-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Stack overflow on EOF* #3359
Comments
It seems like the bug is similar to the bug with So, I fixed it in a similar way. |
Remove EOFInClosure test since now it's not actual on runtime
Hmm..gotta be careful here. EOF is an actual condition/"char" that we sometimes wanna match. maybe not in |
It works fine with set. There is no error for such case: EofInSet: 'y' ('z' | EOF); But the following code where EOF closure actually exists (a sample from runtime tests): prog : stat EOF;
stat : 'x' ('y' | EOF)*?; Should be rewritten in the following way: prog : stat EOF;
stat : 'x' 'y'* EOF?; Anyway, stack overflow on runtime is much worse than restricting EOF closures on grammar level. |
Remove EOFInClosure test since now it's not actual on runtime
Remove EOFInClosure test since now it's not actual on runtime
Remove EOFInClosure test since now it's not actual on runtime
Should this be merged before or after your #3349 ? |
The PR fixes this bug :) |
Consider the following grammar:
It fails with Stackoverflow on empty input:
And it's freezing on any not empty input.
The samples is extracted from #1943 (comment)
The text was updated successfully, but these errors were encountered: