public class DFA extends Object
| Modifier and Type | Field and Description |
|---|---|
protected short[] |
accept |
static boolean |
debug |
protected int |
decisionNumber |
protected short[] |
eof |
protected short[] |
eot |
protected char[] |
max |
protected char[] |
min |
protected BaseRecognizer |
recognizer
Which recognizer encloses this DFA? Needed to check backtracking
|
protected short[] |
special |
protected short[][] |
transition |
| Constructor and Description |
|---|
DFA() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
error(NoViableAltException nvae)
A hook for debugging interface
|
String |
getDescription() |
protected void |
noViableAlt(int s,
IntStream input) |
int |
predict(IntStream input)
From the input stream, predict what alternative will succeed
using this DFA (representing the covering regular approximation
to the underlying CFL).
|
int |
specialStateTransition(int s,
IntStream input) |
static short[] |
unpackEncodedString(String encodedString)
Given a String that has a run-length-encoding of some unsigned shorts
like "\1\2\3\9", convert to short[] {2,9,9,9}.
|
static char[] |
unpackEncodedStringToUnsignedChars(String encodedString)
Hideous duplication of code, but I need different typed arrays out :(
|
protected short[] eot
protected short[] eof
protected char[] min
protected char[] max
protected short[] accept
protected short[] special
protected short[][] transition
protected int decisionNumber
protected BaseRecognizer recognizer
public static final boolean debug
public int predict(IntStream input) throws RecognitionException
RecognitionExceptionprotected void noViableAlt(int s,
IntStream input)
throws NoViableAltException
NoViableAltExceptionprotected void error(NoViableAltException nvae)
public int specialStateTransition(int s,
IntStream input)
throws NoViableAltException
NoViableAltExceptionpublic String getDescription()
public static short[] unpackEncodedString(String encodedString)
public static char[] unpackEncodedStringToUnsignedChars(String encodedString)
Copyright © 1992-2013 ANTLR. All Rights Reserved.