public class DebugParser extends Parser
Modifier and Type | Field | Description |
---|---|---|
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.
|
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
Constructor | Description |
---|---|
DebugParser(TokenStream input,
DebugEventListener dbg) |
|
DebugParser(TokenStream input,
DebugEventListener dbg,
RecognizerSharedState state) |
Create a normal parser except wrap the token stream in a debug
proxy that fires consume events.
|
DebugParser(TokenStream input,
RecognizerSharedState state) |
Modifier and Type | Method | Description |
---|---|---|
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 |
reportError(IOException e) |
|
void |
reportError(RecognitionException e) |
Report a recognition problem.
|
void |
setDebugListener(DebugEventListener dbg) |
Provide a new debug event listener for this parser.
|
alreadyParsedRule, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, failed, getBacktrackingLevel, getErrorHeader, getErrorMessage, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, setBacktrackingLevel, toStrings, traceIn, traceOut
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOut
protected DebugEventListener dbg
public boolean isCyclicDecision
public DebugParser(TokenStream input, DebugEventListener dbg, RecognizerSharedState state)
public DebugParser(TokenStream input, RecognizerSharedState state)
public DebugParser(TokenStream input, DebugEventListener dbg)
public void setDebugListener(DebugEventListener dbg)
public DebugEventListener getDebugListener()
public void reportError(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 reportError(RecognitionException e)
BaseRecognizer
reportError
in class BaseRecognizer
Copyright © 1992–2018 ANTLR. All rights reserved.