mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved oracle pl/sql parser.
This commit is contained in:
@@ -270,6 +270,17 @@ public class SQLParser {
|
||||
}
|
||||
}
|
||||
|
||||
public int acceptInteger() {
|
||||
if (lexer.token() == Token.LITERAL_INT) {
|
||||
int intVal = ((Integer) lexer.integerValue()).intValue();
|
||||
lexer.nextToken();
|
||||
return intVal;
|
||||
} else {
|
||||
throw new ParserException("syntax error, expect int, actual " + lexer.token() + " "
|
||||
+ lexer.stringVal());
|
||||
}
|
||||
}
|
||||
|
||||
public void match(Token token) {
|
||||
if (lexer.token() != token) {
|
||||
throw new ParserException("syntax error, expect " + token + ", actual " + lexer.token() + " "
|
||||
|
||||
Reference in New Issue
Block a user