help-bison
[Top][All Lists]
Advanced

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

AW: bison problem: Aborted (core dumped)


From: Olav Groehn
Subject: AW: bison problem: Aborted (core dumped)
Date: Mon, 1 Nov 2004 13:31:26 +0100

Hi Catharina,

Worked fine with my bison / cygwin (but using the older bison version
1.30)....

Find the result attached.

Kind regards
Olav 

-----Urspr√ľngliche Nachricht-----
Von: address@hidden
[mailto:address@hidden Im Auftrag
von Catharina Ibrahim
Gesendet: Montag, 1. November 2004 12:57
An: address@hidden
Betreff: bison problem: Aborted (core dumped)

Hi all,

I have a spinning head trying to get Bison to work. It costs me 1.5 days
already and I'm really at the end of my sanity. Pls help :)

I use Bison version 1.875 with cygwin. The following is the file tryBison.y
(basically contains example in the manual from gnu.org):

-------------

%{
#define YYSTYPE double
#include <math.h>
%}

%token NUM

%%

exp: NUM { $$ = $1; }
        | exp exp '+' { $$ = $1 + $2; }
;

%%

int yylex (void)
{
        int c = 0;

        /* skip white space  */
        while ((c = getchar ()) == ' ' || c == '\t')
        ;

        /* process numbers   */
        if (c == '.' || isdigit (c))
        {
          ungetc (c, stdin);
          scanf ("%lf", &yylval);
          return NUM;
        }

        /* return end-of-file  */
        if (c == EOF)
        return 0;

        /* return single chars */
        return c;
}

int main (void)
{
        return yyparse ();
}

-----------------------------

in cygwin:
$ bison tryBison.y
Aborted (core dumped)

I can't figure out what's wrong. Plz help.

thx in advance,
cath


                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison

Attachment: test.tab.c
Description: Text document


reply via email to

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