[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yyprint does not work with glr-parser
From: |
Csaba Raduly |
Subject: |
Re: yyprint does not work with glr-parser |
Date: |
Mon, 8 Feb 2010 19:37:33 +0100 |
On Sat, Feb 6, 2010 at 11:05 PM, Joel E. Denny <address@hidden> 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