C# Class Antlr4.Semantics.BasicSemanticChecks

Inheritance: GrammarTreeVisitor
Show file Open project: sharwell/antlr4cs Class Usage Examples

Public Properties

Property Type Description
checkAssocElementOption bool
errMgr Antlr4.Tool.ErrorManager
g Antlr4.Tool.Grammar
ruleCollector RuleCollector
validImportTypes int>.Runtime.Misc.MultiMap

Protected Properties

Property Type Description
nonFragmentRuleCount int

Public Methods

Method Description
ActionInAlt ( ActionAST action ) : void
BasicSemanticChecks ( Grammar g, RuleCollector ruleCollector ) : System.Collections.Generic
BlockOption ( GrammarAST ID, GrammarAST valueAST ) : void
DefineChannel ( GrammarAST ID ) : void
DefineToken ( GrammarAST ID ) : void
DiscoverGrammar ( GrammarRootAST root, GrammarAST ID ) : void
DiscoverLexerRule ( RuleAST rule, GrammarAST ID, IList modifiers, GrammarAST block ) : void
DiscoverRule ( RuleAST rule, GrammarAST ID, IList modifiers, ActionAST arg, ActionAST returns, GrammarAST thrws, GrammarAST options, ActionAST locals, IList actions, GrammarAST block ) : void
DiscoverRules ( GrammarAST rules ) : void
ElementOption ( GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST ) : void
FinishGrammar ( GrammarRootAST root, GrammarAST ID ) : void
FinishPrequels ( GrammarAST firstPrequel ) : void
FinishRule ( RuleAST rule, GrammarAST ID, GrammarAST block ) : void
GetErrorManager ( ) : ErrorManager
GrammarOption ( GrammarAST ID, GrammarAST valueAST ) : void
ImportGrammar ( GrammarAST label, GrammarAST ID ) : void
Label ( GrammarAST op, GrammarAST ID, GrammarAST element ) : void
ModeDef ( GrammarAST m, GrammarAST ID ) : void
Process ( ) : void
RuleOption ( GrammarAST ID, GrammarAST valueAST ) : void
RuleRef ( GrammarAST @ref, ActionAST arg ) : void

Protected Methods

Method Description
CheckElementIsOuterMostInSingleAlt ( GrammarAST tree ) : void
EnterChannelsSpec ( GrammarAST tree ) : void
EnterLabeledLexerElement ( GrammarAST tree ) : void
EnterLexerCommand ( GrammarAST tree ) : void
EnterLexerElement ( GrammarAST tree ) : void
EnterMode ( GrammarAST tree ) : void
EnterTerminal ( GrammarAST tree ) : void
ExitLexerRule ( GrammarAST tree ) : void
ExitMode ( GrammarAST tree ) : void

Private Methods

Method Description
BasicSemanticChecks ( ) : System.Collections.Generic
CheckChannelDefinition ( Antlr.Runtime.IToken tokenID ) : void
CheckElementOptions ( GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST ) : bool
CheckGrammarName ( Antlr.Runtime.IToken nameToken ) : void
CheckImport ( Antlr.Runtime.IToken importID ) : void
CheckInvalidRuleDef ( Antlr.Runtime.IToken ruleID ) : void
CheckInvalidRuleRef ( Antlr.Runtime.IToken ruleID ) : void
CheckNumPrequels ( IList options, IList imports, IList tokens ) : void
CheckNumRules ( GrammarAST rulesNode ) : void
CheckOptions ( GrammarAST parent, Antlr.Runtime.IToken optionID, GrammarAST valueAST ) : bool
CheckRuleRefOptions ( RuleRefAST elem, GrammarAST ID, GrammarAST valueAST ) : bool
CheckTokenDefinition ( Antlr.Runtime.IToken tokenID ) : void
CheckTokenOptions ( TerminalAST elem, GrammarAST ID, GrammarAST valueAST ) : bool
LegalGrammarOption ( string key ) : bool

Method Details

ActionInAlt() public method

public ActionInAlt ( ActionAST action ) : void
action Antlr4.Tool.Ast.ActionAST
return void

BasicSemanticChecks() public method

public BasicSemanticChecks ( Grammar g, RuleCollector ruleCollector ) : System.Collections.Generic
g Antlr4.Tool.Grammar
ruleCollector RuleCollector
return System.Collections.Generic

BlockOption() public method

public BlockOption ( GrammarAST ID, GrammarAST valueAST ) : void
ID Antlr4.Tool.Ast.GrammarAST
valueAST Antlr4.Tool.Ast.GrammarAST
return void

CheckElementIsOuterMostInSingleAlt() protected method

protected CheckElementIsOuterMostInSingleAlt ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

DefineChannel() public method

public DefineChannel ( GrammarAST ID ) : void
ID Antlr4.Tool.Ast.GrammarAST
return void

DefineToken() public method

public DefineToken ( GrammarAST ID ) : void
ID Antlr4.Tool.Ast.GrammarAST
return void

DiscoverGrammar() public method

public DiscoverGrammar ( GrammarRootAST root, GrammarAST ID ) : void
root Antlr4.Tool.Ast.GrammarRootAST
ID Antlr4.Tool.Ast.GrammarAST
return void

DiscoverLexerRule() public method

public DiscoverLexerRule ( RuleAST rule, GrammarAST ID, IList modifiers, GrammarAST block ) : void
rule Antlr4.Tool.Ast.RuleAST
ID Antlr4.Tool.Ast.GrammarAST
modifiers IList
block Antlr4.Tool.Ast.GrammarAST
return void

DiscoverRule() public method

public DiscoverRule ( RuleAST rule, GrammarAST ID, IList modifiers, ActionAST arg, ActionAST returns, GrammarAST thrws, GrammarAST options, ActionAST locals, IList actions, GrammarAST block ) : void
rule Antlr4.Tool.Ast.RuleAST
ID Antlr4.Tool.Ast.GrammarAST
modifiers IList
arg Antlr4.Tool.Ast.ActionAST
returns Antlr4.Tool.Ast.ActionAST
thrws Antlr4.Tool.Ast.GrammarAST
options Antlr4.Tool.Ast.GrammarAST
locals Antlr4.Tool.Ast.ActionAST
actions IList
block Antlr4.Tool.Ast.GrammarAST
return void

DiscoverRules() public method

public DiscoverRules ( GrammarAST rules ) : void
rules Antlr4.Tool.Ast.GrammarAST
return void

ElementOption() public method

public ElementOption ( GrammarASTWithOptions elem, GrammarAST ID, GrammarAST valueAST ) : void
elem Antlr4.Tool.Ast.GrammarASTWithOptions
ID Antlr4.Tool.Ast.GrammarAST
valueAST Antlr4.Tool.Ast.GrammarAST
return void

EnterChannelsSpec() protected method

protected EnterChannelsSpec ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

EnterLabeledLexerElement() protected method

protected EnterLabeledLexerElement ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

EnterLexerCommand() protected method

protected EnterLexerCommand ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

EnterLexerElement() protected method

protected EnterLexerElement ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

EnterMode() protected method

protected EnterMode ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

EnterTerminal() protected method

protected EnterTerminal ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

ExitLexerRule() protected method

protected ExitLexerRule ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

ExitMode() protected method

protected ExitMode ( GrammarAST tree ) : void
tree Antlr4.Tool.Ast.GrammarAST
return void

FinishGrammar() public method

public FinishGrammar ( GrammarRootAST root, GrammarAST ID ) : void
root Antlr4.Tool.Ast.GrammarRootAST
ID Antlr4.Tool.Ast.GrammarAST
return void

FinishPrequels() public method

public FinishPrequels ( GrammarAST firstPrequel ) : void
firstPrequel Antlr4.Tool.Ast.GrammarAST
return void

FinishRule() public method

public FinishRule ( RuleAST rule, GrammarAST ID, GrammarAST block ) : void
rule Antlr4.Tool.Ast.RuleAST
ID Antlr4.Tool.Ast.GrammarAST
block Antlr4.Tool.Ast.GrammarAST
return void

GetErrorManager() public method

public GetErrorManager ( ) : ErrorManager
return Antlr4.Tool.ErrorManager

GrammarOption() public method

public GrammarOption ( GrammarAST ID, GrammarAST valueAST ) : void
ID Antlr4.Tool.Ast.GrammarAST
valueAST Antlr4.Tool.Ast.GrammarAST
return void

ImportGrammar() public method

public ImportGrammar ( GrammarAST label, GrammarAST ID ) : void
label Antlr4.Tool.Ast.GrammarAST
ID Antlr4.Tool.Ast.GrammarAST
return void

Label() public method

public Label ( GrammarAST op, GrammarAST ID, GrammarAST element ) : void
op Antlr4.Tool.Ast.GrammarAST
ID Antlr4.Tool.Ast.GrammarAST
element Antlr4.Tool.Ast.GrammarAST
return void

ModeDef() public method

public ModeDef ( GrammarAST m, GrammarAST ID ) : void
m Antlr4.Tool.Ast.GrammarAST
ID Antlr4.Tool.Ast.GrammarAST
return void

Process() public method

public Process ( ) : void
return void

RuleOption() public method

public RuleOption ( GrammarAST ID, GrammarAST valueAST ) : void
ID Antlr4.Tool.Ast.GrammarAST
valueAST Antlr4.Tool.Ast.GrammarAST
return void

RuleRef() public method

public RuleRef ( GrammarAST @ref, ActionAST arg ) : void
@ref Antlr4.Tool.Ast.GrammarAST
arg Antlr4.Tool.Ast.ActionAST
return void

Property Details

checkAssocElementOption public property

public bool checkAssocElementOption
return bool

errMgr public property

public ErrorManager,Antlr4.Tool errMgr
return Antlr4.Tool.ErrorManager

g public property

public Grammar,Antlr4.Tool g
return Antlr4.Tool.Grammar

nonFragmentRuleCount protected property

protected int nonFragmentRuleCount
return int

ruleCollector public property

public RuleCollector,Antlr4.Semantics ruleCollector
return RuleCollector

validImportTypes public static property

public static Runtime.Misc.MultiMap validImportTypes
return int>.Runtime.Misc.MultiMap