[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yylval corruption solved
From: |
wim delvaux |
Subject: |
Re: yylval corruption solved |
Date: |
Fri, 9 May 2003 21:20:56 +0200 |
User-agent: |
KMail/1.5.1 |
On Monday 05 May 2003 08:49, Akim Demaille wrote:
> wim> The problem is that yyval (it was yyval and not yylval) gets
> wim> reused in the parser code. Value is copied after each 'action'
> wim> to yyvsp.
>
> wim> In my Actions block in the 'y' syntax I stored the pointer to
> wim> the $<>$ which is the pointer to yyval and hence is overwritten.
> wim> I should have stored the pointer to the yyvsp but that is not
> wim> accessible easily.,
>
> I don't know what you are doing, but it seems to me that you get too
> internal with Bison, which is not a good thing. Unless I
> misunderstood your problem, of course.
Thanx for the reply and the concern
The problem was a bug in my program I thought that I could use a pointer to a
$<>$ value somewhere in an action but apparently that refers to a variable
that gets changed after each step in the bison parser.
I have found the bug.
W