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; }
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to