Package org.apache.ignite.internal.sql
Class SqlLexer
- java.lang.Object
-
- org.apache.ignite.internal.sql.SqlLexer
-
- All Implemented Interfaces:
SqlLexerToken
public class SqlLexer extends Object implements SqlLexerToken
SQL lexer.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaneod()SqlLexerTokenlookAhead()Get next token without lexer state change.intposition()booleanshift()Shift lexer to the next position.Stringsql()Stringtoken()chartokenFirstChar()inttokenPosition()SqlLexerTokenTypetokenType()
-
-
-
Constructor Detail
-
SqlLexer
public SqlLexer(String sql)
Constructor.- Parameters:
sql- Input.
-
-
Method Detail
-
lookAhead
public SqlLexerToken lookAhead()
Get next token without lexer state change.- Returns:
- Next token.
-
shift
public boolean shift()
Shift lexer to the next position.- Returns:
Trueif next token was found,falsein case of end-of-file.
-
sql
public String sql()
- Specified by:
sqlin interfaceSqlLexerToken- Returns:
- Original SQL.
-
token
public String token()
- Specified by:
tokenin interfaceSqlLexerToken- Returns:
- Current token.
-
tokenFirstChar
public char tokenFirstChar()
- Specified by:
tokenFirstCharin interfaceSqlLexerToken- Returns:
- First character of the current token.
-
tokenPosition
public int tokenPosition()
- Specified by:
tokenPositionin interfaceSqlLexerToken- Returns:
- Current token start position.
-
tokenType
public SqlLexerTokenType tokenType()
- Specified by:
tokenTypein interfaceSqlLexerToken- Returns:
- Token type.
-
eod
public boolean eod()
- Returns:
Trueif end of data is reached.
-
position
public int position()
- Returns:
- Current lexer position.
-
-