-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Fix grammatical term misuse #804
Merged
Merged
Conversation
This file contains 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
When a phrase such as a |Foo| production or a |Foo| grammar production or a |Foo| syntactic production is talking about an *instance* of the production, change it to just a |Foo|
Replace 4 occurrences of the syntactic production that is being evaluated with a reference to the appropriate nonterminal. (Because one doesn't evaluate productions.)
Change occurrences of "this production" to "this |Foo|" where appropriate.
In When processing the production <emu-grammar>... and Let _formalParameterList_ be the production <emu-grammar>... change the production to an instance of the production
Change occurrences of |ClassElement| is the production <emu-grammar>... to |ClassElement| is <emu-grammar>... (It should more properly be "is an instance of", but there are lots of pre-existing examples of the "is" formulation.)
Change a couple occurrences of "production" to "phrase".
Replace occurrences of: parsed grammar phrase parsed grammar production parse result with Parse Node
For phrases such as: a production a grammar production a syntactic grammar production when they actually refer to an *instance* of the production, change them to: a Parse Node
this production expansion's |Term| -> this |Term| this production's |Term| -> this |Term| this production's |Atom| -> |Atom| the expansion of this production's |Atom| -> |Atom| to the left of this production expansion's initial left parenthesis -> to the left of this |Atom| this production's |Atom| -> this |Atom|
number of times the <emu-grammar> production is expanded -> number of <emu-grammar> Parse Nodes number of <emu-grammar> productions -> number of <emu-grammar> Parse Nodes
the total number of <emu-grammar> Parse Nodes prior to this |Thing| plus the total number of <emu-grammar> Parse Nodes enclosing this |Thing| -> the total number of <emu-grammar> Parse Nodes prior to or enclosing this |Thing|
Rename some parameters whose names don't convey the values that get passed to them: EvaluateNew: _constructProduction_ -> _constructExpr_ IsAnonymousFunctionDefinition: _production_ -> _expr_ IsInTailPosition: _nonterminal_ -> _call_ HasProductionInTailPosition: _nonterminal_ -> _call_
(The former wording read like a traversal of the grammar, not a traversal of a parse tree.)
This is awesome. We should probably define a term Parse Node in 5.1.4 or similar and call out that it is an instance of whatever production it parsed and that it has Children. |
Done. (I'm not entirely happy with the wording, but don't see an easy way to improve it.) |
176c2e1
to
550bb32
Compare
FWIW, I find this wording impeccable! |
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.
Fix many incorrect or questionable uses of grammatical terms, mostly "production" being used in the sense of "instance of a production".
See https://bugs.ecmascript.org/show_bug.cgi?id=2985, submitted in 2014 against ES6 by @rossberg-chromium.
(There are still a few problematic cases, but this PR is good enough for now.)