public class Alternative extends Objectimplements AttributeResolver
| Modifier and Type | Field and Description |
|---|---|
List |
actions
Track all executable actions other than named actions like @init and catch/finally (not in an alt).
|
int |
altNum
What alternative number is this outermost alt? 1..n
|
AltAST |
ast
|
<any> |
labelDefs
A list of all LabelElementPair attached to tokens like id=ID, ids+=ID
|
Rule |
rule
|
<any> |
ruleRefs
|
<any> |
ruleRefsInActions
|
<any> |
tokenRefs
|
<any> |
tokenRefsInActions
|
| Constructor and Description |
|---|
Alternative(Rule
|
| Modifier and Type | Method and Description |
|---|---|
LabelElementPair |
getAnyLabelDef(String
|
boolean |
resolvesToAttributeDict(String
|
boolean |
resolvesToLabel(String
|
boolean |
resolvesToListLabel(String
|
boolean |
resolvesToToken(String
|
Attribute |
resolveToAttribute(String
$x Attribute: rule arguments, return values, predefined rule prop.
|
Attribute |
resolveToAttribute(String
$x.y, x can be surrounding rule, token/rule/label ref.
|
Rule |
resolveToRule(String
x can be ruleref or rule label.
|
public Rulerule
public AltASTast
public int altNum
public <any> tokenRefs
public <any> tokenRefsInActions
public <any> ruleRefs
public <any> ruleRefsInActions
public <any> labelDefs
public List<ActionAST > actions
public Alternative(Ruler, int altNum)
public AttributeresolveToAttribute(String x, ActionAST node)
public AttributeresolveToAttribute(String x, String y, ActionAST node)
public LabelElementPairgetAnyLabelDef(String x)