ES parsing tools (Re: Short Functions)
brendan at mozilla.com
Sun May 29 12:55:31 PDT 2011
On May 29, 2011, at 12:21 PM, Brendan Eich wrote:
> Mark and Tom already use Ometa at a code.google.com project, as noted. What more do you want?
> This does *not* address the issue of a usable spec grammar that can be validated (my point (a)). In spite of over a thousand words and many paragraphs in reply :-/.
To say a bit more, in a more positive tone: I agree that deterministic choice is attractive considered in a vacuum, to avoid ambiguities and better match how hand-crafted recusrive descent parsers are written. So PEG or stronger is plausible when experimenting, no argument there. Mark and Tom's choice to use Ometa for their language lab seems fine.
Recasting the ECMA-262 specification's unambiguous (after ASI, and assuming ES5 added no ambiguities to ES3) LR(1) grammar using a PEG could be tried and evaluated. I would be interested in seeing a no-other-changes translation of the spec grammar into a PEG that is validated somehow.
Here the issue is not validation against ambiguity, since the PEG is unambiguous because of ordered choice. The validation we'd need would be that both grammars produce sentences only and exactly in the same language.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss