|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.runtime.BaseRecognizer
org.antlr.runtime.Parser
org.antlr.runtime.debug.DebugParser
public class DebugParser
Field Summary | |
---|---|
protected DebugEventListener |
dbg
Who to notify when events in the parser occur. |
boolean |
isCyclicDecision
Used to differentiate between fixed lookahead and cyclic DFA decisions while profiling. |
Fields inherited from class org.antlr.runtime.Parser |
---|
input |
Fields inherited from class org.antlr.runtime.BaseRecognizer |
---|
_fsp, backtracking, DEFAULT_TOKEN_CHANNEL, errorRecovery, failed, following, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, lastErrorIndex, MEMO_RULE_FAILED, MEMO_RULE_FAILED_I, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, ruleMemo |
Constructor Summary | |
---|---|
DebugParser(TokenStream input)
|
|
DebugParser(TokenStream input,
DebugEventListener dbg)
Create a normal parser except wrap the token stream in a debug proxy that fires consume events. |
|
DebugParser(TokenStream input,
int port)
Create a proxy to marshall events across socket to another listener. |
Method Summary | |
---|---|
void |
beginBacktrack(int level)
|
void |
beginResync()
A hook to listen in on the token consumption during error recovery. |
void |
endBacktrack(int level,
boolean successful)
|
void |
endResync()
|
DebugEventListener |
getDebugListener()
|
void |
recoverFromMismatchedSet(IntStream input,
RecognitionException mte,
BitSet follow)
|
void |
recoverFromMismatchedToken(IntStream input,
RecognitionException mte,
int ttype,
BitSet follow)
Attempt to recover from a single missing or extra token. |
void |
reportError(java.io.IOException e)
|
void |
setDebugListener(DebugEventListener dbg)
Provide a new debug event listener for this parser. |
Methods inherited from class org.antlr.runtime.Parser |
---|
getTokenStream, reset, setTokenStream, traceIn, traceOut |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DebugEventListener dbg
public boolean isCyclicDecision
Constructor Detail |
---|
public DebugParser(TokenStream input, DebugEventListener dbg)
public DebugParser(TokenStream input)
public DebugParser(TokenStream input, int port)
Method Detail |
---|
public void setDebugListener(DebugEventListener dbg)
public DebugEventListener getDebugListener()
public void reportError(java.io.IOException e)
public void beginResync()
BaseRecognizer
beginResync
in class BaseRecognizer
public void endResync()
endResync
in class BaseRecognizer
public void beginBacktrack(int level)
public void endBacktrack(int level, boolean successful)
public void recoverFromMismatchedToken(IntStream input, RecognitionException mte, int ttype, BitSet follow) throws RecognitionException
BaseRecognizer
recoverFromMismatchedToken
in class BaseRecognizer
RecognitionException
public void recoverFromMismatchedSet(IntStream input, RecognitionException mte, BitSet follow) throws RecognitionException
recoverFromMismatchedSet
in class BaseRecognizer
RecognitionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |