[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glr: include the created header
From: |
Paul Eggert |
Subject: |
Re: glr: include the created header |
Date: |
Thu, 15 Jun 2006 09:41:21 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
"Joel E. Denny" <address@hidden> writes:
> %{
> /* A block for the non-header pre-prologue. */
> /* For Yacc portability, Bison doesn't put this in the header file. */
> %}
> %header{
> /* A block for the header pre-prologue. */
> /* This is the right place to declare %union dependencies. */
> %}
> %union {
> /* If you don't declare a %union, Bison will not generate any
> post-prologues. */
> }
> %header{
> /* A block for the header post-prologue. */
> /* If you want something in the header file and it depends on
> Bison-generated definitions, put it here. */
> %}
> %{
> /* A block for the non-header post-prologue. */
> /* If you want something in your code file but *not* in your header file
> and it depends on Bison-generated definitions, put it here. */
> %}
A nice solution but whew! it's kinda complicated when you step back
and look at it.
Is there any reason one might want to put %header anywhere other than
immediately before or after %union? If not, another possibility is to
extend the %union syntax to allow three operands, not one. Or if
that's too weird, the new %header syntax could be used _instead_ of
%union, and could have three operands.
- Re: glr: include the created header, Joel E. Denny, 2006/06/11
- Re: glr: include the created header, Joel E. Denny, 2006/06/14
- Re: glr: include the created header,
Paul Eggert <=
- Re: glr: include the created header, Joel E. Denny, 2006/06/15
- Re: glr: include the created header, Joel E. Denny, 2006/06/16
- Re: glr: include the created header, Paul Eggert, 2006/06/16
- Re: glr: include the created header, Akim Demaille, 2006/06/16
- Re: glr: include the created header, Joel E. Denny, 2006/06/16
- Re: glr: include the created header, Akim Demaille, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/16
- Re: glr: include the created header, Akim Demaille, 2006/06/17
- Re: glr: include the created header, Joel E. Denny, 2006/06/17