@@ -2265,14 +2265,15 @@ Expression AndExpression() :
2265
2265
{
2266
2266
Expression left, right, result;
2267
2267
boolean not = false;
2268
+ boolean exclamationMarkNot=false;
2268
2269
}
2269
2270
{
2270
2271
(
2271
2272
LOOKAHEAD(Condition())
2272
2273
left=Condition()
2273
2274
|
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; } }
2276
2277
)
2277
2278
{ result = left; }
2278
2279
@@ -2282,8 +2283,8 @@ Expression AndExpression() :
2282
2283
LOOKAHEAD(Condition())
2283
2284
right=Condition()
2284
2285
|
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; } }
2287
2288
)
2288
2289
{
2289
2290
result = new AndExpression(left, right);
@@ -2300,16 +2301,17 @@ Expression Condition():
2300
2301
Expression result;
2301
2302
Token token;
2302
2303
boolean not = false;
2304
+ boolean exclamationMarkNot = false;
2303
2305
}
2304
2306
{
2305
- [ LOOKAHEAD(2) <K_NOT> { not = true; }]
2307
+ [ LOOKAHEAD(2) ( <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot= true; }) ]
2306
2308
(
2307
2309
LOOKAHEAD(SQLCondition()) result=SQLCondition()
2308
2310
| LOOKAHEAD(RegularCondition()) result=RegularCondition()
2309
2311
| result=SimpleExpression()
2310
2312
)
2311
2313
2312
- { return not?new NotExpression(result):result; }
2314
+ { return not?new NotExpression(result, exclamationMarkNot ):result; }
2313
2315
}
2314
2316
2315
2317
Expression RegularCondition() #RegularCondition:
0 commit comments