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 voidstatic voidSave this tree in a postscript filestatic voidSave 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 TypeClassDescriptionclassA parser simulator that mimics what ANTLR's generated parser code does.Methods in org.antlr.v4.runtime with parameters of type ParserModifier and TypeMethodDescriptionprotected voidDefaultErrorStrategy.beginErrorCondition(Parser recognizer) This method is called to enter error recovery mode when a recognition exception is reported.protected voidDefaultErrorStrategy.consumeUntil(Parser recognizer, IntervalSet set) Consume tokens until one matches the given token set.protected voidDefaultErrorStrategy.endErrorCondition(Parser recognizer) This method is called to leave error recovery mode after recovering from a recognition exception.protected StringDiagnosticErrorListener.getDecisionDescription(Parser recognizer, DFA dfa) protected IntervalSetDefaultErrorStrategy.getErrorRecoverySet(Parser recognizer) protected IntervalSetDefaultErrorStrategy.getExpectedTokens(Parser recognizer) protected TokenDefaultErrorStrategy.getMissingSymbol(Parser recognizer) Conjure up a missing token during error recovery.booleanANTLRErrorStrategy.inErrorRecoveryMode(Parser recognizer) Tests whether or notrecognizeris in the process of recovering from an error.booleanDefaultErrorStrategy.inErrorRecoveryMode(Parser recognizer) Tests whether or notrecognizeris in the process of recovering from an error.voidANTLRErrorStrategy.recover(Parser recognizer, RecognitionException e) This method is called to recover from exceptione.voidBailErrorStrategy.recover(Parser recognizer, RecognitionException e) Instead of recovering from exceptione, re-throw it wrapped in aParseCancellationExceptionso it is not caught by the rule function catches.voidDefaultErrorStrategy.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).voidANTLRErrorListener.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.voidBaseErrorListener.reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) voidDiagnosticErrorListener.reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) voidProxyErrorListener.reportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, boolean exact, BitSet ambigAlts, ATNConfigSet configs) voidANTLRErrorListener.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.voidBaseErrorListener.reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) voidDiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) voidProxyErrorListener.reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex, BitSet conflictingAlts, ATNConfigSet configs) voidANTLRErrorListener.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.voidBaseErrorListener.reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) voidDiagnosticErrorListener.reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) voidProxyErrorListener.reportContextSensitivity(Parser recognizer, DFA dfa, int startIndex, int stopIndex, int prediction, ATNConfigSet configs) voidANTLRErrorStrategy.reportError(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException.voidDefaultErrorStrategy.reportError(Parser recognizer, RecognitionException e) Report any kind ofRecognitionException.protected voidDefaultErrorStrategy.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 voidDefaultErrorStrategy.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.voidANTLRErrorStrategy.reportMatch(Parser recognizer) This method is called by when the parser successfully matches an input symbol.voidDefaultErrorStrategy.reportMatch(Parser recognizer) This method is called by when the parser successfully matches an input symbol.protected voidDefaultErrorStrategy.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 voidDefaultErrorStrategy.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 voidDefaultErrorStrategy.reportUnwantedToken(Parser recognizer) This method is called to report a syntax error which requires the removal of a token from the input stream.voidReset the error handler state for the specifiedrecognizer.voidReset the error handler state for the specifiedrecognizer.protected TokenDefaultErrorStrategy.singleTokenDeletion(Parser recognizer) This method implements the single-token deletion inline error recovery strategy.protected booleanDefaultErrorStrategy.singleTokenInsertion(Parser recognizer) This method implements the single-token insertion inline error recovery strategy.voidThis method provides the error handler with an opportunity to handle syntactic or semantic errors in the input stream before they result in aRecognitionException.voidMake sure we don't attempt to recover from problems in subrules.voidThe 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 StringTrees.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 StringTrees.toStringTree(Tree t, Parser recog) Print out a whole tree in LISP form. -
Uses of Parser in org.antlr.v4.runtime.tree.pattern
Fields in org.antlr.v4.runtime.tree.pattern declared as ParserModifier and TypeFieldDescriptionprivate final ParserParseTreePatternMatcher.parserThis is the backing field forParseTreePatternMatcher.getParser().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 TypeClassDescriptionclassA heavier weightParserInterpreterthat creates parse trees that track alternative numbers for subtree roots.Methods in org.antlr.v4.tool with parameters of type ParserModifier and TypeMethodDescriptionstatic ParserInterpreterGrammarParserInterpreter.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.voidGrammarParserInterpreter.BailButConsumeErrorStrategy.recover(Parser recognizer, RecognitionException e) GrammarParserInterpreter.BailButConsumeErrorStrategy.recoverInline(Parser recognizer) void