Class MySqlLexer
- java.lang.Object
-
- com.alibaba.druid.sql.parser.Lexer
-
- com.alibaba.druid.sql.dialect.mysql.parser.MySqlLexer
-
public class MySqlLexer extends Lexer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.alibaba.druid.sql.parser.Lexer
Lexer.CommentHandler, Lexer.SavePoint
-
-
Field Summary
Fields Modifier and Type Field Description static SymbolTablequoteTable-
Fields inherited from class com.alibaba.druid.sql.parser.Lexer
buf, bufPos, ch, commentCount, commentHandler, comments, dbType, dialectFeature, endOfComment, features, hash, hashLCase, keepComments, keepSourceLocation, keywords, line, lines, mark, numberExp, numberSale, optimizedForParameterized, pos, posColumn, posLine, skipComment, startPos, stringVal, symbols_l2, text, timeZone, token
-
-
Constructor Summary
Constructors Constructor Description MySqlLexer(char[] input, int inputLength, boolean skipComment)MySqlLexer(String input)MySqlLexer(String input, boolean skipComment, boolean keepComments)MySqlLexer(String input, SQLParserFeature... features)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitDialectFeature()static booleanisIdentifierChar(char c)static booleanisIdentifierCharForVariable(char c)employee.code=:employee.code 解析异常 修复:变量名支持含符号.protected KeywordsloadKeywords()voidscanComment()voidscanIdentifier()voidscanSharp()protected voidscanString()voidscanVariable()protected voidscanVariable_at()voidskipFirstHintsOrMultiCommentAndNextToken()-
Methods inherited from class com.alibaba.druid.sql.parser.Lexer
addComment, addSymbol, arraycopy, bp, charAt, computeRowAndColumn, computeRowAndColumn, config, current, decimalValue, dialectFeatureEnabled, getCommentCount, getCommentHandler, getComments, getDbType, getKeywords, getLine, getPosColumn, getPosLine, getSource, getTimeZone, hasComment, hashLCase, hexString, identifierEquals, identifierEquals, info, initBuff, integerValue, isAllowComment, isDigit, isDigit2, isEnabled, isEndOfComment, isEOF, isFirstIdentifierChar0, isKeepComments, isKeepSourceLocation, isNegativeIntegerValue, isSafeComment, lexError, mark, markOut, nextIf, nextIfComma, nextIfIdentifier, nextIfIdentifier, nextPath, nextToken, nextTokenAlias, nextTokenBy, nextTokenComma, nextTokenCommaValue, nextTokenEq, nextTokenForSet, nextTokenIdent, nextTokenLParen, nextTokenNotOrNull, nextTokenQues, nextTokenValue, nextVarIndex, numberExpr, numberExpr, numberExpr, numberString, parameterize, pos, putChar, readAndResetComments, reset, reset, reset, reset, scanAlias, scanChar, scanHexaDecimal, scanIdentifier0, scanLBracket, scanLineArgument, scanMultiLineComment, scanNumber, scanSingleLineComment, scanSQLType, scanSQLTypeV2, scanString2, scanString2_d, setAllowComment, setCommentHandler, setKeepComments, setTimeZone, setToken, skipToEOF, skipToNextLine, skipToNextLineOrParameter, stringVal, sub_chars, subString, subString, token, unscan
-
-
-
-
Field Detail
-
quoteTable
public static SymbolTable quoteTable
-
-
Constructor Detail
-
MySqlLexer
public MySqlLexer(char[] input, int inputLength, boolean skipComment)
-
MySqlLexer
public MySqlLexer(String input)
-
MySqlLexer
public MySqlLexer(String input, SQLParserFeature... features)
-
MySqlLexer
public MySqlLexer(String input, boolean skipComment, boolean keepComments)
-
-
Method Detail
-
loadKeywords
protected Keywords loadKeywords()
- Overrides:
loadKeywordsin classLexer
-
scanVariable
public void scanVariable()
- Overrides:
scanVariablein classLexer
-
scanVariable_at
protected void scanVariable_at()
- Overrides:
scanVariable_atin classLexer
-
scanIdentifier
public void scanIdentifier()
- Overrides:
scanIdentifierin classLexer
-
scanString
protected final void scanString()
- Overrides:
scanStringin classLexer
-
skipFirstHintsOrMultiCommentAndNextToken
public void skipFirstHintsOrMultiCommentAndNextToken()
-
scanComment
public void scanComment()
- Overrides:
scanCommentin classLexer
-
isIdentifierChar
public static boolean isIdentifierChar(char c)
-
isIdentifierCharForVariable
public static boolean isIdentifierCharForVariable(char c)
employee.code=:employee.code 解析异常 修复:变量名支持含符号.- Parameters:
c- the character to check- Returns:
- true if the character is a valid identifier character for variables; otherwise false
-
initDialectFeature
protected void initDialectFeature()
- Overrides:
initDialectFeaturein classLexer
-
-