|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.parse.Lexer
public class Lexer
The lexical analyzer.
Constructor Summary | |
---|---|
Lexer(java.lang.String s)
Creates a new lexical analyzer for SQL statement s. |
Method Summary | |
---|---|
void |
eatDelim(char d)
Throws an exception if the current token is not the specified delimiter. |
java.lang.String |
eatId()
Throws an exception if the current token is not an identifier. |
int |
eatIntConstant()
Throws an exception if the current token is not an integer. |
void |
eatKeyword(java.lang.String w)
Throws an exception if the current token is not the specified keyword. |
java.lang.String |
eatStringConstant()
Throws an exception if the current token is not a string. |
boolean |
matchDelim(char d)
Returns true if the current token is the specified delimiter character. |
boolean |
matchId()
Returns true if the current token is a legal identifier. |
boolean |
matchIntConstant()
Returns true if the current token is an integer. |
boolean |
matchKeyword(java.lang.String w)
Returns true if the current token is the specified keyword. |
boolean |
matchStringConstant()
Returns true if the current token is a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Lexer(java.lang.String s)
s
- the SQL statementMethod Detail |
---|
public boolean matchDelim(char d)
d
- a character denoting the delimiter
public boolean matchIntConstant()
public boolean matchStringConstant()
public boolean matchKeyword(java.lang.String w)
w
- the keyword string
public boolean matchId()
public void eatDelim(char d)
d
- a character denoting the delimiterpublic int eatIntConstant()
public java.lang.String eatStringConstant()
public void eatKeyword(java.lang.String w)
w
- the keyword stringpublic java.lang.String eatId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |