resolving shift/reduce in ActionScript3

2008-11-26 Thread Matthias Kramm
Hi All, I'm writing a parser for ActionScript3, and I'm stuck with the following problem. In ActionScript, you can omit the semicolon (;). Furthermore, function pointers are allowed. I have the following (simplified) grammar: PROGRAM : EXPRESSION | PROGRAM ';' EXPRESSION |

Re: Bison complains about undefined reference of my own data type

2008-11-26 Thread Hans Aberg
On 23 Nov 2008, at 17:48, sgaurelius wrote: I am a newbie in bison, so I don't know all the secrets. I used for a while a standard example with its own data type and now I want to include my own. I included the header file, but the compiler throws me an exception for undefined reference.

Re: resolving shift/reduce in ActionScript3

2008-11-26 Thread Hans Aberg
On 26 Nov 2008, at 14:43, Matthias Kramm wrote: I'm writing a parser for ActionScript3, and I'm stuck with the following problem. In ActionScript, you can omit the semicolon (;). Furthermore, function pointers are allowed. I have the following (simplified) grammar: PROGRAM : EXPRESSION

Re: resolving shift/reduce in ActionScript3

2008-11-26 Thread Matthias Kramm
On Wed, Nov 26, 2008 at 03:25:42PM +0100, Hans Aberg [EMAIL PROTECTED] wrote: state 1 4 EXPRESSION: T_IDENTIFIER . '(' EXPRESSION ')' 5 | T_IDENTIFIER . [$end, T_IDENTIFIER, ';', '(', ')', ++, --, '+', '-', '/'] '(' shift, and go to state 5 '(' [reduce

Re: resolving shift/reduce in ActionScript3

2008-11-26 Thread Akim Demaille
MK == Matthias Kramm [EMAIL PROTECTED] writes: state 1 4 EXPRESSION: T_IDENTIFIER . '(' EXPRESSION ')' 5 | T_IDENTIFIER . [$end, T_IDENTIFIER, ';', '(', ')', ++, --, '+', '-', '/'] '(' shift, and go to state 5 '(' [reduce using rule 5 (EXPRESSION)]