You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: exponential backtracking on deeply nested bracketed expressions
Remove allowComplexParsing gates from ExpressionList and
ParenthesedExpressionList so ComplexExpressionList (full Expression())
is always used. This lets Condition() handle all parenthesized content
including comparison and boolean operators, eliminating the expensive
speculative LOOKAHEAD(Condition()) and XorExpression fallback in
AndExpression.
Replace syntactic LOOKAHEAD(NamedExpressionListExprFirst()) in
SpecialStringFunctionWithNamedParameters with a lightweight
isNamedExprListAhead() token scan.
Fixes parsing of deeply nested `IF()` and `POSITION(... IN (CASE ...))`.
- fixes#2422
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
Signed-off-by: manticore-projects <andreas@manticore-projects.com>
"(" left=XorExpression() ")" {left = new ParenthesedExpressionList(left); if (not) { left = new NotExpression(left, exclamationMarkNot); not = false; } }
6700
-
)
6713
+
// ParenthesedExpressionList always delegates to ComplexExpressionList which
6714
+
// uses full Expression(), so Condition() can handle ALL parenthesized content
6715
+
// (including boolean operators like LIKE/IN/BETWEEN/IS inside parens).
6716
+
// No speculative parsing or XorExpression fallback needed.
"(" right=XorExpression() ")" {right = new ParenthesedExpressionList(right); if (not) { right = new NotExpression(right, exclamationMarkNot); not = false; } }
0 commit comments