public class DebugParser extends Parser
Modifier and Type | Field and 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 and 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 and 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.
|
getCurrentInputSymbol, getMissingSymbol, getSourceName, getTokenStream, reset, setTokenStream, traceIn, traceOut
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
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–2015 ANTLR. All rights reserved.