archives

« Bugzilla Issues Index

#4088 — 11.6.2 - 11.8.2: 2-colon nonterminals unreachable from lexical goal symbols


Consider the nonterminals:
ReservedWord
Keyword
FutureReservedWord
NullLiteral
BooleanLiteral
Although each is defined by a production with 2 colons, they're actually 'unreachable' from any of the lexical goal symbols. So, theoretically, the lexical parser would never yield (e.g.) a BooleanLiteral, it would yield a CommonToken that is an IdentifierName that matched the source characters 't', 'r', 'u', and 'e', say. (It would then be up to the syntactic parser to recognize that as a BooleanLiteral. Again, theoretically.)

Which is fine with me, I just think it would make a bit more sense if those 5 nonterminals were defined by 1-colon productions.


true, we already did something like this for Identifier.

However, I think putting : definitions in clause 11 would be equally confusing. And restructuring these into clause 12 is a bigger change then I am comfortable doing at this stage of the release process.

Deferring to ES7


(This relates to Bug 281.)