Re: Javascript grammar

Russell Shaw <>
25 Feb 2007 13:24:54 -0500

          From comp.compilers

Related articles
Javascript grammar (Russell Shaw) (2007-02-25)
Re: Javascript grammar (Russell Shaw) (2007-02-25)
| List of all articles for this month |

From: Russell Shaw <>
Newsgroups: comp.compilers
Date: 25 Feb 2007 13:24:54 -0500
Organization: Compilers Central
References: <>
Keywords: parse
Posted-Date: 25 Feb 2007 13:24:54 EST

I have figured it out.

On page 63 of

it says:

    12.4 Expression Statement

      ExpressionStatement :
              [ lookahead not in {{, function} ] Expression ;

      Note that an ExpressionStatement cannot start with an opening curly
      brace because that might make it ambiguous with a Block. Also, an
      ExpressionStatement cannot start with the function keyword because
      that might make it ambiguous with a FunctionDeclaration.

Russell Shaw wrote:
> Hi,
> I downloaded and inspected the Ecmascript-262 grammar on page 157:
> I found a reduce-reduce conflict in that the kernels for "FunctionExpression"
> and "FunctionDeclaration" both start from the same LALR state (state 0), and
> can consist of an identical sequence of symbols:...

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.