|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--antlr.Parser
|
+--antlr.LLkParser
Untamed: An LL(k) parser.
antlr.Token,
antlr.TokenBuffer,
antlr.LL1Parser| Field Summary | |
(package private) int |
k
|
| Fields inherited from class antlr.Parser |
astFactory, inputState, returnAST, tokenNames, traceDepth |
| Constructor Summary | |
LLkParser(int k_)
Enabled: |
|
LLkParser(ParserSharedInputState state,
int k_)
Enabled: |
|
LLkParser(TokenBuffer tokenBuf,
int k_)
Enabled: |
|
LLkParser(TokenStream lexer,
int k_)
Enabled: |
|
| Method Summary | |
void |
consume()
Enabled: Consume another token from the input stream. |
int |
LA(int i)
Enabled: |
Token |
LT(int i)
Enabled: |
private void |
trace(String ee,
String rname)
|
void |
traceIn(String rname)
Enabled: |
void |
traceOut(String rname)
Enabled: |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
int k
| Constructor Detail |
public LLkParser(int k_)
public LLkParser(ParserSharedInputState state,
int k_)
public LLkParser(TokenBuffer tokenBuf,
int k_)
public LLkParser(TokenStream lexer,
int k_)
| Method Detail |
public void consume()
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 Parser
public int LA(int i)
throws TokenStreamException
LA in class ParserTokenStreamException
public Token LT(int i)
throws TokenStreamException
LT in class ParserTokenStreamException
private void trace(String ee,
String rname)
throws TokenStreamException
TokenStreamException
public void traceIn(String rname)
throws TokenStreamException
traceIn in class ParserTokenStreamException
public void traceOut(String rname)
throws TokenStreamException
traceOut in class ParserTokenStreamException
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||