antlr
Class ANTLRTokdefParser
java.lang.Object
antlr.Parser
antlr.LLkParser
antlr.ANTLRTokdefParser
- All Implemented Interfaces:
- ANTLRTokdefParserTokenTypes
public class ANTLRTokdefParser
- extends LLkParser
- implements ANTLRTokdefParserTokenTypes
Simple lexer/parser for reading token definition files
in support of the import/export vocab option for grammars.
Fields inherited from interface antlr.ANTLRTokdefParserTokenTypes |
ASSIGN, DIGIT, EOF, ESC, ID, INT, LPAREN, ML_COMMENT, NULL_TREE_LOOKAHEAD, RPAREN, SL_COMMENT, STRING, WS, XDIGIT |
Methods inherited from class antlr.Parser |
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_tokenNames
public static final String[] _tokenNames
_tokenSet_0
public static final BitSet _tokenSet_0
_tokenSet_1
public static final BitSet _tokenSet_1
ANTLRTokdefParser
protected ANTLRTokdefParser(TokenBuffer tokenBuf,
int k)
ANTLRTokdefParser
public ANTLRTokdefParser(TokenBuffer tokenBuf)
ANTLRTokdefParser
protected ANTLRTokdefParser(TokenStream lexer,
int k)
ANTLRTokdefParser
public ANTLRTokdefParser(TokenStream lexer)
ANTLRTokdefParser
public ANTLRTokdefParser(ParserSharedInputState state)
setTool
public 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. Instead,
the antlr.Tool instance should register itself via
#initTool(antlr.Tool)
- Throws:
IllegalStateException
- if a tool has already been registered- Since:
- 2.7.2
getTool
protected Tool getTool()
- Since:
- 2.7.2
reportError
public void reportError(String s)
- Delegates the error message to the tool if any was registered via
#initTool(antlr.Tool)
- Overrides:
reportError
in class Parser
- Since:
- 2.7.2
reportError
public void reportError(RecognitionException e)
- Delegates the error message to the tool if any was registered via
#initTool(antlr.Tool)
- Overrides:
reportError
in class Parser
- Since:
- 2.7.2
reportWarning
public void reportWarning(String s)
- Delegates the warning message to the tool if any was registered via
#initTool(antlr.Tool)
- Overrides:
reportWarning
in class Parser
- Since:
- 2.7.2
file
public final void file(ImportVocabTokenManager tm)
throws RecognitionException,
TokenStreamException
- Throws:
RecognitionException
TokenStreamException
line
public final void line(ImportVocabTokenManager tm)
throws RecognitionException,
TokenStreamException
- Throws:
RecognitionException
TokenStreamException