C# Class Antlr4.Codegen.AbstractTarget

Show file Open project: sharwell/antlr4cs Class Usage Examples

Protected Properties

Property Type Description
gen CodeGenerator
targetCharValueEscape string[]

Public Methods

Method Description
EncodeIntAsCharEscape ( int v ) : string
GetAltLabelContextStructName ( string label ) : string
GetBaseListenerFileName ( bool header ) : string
GetBaseVisitorFileName ( bool header ) : string
GetCodeGenerator ( ) : CodeGenerator
GetElementListName ( string name ) : string
GetElementName ( string name ) : string
GetImplicitRuleLabel ( string ruleName ) : string
GetImplicitSetLabel ( string id ) : string
GetImplicitTokenLabel ( string tokenName ) : string
GetInlineTestSetWordSize ( ) : int
GetLanguage ( ) : string
GetListLabel ( string label ) : string
GetListenerFileName ( bool header ) : string
GetLoopCounter ( GrammarAST ast ) : string
GetLoopLabel ( GrammarAST ast ) : string
GetRecognizerFileName ( bool header ) : string
GetRuleFunctionContextStructName ( Rule r ) : string
GetRuleFunctionContextStructName ( RuleFunction function ) : string
GetSerializedATNSegmentLimit ( ) : int
GetTargetStringLiteralFromANTLRStringLiteral ( CodeGenerator generator, string literal, bool addQuotes ) : string
GetTargetStringLiteralFromString ( string s ) : string
GetTargetStringLiteralFromString ( string s, bool quoted ) : string
GetTokenTypeAsTargetLabel ( Grammar g, int ttype ) : string
GetTokenTypesAsTargetLabels ( Grammar g, int ttypes ) : string[]
GetVisitorFileName ( bool header ) : string
GrammarSymbolCausesIssueInGeneratedCode ( GrammarAST idNode ) : bool
NeedsHeader ( ) : bool
SupportsOverloadedMethods ( ) : bool
WantsBaseListener ( ) : bool
WantsBaseVisitor ( ) : bool

Protected Methods

Method Description
AbstractTarget ( CodeGenerator gen, string language ) : System.Diagnostics
GenFile ( Grammar g, Template outputFileST, string fileName ) : void
VisibleGrammarSymbolCausesIssueInGeneratedCode ( GrammarAST idNode ) : bool

Private Methods

Method Description
GetTemplates ( ) : TemplateGroup
LoadTemplates ( ) : TemplateGroup

Method Details

AbstractTarget() protected method

protected AbstractTarget ( CodeGenerator gen, string language ) : System.Diagnostics
gen CodeGenerator
language string
return System.Diagnostics

EncodeIntAsCharEscape() public abstract method

public abstract EncodeIntAsCharEscape ( int v ) : string
v int
return string

GenFile() protected method

protected GenFile ( Grammar g, Template outputFileST, string fileName ) : void
g Antlr4.Tool.Grammar
outputFileST Template
fileName string
return void

GetAltLabelContextStructName() public method

public GetAltLabelContextStructName ( string label ) : string
label string
return string

GetBaseListenerFileName() public method

public GetBaseListenerFileName ( bool header ) : string
header bool
return string

GetBaseVisitorFileName() public method

public GetBaseVisitorFileName ( bool header ) : string
header bool
return string

GetCodeGenerator() public method

public GetCodeGenerator ( ) : CodeGenerator
return CodeGenerator

GetElementListName() public method

public GetElementListName ( string name ) : string
name string
return string

GetElementName() public method

public GetElementName ( string name ) : string
name string
return string

GetImplicitRuleLabel() public method

public GetImplicitRuleLabel ( string ruleName ) : string
ruleName string
return string

GetImplicitSetLabel() public method

public GetImplicitSetLabel ( string id ) : string
id string
return string

GetImplicitTokenLabel() public method

public GetImplicitTokenLabel ( string tokenName ) : string
tokenName string
return string

GetInlineTestSetWordSize() public method

public GetInlineTestSetWordSize ( ) : int
return int

GetLanguage() public method

public GetLanguage ( ) : string
return string

GetListLabel() public method

public GetListLabel ( string label ) : string
label string
return string

GetListenerFileName() public method

public GetListenerFileName ( bool header ) : string
header bool
return string

GetLoopCounter() public method

public GetLoopCounter ( GrammarAST ast ) : string
ast Antlr4.Tool.Ast.GrammarAST
return string

GetLoopLabel() public method

public GetLoopLabel ( GrammarAST ast ) : string
ast Antlr4.Tool.Ast.GrammarAST
return string

GetRecognizerFileName() public method

public GetRecognizerFileName ( bool header ) : string
header bool
return string

GetRuleFunctionContextStructName() public method

public GetRuleFunctionContextStructName ( Rule r ) : string
r Antlr4.Tool.Rule
return string

GetRuleFunctionContextStructName() public method

public GetRuleFunctionContextStructName ( RuleFunction function ) : string
function Antlr4.Codegen.Model.RuleFunction
return string

GetSerializedATNSegmentLimit() public method

public GetSerializedATNSegmentLimit ( ) : int
return int

GetTargetStringLiteralFromANTLRStringLiteral() public abstract method

public abstract GetTargetStringLiteralFromANTLRStringLiteral ( CodeGenerator generator, string literal, bool addQuotes ) : string
generator CodeGenerator
literal string
addQuotes bool
return string

GetTargetStringLiteralFromString() public method

public GetTargetStringLiteralFromString ( string s ) : string
s string
return string

GetTargetStringLiteralFromString() public method

public GetTargetStringLiteralFromString ( string s, bool quoted ) : string
s string
quoted bool
return string

GetTokenTypeAsTargetLabel() public method

public GetTokenTypeAsTargetLabel ( Grammar g, int ttype ) : string
g Antlr4.Tool.Grammar
ttype int
return string

GetTokenTypesAsTargetLabels() public method

public GetTokenTypesAsTargetLabels ( Grammar g, int ttypes ) : string[]
g Antlr4.Tool.Grammar
ttypes int
return string[]

GetVisitorFileName() public method

public GetVisitorFileName ( bool header ) : string
header bool
return string

GrammarSymbolCausesIssueInGeneratedCode() public method

public GrammarSymbolCausesIssueInGeneratedCode ( GrammarAST idNode ) : bool
idNode Antlr4.Tool.Ast.GrammarAST
return bool

NeedsHeader() public method

public NeedsHeader ( ) : bool
return bool

SupportsOverloadedMethods() public method

public SupportsOverloadedMethods ( ) : bool
return bool

VisibleGrammarSymbolCausesIssueInGeneratedCode() protected abstract method

protected abstract VisibleGrammarSymbolCausesIssueInGeneratedCode ( GrammarAST idNode ) : bool
idNode Antlr4.Tool.Ast.GrammarAST
return bool

WantsBaseListener() public method

public WantsBaseListener ( ) : bool
return bool

WantsBaseVisitor() public method

public WantsBaseVisitor ( ) : bool
return bool

Property Details

gen protected property

protected CodeGenerator,Antlr4.Codegen gen
return CodeGenerator

targetCharValueEscape protected property

protected string[] targetCharValueEscape
return string[]