Package org.antlr.v4.parse
Class ToolANTLRParser
- java.lang.Object
-
- org.antlr.runtime.BaseRecognizer
-
- org.antlr.runtime.Parser
-
- org.antlr.v4.parse.ANTLRParser
-
- org.antlr.v4.parse.ToolANTLRParser
-
public class ToolANTLRParser extends ANTLRParser
Override error handling for use with ANTLR tool itself; leaves nothing in grammar associated with Tool so others can use in IDEs, ...
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.antlr.v4.parse.ANTLRParser
ANTLRParser.action_return, ANTLRParser.actionElement_return, ANTLRParser.actionScopeName_return, ANTLRParser.alternative_return, ANTLRParser.alternativeEntry_return, ANTLRParser.altList_return, ANTLRParser.atom_return, ANTLRParser.block_return, ANTLRParser.blockEntry_return, ANTLRParser.blockSet_return, ANTLRParser.blockSuffix_return, ANTLRParser.channelsSpec_return, ANTLRParser.delegateGrammar_return, ANTLRParser.delegateGrammars_return, ANTLRParser.ebnf_return, ANTLRParser.ebnfSuffix_return, ANTLRParser.element_return, ANTLRParser.elementEntry_return, ANTLRParser.elementOption_return, ANTLRParser.elementOptions_return, ANTLRParser.exceptionGroup_return, ANTLRParser.exceptionHandler_return, ANTLRParser.finallyClause_return, ANTLRParser.grammarSpec_return, ANTLRParser.grammarType_return, ANTLRParser.id_return, ANTLRParser.labeledAlt_return, ANTLRParser.labeledElement_return, ANTLRParser.lexerAlt_return, ANTLRParser.lexerAltList_return, ANTLRParser.lexerAtom_return, ANTLRParser.lexerBlock_return, ANTLRParser.lexerCommand_return, ANTLRParser.lexerCommandExpr_return, ANTLRParser.lexerCommandName_return, ANTLRParser.lexerCommands_return, ANTLRParser.lexerElement_return, ANTLRParser.lexerElements_return, ANTLRParser.lexerRule_return, ANTLRParser.lexerRuleBlock_return, ANTLRParser.localsSpec_return, ANTLRParser.modeSpec_return, ANTLRParser.notSet_return, ANTLRParser.option_return, ANTLRParser.optionsSpec_return, ANTLRParser.optionValue_return, ANTLRParser.parserRule_return, ANTLRParser.prequelConstruct_return, ANTLRParser.qid_return, ANTLRParser.range_return, ANTLRParser.rule_return, ANTLRParser.ruleAction_return, ANTLRParser.ruleAltList_return, ANTLRParser.ruleBlock_return, ANTLRParser.ruleEntry_return, ANTLRParser.rulePrequel_return, ANTLRParser.rulePrequels_return, ANTLRParser.ruleref_return, ANTLRParser.ruleReturns_return, ANTLRParser.rules_return, ANTLRParser.setElement_return, ANTLRParser.sync_return, ANTLRParser.terminal_return, ANTLRParser.throwsSpec_return, ANTLRParser.tokensSpec_return, ANTLRParser.wildcard_return
-
-
Field Summary
Fields Modifier and Type Field Description Tool
tool
-
Fields inherited from class org.antlr.v4.parse.ANTLRParser
ACTION, ACTION_CHAR_LITERAL, ACTION_ESC, ACTION_STRING_LITERAL, adaptor, ALT, ARG_ACTION, ARG_OR_CHARSET, ASSIGN, AT, BLOCK, CATCH, CHANNELS, CLOSURE, COLON, COLONCOLON, COMBINED, COMMA, COMMENT, DOC_COMMENT, DOLLAR, DOT, ELEMENT_OPTIONS, EOF, EPSILON, ERRCHAR, ESC_SEQ, FINALLY, FOLLOW_ACTION_in_action1068, FOLLOW_ACTION_in_actionElement2774, FOLLOW_ACTION_in_actionElement2784, FOLLOW_ACTION_in_exceptionHandler1545, FOLLOW_ACTION_in_finallyClause1574, FOLLOW_ACTION_in_optionValue890, FOLLOW_action_in_prequelConstruct776, FOLLOW_ACTION_in_ruleAction1756, FOLLOW_actionElement_in_element2748, FOLLOW_actionElement_in_lexerElement2234, FOLLOW_actionScopeName_in_action1060, FOLLOW_alternative_in_alternativeEntry3854, FOLLOW_alternative_in_altList2476, FOLLOW_alternative_in_altList2481, FOLLOW_alternative_in_labeledAlt1853, FOLLOW_altList_in_block3475, FOLLOW_ARG_ACTION_in_exceptionHandler1543, FOLLOW_ARG_ACTION_in_localsSpec1729, FOLLOW_ARG_ACTION_in_parserRule1329, FOLLOW_ARG_ACTION_in_ruleref3535, FOLLOW_ARG_ACTION_in_ruleReturns1666, FOLLOW_ASSIGN_in_delegateGrammar957, FOLLOW_ASSIGN_in_elementOption3757, FOLLOW_ASSIGN_in_labeledElement2843, FOLLOW_ASSIGN_in_option831, FOLLOW_AT_in_action1057, FOLLOW_AT_in_ruleAction1752, FOLLOW_atom_in_element2691, FOLLOW_atom_in_labeledElement2854, FOLLOW_block_in_blockEntry3885, FOLLOW_block_in_ebnf2912, FOLLOW_block_in_labeledElement2876, FOLLOW_blockSet_in_notSet3308, FOLLOW_blockSuffix_in_ebnf2936, FOLLOW_CATCH_in_exceptionHandler1541, FOLLOW_CHANNELS_in_channelsSpec1027, FOLLOW_channelsSpec_in_prequelConstruct739, FOLLOW_COLON_in_block3462, FOLLOW_COLON_in_lexerBlock2284, FOLLOW_COLON_in_lexerRule1913, FOLLOW_COLON_in_parserRule1397, FOLLOW_COLONCOLON_in_action1062, FOLLOW_COMMA_in_channelsSpec1033, FOLLOW_COMMA_in_delegateGrammars922, FOLLOW_COMMA_in_elementOptions3691, FOLLOW_COMMA_in_lexerCommands2349, FOLLOW_COMMA_in_throwsSpec1699, FOLLOW_COMMA_in_tokensSpec989, FOLLOW_delegateGrammar_in_delegateGrammars919, FOLLOW_delegateGrammar_in_delegateGrammars924, FOLLOW_delegateGrammars_in_prequelConstruct685, FOLLOW_DOT_in_qid3835, FOLLOW_DOT_in_wildcard3236, FOLLOW_ebnf_in_element2743, FOLLOW_ebnfSuffix_in_blockSuffix2986, FOLLOW_ebnfSuffix_in_element2645, FOLLOW_ebnfSuffix_in_element2697, FOLLOW_ebnfSuffix_in_lexerElement2154, FOLLOW_ebnfSuffix_in_lexerElement2206, FOLLOW_element_in_alternative2524, FOLLOW_element_in_elementEntry3865, FOLLOW_elementOption_in_elementOptions3688, FOLLOW_elementOption_in_elementOptions3693, FOLLOW_elementOptions_in_actionElement2786, FOLLOW_elementOptions_in_actionElement2816, FOLLOW_elementOptions_in_alternative2515, FOLLOW_elementOptions_in_ruleref3538, FOLLOW_elementOptions_in_setElement3390, FOLLOW_elementOptions_in_setElement3402, FOLLOW_elementOptions_in_terminal3631, FOLLOW_elementOptions_in_terminal3654, FOLLOW_elementOptions_in_wildcard3238, FOLLOW_EOF_in_alternativeEntry3856, FOLLOW_EOF_in_blockEntry3887, FOLLOW_EOF_in_elementEntry3867, FOLLOW_EOF_in_grammarSpec398, FOLLOW_EOF_in_ruleEntry3877, FOLLOW_exceptionGroup_in_parserRule1438, FOLLOW_exceptionHandler_in_exceptionGroup1521, FOLLOW_FINALLY_in_finallyClause1572, FOLLOW_finallyClause_in_exceptionGroup1524, FOLLOW_FRAGMENT_in_lexerRule1894, FOLLOW_GRAMMAR_in_grammarType572, FOLLOW_GRAMMAR_in_grammarType599, FOLLOW_GRAMMAR_in_grammarType620, FOLLOW_grammarType_in_grammarSpec281, FOLLOW_GT_in_elementOptions3699, FOLLOW_id_in_action1066, FOLLOW_id_in_actionScopeName1097, FOLLOW_id_in_channelsSpec1030, FOLLOW_id_in_channelsSpec1036, FOLLOW_id_in_delegateGrammar955, FOLLOW_id_in_delegateGrammar960, FOLLOW_id_in_delegateGrammar970, FOLLOW_id_in_elementOption3755, FOLLOW_id_in_grammarSpec283, FOLLOW_id_in_labeledAlt1862, FOLLOW_id_in_labeledElement2838, FOLLOW_id_in_lexerCommandExpr2401, FOLLOW_id_in_lexerCommandName2430, FOLLOW_id_in_modeSpec1138, FOLLOW_id_in_option829, FOLLOW_id_in_qid3832, FOLLOW_id_in_qid3837, FOLLOW_id_in_ruleAction1754, FOLLOW_id_in_tokensSpec986, FOLLOW_id_in_tokensSpec991, FOLLOW_IMPORT_in_delegateGrammars917, FOLLOW_INT_in_lexerCommandExpr2406, FOLLOW_INT_in_optionValue901, FOLLOW_labeledAlt_in_ruleAltList1830, FOLLOW_labeledAlt_in_ruleAltList1835, FOLLOW_labeledElement_in_element2639, FOLLOW_LEXER_CHAR_SET_in_lexerAtom3110, FOLLOW_LEXER_CHAR_SET_in_setElement3418, FOLLOW_LEXER_in_actionScopeName1102, FOLLOW_LEXER_in_grammarType568, FOLLOW_lexerAlt_in_lexerAltList2020, FOLLOW_lexerAlt_in_lexerAltList2025, FOLLOW_lexerAltList_in_lexerBlock2297, FOLLOW_lexerAltList_in_lexerRuleBlock1984, FOLLOW_lexerAtom_in_lexerElement2148, FOLLOW_lexerBlock_in_lexerElement2200, FOLLOW_lexerCommand_in_lexerCommands2346, FOLLOW_lexerCommand_in_lexerCommands2351, FOLLOW_lexerCommandExpr_in_lexerCommand2373, FOLLOW_lexerCommandName_in_lexerCommand2369, FOLLOW_lexerCommandName_in_lexerCommand2390, FOLLOW_lexerCommands_in_lexerAlt2049, FOLLOW_lexerElement_in_lexerElements2092, FOLLOW_lexerElements_in_lexerAlt2043, FOLLOW_lexerRule_in_modeSpec1145, FOLLOW_lexerRule_in_rule1250, FOLLOW_lexerRuleBlock_in_lexerRule1915, FOLLOW_LOCALS_in_localsSpec1726, FOLLOW_localsSpec_in_parserRule1350, FOLLOW_LPAREN_in_block3442, FOLLOW_LPAREN_in_blockSet3343, FOLLOW_LPAREN_in_lexerBlock2270, FOLLOW_LPAREN_in_lexerCommand2371, FOLLOW_LT_in_elementOptions3685, FOLLOW_MODE_in_lexerCommandName2448, FOLLOW_MODE_in_modeSpec1136, FOLLOW_modeSpec_in_grammarSpec360, FOLLOW_NOT_in_notSet3276, FOLLOW_NOT_in_notSet3306, FOLLOW_notSet_in_atom3180, FOLLOW_notSet_in_lexerAtom3094, FOLLOW_option_in_optionsSpec794, FOLLOW_OPTIONS_in_optionsSpec791, FOLLOW_optionsSpec_in_block3454, FOLLOW_optionsSpec_in_lexerBlock2282, FOLLOW_optionsSpec_in_lexerRule1906, FOLLOW_optionsSpec_in_prequelConstruct662, FOLLOW_optionsSpec_in_rulePrequel1635, FOLLOW_optionValue_in_elementOption3760, FOLLOW_optionValue_in_option834, FOLLOW_OR_in_altList2479, FOLLOW_OR_in_blockSet3348, FOLLOW_OR_in_lexerAltList2023, FOLLOW_OR_in_ruleAltList1833, FOLLOW_PARSER_in_actionScopeName1117, FOLLOW_PARSER_in_grammarType595, FOLLOW_parserRule_in_rule1245, FOLLOW_PLUS_ASSIGN_in_labeledElement2847, FOLLOW_PLUS_in_ebnfSuffix3043, FOLLOW_POUND_in_labeledAlt1859, FOLLOW_prequelConstruct_in_grammarSpec327, FOLLOW_qid_in_elementOption3747, FOLLOW_qid_in_optionValue877, FOLLOW_qid_in_throwsSpec1696, FOLLOW_qid_in_throwsSpec1701, FOLLOW_QUESTION_in_ebnfSuffix3001, FOLLOW_QUESTION_in_ebnfSuffix3005, FOLLOW_QUESTION_in_ebnfSuffix3025, FOLLOW_QUESTION_in_ebnfSuffix3047, FOLLOW_range_in_atom3155, FOLLOW_range_in_lexerAtom3068, FOLLOW_RANGE_in_range3599, FOLLOW_range_in_setElement3408, FOLLOW_RARROW_in_lexerCommands2344, FOLLOW_RBRACE_in_channelsSpec1040, FOLLOW_RBRACE_in_optionsSpec800, FOLLOW_RBRACE_in_tokensSpec1014, FOLLOW_RBRACE_in_tokensSpec995, FOLLOW_RETURNS_in_ruleReturns1663, FOLLOW_RPAREN_in_block3479, FOLLOW_RPAREN_in_blockSet3354, FOLLOW_RPAREN_in_lexerBlock2307, FOLLOW_RPAREN_in_lexerCommand2375, FOLLOW_rule_in_ruleEntry3875, FOLLOW_rule_in_rules1181, FOLLOW_RULE_REF_in_id3791, FOLLOW_RULE_REF_in_lexerAtom3083, FOLLOW_RULE_REF_in_parserRule1299, FOLLOW_RULE_REF_in_ruleref3533, FOLLOW_ruleAction_in_block3459, FOLLOW_ruleAction_in_rulePrequel1643, FOLLOW_ruleAltList_in_ruleBlock1794, FOLLOW_ruleBlock_in_parserRule1420, FOLLOW_rulePrequel_in_rulePrequels1609, FOLLOW_rulePrequels_in_parserRule1388, FOLLOW_ruleref_in_atom3172, FOLLOW_ruleReturns_in_parserRule1336, FOLLOW_rules_in_grammarSpec354, FOLLOW_SEMI_in_delegateGrammars928, FOLLOW_SEMI_in_grammarSpec285, FOLLOW_SEMI_in_lexerRule1917, FOLLOW_SEMI_in_modeSpec1140, FOLLOW_SEMI_in_optionsSpec796, FOLLOW_SEMI_in_parserRule1429, FOLLOW_SEMPRED_in_actionElement2804, FOLLOW_SEMPRED_in_actionElement2814, FOLLOW_setElement_in_blockSet3345, FOLLOW_setElement_in_blockSet3350, FOLLOW_setElement_in_notSet3278, FOLLOW_STAR_in_ebnfSuffix3021, FOLLOW_STRING_LITERAL_in_optionValue885, FOLLOW_STRING_LITERAL_in_range3594, FOLLOW_STRING_LITERAL_in_range3605, FOLLOW_STRING_LITERAL_in_setElement3396, FOLLOW_STRING_LITERAL_in_terminal3652, FOLLOW_sync_in_grammarSpec323, FOLLOW_sync_in_grammarSpec329, FOLLOW_sync_in_modeSpec1142, FOLLOW_sync_in_modeSpec1147, FOLLOW_sync_in_rulePrequels1606, FOLLOW_sync_in_rulePrequels1611, FOLLOW_sync_in_rules1178, FOLLOW_sync_in_rules1183, FOLLOW_terminal_in_atom3162, FOLLOW_terminal_in_lexerAtom3073, FOLLOW_THROWS_in_throwsSpec1694, FOLLOW_throwsSpec_in_parserRule1343, FOLLOW_TOKEN_REF_in_id3804, FOLLOW_TOKEN_REF_in_lexerRule1900, FOLLOW_TOKEN_REF_in_setElement3384, FOLLOW_TOKEN_REF_in_terminal3629, FOLLOW_TOKENS_SPEC_in_tokensSpec1012, FOLLOW_TOKENS_SPEC_in_tokensSpec984, FOLLOW_tokensSpec_in_prequelConstruct729, FOLLOW_wildcard_in_atom3188, FOLLOW_wildcard_in_lexerAtom3102, FRAGMENT, GRAMMAR, GT, HEX_DIGIT, ID, IMPORT, INT, LEXER, LEXER_ACTION_CALL, LEXER_ALT_ACTION, LEXER_CHAR_SET, LOCALS, LPAREN, LT, MODE, NameChar, NameStartChar, NESTED_ACTION, NLCHARS, NOT, OPTIONAL, OPTIONS, OR, PARSER, PLUS, PLUS_ASSIGN, POSITIVE_CLOSURE, POUND, QUESTION, RANGE, RARROW, RBRACE, RETURNS, RPAREN, RULE, RULE_REF, RULEMODIFIERS, RULES, SEMI, SEMPRED, SET, SRC, STAR, STRING_LITERAL, THROWS, TOKEN_REF, tokenNames, TOKENS_SPEC, UNICODE_ESC, UNICODE_EXTENDED_ESC, UnicodeBOM, WILDCARD, WS, WSCHARS, WSNLCHARS
-
-
Constructor Summary
Constructors Constructor Description ToolANTLRParser(org.antlr.runtime.TokenStream input, Tool tool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayRecognitionError(String[] tokenNames, org.antlr.runtime.RecognitionException e)
String
getParserErrorMessage(org.antlr.runtime.Parser parser, org.antlr.runtime.RecognitionException e)
void
grammarError(ErrorType etype, org.antlr.runtime.Token token, Object... args)
-
Methods inherited from class org.antlr.v4.parse.ANTLRParser
action, actionElement, actionScopeName, alternative, alternativeEntry, altList, atom, block, blockEntry, blockSet, blockSuffix, channelsSpec, delegateGrammar, delegateGrammars, ebnf, ebnfSuffix, element, elementEntry, elementOption, elementOptions, exceptionGroup, exceptionHandler, finallyClause, getDelegates, getGrammarFileName, getTokenNames, getTreeAdaptor, grammarSpec, grammarType, id, labeledAlt, labeledElement, lexerAlt, lexerAltList, lexerAtom, lexerBlock, lexerCommand, lexerCommandExpr, lexerCommandName, lexerCommands, lexerElement, lexerElements, lexerRule, lexerRuleBlock, localsSpec, modeSpec, notSet, option, optionsSpec, optionValue, parserRule, prequelConstruct, qid, range, rule, ruleAction, ruleAltList, ruleBlock, ruleEntry, rulePrequel, rulePrequels, ruleref, ruleReturns, rules, setElement, setTreeAdaptor, sync, terminal, throwsSpec, tokensSpec, wildcard
-
Methods inherited from class org.antlr.runtime.Parser
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOut
-
Methods inherited from class org.antlr.runtime.BaseRecognizer
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, emitErrorMessage, endResync, failed, getBacktrackingLevel, getErrorHeader, getErrorMessage, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, reportError, setBacktrackingLevel, toStrings, traceIn, traceOut
-
-
-
-
Field Detail
-
tool
public Tool tool
-
-
Constructor Detail
-
ToolANTLRParser
public ToolANTLRParser(org.antlr.runtime.TokenStream input, Tool tool)
-
-
Method Detail
-
displayRecognitionError
public void displayRecognitionError(String[] tokenNames, org.antlr.runtime.RecognitionException e)
- Overrides:
displayRecognitionError
in classorg.antlr.runtime.BaseRecognizer
-
getParserErrorMessage
public String getParserErrorMessage(org.antlr.runtime.Parser parser, org.antlr.runtime.RecognitionException e)
-
grammarError
public void grammarError(ErrorType etype, org.antlr.runtime.Token token, Object... args)
- Overrides:
grammarError
in classANTLRParser
-
-