help-bison
[Top][All Lists]
Advanced

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

Re: Problem with a simple grammar


From: Eulogio Serradilla
Subject: Re: Problem with a simple grammar
Date: Sun, 17 Apr 2005 15:35:13 +0200
User-agent: KMail/1.8

> >I have a simple bison file summarizes as
> >
> >#define YYSTYPE const char*
>
> ...
>
> >When I run the program I got all members of prg having the same semantic
> >value, i.e. all with the last string ($4).
>
> This is one of the most frequently asked question on this list: You
> forget to make copies of the strings in your lexer. Thus you only get
> a pointer into a buffer, as you work with pointers.

OK, I see. That's solved my problem.

>
> >PS. I have to use bison 1.24 so you may not be able to help me.
>
> This is rather old; the latest release is 2.0

Yes, I know, but I prefer to wait for a C++ output for bison, as it says in 
the FAQ section of the manual.

Thank you very much,

E. SR




reply via email to

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