org.fusesource.hawtbuf.proto.compiler.parser
Class ProtoParser

java.lang.Object
  extended by org.fusesource.hawtbuf.proto.compiler.parser.ProtoParser
All Implemented Interfaces:
ProtoParserConstants

public class ProtoParser
extends Object
implements ProtoParserConstants

This class is generated with JavaCC. Do not modify manually.


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 ProtoParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface org.fusesource.hawtbuf.proto.compiler.parser.ProtoParserConstants
COMMA, COMMENT, DECIMAL_LITERAL, DEFAULT, ENUM, EOF, EQUALS, EXPONENT, EXTEND, EXTENSIONS, FLOAT, GROUP, HEX_LITERAL, ID, IMPORT, INTEGER, LBRACE, LBRACKET, LPAREN, MAX, MESSAGE, OCTAL_LITERAL, OPTION, OPTIONAL, PACKAGE, PERIOD, RBRACE, RBRACKET, REPEATED, REQURIED, RETURNS, RPAREN, RPC, SEMICOLON, SERVICE, STRING, TO, tokenImage
 
Constructor Summary
ProtoParser(InputStream stream)
          Constructor with InputStream.
ProtoParser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
ProtoParser(ProtoParserTokenManager tm)
          Constructor with generated Token Manager.
ProtoParser(Reader stream)
          Constructor.
 
Method Summary
 void disable_tracing()
          Disable tracing.
 void enable_tracing()
          Enable tracing.
 EnumDescriptor EnumDescriptor(ProtoDescriptor proto, MessageDescriptor parent)
           
 EnumFieldDescriptor EnumFieldDescriptor(EnumDescriptor parent)
          Parses something like: optional string foo = 1;
 MessageDescriptor ExtendDescriptor(ProtoDescriptor proto, MessageDescriptor parent)
           
 ExtensionsDescriptor ExtensionsDescriptor(MessageDescriptor parent)
           
 FieldDescriptor FieldDescriptor(MessageDescriptor parent)
          Parses something like: optional string foo = 1;
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 String ID()
           
 int Integer()
           
 MessageDescriptor MessageDescriptor(ProtoDescriptor proto, MessageDescriptor parent)
           
 MethodDescriptor MethodDescriptor(ProtoDescriptor proto)
           
 OptionDescriptor OptionDescriptor()
           
 String PackageID()
           
 ProtoDescriptor ProtoDescriptor()
           
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(ProtoParserTokenManager tm)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 String Rule()
           
 ServiceDescriptor ServiceDescriptor(ProtoDescriptor proto)
           
 String StringLitteral()
           
 String Value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public ProtoParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

ProtoParser

public ProtoParser(InputStream stream)
Constructor with InputStream.


ProtoParser

public ProtoParser(InputStream stream,
                   String encoding)
Constructor with InputStream and supplied encoding


ProtoParser

public ProtoParser(Reader stream)
Constructor.


ProtoParser

public ProtoParser(ProtoParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

ProtoDescriptor

public final ProtoDescriptor ProtoDescriptor()
                                      throws ParseException
Throws:
ParseException

MessageDescriptor

public final MessageDescriptor MessageDescriptor(ProtoDescriptor proto,
                                                 MessageDescriptor parent)
                                          throws ParseException
Throws:
ParseException

FieldDescriptor

public final FieldDescriptor FieldDescriptor(MessageDescriptor parent)
                                      throws ParseException
Parses something like: optional string foo = 1;

Throws:
ParseException

ServiceDescriptor

public final ServiceDescriptor ServiceDescriptor(ProtoDescriptor proto)
                                          throws ParseException
Throws:
ParseException

MethodDescriptor

public final MethodDescriptor MethodDescriptor(ProtoDescriptor proto)
                                        throws ParseException
Throws:
ParseException

OptionDescriptor

public final OptionDescriptor OptionDescriptor()
                                        throws ParseException
Throws:
ParseException

ExtendDescriptor

public final MessageDescriptor ExtendDescriptor(ProtoDescriptor proto,
                                                MessageDescriptor parent)
                                         throws ParseException
Throws:
ParseException

ExtensionsDescriptor

public final ExtensionsDescriptor ExtensionsDescriptor(MessageDescriptor parent)
                                                throws ParseException
Throws:
ParseException

EnumDescriptor

public final EnumDescriptor EnumDescriptor(ProtoDescriptor proto,
                                           MessageDescriptor parent)
                                    throws ParseException
Throws:
ParseException

EnumFieldDescriptor

public final EnumFieldDescriptor EnumFieldDescriptor(EnumDescriptor parent)
                                              throws ParseException
Parses something like: optional string foo = 1;

Throws:
ParseException

Integer

public final int Integer()
                  throws ParseException
Throws:
ParseException

Rule

public final String Rule()
                  throws ParseException
Throws:
ParseException

Value

public final String Value()
                   throws ParseException
Throws:
ParseException

ID

public final String ID()
                throws ParseException
Throws:
ParseException

PackageID

public final String PackageID()
                       throws ParseException
Throws:
ParseException

StringLitteral

public final String StringLitteral()
                            throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)
Reinitialise.


ReInit

public void ReInit(InputStream stream,
                   String encoding)
Reinitialise.


ReInit

public void ReInit(Reader stream)
Reinitialise.


ReInit

public void ReInit(ProtoParserTokenManager tm)
Reinitialise.


getNextToken

public final Token getNextToken()
Get the next Token.


getToken

public final Token getToken(int index)
Get the specific Token.


generateParseException

public ParseException generateParseException()
Generate ParseException.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.



Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.