Antlr.Runtime.DFA Class Reference
A
DFA implemented as a set of transition tables.
More...
List of all members.
Detailed Description
A
DFA implemented as a set of transition tables.
Any state that has a semantic predicate edge is special; those states are generated with if-then-else structures in a SpecialStateTransition() which is generated by cyclicDFA template.
There are at most 32767 states (16-bit signed short). Could get away with byte sometimes but would have to generate different types and the simulation code too.
As a point of reference, the Tokens rule DFA for the lexer in the Java grammar sample has approximately 326 states.
Definition at line 57 of file DFA.cs.
Member Function Documentation
| delegate int Antlr.Runtime.DFA.SpecialStateTransitionHandler |
( |
DFA |
dfa, |
|
|
int |
s, |
|
|
IIntStream |
input | |
|
) |
| | |
| int Antlr.Runtime.DFA.Predict |
( |
IIntStream |
input |
) |
|
From the input stream, predict what alternative will succeed using this DFA (representing the covering regular approximation to the underlying CFL).
- Parameters:
-
- Returns:
- Return an alternative number 1..n. Throw an exception upon error.
Definition at line 87 of file DFA.cs.
| void Antlr.Runtime.DFA.NoViableAlt |
( |
int |
s, |
|
|
IIntStream |
input | |
|
) |
| | [protected] |
A hook for debugging interface.
- Parameters:
-
Definition at line 209 of file DFA.cs.
| virtual int Antlr.Runtime.DFA.SpecialStateTransition |
( |
int |
s, |
|
|
IIntStream |
input | |
|
) |
| | [virtual] |
| static short [] Antlr.Runtime.DFA.UnpackEncodedString |
( |
string |
encodedString |
) |
[static] |
| static short [][] Antlr.Runtime.DFA.UnpackEncodedStringArray |
( |
string[] |
encodedStrings |
) |
[static] |
| static char [] Antlr.Runtime.DFA.UnpackEncodedStringToUnsignedChars |
( |
string |
encodedString |
) |
[static] |
| int Antlr.Runtime.DFA.SpecialTransition |
( |
int |
state, |
|
|
int |
symbol | |
|
) |
| | |
Member Data Documentation
Which recognizer encloses this DFA? Needed to check backtracking.
Definition at line 77 of file DFA.cs.
Property Documentation
virtual string Antlr.Runtime.DFA.Description [get] |
The documentation for this class was generated from the following file:
- /Users/parrt/antlr/code/antlr/main/runtime/CSharp/Sources/Antlr3.Runtime/Antlr.Runtime/DFA.cs