Class ProtoParser
- java.lang.Object
-
- org.apache.activemq.protobuf.compiler.parser.ProtoParser
-
- All Implemented Interfaces:
ProtoParserConstants
public class ProtoParser extends java.lang.Object implements ProtoParserConstants
This class is generated with JavaCC. Do not modify manually.
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.Token
token
Current token.ProtoParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface org.apache.activemq.protobuf.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
Constructors Constructor Description ProtoParser(java.io.InputStream stream)
Constructor with InputStream.ProtoParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingProtoParser(java.io.Reader stream)
Constructor.ProtoParser(ProtoParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
-
-
-
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(java.io.InputStream stream)
Constructor with InputStream.
-
ProtoParser
public ProtoParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
ProtoParser
public ProtoParser(java.io.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 java.lang.String Rule() throws ParseException
- Throws:
ParseException
-
Value
public final java.lang.String Value() throws ParseException
- Throws:
ParseException
-
ID
public final java.lang.String ID() throws ParseException
- Throws:
ParseException
-
PackageID
public final java.lang.String PackageID() throws ParseException
- Throws:
ParseException
-
StringLitteral
public final java.lang.String StringLitteral() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.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.
-
-