> >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


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

Reply via email to