public class LLkParser extends Parser
Token,
TokenBufferastFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth| Constructor and Description |
|---|
LLkParser(int k_) |
LLkParser(ParserSharedInputState state,
int k_) |
LLkParser(TokenBuffer tokenBuf,
int k_) |
LLkParser(TokenStream lexer,
int k_) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume()
Consume another token from the input stream.
|
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).
|
Token |
LT(int i)
Return the ith token of lookahead
|
void |
traceIn(String rname) |
void |
traceOut(String rname) |
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndentpublic LLkParser(int k_)
public LLkParser(ParserSharedInputState state, int k_)
public LLkParser(TokenBuffer tokenBuf, int k_)
public LLkParser(TokenStream lexer, int k_)
public void consume()
throws TokenStreamException
Note that it is possible to overwrite tokens that have not been matched. For example, calling consume() 3 times when k=2, means that the first token consumed will be overwritten with the 3rd.
consume in class ParserTokenStreamExceptionpublic int LA(int i)
throws TokenStreamException
ParserLA in class ParserTokenStreamExceptionpublic Token LT(int i) throws TokenStreamException
ParserLT in class ParserTokenStreamExceptionpublic void traceIn(String rname) throws TokenStreamException
traceIn in class ParserTokenStreamExceptionpublic void traceOut(String rname) throws TokenStreamException
traceOut in class ParserTokenStreamExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.