+ ruby33.y: extract p_assoc and p_in rules#976
Merged
iliabylich merged 1 commit intowhitequark:masterfrom Dec 28, 2023
Merged
Conversation
This commit tracks upstream commit ruby/ruby@3b05238.
Collaborator
Author
|
cc @nobu, I hope it's a false alarm and Lrama does everything right but could you PTAL? Do all mid-rules have access to results of previous mid-rules in the scope of the same derivation? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit tracks upstream commit ruby/ruby@3b05238.
Closes #951.
Racc doesn't have access to a result of a
p_assocrule in the last mid-rule of the diff (probably because of a lookahead?) and so it can't read$ctxt.in_kwarg. If that's true for Lrama then it's a very nasty bug that I don't see exactly how to reproduce :(. It could be something like this:that gets rejected (this particular snippet is accepted by MRI which is correct). It could even be a UB if generated code reads uninitialised memory and transmutes it to
ctxt(then it becomes a heisenbug) but I hope Ruby CI runs ASAN for all of its tests.