When %dprec and %merge aren't enough...

2008-11-11 Thread Marcel Laverdet
Hello. I'm writing a parser for ECMAScript (http://www.mozilla.org/js/language/E262-3.pdf ) in Bison right now and I'm having some problems dealing with ambiguities in the language. The relevant portions of my grammar are as follows: statement_list: source_element | statement

Re: When %dprec and %merge aren't enough...

2008-11-11 Thread Hans Aberg
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