Rob Shearman wrote:
I've looked at the spec and I see that it has a nice "lookahead not a member of '{, function'" in the rule for ExpressionStatement, meaning that the grammar cannot be implemented unambiguously by a LALR(1) parser-generator like bison. :-(
I've found on MS blog that my guess that JScript treads function expressions with identifier as function declaration was right. I can't find the link now, it was somewhere on http://blogs.msdn.com/jscript/ I've sent a patch that implements this behavior.
Thanks, Jacek