C# Class Antlr4.Runtime.Atn.ATN

Show file Open project: sharwell/antlr4cs Class Usage Examples

Public Properties

Property Type Description
grammarType ATNType
lexerActions ILexerAction[]
maxTokenType int
ruleToStartState Antlr4.Runtime.Atn.RuleStartState[]
ruleToStopState Antlr4.Runtime.Atn.RuleStopState[]
ruleToTokenType int[]

Protected Properties

Property Type Description
LL1Table int>.ConcurrentDictionary

Public Methods

Method Description
ATN ( ATNType grammarType, int maxTokenType ) : System

Used for runtime deserialization of ATNs from strings

AddState ( ATNState state ) : void
ClearDFA ( ) : void
DefineDecisionState ( DecisionState s ) : int
DefineMode ( string name, TokensStartState s ) : void
GetCachedContext ( PredictionContext context ) : PredictionContext
GetDecisionState ( int decision ) : DecisionState
RemoveState ( ATNState state ) : void

Private Methods

Method Description
GetExpectedTokens ( int stateNumber, RuleContext context ) : IntervalSet
NextTokens ( ATNState s ) : IntervalSet
NextTokens ( ATNState s, PredictionContext ctx ) : IntervalSet

Method Details

ATN() public method

Used for runtime deserialization of ATNs from strings
public ATN ( ATNType grammarType, int maxTokenType ) : System
grammarType ATNType
maxTokenType int
return System

AddState() public method

public AddState ( ATNState state ) : void
state ATNState
return void

ClearDFA() public method

public ClearDFA ( ) : void
return void

DefineDecisionState() public method

public DefineDecisionState ( DecisionState s ) : int
s DecisionState
return int

DefineMode() public method

public DefineMode ( string name, TokensStartState s ) : void
name string
s TokensStartState
return void

GetCachedContext() public method

public GetCachedContext ( PredictionContext context ) : PredictionContext
context PredictionContext
return PredictionContext

GetDecisionState() public method

public GetDecisionState ( int decision ) : DecisionState
decision int
return DecisionState

RemoveState() public method

public RemoveState ( ATNState state ) : void
state ATNState
return void

Property Details

LL1Table protected property

protected ConcurrentDictionary LL1Table
return int>.ConcurrentDictionary

grammarType public property

The type of the ATN.
public ATNType grammarType
return ATNType

lexerActions public property

For lexer ATNs, this is an array of ILexerAction objects which may be referenced by action transitions in the ATN.
public ILexerAction[] lexerActions
return ILexerAction[]

maxTokenType public property

The maximum value for any symbol recognized by a transition in the ATN.
public int maxTokenType
return int

ruleToStartState public property

Maps from rule index to starting state number.
public RuleStartState[],Antlr4.Runtime.Atn ruleToStartState
return Antlr4.Runtime.Atn.RuleStartState[]

ruleToStopState public property

Maps from rule index to stop state number.
public RuleStopState[],Antlr4.Runtime.Atn ruleToStopState
return Antlr4.Runtime.Atn.RuleStopState[]

ruleToTokenType public property

For lexer ATNs, this maps the rule index to the resulting token type.
For lexer ATNs, this maps the rule index to the resulting token type. For parser ATNs, this maps the rule index to the generated bypass token type if the ATNDeserializationOptions.GenerateRuleBypassTransitions() deserialization option was specified; otherwise, this is .
public int[] ruleToTokenType
return int[]