From: Russell Potter on
In the "examples" section within "the section dealing
with "Automatic semicolonInsertion" section of the
spec, the example whose text is "a = b + c(d + e).print()"
is described as not being Semicolon-transformable
since the parenthesis before the "c" could then be
"interpreted as an argument list for a function call",
yet I can't find this rule anywhere in the in the
rules of semicolon insertion appearing just prior to
the examples.

Could someone tell me where I'm going wrong here and
what this missing rule actually is?

Russell

From: John G Harris on
On Sun, 10 Jan 2010 at 06:49:53, in comp.lang.javascript, Russell Potter
wrote:
>In the "examples" section within "the section dealing
>with "Automatic semicolonInsertion" section of the
>spec, the example whose text is "a = b + c(d + e).print()"
>is described as not being Semicolon-transformable
>since the parenthesis before the "c" could then be
>"interpreted as an argument list for a function call",
>yet I can't find this rule anywhere in the in the
>rules of semicolon insertion appearing just prior to
>the examples.
>
>Could someone tell me where I'm going wrong here and
>what this missing rule actually is?

When the parser sees c( there is nothing illegal there, so it is not
allowed to insert a semicolon. The text you are looking for is in the
first rule :

.... "a token (called the offending token) is encountered that is not
allowed by any production of the grammar," ...

The ( *is* allowed, if c(d + e) is a function call, so no implied
semicolon.

John
--
John Harris
From: Nik Coughlin on
On 10/01/2010 7:49 pm, Russell Potter wrote:
> In the "examples" section within "the section dealing
> with "Automatic semicolonInsertion" section of the
> spec, the example whose text is "a = b + c(d + e).print()"
> is described as not being Semicolon-transformable
> since the parenthesis before the "c" could then be
> "interpreted as an argument list for a function call",
> yet I can't find this rule anywhere in the in the
> rules of semicolon insertion appearing just prior to
> the examples.
>
> Could someone tell me where I'm going wrong here and
> what this missing rule actually is?

Forget it, always use semicolons. Omitting them is bad practice.

From: "Michael Haufe ("TNO")" on
On Jan 10, 4:47 pm, Nik Coughlin <nrkn....(a)gmail.com> wrote:
> Forget it, always use semicolons. Omitting them is bad practice.

According to whom?
From: Andrew Poulos on
On 11/01/2010 10:23 AM, Michael Haufe ("TNO") wrote:
> On Jan 10, 4:47 pm, Nik Coughlin<nrkn....(a)gmail.com> wrote:
>> Forget it, always use semicolons. Omitting them is bad practice.
>
> According to whom?

Me!

Andrew Poulos