improved oracle pl/sql parser.

This commit is contained in:
wenshao
2017-05-13 05:03:10 +08:00
parent b6a15a3c23
commit 33914b35df
10 changed files with 364 additions and 35 deletions
@@ -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() + " "