On Sat, Feb 6, 2010 at 11:05 PM, Joel E. Denny <[email protected]> wrote:
> On Fri, 5 Feb 2010, Csaba Raduly wrote:
>
>> The C code generated from the following grammar will not compile,
>> because yytoknum is not defined when glr-parser is in use.
>
> You should have better luck with %printer, which is the modern version of
> YYPRINT.  Actually, our %printer documentation is poor.

Make that non-existent, bar some examples :)

> It has the same
> syntax as %destructor.  You print to yyoutput, which is a FILE*.  For
> example:
>
>  %printer { fprintf (yyoutput, "%d", $$); } BOOL <integer>
>
> It's not clear to me whether we should add YYPRINT support to GLR or if we
> should just document the lack of support.
>

At least it (seems to) work with 2.3 too so I don't have to hack yyprint.
Pity that only 2.4 seems to accept the "<integer>" form.


-- 
Life is complex, with real and imaginary parts


Reply via email to