do-while grammar

Allen Wirfs-Brock allen at
Tue Feb 8 14:41:43 PST 2011

see below
On Feb 8, 2011, at 2:01 PM, Mark S. Miller wrote:

> Does anyone know of any other syntax that all major JS engines accept that are not in the official ES5.1 grammar?

Yes, various RegExp syntax discrepancies are know to exist.  Somebody needs to catalog them.

> Does anyone know of any places on the web attempting to accumulate such exceptions?

None that I know of that I would unconditionally trust.

> The other one I know of is nested named function declarations <>. And there was an ASI mis-description for "break" and "continue" that was corrected between ES5 and ES5.1.

There really isn't any useful common semantics for function declaration in blocks.  See 

> We really need a complete codification of the consensus ES5.1 grammar. Starting from the official grammar, the Caja <{%3b}%20while%28false%29%20false> and ES-Lab <> parsers both reject "do {;} while (false) false;" because we didn't know any better. I expect there are many other independent parsers (minimizers, linters, etc) that make the same mistake.
> Even if such "corrections" do not make it into future errata, I would like to see them recorded on the ecmascript wiki.

I was going to suggest that the place to start is, but you beat me to it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list