public class Lexer extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Lexer.CommentHandler |
static class |
Lexer.SavePoint |
Constructor and Description |
---|
Lexer(char[] input,
int inputLength,
boolean skipComment) |
Lexer(String input) |
Lexer(String input,
boolean skipComment) |
Lexer(String input,
Lexer.CommentHandler commentHandler) |
Lexer(String input,
Lexer.CommentHandler commentHandler,
String dbType) |
Modifier and Type | Method and Description |
---|---|
String |
addSymbol() |
void |
arraycopy(int srcPos,
char[] dest,
int destPos,
int length) |
int |
bp() |
char |
charAt(int index) |
void |
computeRowAndColumn() |
void |
config(SQLParserFeature feature,
boolean state) |
char |
current() |
BigDecimal |
decimalValue() |
int |
getCommentCount() |
Lexer.CommentHandler |
getCommentHandler() |
String |
getDbType() |
Keywords |
getKeywods() |
int |
getLine() |
int |
getPosColumn() |
int |
getPosLine() |
String |
getSource() |
boolean |
hasComment() |
long |
hash_lower() |
String |
hexString() |
boolean |
identifierEquals(long hash_lower) |
boolean |
identifierEquals(String text) |
String |
info() |
Number |
integerValue() |
boolean |
isAllowComment() |
boolean |
isDigit(char ch) |
boolean |
isEnabled(SQLParserFeature feature) |
boolean |
isEndOfComment() |
boolean |
isEOF() |
boolean |
isKeepComments() |
Lexer.SavePoint |
mark() |
void |
nextToken() |
void |
nextTokenBy() |
void |
nextTokenComma() |
void |
nextTokenEq() |
void |
nextTokenIdent() |
void |
nextTokenLParen() |
void |
nextTokenNotOrNull() |
void |
nextTokenValue() |
int |
nextVarIndex() |
SQLNumberExpr |
numberExpr() |
SQLNumberExpr |
numberExpr(boolean negate) |
String |
numberString() |
static String |
parameterize(String sql,
String dbType) |
int |
pos()
Return the current token's position: a 0-based offset from beginning of the raw input stream (before unicode
translation)
|
List<String> |
readAndResetComments() |
void |
reset() |
void |
reset(int pos) |
void |
reset(int mark,
char markChar,
Token token) |
void |
reset(Lexer.SavePoint savePoint) |
void |
scanComment() |
void |
scanHexaDecimal() |
void |
scanIdentifier() |
void |
scanNumber() |
void |
scanSharp() |
void |
scanVariable() |
void |
setAllowComment(boolean allowComment) |
void |
setCommentHandler(Lexer.CommentHandler commentHandler) |
void |
setKeepComments(boolean keepComments) |
void |
skipToEOF() |
String |
stringVal()
The value of a literal token, recorded as a string.
|
char[] |
sub_chars(int offset,
int count) |
String |
subString(int offset,
int count) |
Token |
token()
Return the current token, set by nextToken().
|
public final String text
public Lexer(String input)
public Lexer(String input, Lexer.CommentHandler commentHandler)
public Lexer(String input, Lexer.CommentHandler commentHandler, String dbType)
public Lexer(String input, boolean skipComment)
public Lexer(char[] input, int inputLength, boolean skipComment)
public boolean isKeepComments()
public void setKeepComments(boolean keepComments)
public Lexer.CommentHandler getCommentHandler()
public void setCommentHandler(Lexer.CommentHandler commentHandler)
public final char charAt(int index)
public final String addSymbol()
public final String subString(int offset, int count)
public final char[] sub_chars(int offset, int count)
public void arraycopy(int srcPos, char[] dest, int destPos, int length)
public boolean isAllowComment()
public void setAllowComment(boolean allowComment)
public int nextVarIndex()
public Keywords getKeywods()
public Lexer.SavePoint mark()
public void reset(Lexer.SavePoint savePoint)
public void reset()
public void reset(int pos)
public boolean isEOF()
public final Token token()
public final String getDbType()
public String info()
public final void nextTokenComma()
public final void nextTokenEq()
public final void nextTokenLParen()
public final void nextTokenValue()
public final void nextTokenBy()
public final void nextTokenNotOrNull()
public final void nextTokenIdent()
public final void nextToken()
public void scanSharp()
public void scanVariable()
public void scanComment()
public void scanIdentifier()
public void scanNumber()
public void scanHexaDecimal()
public String hexString()
public final boolean isDigit(char ch)
public final int pos()
public final String stringVal()
public final boolean identifierEquals(String text)
public final boolean identifierEquals(long hash_lower)
public final long hash_lower()
public Number integerValue()
public int bp()
public char current()
public void reset(int mark, char markChar, Token token)
public final String numberString()
public BigDecimal decimalValue()
public SQLNumberExpr numberExpr()
public SQLNumberExpr numberExpr(boolean negate)
public boolean hasComment()
public int getCommentCount()
public void skipToEOF()
public boolean isEndOfComment()
public int getLine()
public void computeRowAndColumn()
public int getPosLine()
public int getPosColumn()
public void config(SQLParserFeature feature, boolean state)
public final boolean isEnabled(SQLParserFeature feature)
public String getSource()
Copyright © 2013–2017 Alibaba Group. All rights reserved.