Skip to content

Commit

Permalink
Tweak intro wording for SDOs
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed May 21, 2017
1 parent 6161792 commit 2dea0b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ <h1>Abstract Operations</h1>

<emu-clause id=sec-algorithm-conventions-syntax-directed-operations namespace=algorithm-conventions>
<h1>Syntax-Directed Operations</h1>
<p>Algorithms may be associated with productions of one of the ECMAScript grammars. Such algorithms are called <dfn>syntax-directed operations</dfn>. A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative. When an algorithm is associated with a grammar production, it may reference the terminal and nonterminal symbols of the production alternative as if they were parameters of the algorithm. When used in this manner, nonterminal symbols refer to the actual alternative definition that is matched when parsing the source text.</p>
<p>A <dfn>syntax-directed operation</dfn> is a named operation whose definition consists of algorithms. Each algorithm is associated with one or more productions from one of the ECMAScript grammars. A production that has multiple alternative definitions will typically have a distinct algorithm for each alternative. When an algorithm is associated with a grammar production, it may reference the terminal and nonterminal symbols of the production alternative as if they were parameters of the algorithm. When used in this manner, nonterminal symbols refer to the actual alternative definition that is matched when parsing the source text.</p>
<p>When an algorithm is associated with a production alternative, the alternative is typically shown without any &ldquo;[ ]&rdquo; grammar annotations. Such annotations should only affect the syntactic recognition of the alternative and have no effect on the associated semantics for the alternative.</p>
<p>Unless explicitly specified otherwise, all chain productions have an implicit definition for every algorithm that might be applied to that production's left-hand side nonterminal. The implicit definition simply reapplies the same algorithm name with the same parameters, if any, to the chain production's sole right-hand side nonterminal and then returns the result. For example, assume there is a production:</p>
<emu-grammar>
Expand Down

0 comments on commit 2dea0b3

Please sign in to comment.