-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Weird behavior #209
Comments
Can you revisit this, @Victorious3 ? |
I'll see what I can do, I'm just really busy with university at this point. |
I have come to revisit this and I have an updated sample.,.. It seems like left recursion still has some problems that need to be addressed.
Trace for input
|
I can't see where the problem is off the top of my head. It could be that we need to implement leftrec using what @gvanrossum used for Python? |
Once again, @Victorious3 ? |
Sorry, I have a new job and I don't have much time for personal projects at the moment. |
In #305 @dnicolodi reported that Because ho have space in the regexp for your patch, perhaps the above fix is a fix for your case? Can you do a quick check, @Victorious3? |
I have the following grammar for a small parser that parses C types:
This fails for the input
Looking at the trace I see this here:
For some reason it doesn't seem to recognize the open paren.
I have a workaround which looks as follows, changing the relevant line to:
Notice that the space in the regex is significant.
Now the trace looks as follows:
This might be a problem with leftrec, I'm not entirely sure. I'll work on finding a minimal example. I remember that I had to change some strings to regexes in my other project as well to work around potentially the same bug.
The text was updated successfully, but these errors were encountered: