C# Class Antlr4.Codegen.OutputModelController

Show file Open project: sharwell/antlr4cs Class Usage Examples

Public Properties

Property Type Description
@delegate OutputModelFactory
codeBlockLevel int
currentBlock Antlr4.Codegen.Model.Decl.CodeBlock
currentOuterMostAlt Antlr4.Tool.Alternative
currentOuterMostAlternativeBlock Antlr4.Codegen.Model.CodeBlockForOuterMostAlt
currentRule Stack
extensions IList
root Antlr4.Codegen.Model.OutputModelObject
treeLevel int
walker SourceGenTriggers

Public Methods

Method Description
Action ( ActionAST ast ) : IList
AddExtension ( CodeGeneratorExtension ext ) : void
Alternative ( Alternative alt, bool outerMost ) : CodeBlockForAlt
BuildBaseListenerOutputModel ( bool header ) : OutputModelObject
BuildBaseVisitorOutputModel ( bool header ) : OutputModelObject
BuildLeftRecursiveRuleFunction ( LeftRecursiveRule r, LeftRecursiveRuleFunction function ) : void
BuildLexerOutputModel ( bool header ) : OutputModelObject
BuildLexerRuleActions ( Lexer lexer, Rule r ) : void
BuildListenerOutputModel ( bool header ) : OutputModelObject
BuildNormalRuleFunction ( Rule r, RuleFunction function ) : void
BuildParserOutputModel ( bool header ) : OutputModelObject
BuildRuleFunction ( Parser parser, Rule r ) : void
BuildVisitorOutputModel ( bool header ) : OutputModelObject
Epsilon ( Alternative alt, bool outerMost ) : CodeBlockForAlt
FinishAlternative ( CodeBlockForAlt blk, IList ops, bool outerMost ) : CodeBlockForAlt
GetChoiceBlock ( BlockAST blkAST, IList alts, GrammarAST label ) : Choice
GetCodeBlockLevel ( ) : int
GetCurrentBlock ( ) : CodeBlock
GetCurrentOuterMostAlt ( ) : Alternative
GetCurrentOuterMostAlternativeBlock ( ) : CodeBlockForOuterMostAlt
GetCurrentRuleFunction ( ) : RuleFunction
GetEBNFBlock ( GrammarAST ebnfRoot, IList alts ) : Choice
GetGenerator ( ) : CodeGenerator
GetGrammar ( ) : Grammar
GetRoot ( ) : OutputModelObject
Lexer ( LexerFile file ) : Lexer
LexerFile ( string fileName ) : LexerFile
NeedsImplicitLabel ( GrammarAST ID, LabeledOp op ) : bool
OutputModelController ( OutputModelFactory factory ) : System.Collections.Generic
Parser ( ParserFile file ) : Parser
ParserFile ( string fileName ) : ParserFile
PopCurrentRule ( ) : RuleFunction
PushCurrentRule ( RuleFunction r ) : void
Rule ( Rule r ) : RuleFunction
RulePostamble ( RuleFunction function, Rule r ) : IList
RuleRef ( GrammarAST ID, GrammarAST label, GrammarAST args ) : IList
Sempred ( ActionAST ast ) : IList
Set ( GrammarAST setAST, GrammarAST labelAST, bool invert ) : IList
SetCurrentBlock ( CodeBlock blk ) : void
SetCurrentOuterMostAlt ( Alternative currentOuterMostAlt ) : void
SetCurrentOuterMostAlternativeBlock ( CodeBlockForOuterMostAlt currentOuterMostAlternativeBlock ) : void
SetRoot ( OutputModelObject root ) : void
StringRef ( GrammarAST ID, GrammarAST label ) : IList
TokenRef ( GrammarAST ID, GrammarAST label, GrammarAST args ) : IList
Wildcard ( GrammarAST ast, GrammarAST labelAST ) : IList

Method Details

Action() public method

public Action ( ActionAST ast ) : IList
ast Antlr4.Tool.Ast.ActionAST
return IList

AddExtension() public method

public AddExtension ( CodeGeneratorExtension ext ) : void
ext CodeGeneratorExtension
return void

Alternative() public method

public Alternative ( Alternative alt, bool outerMost ) : CodeBlockForAlt
alt Antlr4.Tool.Alternative
outerMost bool
return Antlr4.Codegen.Model.CodeBlockForAlt

BuildBaseListenerOutputModel() public method

public BuildBaseListenerOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

BuildBaseVisitorOutputModel() public method

public BuildBaseVisitorOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

BuildLeftRecursiveRuleFunction() public method

public BuildLeftRecursiveRuleFunction ( LeftRecursiveRule r, LeftRecursiveRuleFunction function ) : void
r Antlr4.Tool.LeftRecursiveRule
function Antlr4.Codegen.Model.LeftRecursiveRuleFunction
return void

BuildLexerOutputModel() public method

public BuildLexerOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

BuildLexerRuleActions() public method

public BuildLexerRuleActions ( Lexer lexer, Rule r ) : void
lexer Antlr4.Codegen.Model.Lexer
r Antlr4.Tool.Rule
return void

BuildListenerOutputModel() public method

public BuildListenerOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

BuildNormalRuleFunction() public method

public BuildNormalRuleFunction ( Rule r, RuleFunction function ) : void
r Antlr4.Tool.Rule
function Antlr4.Codegen.Model.RuleFunction
return void

BuildParserOutputModel() public method

public BuildParserOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

BuildRuleFunction() public method

public BuildRuleFunction ( Parser parser, Rule r ) : void
parser Antlr4.Codegen.Model.Parser
r Antlr4.Tool.Rule
return void

BuildVisitorOutputModel() public method

public BuildVisitorOutputModel ( bool header ) : OutputModelObject
header bool
return Antlr4.Codegen.Model.OutputModelObject

Epsilon() public method

public Epsilon ( Alternative alt, bool outerMost ) : CodeBlockForAlt
alt Antlr4.Tool.Alternative
outerMost bool
return Antlr4.Codegen.Model.CodeBlockForAlt

FinishAlternative() public method

public FinishAlternative ( CodeBlockForAlt blk, IList ops, bool outerMost ) : CodeBlockForAlt
blk Antlr4.Codegen.Model.CodeBlockForAlt
ops IList
outerMost bool
return Antlr4.Codegen.Model.CodeBlockForAlt

GetChoiceBlock() public method

public GetChoiceBlock ( BlockAST blkAST, IList alts, GrammarAST label ) : Choice
blkAST Antlr4.Tool.Ast.BlockAST
alts IList
label Antlr4.Tool.Ast.GrammarAST
return Antlr4.Codegen.Model.Choice

GetCodeBlockLevel() public method

public GetCodeBlockLevel ( ) : int
return int

GetCurrentBlock() public method

public GetCurrentBlock ( ) : CodeBlock
return Antlr4.Codegen.Model.Decl.CodeBlock

GetCurrentOuterMostAlt() public method

public GetCurrentOuterMostAlt ( ) : Alternative
return Antlr4.Tool.Alternative

GetCurrentOuterMostAlternativeBlock() public method

public GetCurrentOuterMostAlternativeBlock ( ) : CodeBlockForOuterMostAlt
return Antlr4.Codegen.Model.CodeBlockForOuterMostAlt

GetCurrentRuleFunction() public method

public GetCurrentRuleFunction ( ) : RuleFunction
return Antlr4.Codegen.Model.RuleFunction

GetEBNFBlock() public method

public GetEBNFBlock ( GrammarAST ebnfRoot, IList alts ) : Choice
ebnfRoot Antlr4.Tool.Ast.GrammarAST
alts IList
return Antlr4.Codegen.Model.Choice

GetGenerator() public method

public GetGenerator ( ) : CodeGenerator
return CodeGenerator

GetGrammar() public method

public GetGrammar ( ) : Grammar
return Antlr4.Tool.Grammar

GetRoot() public method

public GetRoot ( ) : OutputModelObject
return Antlr4.Codegen.Model.OutputModelObject

Lexer() public method

public Lexer ( LexerFile file ) : Lexer
file Antlr4.Codegen.Model.LexerFile
return Antlr4.Codegen.Model.Lexer

LexerFile() public method

public LexerFile ( string fileName ) : LexerFile
fileName string
return Antlr4.Codegen.Model.LexerFile

NeedsImplicitLabel() public method

public NeedsImplicitLabel ( GrammarAST ID, LabeledOp op ) : bool
ID Antlr4.Tool.Ast.GrammarAST
op LabeledOp
return bool

OutputModelController() public method

public OutputModelController ( OutputModelFactory factory ) : System.Collections.Generic
factory OutputModelFactory
return System.Collections.Generic

Parser() public method

public Parser ( ParserFile file ) : Parser
file Antlr4.Codegen.Model.ParserFile
return Antlr4.Codegen.Model.Parser

ParserFile() public method

public ParserFile ( string fileName ) : ParserFile
fileName string
return Antlr4.Codegen.Model.ParserFile

PopCurrentRule() public method

public PopCurrentRule ( ) : RuleFunction
return Antlr4.Codegen.Model.RuleFunction

PushCurrentRule() public method

public PushCurrentRule ( RuleFunction r ) : void
r Antlr4.Codegen.Model.RuleFunction
return void

Rule() public method

public Rule ( Rule r ) : RuleFunction
r Antlr4.Tool.Rule
return Antlr4.Codegen.Model.RuleFunction

RulePostamble() public method

public RulePostamble ( RuleFunction function, Rule r ) : IList
function Antlr4.Codegen.Model.RuleFunction
r Antlr4.Tool.Rule
return IList

RuleRef() public method

public RuleRef ( GrammarAST ID, GrammarAST label, GrammarAST args ) : IList
ID Antlr4.Tool.Ast.GrammarAST
label Antlr4.Tool.Ast.GrammarAST
args Antlr4.Tool.Ast.GrammarAST
return IList

Sempred() public method

public Sempred ( ActionAST ast ) : IList
ast Antlr4.Tool.Ast.ActionAST
return IList

Set() public method

public Set ( GrammarAST setAST, GrammarAST labelAST, bool invert ) : IList
setAST Antlr4.Tool.Ast.GrammarAST
labelAST Antlr4.Tool.Ast.GrammarAST
invert bool
return IList

SetCurrentBlock() public method

public SetCurrentBlock ( CodeBlock blk ) : void
blk Antlr4.Codegen.Model.Decl.CodeBlock
return void

SetCurrentOuterMostAlt() public method

public SetCurrentOuterMostAlt ( Alternative currentOuterMostAlt ) : void
currentOuterMostAlt Antlr4.Tool.Alternative
return void

SetCurrentOuterMostAlternativeBlock() public method

public SetCurrentOuterMostAlternativeBlock ( CodeBlockForOuterMostAlt currentOuterMostAlternativeBlock ) : void
currentOuterMostAlternativeBlock Antlr4.Codegen.Model.CodeBlockForOuterMostAlt
return void

SetRoot() public method

public SetRoot ( OutputModelObject root ) : void
root Antlr4.Codegen.Model.OutputModelObject
return void

StringRef() public method

public StringRef ( GrammarAST ID, GrammarAST label ) : IList
ID Antlr4.Tool.Ast.GrammarAST
label Antlr4.Tool.Ast.GrammarAST
return IList

TokenRef() public method

public TokenRef ( GrammarAST ID, GrammarAST label, GrammarAST args ) : IList
ID Antlr4.Tool.Ast.GrammarAST
label Antlr4.Tool.Ast.GrammarAST
args Antlr4.Tool.Ast.GrammarAST
return IList

Wildcard() public method

public Wildcard ( GrammarAST ast, GrammarAST labelAST ) : IList
ast Antlr4.Tool.Ast.GrammarAST
labelAST Antlr4.Tool.Ast.GrammarAST
return IList

Property Details

@delegate public property

public OutputModelFactory @delegate
return OutputModelFactory

codeBlockLevel public property

public int codeBlockLevel
return int

currentBlock public property

public CodeBlock,Antlr4.Codegen.Model.Decl currentBlock
return Antlr4.Codegen.Model.Decl.CodeBlock

currentOuterMostAlt public property

public Alternative,Antlr4.Tool currentOuterMostAlt
return Antlr4.Tool.Alternative

currentOuterMostAlternativeBlock public property

public CodeBlockForOuterMostAlt,Antlr4.Codegen.Model currentOuterMostAlternativeBlock
return Antlr4.Codegen.Model.CodeBlockForOuterMostAlt

currentRule public property

public Stack currentRule
return Stack

extensions public property

public IList extensions
return IList

root public property

public OutputModelObject,Antlr4.Codegen.Model root
return Antlr4.Codegen.Model.OutputModelObject

treeLevel public property

public int treeLevel
return int

walker public property

public SourceGenTriggers walker
return SourceGenTriggers