@@ -2265,14 +2265,15 @@ Expression AndExpression() :
22652265{
22662266 Expression left, right, result;
22672267 boolean not = false;
2268+ boolean exclamationMarkNot=false;
22682269}
22692270{
22702271 (
22712272 LOOKAHEAD(Condition())
22722273 left=Condition()
22732274 |
2274- [ <K_NOT> { not = true; } ]
2275- "(" left=OrExpression() ")" {left = new Parenthesis(left); if (not) { left = new NotExpression(left); not = false; } }
2275+ [ <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot= true; } ]
2276+ "(" left=OrExpression() ")" {left = new Parenthesis(left); if (not) { left = new NotExpression(left, exclamationMarkNot ); not = false; } }
22762277 )
22772278 { result = left; }
22782279
@@ -2282,8 +2283,8 @@ Expression AndExpression() :
22822283 LOOKAHEAD(Condition())
22832284 right=Condition()
22842285 |
2285- [ <K_NOT> { not = true; } ]
2286- "(" right=OrExpression() ")" {right = new Parenthesis(right); if (not) { right = new NotExpression(right); not = false; } }
2286+ [ <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot= true; } ]
2287+ "(" right=OrExpression() ")" {right = new Parenthesis(right); if (not) { right = new NotExpression(right, exclamationMarkNot ); not = false; } }
22872288 )
22882289 {
22892290 result = new AndExpression(left, right);
@@ -2300,16 +2301,17 @@ Expression Condition():
23002301 Expression result;
23012302 Token token;
23022303 boolean not = false;
2304+ boolean exclamationMarkNot = false;
23032305}
23042306{
2305- [ LOOKAHEAD(2) <K_NOT> { not = true; }]
2307+ [ LOOKAHEAD(2) ( <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot= true; }) ]
23062308 (
23072309 LOOKAHEAD(SQLCondition()) result=SQLCondition()
23082310 | LOOKAHEAD(RegularCondition()) result=RegularCondition()
23092311 | result=SimpleExpression()
23102312 )
23112313
2312- { return not?new NotExpression(result):result; }
2314+ { return not?new NotExpression(result, exclamationMarkNot ):result; }
23132315}
23142316
23152317Expression RegularCondition() #RegularCondition:
0 commit comments