Top Description Fields Constructors Methods
org.antlr.v4.semantics

public Class BasicSemanticChecks

extends GrammarTreeVisitor
Class Inheritance
Imports
org.antlr.runtime.Token, org.antlr.runtime.tree.CommonTree, .Tree, org.antlr.v4.misc.Utils, org.antlr.v4.parse.ANTLRParser, .GrammarTreeVisitor, org.antlr.v4.tool.ErrorManager, .ErrorType, .Grammar, .Rule, org.antlr.v4.tool.ast.ActionAST, .AltAST, .BlockAST, .GrammarAST, .GrammarASTWithOptions, .GrammarRootAST, .RuleAST, .RuleRefAST, .TerminalAST, org.stringtemplate.v4.misc.MultiMap, java.io.File, java.util.ArrayList, .List, .Set

No side-effects except for setting options into the appropriate node.

Todo

make the side effects into a separate pass this Invokes check rules for these: FILE_AND_GRAMMAR_NAME_DIFFER LEXER_RULES_NOT_ALLOWED PARSER_RULES_NOT_ALLOWED CANNOT_ALIAS_TOKENS ARGS_ON_TOKEN_REF ILLEGAL_OPTION REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION NO_RULES REWRITE_FOR_MULTI_ELEMENT_ALT HETERO_ILLEGAL_IN_REWRITE_ALT AST_OP_WITH_NON_AST_OUTPUT_OPTION AST_OP_IN_ALT_WITH_REWRITE CONFLICTING_OPTION_IN_TREE_FILTER WILDCARD_AS_ROOT INVALID_IMPORT TOKEN_VOCAB_IN_DELEGATE IMPORT_NAME_CLASH REPEATED_PREQUEL TOKEN_NAMES_MUST_START_UPPER

Field Summary

Modifier and TypeField and Description
public boolean
checkAssocElementOption

When this is true, the semantic checks will report ErrorType#UNRECOGNIZED_ASSOC_OPTION where appropriate.

public ErrorManager
public Grammar
g

private boolean
grammarCaseInsensitive

Value of caseInsensitive option (false if not defined)

private boolean
inFragmentRule

This is true from the time discoverLexerRule is called for a lexer rule with the fragment modifier until exitLexerRule is called.

protected int
nonFragmentRuleCount

This field is used for reporting the ErrorType#MODE_WITHOUT_RULES error when necessary.

public RuleCollector
public static final MultiMap<Integer, Integer>
validImportTypes

Set of valid imports.

Inherited from org.antlr.v4.parse.GrammarTreeVisitor:
ACTIONACTION_CHAR_LITERALACTION_ESCACTION_STRING_LITERALALTARG_ACTIONARG_OR_CHARSETASSIGNATBLOCKCATCHCHANNELSCLOSURECOLONCOLONCOLONCOMBINEDCOMMACOMMENTcurrentModeNamecurrentOuterAltNumbercurrentOuterAltRootcurrentRuleASTcurrentRuleNamedfa38DOC_COMMENTDOLLARDOTELEMENT_OPTIONSEOFEPSILONERRCHARESC_SEQFINALLYFOLLOW_ACTION_in_action596FOLLOW_ACTION_in_actionElement1679FOLLOW_ACTION_in_actionElement1687FOLLOW_ACTION_in_block2430FOLLOW_ACTION_in_element1868FOLLOW_ACTION_in_element1897FOLLOW_ACTION_in_elementOption2733FOLLOW_ACTION_in_exceptionHandler998FOLLOW_ACTION_in_finallyClause1025FOLLOW_ACTION_in_lexerElement1468FOLLOW_ACTION_in_lexerElement1497FOLLOW_action_in_prequelConstruct234FOLLOW_ACTION_in_ruleAction1139FOLLOW_ALT_in_alternative1730FOLLOW_ALT_in_alternative1743FOLLOW_ALT_in_lexerElements1428FOLLOW_alternative_in_block2433FOLLOW_alternative_in_outerAlternative1362FOLLOW_ARG_ACTION_in_exceptionHandler996FOLLOW_ARG_ACTION_in_locals1055FOLLOW_ARG_ACTION_in_rule817FOLLOW_ARG_ACTION_in_ruleref2467FOLLOW_ARG_ACTION_in_ruleReturns1080FOLLOW_ASSIGN_in_delegateGrammar420FOLLOW_ASSIGN_in_elementOption2683FOLLOW_ASSIGN_in_elementOption2707FOLLOW_ASSIGN_in_elementOption2727FOLLOW_ASSIGN_in_elementOption2749FOLLOW_ASSIGN_in_option295FOLLOW_AT_in_action585FOLLOW_AT_in_ruleAction1135FOLLOW_atom_in_astOperand1959FOLLOW_atom_in_element1856FOLLOW_block_in_astOperand1976FOLLOW_BLOCK_in_block2422FOLLOW_block_in_element1937FOLLOW_BLOCK_in_lexerBlock1543FOLLOW_BLOCK_in_lexerRuleBlock1217FOLLOW_BLOCK_in_ruleBlock1281FOLLOW_block_in_subrule2034FOLLOW_block_in_subrule2041FOLLOW_blockSet_in_astOperand1967FOLLOW_blockSet_in_atom2225FOLLOW_blockSet_in_element1928FOLLOW_blockSet_in_lexerAtom1592FOLLOW_blockSet_in_lexerAtom1603FOLLOW_blockSuffix_in_lexerSubrule2066FOLLOW_blockSuffix_in_subrule2032FOLLOW_CATCH_in_exceptionHandler994FOLLOW_CHANNELS_in_channelsSpec532FOLLOW_channelSpec_in_channelsSpec534FOLLOW_channelsSpec_in_prequelConstruct224FOLLOW_delegateGrammar_in_delegateGrammars391FOLLOW_delegateGrammars_in_prequelConstruct204FOLLOW_DOT_in_atom2163FOLLOW_DOT_in_atom2174FOLLOW_ebnfSuffix_in_blockSuffix2102FOLLOW_element_in_alternative1735FOLLOW_element_in_labeledElement2007FOLLOW_ELEMENT_OPTIONS_in_elementOptions2630FOLLOW_elementOption_in_elementOptions2632FOLLOW_elementOptions_in_actionElement1689FOLLOW_elementOptions_in_actionElement1707FOLLOW_elementOptions_in_alternative1732FOLLOW_elementOptions_in_alternative1745FOLLOW_elementOptions_in_atom2190FOLLOW_elementOptions_in_element1899FOLLOW_elementOptions_in_element1912FOLLOW_elementOptions_in_lexerAtom1616FOLLOW_elementOptions_in_lexerElement1499FOLLOW_elementOptions_in_lexerElement1512FOLLOW_elementOptions_in_ruleref2470FOLLOW_elementOptions_in_setElement2288FOLLOW_elementOptions_in_setElement2302FOLLOW_elementOptions_in_terminal2543FOLLOW_elementOptions_in_terminal2582FOLLOW_EPSILON_in_alternative1748FOLLOW_EPSILON_in_lexerElement1520FOLLOW_exceptionGroup_in_rule918FOLLOW_exceptionHandler_in_exceptionGroup965FOLLOW_FINALLY_in_finallyClause1023FOLLOW_finallyClause_in_exceptionGroup968FOLLOW_FRAGMENT_in_lexerRule712FOLLOW_GRAMMAR_in_grammarSpec85FOLLOW_ID_in_action589FOLLOW_ID_in_action594FOLLOW_ID_in_atom2165FOLLOW_ID_in_atom2176FOLLOW_ID_in_channelSpec557FOLLOW_ID_in_delegateGrammar424FOLLOW_ID_in_delegateGrammar428FOLLOW_ID_in_delegateGrammar443FOLLOW_ID_in_elementOption2663FOLLOW_ID_in_elementOption2687FOLLOW_ID_in_elementOption2691FOLLOW_ID_in_elementOption2709FOLLOW_ID_in_elementOption2729FOLLOW_ID_in_elementOption2751FOLLOW_ID_in_grammarSpec87FOLLOW_ID_in_labeledElement2005FOLLOW_ID_in_lexerCommand1776FOLLOW_ID_in_lexerCommand1794FOLLOW_ID_in_mode664FOLLOW_ID_in_option297FOLLOW_ID_in_ruleAction1137FOLLOW_ID_in_throwsSpec1108FOLLOW_ID_in_tokenSpec502FOLLOW_IMPORT_in_delegateGrammars389FOLLOW_INT_in_elementOption2755FOLLOW_labeledElement_in_element1851FOLLOW_LEXER_ACTION_CALL_in_lexerCommand1774FOLLOW_LEXER_ALT_ACTION_in_lexerAlternative1384FOLLOW_LEXER_CHAR_SET_in_lexerAtom1635FOLLOW_LEXER_CHAR_SET_in_setElement2397FOLLOW_lexerAlternative_in_lexerBlock1548FOLLOW_lexerAlternative_in_lexerOuterAlternative1340FOLLOW_lexerAtom_in_lexerElement1456FOLLOW_lexerBlock_in_lexerSubrule2068FOLLOW_lexerBlock_in_lexerSubrule2075FOLLOW_lexerCommand_in_lexerAlternative1388FOLLOW_lexerCommandExpr_in_lexerCommand1778FOLLOW_lexerElement_in_lexerElements1430FOLLOW_lexerElements_in_lexerAlternative1386FOLLOW_lexerElements_in_lexerAlternative1400FOLLOW_lexerOuterAlternative_in_lexerRuleBlock1236FOLLOW_lexerRule_in_mode668FOLLOW_lexerRule_in_rules631FOLLOW_lexerRuleBlock_in_lexerRule745FOLLOW_lexerSubrule_in_lexerElement1461FOLLOW_LOCALS_in_locals1053FOLLOW_locals_in_rule856FOLLOW_mode_in_grammarSpec125FOLLOW_MODE_in_mode662FOLLOW_NOT_in_astOperand1965FOLLOW_NOT_in_astOperand1974FOLLOW_NOT_in_element1926FOLLOW_NOT_in_element1935FOLLOW_NOT_in_lexerAtom1590FOLLOW_option_in_optionsSpec261FOLLOW_OPTIONS_in_optionsSpec259FOLLOW_optionsSpec_in_block2424FOLLOW_optionsSpec_in_lexerBlock1545FOLLOW_optionsSpec_in_lexerRule724FOLLOW_optionsSpec_in_prequelConstruct194FOLLOW_optionsSpec_in_rule871FOLLOW_optionValue_in_option301FOLLOW_outerAlternative_in_ruleBlock1300FOLLOW_prequelConstruct_in_prequelConstructs167FOLLOW_prequelConstructs_in_grammarSpec106FOLLOW_range_in_element1920FOLLOW_range_in_lexerAtom1645FOLLOW_RANGE_in_range2507FOLLOW_RANGE_in_setElement2366FOLLOW_RETURNS_in_ruleReturns1078FOLLOW_RULE_in_lexerRule694FOLLOW_RULE_in_rule790FOLLOW_rule_in_rules629FOLLOW_RULE_REF_in_rule792FOLLOW_RULE_REF_in_ruleref2463FOLLOW_ruleAction_in_block2427FOLLOW_ruleAction_in_rule885FOLLOW_ruleBlock_in_rule916FOLLOW_ruleModifier_in_rule806FOLLOW_RULEMODIFIERS_in_lexerRule708FOLLOW_RULEMODIFIERS_in_rule801FOLLOW_ruleref_in_atom2178FOLLOW_ruleref_in_atom2235FOLLOW_ruleref_in_lexerAtom1655FOLLOW_ruleReturns_in_rule830FOLLOW_rules_in_grammarSpec123FOLLOW_RULES_in_rules624FOLLOW_SEMPRED_in_actionElement1697FOLLOW_SEMPRED_in_actionElement1705FOLLOW_SEMPRED_in_element1882FOLLOW_SEMPRED_in_element1910FOLLOW_SEMPRED_in_lexerElement1482FOLLOW_SEMPRED_in_lexerElement1510FOLLOW_SET_in_blockSet2260FOLLOW_set_in_labeledElement1999FOLLOW_setElement_in_blockSet2262FOLLOW_STRING_LITERAL_in_elementOption2713FOLLOW_STRING_LITERAL_in_range2509FOLLOW_STRING_LITERAL_in_range2511FOLLOW_STRING_LITERAL_in_setElement2286FOLLOW_STRING_LITERAL_in_setElement2312FOLLOW_STRING_LITERAL_in_setElement2370FOLLOW_STRING_LITERAL_in_setElement2374FOLLOW_STRING_LITERAL_in_terminal2541FOLLOW_STRING_LITERAL_in_terminal2566FOLLOW_subrule_in_element1861FOLLOW_terminal_in_atom2167FOLLOW_terminal_in_atom2217FOLLOW_terminal_in_lexerAtom1579FOLLOW_THROWS_in_throwsSpec1106FOLLOW_throwsSpec_in_rule843FOLLOW_TOKEN_REF_in_lexerRule696FOLLOW_TOKEN_REF_in_setElement2300FOLLOW_TOKEN_REF_in_setElement2337FOLLOW_TOKEN_REF_in_terminal2580FOLLOW_TOKEN_REF_in_terminal2593FOLLOW_TOKENS_SPEC_in_tokensSpec477FOLLOW_tokenSpec_in_tokensSpec479FOLLOW_tokensSpec_in_prequelConstruct214FOLLOW_WILDCARD_in_atom2188FOLLOW_WILDCARD_in_atom2201FOLLOW_WILDCARD_in_lexerAtom1614FOLLOW_WILDCARD_in_lexerAtom1627FRAGMENTGRAMMARgrammarNameGTHEX_DIGITIDIMPORTINTLEXERLEXER_ACTION_CALLLEXER_ALT_ACTIONLEXER_CHAR_SETLOCALSLPARENLTMODENameCharNameStartCharNESTED_ACTIONNLCHARSNOTOPTIONALOPTIONSORPARSERPLUSPLUS_ASSIGNPOSITIVE_CLOSUREPOUNDPRIVATEPROTECTEDPUBLICQUESTIONRANGERARROWRBRACERETURNSrewriteEBNFLevelRPARENRULERULE_REFRULEMODIFIERSRULESSEMISEMPREDSETSRCSTARSTRING_LITERALTHROWSTOKEN_REFtokenNamesTOKENS_SPECUNICODE_ESCUNICODE_EXTENDED_ESCUnicodeBOMWILDCARDWSWSCHARSWSNLCHARS

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
private void
checkCaseInsensitiveOption(Token optionID, GrammarAST valueAST, int parentType)

pack-priv void
protected void
checkElementIsOuterMostInSingleAlt(GrammarAST tree)

Make sure that action is last element in outer alt; here action, a2, z, and zz are bad, but a3 is ok: (RULE A (BLOCK (ALT {action} 'a'))) (RULE B (BLOCK (ALT (BLOCK (ALT {a2} 'x') (ALT 'y')) {a3}))) (RULE C (BLOCK (ALT 'd' {z}) (ALT 'e' {zz})))

pack-priv boolean
checkElementOptions(GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST)

Check option is appropriate for elem; parent of ID is ELEMENT_OPTIONS

pack-priv void
pack-priv void
checkImport(Token importID)

pack-priv void
pack-priv void
pack-priv void
pack-priv void
pack-priv void
checkOptions(GrammarAST parent, Token optionID, GrammarAST valueAST)

Check option is appropriate for grammar, rule, subrule

pack-priv boolean
pack-priv void
pack-priv boolean
public void
public void
public void
public void
public void
public void
public void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
public void
public void
public ErrorManager
public void
public void
public void
public void
public void
public void
public void
Inherited from org.antlr.v4.parse.GrammarTreeVisitor:
actionactionElementalternativeastOperandatomblockblockSetblockSuffixchannelSpecchannelsSpecdelegateGrammardelegateGrammarsdiscoverAltdiscoverOuterAltebnfSuffixelementelementOptionelementOptionsenterActionenterActionElemententerAlternativeenterAstOperandenterAtomenterBlockenterBlockSetenterBlockSuffixenterChannelSpecenterDelegateGrammarenterDelegateGrammarsenterEbnfSuffixenterElemententerElementOptionenterElementOptionsenterExceptionGroupenterExceptionHandlerenterFinallyClauseenterGrammarSpecenterLabeledElemententerLexerAlternativeenterLexerAtomenterLexerBlockenterLexerCommandExprenterLexerElementsenterLexerOuterAlternativeenterLexerRuleenterLexerRuleBlockenterLexerSubruleenterLocalsenterOptionenterOptionsSpecenterOptionValueenterOuterAlternativeenterPrequelConstructenterPrequelConstructsenterRangeenterRuleenterRuleActionenterRuleBlockenterRuleModifierenterRulerefenterRuleReturnsenterRulesenterSetElemententerSubruleenterThrowsSpecenterTokenSpecenterTokensSpecexceptionGroupexceptionHandlerexitActionexitActionElementexitAlternativeexitAstOperandexitAtomexitBlockexitBlockSetexitBlockSuffixexitChannelSpecexitChannelsSpecexitDelegateGrammarexitDelegateGrammarsexitEbnfSuffixexitElementexitElementOptionexitElementOptionsexitExceptionGroupexitExceptionHandlerexitFinallyClauseexitGrammarSpecexitLabeledElementexitLexerAlternativeexitLexerAtomexitLexerBlockexitLexerCommandexitLexerCommandExprexitLexerElementexitLexerElementsexitLexerOuterAlternativeexitLexerRuleBlockexitLexerSubruleexitLocalsexitOptionexitOptionsSpecexitOptionValueexitOuterAlternativeexitPrequelConstructexitPrequelConstructsexitRangeexitRuleexitRuleActionexitRuleBlockexitRuleModifierexitRulerefexitRuleReturnsexitRulesexitSetElementexitSubruleexitTerminalexitThrowsSpecexitTokenSpecexitTokensSpecfinallyActionfinallyClausefinishAltfinishGrammarfinishLexerRulefinishOuterAltfinishRulesgetDelegatesgetGrammarFileNamegetTokenNamesglobalNamedActiongrammarSpeclabeledElementlexerAlternativelexerAtomlexerBlocklexerCallCommandlexerCommandlexerCommandlexerCommandExprlexerElementlexerElementslexerOuterAlternativelexerRulelexerRuleBlocklexerSubrulelocalsmodeoptionoptionsSpecoptionValueouterAlternativeprequelConstructprequelConstructsrangeruleruleActionruleBlockruleCatchruleModifierrulerefruleReturnsrulessempredInAltsetElementstringRefsubruleterminalthrowsSpectokenReftokenSpectokensSpectraceIntraceOutvisitvisitGrammarwildcardRef

Field Detail

checkAssocElementOptionback to summary
public boolean checkAssocElementOption

When this is true, the semantic checks will report ErrorType#UNRECOGNIZED_ASSOC_OPTION where appropriate. This may be set to false to disable this specific check.

The default value is true.

errMgrback to summary
public ErrorManager errMgr
gback to summary
public Grammar g
grammarCaseInsensitiveback to summary
private boolean grammarCaseInsensitive

Value of caseInsensitive option (false if not defined)

inFragmentRuleback to summary
private boolean inFragmentRule

This is true from the time discoverLexerRule is called for a lexer rule with the fragment modifier until exitLexerRule is called.

nonFragmentRuleCountback to summary
protected int nonFragmentRuleCount

This field is used for reporting the ErrorType#MODE_WITHOUT_RULES error when necessary.

ruleCollectorback to summary
public RuleCollector ruleCollector
validImportTypesback to summary
public static final MultiMap<Integer, Integer> validImportTypes

Set of valid imports. Maps delegate to set of delegator grammar types. validDelegations.get(LEXER) gives list of the kinds of delegators that can import lexers.

Constructor Detail

BasicSemanticChecksback to summary
public BasicSemanticChecks(Grammar g, RuleCollector ruleCollector)

Method Detail

actionInAltback to summary
public void actionInAlt(ActionAST action)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.actionInAlt.

Annotations
@Override
blockOptionback to summary
public void blockOption(GrammarAST ID, GrammarAST valueAST)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.blockOption.

Annotations
@Override
checkCaseInsensitiveOptionback to summary
private void checkCaseInsensitiveOption(Token optionID, GrammarAST valueAST, int parentType)
checkChannelDefinitionback to summary
pack-priv void checkChannelDefinition(Token tokenID)
checkElementIsOuterMostInSingleAltback to summary
protected void checkElementIsOuterMostInSingleAlt(GrammarAST tree)

Make sure that action is last element in outer alt; here action, a2, z, and zz are bad, but a3 is ok: (RULE A (BLOCK (ALT {action} 'a'))) (RULE B (BLOCK (ALT (BLOCK (ALT {a2} 'x') (ALT 'y')) {a3}))) (RULE C (BLOCK (ALT 'd' {z}) (ALT 'e' {zz})))

checkElementOptionsback to summary
pack-priv boolean checkElementOptions(GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST)

Check option is appropriate for elem; parent of ID is ELEMENT_OPTIONS

checkGrammarNameback to summary
pack-priv void checkGrammarName(Token nameToken)
checkImportback to summary
pack-priv void checkImport(Token importID)
checkInvalidRuleDefback to summary
pack-priv void checkInvalidRuleDef(Token ruleID)
checkInvalidRuleRefback to summary
pack-priv void checkInvalidRuleRef(Token ruleID)
checkNumPrequelsback to summary
pack-priv void checkNumPrequels(List<GrammarAST> options, List<GrammarAST> imports, List<GrammarAST> tokens)
checkNumRulesback to summary
pack-priv void checkNumRules(GrammarAST rulesNode)
checkOptionsback to summary
pack-priv void checkOptions(GrammarAST parent, Token optionID, GrammarAST valueAST)

Check option is appropriate for grammar, rule, subrule

checkRuleRefOptionsback to summary
pack-priv boolean checkRuleRefOptions(RuleRefAST elem, GrammarAST ID, GrammarAST valueAST)
checkTokenDefinitionback to summary
pack-priv void checkTokenDefinition(Token tokenID)
checkTokenOptionsback to summary
pack-priv boolean checkTokenOptions(TerminalAST elem, GrammarAST ID, GrammarAST valueAST)
defineChannelback to summary
public void defineChannel(GrammarAST ID)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.defineChannel.

Annotations
@Override
defineTokenback to summary
public void defineToken(GrammarAST ID)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.defineToken.

Annotations
@Override
discoverGrammarback to summary
public void discoverGrammar(GrammarRootAST root, GrammarAST ID)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.discoverGrammar.

Annotations
@Override
discoverLexerRuleback to summary
public void discoverLexerRule(RuleAST rule, GrammarAST ID, List<GrammarAST> modifiers, GrammarAST options, GrammarAST block)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.discoverLexerRule.

Annotations
@Override
discoverRuleback to summary
public void discoverRule(RuleAST rule, GrammarAST ID, List<GrammarAST> modifiers, ActionAST arg, ActionAST returns, GrammarAST thrws, GrammarAST options, ActionAST locals, List<GrammarAST> actions, GrammarAST block)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.discoverRule.

Annotations
@Override
discoverRulesback to summary
public void discoverRules(GrammarAST rules)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.discoverRules.

Annotations
@Override
elementOptionback to summary
public void elementOption(GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.elementOption.

Annotations
@Override
enterChannelsSpecback to summary
protected void enterChannelsSpec(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.enterChannelsSpec.

Annotations
@Override
enterLexerCommandback to summary
protected void enterLexerCommand(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.enterLexerCommand.

Annotations
@Override
enterLexerElementback to summary
protected void enterLexerElement(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.enterLexerElement.

Annotations
@Override
enterModeback to summary
protected void enterMode(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.enterMode.

Annotations
@Override
enterTerminalback to summary
protected void enterTerminal(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.enterTerminal.

Annotations
@Override
exitLexerRuleback to summary
protected void exitLexerRule(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.exitLexerRule.

Annotations
@Override
exitModeback to summary
protected void exitMode(GrammarAST tree)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.exitMode.

Annotations
@Override
finishPrequelsback to summary
public void finishPrequels(GrammarAST firstPrequel)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.finishPrequels.

Annotations
@Override
finishRuleback to summary
public void finishRule(RuleAST rule, GrammarAST ID, GrammarAST block)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.finishRule.

Annotations
@Override
getErrorManagerback to summary
public ErrorManager getErrorManager()

Overrides org.antlr.v4.parse.GrammarTreeVisitor.getErrorManager.

Annotations
@Override
grammarOptionback to summary
public void grammarOption(GrammarAST ID, GrammarAST valueAST)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.grammarOption.

Annotations
@Override
importGrammarback to summary
public void importGrammar(GrammarAST label, GrammarAST ID)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.importGrammar.

Annotations
@Override
labelback to summary
public void label(GrammarAST op, GrammarAST ID, GrammarAST element)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.label.

Annotations
@Override
modeDefback to summary
public void modeDef(GrammarAST m, GrammarAST ID)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.modeDef.

Annotations
@Override
processback to summary
public void process()
ruleOptionback to summary
public void ruleOption(GrammarAST ID, GrammarAST valueAST)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.ruleOption.

Annotations
@Override
ruleRefback to summary
public void ruleRef(GrammarAST ref, ActionAST arg)

Overrides org.antlr.v4.parse.GrammarTreeVisitor.ruleRef.

Annotations
@Override