java.lang.Objectantlr.Parser
antlr.LLkParser
antlr.ANTLRTokdefParser
Simple lexer/parser for reading token definition files in support of the import/export vocab option for grammars.
| Field Summary | |
static java.lang.String[] |
_tokenNames
|
static BitSet |
_tokenSet_0
|
static BitSet |
_tokenSet_1
|
| Fields inherited from interface antlr.ANTLRTokdefParserTokenTypes |
ASSIGN, DIGIT, EOF, ESC, ID, INT, LPAREN, ML_COMMENT, NULL_TREE_LOOKAHEAD, RPAREN, SL_COMMENT, STRING, WS, XDIGIT |
| Constructor Summary | |
ANTLRTokdefParser(ParserSharedInputState state)
|
|
ANTLRTokdefParser(TokenBuffer tokenBuf)
|
|
ANTLRTokdefParser(TokenStream lexer)
|
|
| Method Summary | |
void |
file(antlr.ImportVocabTokenManager tm)
|
void |
line(antlr.ImportVocabTokenManager tm)
|
void |
reportError(RecognitionException e)
Delegates the error message to the tool if any was registered via #initTool(antlr.Tool) |
void |
reportError(java.lang.String s)
Delegates the error message to the tool if any was registered via #initTool(antlr.Tool) |
void |
reportWarning(java.lang.String s)
Delegates the warning message to the tool if any was registered via #initTool(antlr.Tool) |
void |
setTool(Tool tool)
In order to make it so existing subclasses don't break, we won't require that the antlr.Tool instance be passed as a constructor element. |
| Methods inherited from class antlr.LLkParser |
consume, LA, LT, traceIn, traceOut |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] _tokenNames
public static final BitSet _tokenSet_0
public static final BitSet _tokenSet_1
| Constructor Detail |
public ANTLRTokdefParser(TokenBuffer tokenBuf)
public ANTLRTokdefParser(TokenStream lexer)
public ANTLRTokdefParser(ParserSharedInputState state)
| Method Detail |
public void setTool(Tool tool)
#initTool(antlr.Tool)
java.lang.IllegalStateException - if a tool has already been registeredpublic void reportError(java.lang.String s)
#initTool(antlr.Tool)
reportError in class Parserpublic void reportError(RecognitionException e)
#initTool(antlr.Tool)
reportError in class Parserpublic void reportWarning(java.lang.String s)
#initTool(antlr.Tool)
reportWarning in class Parser
public final void file(antlr.ImportVocabTokenManager tm)
throws RecognitionException,
TokenStreamException
RecognitionException
TokenStreamException
public final void line(antlr.ImportVocabTokenManager tm)
throws RecognitionException,
TokenStreamException
RecognitionException
TokenStreamException