-
Notifications
You must be signed in to change notification settings - Fork 262
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
JSIL front-end: no need for parser reentrancy #8153
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #8153 +/- ##
===========================================
- Coverage 79.09% 79.09% -0.01%
===========================================
Files 1695 1695
Lines 196583 196589 +6
===========================================
- Hits 155496 155493 -3
- Misses 41087 41096 +9 ☔ View full report in Codecov by Sentry. |
Where does the bison state go? |
800522a
to
43fa0d5
Compare
Good call, this is now fixed (by using |
Sure this is worth it? We currently don't need reentrant parsing, and if all you want is to remove set_message_handler call, you could achieve that with a simple precondition in the constructor. |
43fa0d5
to
ede5ea4
Compare
Added commits to just do the precondition. The overall change should now accomplish the simpler approach, while the individual commits could be reverted in case we ever wish to use full reentrancy. |
eab428d
to
9b220d6
Compare
There are still lots of changes to the scanner left, which are probably not needed? |
We can stick with the existing I believe the reentrant lexer makes for cleaner code, but I acknowledge that we don't actually need that capability and it might just be seen as unnecessary code churn. So I am ok producing a (much simpler) variant of this PR that just introduces the additional safety check. Just let me know. Edit: and I will use the outcome of this PR to inform how to proceed with #8135, #8138, #8141. |
For reentrant lexing, we should consider generating C++ lexers, which would be possibly easier to understand. The flex-generated C++ code seems to be sensible. However, attempts to have bison generate C++ have apparently been abandoned. |
Just make sure it isn't used in a reentrant manner.
9b220d6
to
6682802
Compare
The changes in this PR are now limited to just guarding against attempts of reentrant parser use. |
I'm a bit late to the party do the following exist or are there plans for them to exist?
Because if not, I could suggest a much more radical PR which would also solve this problem. Last I spoke to Philippa I got the impression that she and her group had stopped working on this. |
|
Just make sure it isn't used in a reentrant manner.