Brendan Eich wrote:
> On Oct 17, 2008, at 3:47 PM, Brendan Eich wrote:
> 
>> On Oct 17, 2008, at 3:39 PM, Brendan Eich wrote:
>>
>> Er, you are right, I should have acknowedged this point. The rest of
>> my post is about x++() not being a valid sentence, which supports your
>> argument.
>>
>> While we don't have any usability problems, and torturous statements
>> such as
>>
>> let (a = 1) a ? f : x++();
>>
>> are not written by real users (they'd parenthesize to clear up
>> things), I agree that we don't want the "prove a negative" problem.

It can rear up accidentally with semicolon insertion.  Split the example across 
two lines:

let (a = 1) a ? f : x++
(...)


> This shows a problem with ES4's reliance on top-down parser 
> construction. We never created an LR(1) grammar (ignoring ASI and the 
> other exceptions that don't fit in LR-anything, and solving dangling 
> else as is customary). To avoid the "prove a negative" problem, we need 
> one. IIRC you have one -- can you share it via ecmascript.org?

The old ES4 grammar is machine-verified LR(1).  It's on:

http://www.mozilla.org/js/language/old-es4/

    Waldemar
_______________________________________________
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to