public class RuleFunction extends OutputModelObject
| Modifier and Type | Field and Description |
|---|---|
Map |
altLabelCtxs
|
AltLabelStructDecl |
altToContext
|
Collection |
args
|
List |
code
|
String |
ctxType
|
List |
exceptions
|
Action |
finallyAction
|
boolean |
hasLookaheadBlock
|
int |
index
|
<any> |
locals
|
List |
modifiers
|
String |
name
|
Map |
namedActions
|
List |
postamble
|
Rule |
rule
|
StructDecl |
ruleCtx
|
Collection |
ruleLabels
|
ATNState |
startState
|
Collection |
tokenLabels
|
ast, factory| Constructor and Description |
|---|
RuleFunction(OutputModelFactory
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContextDecl(String
Add decl to struct ctx for rule or alt if labeled
|
void |
addContextGetters(OutputModelFactory
|
void |
addLocalDecl(Decl
Add local var decl
|
void |
fillNamedActions(OutputModelFactory
|
List |
getDeclForAltElement(GrammarAST
|
Set |
getDeclsForAllElements(List
for all alts, find which ref X or r needs List Must see across alts.
|
protected FrequencySet |
getElementFrequenciesForAlt(AltAST
Given list of X and r refs in alt, compute how many of each there are
|
public Stringname
public StringctxType
public Collection<String > ruleLabels
public Collection<String > tokenLabels
public ATNState startState
public int index
public Rulerule
public AltLabelStructDecl[] altToContext
public boolean hasLookaheadBlock
public <any> locals
public Collection<AttributeDecl > args
public StructDeclruleCtx
public Map<String ,AltLabelStructDecl > altLabelCtxs
public ActionfinallyAction
public List<ExceptionClause > exceptions
public RuleFunction(OutputModelFactoryfactory, Rule r)
public void addContextGetters(OutputModelFactoryfactory, Rule r)
public void fillNamedActions(OutputModelFactoryfactory, Rule r)
public Set<Decl > getDeclsForAllElements(List <AltAST > altASTs)
protected FrequencySet<String > getElementFrequenciesForAlt(AltAST ast)
public List<Decl > getDeclForAltElement(GrammarAST t, String refLabelName, boolean needList)
public void addLocalDecl(Decld)