help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interesting push parser use case


From: Joel E. Denny
Subject: Re: interesting push parser use case
Date: Wed, 20 Feb 2008 13:25:36 -0500 (EST)

On Wed, 20 Feb 2008, Bob Rossi wrote:

> Sorry for the extremely long delay. I'm trying out your suggestion now.
> Whenver I put a struct in the parse param like so,
>   %parse-param { struct gdbmi_pdata *gdbmi_pdata }
> I get a compiler warning, 
> ../../../../cgdb/lib/gdbmi/src/gdbmi_grammar.h:127: warning: ‘struct
> gdbmi_pdata’ declared inside parameter list
> 
> Do you know how to avoid that? It seems like the header file generated
> has the struct in the parameter list but the definition is not in global
> scope.
> 
> The more I think about it, this might have been introduced with the push
> parser, since we put the declarations in the .h file now.
> 
> Does anyone have any suggestions on how to fix this? One obvious
> solution would be to have a section in the bison grammar file that would
> go into the header file, to allow the definition or prototype of certain
> types.

You want something like:

  %code requires { struct gdbmi_pdata; }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]