bug-bison
[Top][All Lists]
Advanced

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

Re: Action blocks may not refer to their own value with number


From: akim
Subject: Re: Action blocks may not refer to their own value with number
Date: Sat, 19 Oct 2002 13:30:31 +0200
User-agent: Mutt/1.3.28i

On Sat, Oct 19, 2002 at 12:29:02PM +0200, Henrik Grubbstr?m wrote:
> Found another bug when backporting bison 1.50 kludges:
> 
> In bison 1.50 and 1.75 the following construct is no longer accepted:
> 
> %union{
>   int field;
> %}
> 
> %type <field> nonterm
> 
> %%
> 
> nonterm: { $<field>1 = 0; } ;
> 
> %%
> 
> The following error is produced:
> 
> foo.yacc:9.10-20: invalid value: $1
> 
> It works fine in bison 1.35.
> 
> The obvious workaround is to refer to the value with $$.

I disagree: this is the obvious fix to the action.  I hope you never
relied on this code, coz you can be sure it was never properly honored.
Not even by pre 1.50, they were just buggy and unable to report the error.




reply via email to

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