Skip to content

Commit b3c5b63

Browse files
fix: bring back SYNTACTIC LOOKAHEAD where it makes sense
Signed-off-by: Andreas Reichel <[email protected]>
1 parent 21c983f commit b3c5b63

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3682,7 +3682,7 @@ FromItem FromItem() #FromItem:
36823682
|
36833683
LOOKAHEAD(3) fromItem=Table()
36843684
|
3685-
LOOKAHEAD(110) fromItem = ParenthesedFromItem()
3685+
LOOKAHEAD(ParenthesedFromItem()) fromItem = ParenthesedFromItem()
36863686
|
36873687
LOOKAHEAD(3, { !getAsBoolean(Feature.allowUnparenthesizedSubSelects) }) (
36883688
fromItem=ParenthesedSelect()
@@ -4509,7 +4509,7 @@ Expression AndExpression() :
45094509
}
45104510
{
45114511
(
4512-
LOOKAHEAD(814, {!interrupted}) left=Condition()
4512+
LOOKAHEAD(Condition(), {!interrupted}) left=Condition()
45134513
|
45144514
[ <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot=true; } ]
45154515
"(" left=XorExpression() ")" {left = new ParenthesedExpressionList(left); if (not) { left = new NotExpression(left, exclamationMarkNot); not = false; } }
@@ -4520,7 +4520,7 @@ Expression AndExpression() :
45204520
{ boolean useOperator = false; }
45214521
(<K_AND> | <OP_DOUBLEAND> {useOperator=true;} )
45224522
(
4523-
LOOKAHEAD(814, {!interrupted}) right=Condition()
4523+
LOOKAHEAD(Condition(), {!interrupted}) right=Condition()
45244524
|
45254525
[ <K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot=true; } ]
45264526
"(" right=XorExpression() ")" {right = new ParenthesedExpressionList(right); if (not) { right = new NotExpression(right, exclamationMarkNot); not = false; } }
@@ -4546,7 +4546,7 @@ Expression Condition():
45464546
{
45474547
[ LOOKAHEAD(2) (<K_NOT> { not=true; } | "!" { not=true; exclamationMarkNot=true; })]
45484548
(
4549-
LOOKAHEAD(814, {!interrupted}) result=RegularCondition()
4549+
LOOKAHEAD(RegularCondition(), {!interrupted}) result=RegularCondition()
45504550
|
45514551
result=SQLCondition()
45524552
)
@@ -4649,7 +4649,7 @@ Expression SQLCondition():
46494649
{
46504650
(
46514651
result=ExistsExpression()
4652-
| LOOKAHEAD( 814, {!interrupted}) result=OverlapsCondition()
4652+
| LOOKAHEAD( OverlapsCondition(), {!interrupted}) result=OverlapsCondition()
46534653
| left = SimpleExpression() { result = left; }
46544654
[
46554655
LOOKAHEAD(2) (

0 commit comments

Comments
 (0)