public class LeftRecursiveRule extends Rule
Modifier and Type | Field and Description |
---|---|
List<Pair<GrammarAST,String>> |
leftRecursiveRuleRefLabels
Did we delete any labels on direct left-recur refs? Points at ID of ^(= ID el)
|
RuleAST |
originalAST |
OrderedHashMap<Integer,LeftRecursiveRuleAltInfo> |
recOpAlts |
List<LeftRecursiveRuleAltInfo> |
recPrimaryAlts |
actionIndex, actions, alt, args, ast, exceptions, finallyAction, g, index, isStartRule, locals, mode, modifiers, name, namedActions, numberOfAlts, predefinedRulePropertiesDict, retvals, validLexerCommands
Constructor and Description |
---|
LeftRecursiveRule(Grammar g,
String name,
RuleAST ast) |
Modifier and Type | Method and Description |
---|---|
Map<String,List<Pair<Integer,AltAST>>> |
getAltLabels()
Get -> labels from those alts we deleted for left-recursive rules.
|
RuleAST |
getOriginalAST() |
int |
getOriginalNumberOfAlts()
Used for recursive rules (subclass), which have 1 alt, but many original alts
|
int[] |
getPrimaryAlts()
Return an array that maps predicted alt from primary decision
to original alt of rule.
|
int[] |
getRecursiveOpAlts()
Return an array that maps predicted alt from recursive op decision
to original alt of rule.
|
List<AltAST> |
getUnlabeledAltASTs() |
boolean |
hasAltSpecificContexts() |
defineActionInAlt, defineLexerAction, definePredicateInAlt, equals, getAnyLabelDef, getElementLabelDefs, getElementLabelNames, getPredefinedScope, getTokenRefs, hashCode, isFragment, resolveRetvalOrProperty, resolvesToAttributeDict, resolvesToLabel, resolvesToListLabel, resolvesToToken, resolveToAttribute, resolveToAttribute, resolveToRule, toString
public List<LeftRecursiveRuleAltInfo> recPrimaryAlts
public OrderedHashMap<Integer,LeftRecursiveRuleAltInfo> recOpAlts
public RuleAST originalAST
public List<Pair<GrammarAST,String>> leftRecursiveRuleRefLabels
public boolean hasAltSpecificContexts()
hasAltSpecificContexts
in class Rule
public int getOriginalNumberOfAlts()
Rule
getOriginalNumberOfAlts
in class Rule
public RuleAST getOriginalAST()
public List<AltAST> getUnlabeledAltASTs()
getUnlabeledAltASTs
in class Rule
public int[] getPrimaryAlts()
public int[] getRecursiveOpAlts()
Copyright © 1992–2020 ANTLR. All rights reserved.