|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract interface to a lexical analyser for use in recursive descent parsers.
Method Summary | |
boolean |
have(int token)
The function returns true if the current symbol is one of the lexical tokens indicated by the integer parameter. |
boolean |
have(java.lang.String token)
The function returns true if the current symbol is the same as the string. |
void |
mustbe(int token)
This throws an exception if the current symbol is not the token. |
void |
mustbe(java.lang.String token)
Equivalent to mustbe(tokenise(token)) |
void |
nextSymbol()
Advance to the next symbol |
int |
tokenise(java.lang.String token)
Convert a string to the equivalent integer token |
Method Detail |
public boolean have(java.lang.String token)
public boolean have(int token)
public int tokenise(java.lang.String token)
public void mustbe(int token) throws java.lang.Exception
public void mustbe(java.lang.String token) throws java.lang.Exception
public void nextSymbol()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |