ES6 module grammar - Conflicting states
# David Herman (14 years ago)
Sorry for the delay. Yes, good catch. Your fix looks good to me. I'm updating the module syntax on the wiki today, and I'll incorporate your fix. I'll send a message to es-discuss when it's updated.
I was looking at the grammar defined at harmony:modules (Last modified: 2012/02/27 17:27 by samth) and noticed conflicting states during tokenization. Consider the following expression:
export x, y, z;
According to the grammar defined in the wiki, this expression might have two (undecidable) tokenized forms:
ExportDeclaration -> ExportSpecifierSet -> Id -> Id -> Id
ExportDeclaration -> ExportSpecifierSet -> Id -> ExportSpecifierSet -> Id -> ExportSpecifierSet -> Id
The issue here is that parsers won't be able to choose one form or the other. I've posted a possible fix for the grammar here: gist.github.com/1990115.
Hope this helps, ,