public class Lexer extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Lexer.CommentHandler |
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) |
char |
current() |
BigDecimal |
decimalValue() |
int |
getCommentCount() |
Lexer.CommentHandler |
getCommentHandler() |
String |
getDbType() |
Keywords |
getKeywods() |
int |
getLine() |
boolean |
hasComment() |
String |
hexString() |
String |
info() |
Number |
integerValue() |
boolean |
isAllowComment() |
boolean |
isDigit(char ch) |
boolean |
isEndOfComment() |
boolean |
isEOF() |
boolean |
isKeepComments() |
void |
mark() |
void |
nextToken() |
void |
nextTokenComma() |
void |
nextTokenLParen() |
void |
nextTokenValue() |
int |
nextVarIndex() |
String |
numberString() |
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 mark,
char markChar,
Token token) |
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.
|
String |
subString(int offset,
int count) |
Token |
token()
Return the current token, set by nextToken().
|
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 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 void mark()
public void reset()
public boolean isEOF()
public final Token token()
public final String getDbType()
public String info()
public final void nextTokenComma()
public final void nextTokenLParen()
public final void nextTokenValue()
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 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 boolean hasComment()
public int getCommentCount()
public void skipToEOF()
public boolean isEndOfComment()
public int getLine()
Copyright © 2013–2017 Alibaba Group. All rights reserved.