symbols near the boundary between lexical and syntactic grammars
jmdyck at ibiblio.org
Tue Jan 25 22:35:12 PST 2011
Section 5.1.2 says:
[The lexical grammar for ECMAScript] defines a set of productions,
starting from the goal symbol InputElementDiv or InputElementRegExp ...
so I expected that it would contain, roughly speaking, the transitive
closure of those two symbols (where the relation being closed is "X has a
rhs containing Y"). And it does, but it also defines some symbols that
aren't in that set (e.g., Literal, Identifier, ReservedWord).
So I'm wondering: is there any (normative) significance to those additional
productions being in the lexical grammar, as opposed to the syntactic
grammar? If they moved from one to the other, would the language defined be
It looks to me like the answer is "no" -- I'm just checking.
More information about the es5-discuss