com.alibaba.druid.sql.parser
类 Lexer

java.lang.Object
  继承者 com.alibaba.druid.sql.parser.Lexer
直接已知子类:
DB2Lexer, MySqlLexer, OracleLexer, PGLexer, SQLServerLexer

public class Lexer
extends Object

作者:
wenshao

嵌套类摘要
static interface Lexer.CommentHandler
           
 
构造方法摘要
Lexer(char[] input, int inputLength, boolean skipComment)
           
Lexer(String input)
           
Lexer(String input, boolean skipComment)
           
 
方法摘要
 String addSymbol()
           
 void arraycopy(int srcPos, char[] dest, int destPos, int length)
           
 int bp()
           
 char charAt(int index)
           
 char current()
           
 BigDecimal decimalValue()
           
 Lexer.CommentHandler getCommentHandler()
           
 Keywords getKeywods()
           
 String hexString()
           
 String info()
           
 Number integerValue()
           
 boolean isAllowComment()
           
 boolean isDigit(char ch)
           
 boolean isEOF()
           
 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)
 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)
           
 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().
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Lexer

public Lexer(String input)

Lexer

public Lexer(String input,
             boolean skipComment)

Lexer

public Lexer(char[] input,
             int inputLength,
             boolean skipComment)
方法详细信息

getCommentHandler

public Lexer.CommentHandler getCommentHandler()

setCommentHandler

public void setCommentHandler(Lexer.CommentHandler commentHandler)

charAt

public final char charAt(int index)

addSymbol

public final String addSymbol()

subString

public final String subString(int offset,
                              int count)

arraycopy

public void arraycopy(int srcPos,
                      char[] dest,
                      int destPos,
                      int length)

isAllowComment

public boolean isAllowComment()

setAllowComment

public void setAllowComment(boolean allowComment)

nextVarIndex

public int nextVarIndex()

getKeywods

public Keywords getKeywods()

mark

public void mark()

reset

public void reset()

isEOF

public boolean isEOF()

token

public final Token token()
Return the current token, set by nextToken().


info

public String info()

nextTokenComma

public final void nextTokenComma()

nextTokenLParen

public final void nextTokenLParen()

nextTokenValue

public final void nextTokenValue()

nextToken

public final void nextToken()

scanSharp

public void scanSharp()

scanVariable

public void scanVariable()

scanComment

public void scanComment()

scanIdentifier

public void scanIdentifier()

scanNumber

public void scanNumber()

scanHexaDecimal

public void scanHexaDecimal()

hexString

public String hexString()

isDigit

public final boolean isDigit(char ch)

pos

public final int pos()
Return the current token's position: a 0-based offset from beginning of the raw input stream (before unicode translation)


stringVal

public final String stringVal()
The value of a literal token, recorded as a string. For integers, leading 0x and 'l' suffixes are suppressed.


integerValue

public Number integerValue()

bp

public int bp()

current

public char current()

reset

public void reset(int mark,
                  char markChar,
                  Token token)

numberString

public final String numberString()

decimalValue

public BigDecimal decimalValue()


Copyright © 2013 Alibaba Group. All Rights Reserved.