In <http://lists.gnu.org/archive/html/bug-bison/2005-06/msg00036.html> evilfred <[EMAIL PROTECTED]> writes:
> I'm using Bison 2.0 with Flex 2.5.27 in MinGW in Windows.... > - in the generated c file, just after the part where it says > "initialize stack pointers", there is a line that says "yyvsp[0] = > yylval;". this kills my program as yylval is not initialized yet. Thanks for reporting that. This has been fixed in Bison CVS here <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00020.html> and the fix should appear in the next Bison release. > - I have stuff at the top of my grammar like so: > > %{ > #define YYSTYPE double > ... > %} > > %defines > > yet this is never copied into the generated header file. That's the intended behavior. Here's a quote from the documentation that may explain things. Unless @code{YYSTYPE} is already defined as a macro, the output header declares @code{YYSTYPE}. Therefore, if you are using a @code{%union} (@pxref{Multiple Types, ,More Than One Value Type}) with components that require other definitions, or if you have defined a @code{YYSTYPE} macro (@pxref{Value Type, ,Data Types of Semantic Values}), you need to arrange for these definitions to be propagated to all modules, e.g., by putting them in a prerequisite header that is included both by your parser and by any other module that needs @code{YYSTYPE}.
