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: Hans Aberg
Subject: Re: Problem with a simple grammar
Date: Sun, 17 Apr 2005 13:58:34 +0200

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.

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




reply via email to

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