[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yyprint does not work with glr-parser
From: |
Joel E. Denny |
Subject: |
Re: yyprint does not work with glr-parser |
Date: |
Sat, 6 Feb 2010 17:05:46 -0500 (EST) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
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. 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.