bug-bison
[Top][All Lists]
Advanced

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

Bugs in Bison 2.0: YYSTYPE and yylval


From: evilfred
Subject: Bugs in Bison 2.0: YYSTYPE and yylval
Date: Fri, 17 Jun 2005 10:46:48 -0700

Hi,

I'm using Bison 2.0 with Flex 2.5.27 in MinGW in Windows. I've had two
weird problems, and I'm not sure if it's Bison's fault or something
wrong with my configuration:

- 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. I
threw in an %initial-action that sets yylval to 0 for now to
workaround this.

- 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. instead I get this:

    #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

I've looked through the archives and can't find any responses about
these questions. Thanks for your help.

- Chris




reply via email to

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