improve wall filter

This commit is contained in:
wenshao
2013-04-02 19:52:40 +08:00
parent ba45a857c4
commit 78c7456ef0
31 changed files with 824 additions and 147 deletions
@@ -457,8 +457,10 @@ public class SQLExprParser extends SQLParser {
sqlExpr = new SQLIdentifierExpr('"' + lexer.stringVal() + '"');
lexer.nextToken();
break;
case EOF:
throw new EOFParserException();
default:
throw new ParserException("ERROR. token : " + tok + " " + lexer.stringVal());
throw new ParserException("ERROR. token : " + tok + ", pos : " + lexer.pos());
}
return primaryRest(sqlExpr);
@@ -814,8 +816,11 @@ public class SQLExprParser extends SQLParser {
SQLExpr rightExp;
if (lexer.token() == Token.EQ) {
lexer.nextToken();
rightExp = bitOr();
try {
rightExp = bitOr();
} catch (EOFParserException e) {
throw new ParserException("EOF, " + expr + "=", e);
}
rightExp = equalityRest(rightExp);
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.Equality, rightExp);