public class LLkDebuggingParser extends LLkParser implements DebuggingParser
| Modifier and Type | Field and Description |
|---|---|
protected ParserEventSupport |
parserEventSupport |
protected String[] |
ruleNames |
protected String[] |
semPredNames |
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth| Constructor and Description |
|---|
LLkDebuggingParser(int k_) |
LLkDebuggingParser(ParserSharedInputState state,
int k_) |
LLkDebuggingParser(TokenBuffer tokenBuf,
int k_) |
LLkDebuggingParser(TokenStream lexer,
int k_) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageListener(MessageListener l) |
void |
addParserListener(ParserListener l) |
void |
addParserMatchListener(ParserMatchListener l) |
void |
addParserTokenListener(ParserTokenListener l) |
void |
addSemanticPredicateListener(SemanticPredicateListener l) |
void |
addSyntacticPredicateListener(SyntacticPredicateListener l) |
void |
addTraceListener(TraceListener l) |
void |
consume()
Get another token object from the token stream
|
protected void |
fireEnterRule(int num,
int data) |
protected void |
fireExitRule(int num,
int data) |
protected boolean |
fireSemanticPredicateEvaluated(int type,
int num,
boolean condition) |
protected void |
fireSyntacticPredicateFailed() |
protected void |
fireSyntacticPredicateStarted() |
protected void |
fireSyntacticPredicateSucceeded() |
String |
getRuleName(int num) |
String |
getSemPredName(int num) |
void |
goToSleep() |
boolean |
isDebugMode() |
boolean |
isGuessing() |
int |
LA(int i)
Return the token type of the ith token of lookahead where i=1
is the current token being examined by the parser (i.e., it
has not been matched yet).
|
void |
match(BitSet b)
Make sure current lookahead symbol matches the given set
Throw an exception upon mismatch, which is catch by either the
error handler or by the syntactic predicate.
|
void |
match(int t)
Make sure current lookahead symbol matches token type t.
|
void |
matchNot(int t) |
void |
removeMessageListener(MessageListener l) |
void |
removeParserListener(ParserListener l) |
void |
removeParserMatchListener(ParserMatchListener l) |
void |
removeParserTokenListener(ParserTokenListener l) |
void |
removeSemanticPredicateListener(SemanticPredicateListener l) |
void |
removeSyntacticPredicateListener(SyntacticPredicateListener l) |
void |
removeTraceListener(TraceListener l) |
void |
reportError(RecognitionException ex)
Parser error-reporting function can be overridden in subclass
|
void |
reportError(String s)
Parser error-reporting function can be overridden in subclass
|
void |
reportWarning(String s)
Parser warning-reporting function can be overridden in subclass
|
void |
setDebugMode(boolean value) |
void |
setupDebugging(TokenBuffer tokenBuf) |
void |
setupDebugging(TokenStream lexer) |
protected void |
setupDebugging(TokenStream lexer,
TokenBuffer tokenBuf)
User can override to do their own debugging
|
void |
wakeUp() |
consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, mark, panic, recover, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndentprotected ParserEventSupport parserEventSupport
protected String[] ruleNames
protected String[] semPredNames
public LLkDebuggingParser(int k_)
public LLkDebuggingParser(ParserSharedInputState state, int k_)
public LLkDebuggingParser(TokenBuffer tokenBuf, int k_)
public LLkDebuggingParser(TokenStream lexer, int k_)
public void addMessageListener(MessageListener l)
addMessageListener in class Parserpublic void addParserListener(ParserListener l)
addParserListener in class Parserpublic void addParserMatchListener(ParserMatchListener l)
addParserMatchListener in class Parserpublic void addParserTokenListener(ParserTokenListener l)
addParserTokenListener in class Parserpublic void addSemanticPredicateListener(SemanticPredicateListener l)
addSemanticPredicateListener in class Parserpublic void addSyntacticPredicateListener(SyntacticPredicateListener l)
addSyntacticPredicateListener in class Parserpublic void addTraceListener(TraceListener l)
addTraceListener in class Parserpublic void consume()
throws TokenStreamException
consume in class LLkParserTokenStreamExceptionprotected void fireEnterRule(int num,
int data)
protected void fireExitRule(int num,
int data)
protected boolean fireSemanticPredicateEvaluated(int type,
int num,
boolean condition)
protected void fireSyntacticPredicateFailed()
protected void fireSyntacticPredicateStarted()
protected void fireSyntacticPredicateSucceeded()
public String getRuleName(int num)
getRuleName in interface DebuggingParserpublic String getSemPredName(int num)
getSemPredName in interface DebuggingParserpublic void goToSleep()
public boolean isDebugMode()
isDebugMode in class Parserpublic boolean isGuessing()
public int LA(int i)
throws TokenStreamException
LA in class LLkParserTokenStreamExceptionpublic void match(int t)
throws MismatchedTokenException,
TokenStreamException
match in class ParserMismatchedTokenExceptionTokenStreamExceptionpublic void match(BitSet b) throws MismatchedTokenException, TokenStreamException
match in class ParserMismatchedTokenExceptionTokenStreamExceptionpublic void matchNot(int t)
throws MismatchedTokenException,
TokenStreamException
matchNot in class ParserMismatchedTokenExceptionTokenStreamExceptionpublic void removeMessageListener(MessageListener l)
removeMessageListener in class Parserpublic void removeParserListener(ParserListener l)
removeParserListener in class Parserpublic void removeParserMatchListener(ParserMatchListener l)
removeParserMatchListener in class Parserpublic void removeParserTokenListener(ParserTokenListener l)
removeParserTokenListener in class Parserpublic void removeSemanticPredicateListener(SemanticPredicateListener l)
removeSemanticPredicateListener in class Parserpublic void removeSyntacticPredicateListener(SyntacticPredicateListener l)
removeSyntacticPredicateListener in class Parserpublic void removeTraceListener(TraceListener l)
removeTraceListener in class Parserpublic void reportError(RecognitionException ex)
reportError in class Parserpublic void reportError(String s)
reportError in class Parserpublic void reportWarning(String s)
reportWarning in class Parserpublic void setDebugMode(boolean value)
setDebugMode in class Parserpublic void setupDebugging(TokenBuffer tokenBuf)
public void setupDebugging(TokenStream lexer)
protected void setupDebugging(TokenStream lexer, TokenBuffer tokenBuf)
public void wakeUp()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.