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
Editorial: Tweak the syntax of grammatical parameters. #571
Conversation
I like the change for What does The patch should probably update the frontmatter to define the new grammar language. |
(For "production", I assume you mean "nonterminal".) It's a way to explicitly denote that the foo parameter is "not present" for that reference to the nonterminal. See issue #374 and the old bug it references for reasons why this is useful. In my proposal, all of a nonterminal's parameters appear (with +/~/? prefixes) in each of its invocations (at least in 'defining' productions). Given this, it makes less sense to describe the possible 'states' of a parameter as "present" or "not present". I started to work on changing that terminology, but dropped those edits, since they were distracting from the main point of the PR.
It does. The proposed notation is explained to the same level of detail as the current notation (which is to say, not much). |
Having recently played a little with the parametrised grammar, I support this change (or some other change that would solve the following issue): because currently the notation For the proposed substitution |
Yup, that's basically reason (2) at https://bugs.ecmascript.org/show_bug.cgi?id=2794
(To be clear, that was part of the proposal in Bug 2794, but isn't in this PR, for reasons explained in Issue #374.)
Hm, that hadn't occurred to me. I'm not sure I prefer it, but I don't think I'd have a serious objection. |
I like this a lot. I've filed rbuckton/grammarkdown#19 on Grammarkdown to add parsing support for this, and once this lands I will accept this PR! |
(Make things more explicit, and establish a clearer parallel between rhs-guard syntax and rhs-nonterminal use syntax.) See https://bugs.ecmascript.org/show_bug.cgi?id=2794 and tc39#374
And we've got Grammarkdown support! Merging this in. |
(Make things more explicit, and establish a clearer parallel between rhs-guard syntax and rhs-nonterminal use syntax.)
Resolves Issue #374.