-
Notifications
You must be signed in to change notification settings - Fork 92
Grammar – Consistency & Cleanup 4 #1320
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work again @Nigel-Ecma
It took me a couple reads to ensure the semantics are the same. I like the transformation here.
Let's
I'm planning to review this on Monday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, but I'm generally happy. It's entirely possible that I've missed something, of course.
Co-authored-by: Jon Skeet <[email protected]>
Thanks for catching those Jon, all committed. |
Great - I'm happy to go with either merging now, or wait for others to review as well. Thoughts, @Nigel-Ecma and @BillWagner? |
After offline discussion, merging now - we can revisit aspects if we need to when the next PR is discussed. |
[Continues on from #1318 Grammar – Consistency & Cleanup 3]
This PR is the fourth in the series.
The targets here are namespace_or_type_name and unbound_type_name – two constructs which
are variants of each other.
The existing grammar from §7.8.1 & §12.8.18:
These are left-recursive definitions which would probably have used repetition if it had
been available at the time.
The revised grammar for these two is:
The production unbound_qualified_alias_member has been introduced to mirror qualified_alias_member
and is used only here.
Resolution of a namespace_or_type_name is currently a many branched nested if/otherwise,
with the revised grammar using repetition rather than left recursion this has been re-jigged
to match, including new subscripts! ;-)
Review Notes:
You only need to consider the changes to the
*.md
files instandard
; the other files are machine-generated updates to parsing test samples describing the new expected parse for some samples. If you wish to see visualisations of the changes you may download the changed*.svg
files in the PR and the current versions of them indraft-v8
and view them side-by-side (multiple monitors helps!)