Skip to content

Commit

Permalink
Editorial: Fix grammatical term misuse (#804)
Browse files Browse the repository at this point in the history
* Editorial: delete misuses of "production" where possible

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|

* Editorial: "the syntactic production that is being evaluated"

Replace 4 occurrences of
    the syntactic production that is being evaluated
with a reference to the appropriate nonterminal.
(Because one doesn't evaluate productions.)

* Editorial: "this production" -> "this |Foo|"

Change occurrences of "this production" to "this |Foo|" where appropriate.

* Editorial: "the production" -> "an instance of the production"

In
    When processing the production <emu-grammar>...
and
    Let _formalParameterList_ be the production <emu-grammar>...

change
    the production
to
    an instance of the production

* Editorial: "is 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.)

* Editorial: change various terms to "Parse Node"

Replace occurrences of:
    parsed grammar phrase
    parsed grammar production
    parse result
with
    Parse Node

* Editorial: "production" -> "phrase"

Change a couple occurrences of "production" to "phrase".

* Editorial: replace "production" 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

* Editorial: fix uses of "production" re capturing parens

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|

* Editorial: more changes re capturing parens

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

* Editorial: simplify sentence re capturing parens

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|

* Editorial: rename some parameters

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_

* Editorial: "HasProductionInTailPosition" -> "HasCallInTailPosition"

* Editorial: reword preamble of HasCallInTailPosition

* Editorial: reword the default 'Contains' definition

(The former wording read like a traversal of the grammar,
not a traversal of a parse tree.)

* Editorial: add a paragraph defining Parse Node etc.
  • Loading branch information
jmdyck authored and bterlson committed Feb 13, 2017
1 parent 931261e commit d65c54b
Showing 1 changed file with 102 additions and 101 deletions.
Loading

0 comments on commit d65c54b

Please sign in to comment.