public class OutputModelController extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
codeBlockLevel
Context set by the SourceGenTriggers.g
|
CodeBlock |
currentBlock
|
Alternative |
currentOuterMostAlt
|
CodeBlockForOuterMostAlt |
currentOuterMostAlternativeBlock
|
Stack |
currentRule
|
OutputModelFactory |
delegate
Who does the work? Doesn't have to be CoreOutputModelFactory.
|
List |
extensions
Post-processing CodeGeneratorExtension objects; done in order given.
|
OutputModelObject |
root
|
int |
treeLevel
|
SourceGenTriggers |
walker
While walking code in rules, this is set to the tree walker that triggers actions.
|
| Constructor and Description |
|---|
OutputModelController(OutputModelFactory
|
public OutputModelFactorydelegate
public List<CodeGeneratorExtension > extensions
public SourceGenTriggerswalker
public int codeBlockLevel
public int treeLevel
public OutputModelObjectroot
public Stack<RuleFunction > currentRule
public AlternativecurrentOuterMostAlt
public CodeBlockcurrentBlock
public CodeBlockForOuterMostAltcurrentOuterMostAlternativeBlock
public OutputModelController(OutputModelFactoryfactory)
public void addExtension(CodeGeneratorExtensionext)
public OutputModelObjectbuildParserOutputModel()
public OutputModelObjectbuildLexerOutputModel()
public OutputModelObjectbuildListenerOutputModel()
public OutputModelObjectbuildBaseListenerOutputModel()
public OutputModelObjectbuildVisitorOutputModel()
public OutputModelObjectbuildBaseVisitorOutputModel()
public ParserFileparserFile(String fileName)
public Parserparser(ParserFile file)
public void buildRuleFunction(Parserparser, Rule r)
public void buildLeftRecursiveRuleFunction(LeftRecursiveRuler, LeftRecursiveRuleFunction function)
public void buildNormalRuleFunction(Ruler, RuleFunction function)
public RuleFunctionrule(Rule r)
public List<SrcOp > rulePostamble(RuleFunction function, Rule r)
public GrammargetGrammar()
public CodeGeneratorgetGenerator()
public CodeBlockForAltalternative(Alternative alt, boolean outerMost)
public CodeBlockForAltfinishAlternative(CodeBlockForAlt blk, List <SrcOp > ops, boolean outerMost)
public List<SrcOp > ruleRef(GrammarAST ID, GrammarAST label, GrammarAST args)
public List<SrcOp > tokenRef(GrammarAST ID, GrammarAST label, GrammarAST args)
public List<SrcOp > stringRef(GrammarAST ID, GrammarAST label)
public List<SrcOp > set(GrammarAST setAST, GrammarAST labelAST, boolean invert)
public CodeBlockForAltepsilon(Alternative alt, boolean outerMost)
public List<SrcOp > wildcard(GrammarAST ast, GrammarAST labelAST)
public ChoicegetChoiceBlock(BlockAST blkAST, List <CodeBlockForAlt > alts, GrammarAST label)
public ChoicegetEBNFBlock(GrammarAST ebnfRoot, List <CodeBlockForAlt > alts)
public boolean needsImplicitLabel(GrammarASTID, LabeledOp op)
public OutputModelObjectgetRoot()
public void setRoot(OutputModelObjectroot)
public RuleFunctiongetCurrentRuleFunction()
public void pushCurrentRule(RuleFunctionr)
public RuleFunctionpopCurrentRule()
public AlternativegetCurrentOuterMostAlt()
public void setCurrentOuterMostAlt(AlternativecurrentOuterMostAlt)
public void setCurrentBlock(CodeBlockblk)
public CodeBlockgetCurrentBlock()
public void setCurrentOuterMostAlternativeBlock(CodeBlockForOuterMostAltcurrentOuterMostAlternativeBlock)
public CodeBlockForOuterMostAltgetCurrentOuterMostAlternativeBlock()
public int getCodeBlockLevel()