improved sql parser.

This commit is contained in:
wenshao
2017-09-10 03:42:21 +08:00
parent 3330643479
commit 7d54eea716
37 changed files with 848 additions and 243 deletions
@@ -153,24 +153,6 @@ public class OdpsExprParser extends SQLExprParser {
return super.primaryRest(expr);
}
public SQLExpr equalityRest(SQLExpr expr) {
if (lexer.token() == Token.EQEQ) {
SQLExpr rightExp;
lexer.nextToken();
try {
rightExp = bitOr();
} catch (EOFParserException e) {
throw new ParserException("EOF, " + expr + "=", e);
}
rightExp = equalityRest(rightExp);
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.Equality, rightExp, getDbType());
return expr;
}
return super.equalityRest(expr);
}
public SQLExpr relationalRest(SQLExpr expr) {
if (lexer.identifierEquals("REGEXP")) {
@@ -362,6 +362,10 @@ public class OdpsLexer extends Lexer {
super.scanVariable();
}
protected void scanVariable_at() {
scanVariable();
}
protected final void scanString() {
scanString2();
}