|
||||||||||
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(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. |
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(String w)
Throws an exception if the current token is not the specified keyword. |
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(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(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(String w)
w
- the keyword string
public boolean matchId()
public void eatDelim(char d)
d
- a character denoting the delimiterpublic int eatIntConstant()
public String eatStringConstant()
public void eatKeyword(String w)
w
- the keyword stringpublic String eatId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |