public class TCustomLexer extends Object
SQL Input → readln() → yyline[] → reversed into buf[] → get_char() → yytextbuf[]
↓
yylex() processing
↓
yylvalstr (String)
↓
TSourceToken.astext
| Modifier and Type | Field and Description |
|---|---|
static int |
bconst |
static int |
COLUMN0_COUNT |
static int |
COLUMN1_FIRST_X |
static int |
COLUMN2_FIRST_Y |
static int |
COLUMN3_LAST_X |
static int |
COLUMN4_LAST_Y |
static int |
COLUMN5_FIRST_POS |
static int |
COLUMN6_LAST_POS |
String |
defaultDelimiterStr |
char |
delimiterchar |
String |
dolqstart |
boolean |
insideSingleQuoteStr |
boolean |
insqlpluscmd |
static int |
keyword_type_column |
static int |
keyword_type_identifier |
static int |
keyword_type_keyword |
static int |
keyword_type_reserved |
static int |
MAX_TOKEN_COLUMN_SIZE |
static int |
MAX_TOKEN_SIZE |
boolean |
stringLiteralStartWithUnicodeSingleQuote |
String |
tmpDelimiter |
long[][] |
TOKEN_TABLE |
static int |
UNICODE_ENCODE_ID |
static int |
xconst |
BufferedReader |
yyinput |
| Constructor and Description |
|---|
TCustomLexer() |
| Modifier and Type | Method and Description |
|---|---|
static EKeywordType |
getKeywordType(String keyword,
HashMap<String,Integer> keywordValueList,
HashMap<Integer,Integer> keywordTypeList)
Deprecated.
, please use keywordChecker.isKeyword() instead.
because there are so many non-reserved keywords in some databases, it's not suitable to put those
non-reserved keywords in lexer and parser.
|
int |
getkeywordvalue(String keyword) |
String |
getSqlCharset() |
String |
getStringByCode(int tokenCode) |
boolean |
isAtBeginOfLine() |
protected boolean |
isKeyword(int tokenCode)
Check if token code represents a keyword
|
int |
iskeyword(String str) |
protected boolean |
isSingleCharOperator(int tokenCode)
Check if token code represents a single character operator
|
void |
reset() |
void |
resetTokenTable()
Reset TOKEN_TABLE by only clearing entries that were used (incremental clear).
|
void |
setSqlCharset(String sqlCharset) |
void |
setTokenTableValue(TSourceToken token) |
int |
yylexwrap(TSourceToken psourcetoken) |
public static int MAX_TOKEN_SIZE
public static int MAX_TOKEN_COLUMN_SIZE
public static int COLUMN0_COUNT
public static int COLUMN1_FIRST_X
public static int COLUMN2_FIRST_Y
public static int COLUMN3_LAST_X
public static int COLUMN4_LAST_Y
public static int COLUMN5_FIRST_POS
public static int COLUMN6_LAST_POS
public long[][] TOKEN_TABLE
public BufferedReader yyinput
public boolean insqlpluscmd
public static int keyword_type_reserved
public static int keyword_type_keyword
public static int keyword_type_identifier
public static int keyword_type_column
public char delimiterchar
public String defaultDelimiterStr
public String tmpDelimiter
public static final int bconst
public static final int xconst
public static final int UNICODE_ENCODE_ID
public boolean insideSingleQuoteStr
public boolean stringLiteralStartWithUnicodeSingleQuote
public TCustomLexer()
public void resetTokenTable()
public void setTokenTableValue(TSourceToken token)
public void setSqlCharset(String sqlCharset)
public String getSqlCharset()
protected boolean isSingleCharOperator(int tokenCode)
protected boolean isKeyword(int tokenCode)
public boolean isAtBeginOfLine()
public String getStringByCode(int tokenCode)
public int getkeywordvalue(String keyword)
public static EKeywordType getKeywordType(String keyword, HashMap<String,Integer> keywordValueList, HashMap<Integer,Integer> keywordTypeList)
keyword - keywordValueList - keywordTypeList - public void reset()
public int yylexwrap(TSourceToken psourcetoken)