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<RuleFunction> |
currentRule |
OutputModelFactory |
delegate
Who does the work? Doesn't have to be CoreOutputModelFactory.
|
List<CodeGeneratorExtension> |
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 factory) |
public OutputModelFactory delegate
public List<CodeGeneratorExtension> extensions
public SourceGenTriggers walker
public int codeBlockLevel
public int treeLevel
public OutputModelObject root
public Stack<RuleFunction> currentRule
public Alternative currentOuterMostAlt
public CodeBlock currentBlock
public CodeBlockForOuterMostAlt currentOuterMostAlternativeBlock
public OutputModelController(OutputModelFactory factory)
public void addExtension(CodeGeneratorExtension ext)
public OutputModelObject buildParserOutputModel()
public OutputModelObject buildLexerOutputModel()
public OutputModelObject buildListenerOutputModel()
public OutputModelObject buildBaseListenerOutputModel()
public OutputModelObject buildVisitorOutputModel()
public OutputModelObject buildBaseVisitorOutputModel()
public ParserFile parserFile(String fileName)
public Parser parser(ParserFile file)
public void buildRuleFunction(Parser parser, Rule r)
public void buildLeftRecursiveRuleFunction(LeftRecursiveRule r, LeftRecursiveRuleFunction function)
public void buildNormalRuleFunction(Rule r, RuleFunction function)
public RuleFunction rule(Rule r)
public List<SrcOp> rulePostamble(RuleFunction function, Rule r)
public Grammar getGrammar()
public CodeGenerator getGenerator()
public CodeBlockForAlt alternative(Alternative alt, boolean outerMost)
public CodeBlockForAlt finishAlternative(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 CodeBlockForAlt epsilon(Alternative alt, boolean outerMost)
public List<SrcOp> wildcard(GrammarAST ast, GrammarAST labelAST)
public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST label)
public Choice getEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts)
public boolean needsImplicitLabel(GrammarAST ID, LabeledOp op)
public OutputModelObject getRoot()
public void setRoot(OutputModelObject root)
public RuleFunction getCurrentRuleFunction()
public void pushCurrentRule(RuleFunction r)
public RuleFunction popCurrentRule()
public Alternative getCurrentOuterMostAlt()
public void setCurrentOuterMostAlt(Alternative currentOuterMostAlt)
public void setCurrentBlock(CodeBlock blk)
public CodeBlock getCurrentBlock()
public void setCurrentOuterMostAlternativeBlock(CodeBlockForOuterMostAlt currentOuterMostAlternativeBlock)
public CodeBlockForOuterMostAlt getCurrentOuterMostAlternativeBlock()
public int getCodeBlockLevel()
Copyright © 1992-2013 ANTLR. All Rights Reserved.