Uses of Class
org.antlr.v4.runtime.Parser
Packages that use Parser
Package
Description
-
Uses of Parser in org.antlr.v4.gui
Methods in org.antlr.v4.gui with parameters of type ParserModifier and TypeMethodDescriptionCall this method to view a parse tree in a dialog box visually.protected void
static void
Save this tree in a postscript filestatic void
Save this tree in a postscript file using a particular font name and sizeMethod parameters in org.antlr.v4.gui with type arguments of type Parser -
Uses of Parser in org.antlr.v4.runtime
Subclasses of Parser in org.antlr.v4.runtimeModifier and TypeClassDescriptionclass
A parser simulator that mimics what ANTLR's generated parser code does.Methods in org.antlr.v4.runtime with parameters of type ParserModifier and TypeMethodDescriptionprotected void
DefaultErrorStrategy.beginErrorCondition
(Parser recognizer) This method is called to enter error recovery mode when a recognition exception is reported.protected void
DefaultErrorStrategy.consumeUntil
(Parser recognizer, IntervalSet set) Consume tokens until one matches the given token set.protected void
DefaultErrorStrategy.endErrorCondition
(Parser recognizer) This method is called to leave error recovery mode after recovering from a recognition exception.protected String
DiagnosticErrorListener.getDecisionDescription
(Parser recognizer, DFA dfa) protected IntervalSet
DefaultErrorStrategy.getErrorRecoverySet
(Parser recognizer) protected IntervalSet
DefaultErrorStrategy.getExpectedTokens
(Parser recognizer) protected Token
DefaultErrorStrategy.getMissingSymbol
(Parser recognizer) Conjure up a missing token during error recovery.boolean
ANTLRErrorStrategy.inErrorRecoveryMode
(Parser recognizer) Tests whether or notrecognizer
is in the process of recovering from an error.boolean
DefaultErrorStrategy.inErrorRecoveryMode
(Parser recognizer) Tests whether or notrecognizer
is in the process of recovering from an error.void
ANTLRErrorStrategy.recover
(Parser recognizer, RecognitionException e) This method is called to recover from exceptione
.void
BailErrorStrategy.recover
(Parser recognizer, RecognitionException e) Instead of recovering from exceptione
, re-throw it wrapped in aParseCancellationException
so it is not caught by the rule function catches.void
DefaultErrorStrategy.recover
(Parser recognizer, RecognitionException e) This method is called to recover from exceptione
.ANTLRErrorStrategy.recoverInline
(Parser recognizer) This method is called when an unexpected symbol is encountered during an inline match operation, such asmatch(int)
.BailErrorStrategy.recoverInline
(Parser recognizer) Make sure we don't attempt to recover inline; if the parser successfully recovers, it won't throw an exception.DefaultErrorStrategy.recoverInline
(Parser recognizer) This method is called when an unexpected symbol is encountered during an inline match operation, such asmatch(int)
.void
ANTLRErrorListener.reportAmbiguity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) This method is called by the parser when a full-context prediction results in an ambiguity.void
BaseErrorListener.reportAmbiguity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) void
DiagnosticErrorListener.reportAmbiguity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) void
ProxyErrorListener.reportAmbiguity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) void
ANTLRErrorListener.reportAttemptingFullContext
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) This method is called when an SLL conflict occurs and the parser is about to use the full context information to make an LL decision.void
BaseErrorListener.reportAttemptingFullContext
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) void
DiagnosticErrorListener.reportAttemptingFullContext
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) void
ProxyErrorListener.reportAttemptingFullContext
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) void
ANTLRErrorListener.reportContextSensitivity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) This method is called by the parser when a full-context prediction has a unique result.void
BaseErrorListener.reportContextSensitivity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) void
DiagnosticErrorListener.reportContextSensitivity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) void
ProxyErrorListener.reportContextSensitivity
(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) void
ANTLRErrorStrategy.reportError
(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException
.void
DefaultErrorStrategy.reportError
(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException
.protected void
DefaultErrorStrategy.reportFailedPredicate
(Parser recognizer, FailedPredicateException e) This is called byDefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException)
when the exception is aFailedPredicateException
.protected void
DefaultErrorStrategy.reportInputMismatch
(Parser recognizer, InputMismatchException e) This is called byDefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException)
when the exception is anInputMismatchException
.void
ANTLRErrorStrategy.reportMatch
(Parser recognizer) This method is called by when the parser successfully matches an input symbol.void
DefaultErrorStrategy.reportMatch
(Parser recognizer) This method is called by when the parser successfully matches an input symbol.protected void
DefaultErrorStrategy.reportMissingToken
(Parser recognizer) This method is called to report a syntax error which requires the insertion of a missing token into the input stream.protected void
DefaultErrorStrategy.reportNoViableAlternative
(Parser recognizer, NoViableAltException e) This is called byDefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException)
when the exception is aNoViableAltException
.protected void
DefaultErrorStrategy.reportUnwantedToken
(Parser recognizer) This method is called to report a syntax error which requires the removal of a token from the input stream.void
Reset the error handler state for the specifiedrecognizer
.void
Reset the error handler state for the specifiedrecognizer
.protected Token
DefaultErrorStrategy.singleTokenDeletion
(Parser recognizer) This method implements the single-token deletion inline error recovery strategy.protected boolean
DefaultErrorStrategy.singleTokenInsertion
(Parser recognizer) This method implements the single-token insertion inline error recovery strategy.void
This method provides the error handler with an opportunity to handle syntactic or semantic errors in the input stream before they result in aRecognitionException
.void
Make sure we don't attempt to recover from problems in subrules.void
The default implementation ofANTLRErrorStrategy.sync(org.antlr.v4.runtime.Parser)
makes sure that the current lookahead symbol is consistent with what were expecting at this point in the ATN.ParserRuleContext.toInfoString
(Parser recognizer) Used for rule context info debugging during parse-time, not so much for ATN debuggingRuleContext.toStringTree
(Parser recog) Print out a whole tree, not just a node, in LISP format (root child1 ..Constructors in org.antlr.v4.runtime with parameters of type ParserModifierConstructorDescriptionFailedPredicateException
(Parser recognizer) FailedPredicateException
(Parser recognizer, String predicate) FailedPredicateException
(Parser recognizer, String predicate, String message) InputMismatchException
(Parser recognizer) InputMismatchException
(Parser recognizer, int state, ParserRuleContext ctx) NoViableAltException
(Parser recognizer) NoViableAltException
(Parser recognizer, TokenStream input, Token startToken, Token offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx) -
Uses of Parser in org.antlr.v4.runtime.atn
Fields in org.antlr.v4.runtime.atn declared as ParserMethods in org.antlr.v4.runtime.atn that return ParserConstructors in org.antlr.v4.runtime.atn with parameters of type ParserModifierConstructorDescriptionParserATNSimulator
(Parser parser, ATN atn, DFA[] decisionToDFA, PredictionContextCache sharedContextCache) ProfilingATNSimulator
(Parser parser) -
Uses of Parser in org.antlr.v4.runtime.tree
Methods in org.antlr.v4.runtime.tree with parameters of type ParserModifier and TypeMethodDescriptionstatic String
Trees.getNodeText
(Tree t, Parser recog) ParseTree.toStringTree
(Parser parser) Specialize toStringTree so that it can print out more information based upon the parser.TerminalNodeImpl.toStringTree
(Parser parser) static String
Trees.toStringTree
(Tree t, Parser recog) Print out a whole tree in LISP form. -
Uses of Parser in org.antlr.v4.runtime.tree.pattern
Methods in org.antlr.v4.runtime.tree.pattern that return ParserModifier and TypeMethodDescriptionParseTreePatternMatcher.getParser()
Used to collect to the grammar file name, token names, rule names for used to parse the pattern into a parse tree.Constructors in org.antlr.v4.runtime.tree.pattern with parameters of type Parser -
Uses of Parser in org.antlr.v4.runtime.tree.xpath
Fields in org.antlr.v4.runtime.tree.xpath declared as ParserMethods in org.antlr.v4.runtime.tree.xpath with parameters of type ParserConstructors in org.antlr.v4.runtime.tree.xpath with parameters of type Parser -
Uses of Parser in org.antlr.v4.tool
Subclasses of Parser in org.antlr.v4.toolModifier and TypeClassDescriptionclass
A heavier weightParserInterpreter
that creates parse trees that track alternative numbers for subtree roots.Methods in org.antlr.v4.tool with parameters of type ParserModifier and TypeMethodDescriptionstatic ParserInterpreter
GrammarParserInterpreter.deriveTempParserInterpreter
(Grammar g, Parser originalParser, TokenStream tokens) Derive a new parser from an old one that has knowledge of the grammar.static List
<ParserRuleContext> GrammarParserInterpreter.getAllPossibleParseTrees
(Grammar g, Parser originalParser, TokenStream tokens, int decision, BitSet alts, int startIndex, int stopIndex, int startRuleIndex) Given an ambiguous parse information, return the list of ambiguous parse trees.void
GrammarParserInterpreter.BailButConsumeErrorStrategy.recover
(Parser recognizer, RecognitionException e) GrammarParserInterpreter.BailButConsumeErrorStrategy.recoverInline
(Parser recognizer) void