Example usage for Java org.antlr.v4.runtime Parser fields, constructors, methods, implement or subclass
The text is from its open source code.
Token | consume() Consume and return the #getCurrentToken current symbol . |
boolean | getBuildParseTree() Gets whether or not a complete parse tree will be constructed while parsing. |
ParserRuleContext | getContext() |
Token | getCurrentToken() Match needs to return the current input symbol, which gets put into the label for the associated token ref; e.g., x=ID. |
IntervalSet | getExpectedTokens() Computes the set of input symbols which could follow the current parser state and context, as given by #getState and #getContext , respectively. |
TokenStream | getInputStream() |
List | getRuleInvocationStack() Return List<String> of the rule names in your parser instance leading up to a call to the current rule. |
List | getRuleInvocationStack(RuleContext p) |
String | getSourceName() |
TokenFactory> | getTokenFactory() |
TokenStream | getTokenStream() |
boolean | isExpectedToken(int symbol) Checks whether or not symbol can follow the current state in the ATN. |
void | notifyErrorListeners(Token offendingToken, String msg, RecognitionException e) |
void | notifyErrorListeners(String msg) |
void | setBuildParseTree(boolean buildParseTrees) Track the ParserRuleContext objects during the parse and hook them up using the ParserRuleContext#children list so that it forms a parse tree. |
void | setErrorHandler(ANTLRErrorStrategy handler) |
void | setInputStream(IntStream input) |