On 17 Nov 2008, at 20:48, Marcel Laverdet wrote:
So I ended up solving this by basically copy and pasting my
expression grammar sans the expressions that begin with t_LCURLY.
Then an expression_statement must be an expression_no_statement
t_SEMICOLON, where expression_no_statement is the co
So I ended up solving this by basically copy and pasting my expression
grammar sans the expressions that begin with t_LCURLY. Then an
expression_statement must be an expression_no_statement t_SEMICOLON,
where expression_no_statement is the copy and pasted grammar.
ES-262 recommends a simi
On 14 Nov 2008, at 19:35, Marcel Laverdet wrote:
This is a pretty good idea, but I'm not sure if it's possible. For
instance in the case of an if statement I modified my grammar as such:
if_statement:
t_IF t_LPAREN expression t_RPAREN {yyexpect_statement;}
statement t_ELSE statement
<.
This is a pretty good idea, but I'm not sure if it's possible. For
instance in the case of an if statement I modified my grammar as such:
if_statement:
t_IF t_LPAREN expression t_RPAREN {yyexpect_statement;} statement
t_ELSE statement
<...>
| t_IF t_LPAREN expression t_RPAREN {yyexpe
On 11 Nov 2008, at 08:10, Marcel Laverdet wrote:
It's unclear here whether the child of the if statement should be
an empty Block or an empty ObjectLiteral. The ECMAScript spec
addresses this simply:
"Note that an ExpressionStatement cannot start with an opening
curly brace because that mig