Top Inners Fields Constructors Methods
org.antlr.tool

public Class LeftRecursiveRuleAnalyzer

extends LeftRecursiveRuleWalker
Class Inheritance
Imports
org.antlr.codegen.CodeGenerator, org.antlr.grammar.v3.*, org.antlr.runtime.Token, org.antlr.runtime.tree.CommonTreeNodeStream, .TreeNodeStream, org.stringtemplate.v4.*, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public Map<Integer, LeftRecursiveRuleAnalyzer.ASSOC>
public LinkedHashMap<Integer, String>
public Grammar
g

public CodeGenerator
public String
public List<String>
public List<String>
public STGroup
public GrammarAST
public String
public LinkedHashMap<Integer, String>
public LinkedHashMap<Integer, String>
pack-priv Map<Integer, Integer>
Inherited from org.antlr.grammar.v3.LeftRecursiveRuleWalker:
ACTIONACTION_CHAR_LITERALACTION_ESCACTION_STRING_LITERALALTAMPERSANDARGARG_ACTIONARGLISTASSIGNBACKTRACK_SEMPREDBANGBLOCKCATCHCHAR_LITERALCHAR_RANGECLOSE_ELEMENT_OPTIONCLOSURECOLONCOMBINED_GRAMMARCOMMACOMMENTDIGITDOC_COMMENTDOLLARDOTDOUBLE_ANGLE_STRING_LITERALDOUBLE_QUOTE_STRING_LITERALEOAEOBEOFEOREPSILONESCETCFINALLYFOLLOW_ACTION_in_element1365FOLLOW_ACTION_in_exceptionHandler1200FOLLOW_ACTION_in_finallyClause1215FOLLOW_ACTION_in_rewrite1254FOLLOW_ACTION_in_ruleScopeSpec288FOLLOW_ALT_in_binary814FOLLOW_ALT_in_binaryMultipleOp851FOLLOW_ALT_in_binaryMultipleOp873FOLLOW_ALT_in_block413FOLLOW_ALT_in_outerAlternative760FOLLOW_ALT_in_prefix949FOLLOW_ALT_in_rewrite1241FOLLOW_ALT_in_suffix985FOLLOW_ALT_in_ternary909FOLLOW_AMPERSAND_in_rec_rule215FOLLOW_ARG_ACTION_in_atom1487FOLLOW_ARG_ACTION_in_atom1497FOLLOW_ARG_ACTION_in_exceptionHandler1198FOLLOW_ARG_ACTION_in_rec_rule184FOLLOW_ARG_ACTION_in_rec_rule194FOLLOW_ARG_in_rec_rule182FOLLOW_ASSIGN_in_element1319FOLLOW_ASSIGN_in_option73FOLLOW_ASSIGN_in_recurse1018FOLLOW_ASSIGN_in_token1068FOLLOW_atom_in_atom1524FOLLOW_atom_in_element1293FOLLOW_atom_in_element1310FOLLOW_atom_in_element1312FOLLOW_BACKTRACK_SEMPRED_in_binary818FOLLOW_BACKTRACK_SEMPRED_in_binaryMultipleOp855FOLLOW_BACKTRACK_SEMPRED_in_element1380FOLLOW_BACKTRACK_SEMPRED_in_prefix953FOLLOW_BACKTRACK_SEMPRED_in_suffix989FOLLOW_BACKTRACK_SEMPRED_in_ternary913FOLLOW_BANG_in_element1285FOLLOW_BANG_in_token1111FOLLOW_binary_in_outerAlternative544FOLLOW_binary_in_synpred2_LeftRecursiveRuleWalker530FOLLOW_binaryMultipleOp_in_outerAlternative488FOLLOW_binaryMultipleOp_in_synpred1_LeftRecursiveRuleWalker484FOLLOW_BLOCK_in_binaryMultipleOp867FOLLOW_BLOCK_in_block381FOLLOW_block_in_ebnf1402FOLLOW_block_in_ebnf1416FOLLOW_block_in_ebnf1433FOLLOW_block_in_ebnf1451FOLLOW_block_in_element1353FOLLOW_BLOCK_in_ruleBlock315FOLLOW_CATCH_in_exceptionHandler1196FOLLOW_CHAR_LITERAL_in_atom1504FOLLOW_CHAR_LITERAL_in_charSetElement115FOLLOW_CHAR_LITERAL_in_charSetElement123FOLLOW_CHAR_LITERAL_in_charSetElement125FOLLOW_CHAR_LITERAL_in_charSetElement134FOLLOW_CHAR_LITERAL_in_charSetElement136FOLLOW_CHAR_LITERAL_in_token1125FOLLOW_CLOSURE_in_ebnf1431FOLLOW_DOT_in_atom1520FOLLOW_ebnf_in_element1340FOLLOW_element_in_block415FOLLOW_element_in_element1278FOLLOW_element_in_element1287FOLLOW_element_in_element1301FOLLOW_element_in_element1323FOLLOW_element_in_element1334FOLLOW_element_in_outerAlternative762FOLLOW_element_in_prefix966FOLLOW_element_in_suffix1001FOLLOW_element_in_tree_1471FOLLOW_EOA_in_binary834FOLLOW_EOA_in_binaryMultipleOp879FOLLOW_EOA_in_binaryMultipleOp894FOLLOW_EOA_in_block418FOLLOW_EOA_in_outerAlternative765FOLLOW_EOA_in_prefix972FOLLOW_EOA_in_suffix1005FOLLOW_EOA_in_ternary933FOLLOW_EOB_in_binaryMultipleOp888FOLLOW_EOB_in_block439FOLLOW_EOB_in_ruleBlock358FOLLOW_EOR_in_rec_rule239FOLLOW_EPSILON_in_element1390FOLLOW_ETC_in_rewrite1256FOLLOW_exceptionGroup_in_rec_rule233FOLLOW_exceptionHandler_in_exceptionGroup1172FOLLOW_FINALLY_in_finallyClause1213FOLLOW_finallyClause_in_exceptionGroup1175FOLLOW_finallyClause_in_exceptionGroup1181FOLLOW_FORCED_ACTION_in_element1360FOLLOW_GATED_SEMPRED_in_element1385FOLLOW_ID_in_atom1522FOLLOW_ID_in_element1321FOLLOW_ID_in_element1332FOLLOW_ID_in_option75FOLLOW_ID_in_rec_rule168FOLLOW_ID_in_recurse1020FOLLOW_ID_in_recurse1031FOLLOW_ID_in_ruleScopeSpec291FOLLOW_ID_in_token1070FOLLOW_ID_in_token1085FOLLOW_modifier_in_rec_rule175FOLLOW_NOT_in_element1299FOLLOW_option_in_optionsSpec59FOLLOW_OPTIONAL_in_ebnf1414FOLLOW_OPTIONS_in_optionsSpec57FOLLOW_optionsSpec_in_block395FOLLOW_optionsSpec_in_rec_rule201FOLLOW_optionsSpec_in_ruleBlock320FOLLOW_optionValue_in_option77FOLLOW_OR_in_charSetElement121FOLLOW_outerAlternative_in_ruleBlock328FOLLOW_PLUS_ASSIGN_in_element1330FOLLOW_PLUS_ASSIGN_in_recurse1029FOLLOW_PLUS_ASSIGN_in_token1083FOLLOW_POSITIVE_CLOSURE_in_ebnf1449FOLLOW_prefix_in_outerAlternative662FOLLOW_prefix_in_synpred4_LeftRecursiveRuleWalker648FOLLOW_RANGE_in_charSetElement132FOLLOW_RANGE_in_element1308FOLLOW_recurse_in_binary832FOLLOW_recurse_in_binaryMultipleOp892FOLLOW_recurse_in_prefix970FOLLOW_recurse_in_ternary927FOLLOW_recurse_in_ternary931FOLLOW_recurseNoLabel_in_binary826FOLLOW_recurseNoLabel_in_binaryMultipleOp863FOLLOW_recurseNoLabel_in_recurse1022FOLLOW_recurseNoLabel_in_recurse1033FOLLOW_recurseNoLabel_in_recurse1039FOLLOW_recurseNoLabel_in_suffix997FOLLOW_recurseNoLabel_in_ternary921FOLLOW_RET_in_rec_rule192FOLLOW_rewrite_in_block421FOLLOW_REWRITE_in_rewrite1234FOLLOW_rewrite_in_ruleBlock340FOLLOW_REWRITES_in_rewrite1228FOLLOW_ROOT_in_element1276FOLLOW_ROOT_in_token1098FOLLOW_RULE_in_rec_rule164FOLLOW_RULE_REF_in_atom1485FOLLOW_RULE_REF_in_recurseNoLabel1051FOLLOW_ruleBlock_in_rec_rule226FOLLOW_ruleScopeSpec_in_rec_rule207FOLLOW_SCOPE_in_ruleScopeSpec286FOLLOW_SEMPRED_in_element1370FOLLOW_SEMPRED_in_rewrite1236FOLLOW_STRING_LITERAL_in_atom1509FOLLOW_STRING_LITERAL_in_token1139FOLLOW_suffix_in_outerAlternative718FOLLOW_suffix_in_synpred5_LeftRecursiveRuleWalker704FOLLOW_SYN_SEMPRED_in_element1375FOLLOW_SYNPRED_in_element1351FOLLOW_TEMPLATE_in_rewrite1248FOLLOW_ternary_in_outerAlternative606FOLLOW_ternary_in_synpred3_LeftRecursiveRuleWalker593FOLLOW_token_in_binary830FOLLOW_token_in_binaryMultipleOp877FOLLOW_token_in_ternary925FOLLOW_token_in_ternary929FOLLOW_token_in_token1074FOLLOW_token_in_token1089FOLLOW_token_in_token1102FOLLOW_token_in_token1115FOLLOW_TOKEN_REF_in_atom1495FOLLOW_TOKEN_REF_in_token1151FOLLOW_tree__in_element1345FOLLOW_TREE_BEGIN_in_tree_1469FOLLOW_WILDCARD_in_atom1514FORCED_ACTIONFRAGMENTGATED_SEMPREDGRAMMARgrammarIDIMPLIESIMPORTINITACTIONINTLABELLEXERLEXER_GRAMMARLPARENML_COMMENTNESTED_ACTIONNESTED_ARG_ACTIONNOTnumAltsOPEN_ELEMENT_OPTIONOPTIONALOPTIONSORPARSERPARSER_GRAMMARPLUSPLUS_ASSIGNPOSITIVE_CLOSUREPREC_RULEPRIVATEPROTECTEDPUBLICQUESTIONRANGERCURLYRECURSIVE_RULE_REFRETRETURNSREWRITEREWRITESROOTRPARENRULERULE_REFSCOPESEMISEMPREDSL_COMMENTSRCSTARSTRAY_BRACKETSTRING_LITERALSYN_SEMPREDSYNPREDTEMPLATETHROWSTOKEN_REFtokenNamesTOKENSTREETREE_BEGINTREE_GRAMMARWILDCARDWSWS_LOOPWS_OPTXDIGIT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
fillRetValAssignments(ST ruleST, String srcName)

public String
public String
public String
public Collection<String>
public static boolean
public void
public int
nextPrecedence(int alt)

public void
public int
precedence(int alt)

public void
public GrammarAST
public GrammarAST
public void
public void
public void
public void
public void
public void
ternaryAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.ternaryAlt.

Convert e ?
public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.antlr.grammar.v3.LeftRecursiveRuleWalker:
ast_suffixatombinarybinaryMultipleOpblockcharSetElementebnfelementexceptionGroupexceptionHandlerfinallyClausegetDelegatesgetGrammarFileNamegetTokenNamesmodifieroptionoptionsSpecoptionValueouterAlternativeprefixrec_rulerecurserecurseNoLabelreportErrorrewriteruleBlockruleScopeSpecsuffixsynpred1_LeftRecursiveRuleWalkersynpred1_LeftRecursiveRuleWalker_fragmentsynpred2_LeftRecursiveRuleWalkersynpred2_LeftRecursiveRuleWalker_fragmentsynpred3_LeftRecursiveRuleWalkersynpred3_LeftRecursiveRuleWalker_fragmentsynpred4_LeftRecursiveRuleWalkersynpred4_LeftRecursiveRuleWalker_fragmentsynpred5_LeftRecursiveRuleWalkersynpred5_LeftRecursiveRuleWalker_fragmentternarytokentree_

Field Detail

altAssociativityback to summary
public Map<Integer, LeftRecursiveRuleAnalyzer.ASSOC> altAssociativity
binaryAltsback to summary
public LinkedHashMap<Integer, String> binaryAlts
gback to summary
public Grammar g
generatorback to summary
public CodeGenerator generator
languageback to summary
public String language
otherAltsback to summary
public List<String> otherAlts
prefixAltsback to summary
public List<String> prefixAlts
recRuleTemplatesback to summary
public STGroup recRuleTemplates
retvalsback to summary
public GrammarAST retvals
ruleNameback to summary
public String ruleName

Hides org.antlr.grammar.v3.LeftRecursiveRuleWalker.ruleName.

suffixAltsback to summary
public LinkedHashMap<Integer, String> suffixAlts
ternaryAltsback to summary
public LinkedHashMap<Integer, String> ternaryAlts
tokenToPrecback to summary
pack-priv Map<Integer, Integer> tokenToPrec

Constructor Detail

LeftRecursiveRuleAnalyzerback to summary
public LeftRecursiveRuleAnalyzer(TreeNodeStream input, Grammar g, String ruleName)

Method Detail

binaryAltback to summary
public void binaryAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.binaryAlt.

Annotations
@Override
fillRetValAssignmentsback to summary
public void fillRetValAssignments(ST ruleST, String srcName)
getArtificialOpPrecRuleback to summary
public String getArtificialOpPrecRule()
getArtificialPrecStartRuleback to summary
public String getArtificialPrecStartRule()
getArtificialPrimaryRuleback to summary
public String getArtificialPrimaryRule()
getNamesFromArgActionback to summary
public Collection<String> getNamesFromArgAction(Token t)
hasImmediateRecursiveRuleRefsback to summary
public static boolean hasImmediateRecursiveRuleRefs(GrammarAST t, String ruleName)
loadPrecRuleTemplatesback to summary
public void loadPrecRuleTemplates()
nextPrecedenceback to summary
public int nextPrecedence(int alt)
otherAltback to summary
public void otherAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.otherAlt.

Annotations
@Override
precedenceback to summary
public int precedence(int alt)
prefixAltback to summary
public void prefixAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.prefixAlt.

Annotations
@Override
replaceLastRuleRefback to summary
public GrammarAST replaceLastRuleRef(GrammarAST t, String name)
replaceRuleRefsback to summary
public GrammarAST replaceRuleRefs(GrammarAST t, String name)
setReturnValuesback to summary
public void setReturnValues(GrammarAST t)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.setReturnValues.

Annotations
@Override
setTokenPrecback to summary
public void setTokenPrec(GrammarAST t, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.setTokenPrec.

Annotations
@Override
stripLeftRecursionback to summary
public void stripLeftRecursion(GrammarAST altAST)
stripSynPredback to summary
public void stripSynPred(GrammarAST altAST)
suffixAltback to summary
public void suffixAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.suffixAlt.

Annotations
@Override
ternaryAltback to summary
public void ternaryAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt)

Overrides org.antlr.grammar.v3.LeftRecursiveRuleWalker.ternaryAlt.

Convert e ? e : e → ? e : e_[nextPrec]

Annotations
@Override
textback to summary
public String text(GrammarAST t)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
org.antlr.tool back to summary

public final Enum LeftRecursiveRuleAnalyzer.ASSOC

extends Enum<LeftRecursiveRuleAnalyzer.ASSOC>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final LeftRecursiveRuleAnalyzer.ASSOC
public static final LeftRecursiveRuleAnalyzer.ASSOC

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static LeftRecursiveRuleAnalyzer.ASSOC
public static LeftRecursiveRuleAnalyzer.ASSOC[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

leftback to summary
public static final LeftRecursiveRuleAnalyzer.ASSOC left
rightback to summary
public static final LeftRecursiveRuleAnalyzer.ASSOC right

Constructor Detail

ASSOCback to summary
private ASSOC()

Method Detail

valueOfback to summary
public static LeftRecursiveRuleAnalyzer.ASSOC valueOf(String name)
valuesback to summary
public static LeftRecursiveRuleAnalyzer.ASSOC[] values()