grammar update

Eric Suen eric.suen.tech at gmail.com
Tue Apr 1 20:37:45 PDT 2008


Hi,

the statement is:

var a = function() type function() like AAA

RelationalExpression ::= RelationalExpression like TypeExpression

RelationalExpression -> PostfixExpression -> PrimaryExpression
 -> FunctionExpression

FunctionExpression ::= function FunctionSignature FunctionExpressionBody

FunctionExpressionBody ::= AssignmentExpression

AssignmentExpression -> ConditionalExpression -> UnaryTypeExpression
-> type TypeExpression -> type FunctionType
 -> type function FunctionSignature

FunctionSignature ::= TypeParameters '(' Parameters ')' ResultType

ResultType ::= $empty
 | ':' 'void'
 | ':' TypeExpression
 | 'like' TypeExpression  -- conflict on this rule with $empty

So, is it
 var a = FunctionExpression like AAA
or
 var a = function() type FunctionType


----- Original Message ----- 
From: "Eric Suen" <eric.suen.tech-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
Newsgroups: gmane.comp.lang.javascript.ecmascript4.general
To: <es4-discuss-4eJtQOnFJqFAfugRpC6u6w at public.gmane.org>
Sent: Tuesday, April 01, 2008 7:35 PM
Subject: Re: grammar update


> Page 11
> FunctionDeclaration ::= function FunctionName FunctionSignature
> should be
> FunctionDeclarationW ::= function FunctionName FunctionSignature SemicolonW
>
> following statement:
>  type function() like AAA
>
> Should it be:
> RelationalExpression like TypeExpression (like is operator)
> [type function()] like [AAA]
> or
> type FunctionType (like is ResultType)
> type [function() like AAA]
>
> Regards,
>
> Eric Suen 





More information about the Es4-discuss mailing list