Odd parser behaviour

2006-09-24 Thread Tim Van Holder
Given a simple grammar %token A B C D E F %% foo : bar { YYACCEPT; } ; bar : A plus_xyzzy ; plus_xyzzy : xyzzy | plus_xyzzy xyzzy ; xyzzy : B | opt_C opt_D E ; opt_C : | C ; opt_D : | D ; %% I would expect this to accept any input starting with A(B|C?D?E)+, but in practice, it only

Re: Odd parser behaviour

2006-09-24 Thread Heiko Wundram
Am Freitag, 22. September 2006 15:26 schrieb Tim Van Holder: I would expect this to accept any input starting with A(B|C?D?E)+, but in practice, it only accepts input starting with A(B|CDE)+, because for the xyzzy nterm, it always tries to reduce the opt_C. From the .output: state 1 2