bug-bison
[Top][All Lists]
Advanced

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

Re: Bison H file generation


From: Hans Aberg
Subject: Re: Bison H file generation
Date: Fri, 9 Apr 2004 21:39:06 +0200

Please avoid styled text on this list.

The stuff is a well known limitation of current Bison. In future, there
might be some change. I got around it by tweaking Bison for use with C++
outputs so that the stuff actually gets into the header file -- see the
Bison-Patches list.

In the meantime, you need to figure out a way so that your parser and lexer
source files read the
    #define YYSTYPE ...
line before it reads the header file.


At 13:08 +0200 2004/04/09, Yair Grosu wrote:
>
>
>Hi,
>
>
>I have been using Bison with the -d option to generate a header file to be
>used by flex.
>
>
>I have defined the '#define YYSTYPE double' in the grammar file, but the
>output ignores this and the header file only contains the type as int as
>follows:
>
>
>
>#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
>
>
>typedef int YYSTYPE;
>
>
># define yystype YYSTYPE /* obsolescent; will be withdrawn */
>
>
># define YYSTYPE_IS_DECLARED 1
>
>
># define YYSTYPE_IS_TRIVIAL 1
>
>
>#endif
>
>
>extern YYSTYPE yylval;
>
>
>This goes for the Gnuwin32 from SourceFourge and the Cygwin version.
>
>
>Thanks
>
>
>
>Yair Grosu
>
>
>mailto: <mailto:address@hidden>address@hidden
>
>


  Hans Aberg






reply via email to

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