-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single statement taking minutes to be parsed #1151
Comments
I'll quickly investigate, but it's unlikely to be fixed. Code is ambiguous, and ANTLR has to find all viable paths before choosing one. In this case, the number of paths grows exponentially with the number of |
out of curiosity would brackets help ? define variable xx as integer extent 20.
define variable sep as character initial ';'.
put unformatted "header" +
(if xx[1] = ? then "" else string(xx[1])) + sep +
(if xx[1] = ? then "" else string(xx[1])) + sep
. In that case is it possible to have a rule conditional-expressions-should-be-in-brackets ? |
Yes, that removes the ambiguity.
Could be done |
@gquerret conditional-expressions-should-be-in-brackets is actually part of our coding convention. Do you prefer that I create a separate enhancement request for such a rule ? |
@ccecvb Yes please |
On behalf of CNAF
Proparse can parse this procedure very quickly:
With 10 nested
if / then / else
functions in theput
statement, then Proparse takes 500 ms.With 15 nested functions, Proparse takes 2 seconds.
With 20 nested functions, Proparse takes 50 seconds.
The text was updated successfully, but these errors were encountered: