bug-bison
[Top][All Lists]
Advanced

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

Action blocks may not refer to their own value with number


From: Henrik Grubbström
Subject: Action blocks may not refer to their own value with number
Date: Sat, 19 Oct 2002 12:29:02 +0200 (MET DST)

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

Thanks,

--
Henrik Grubbström                                       address@hidden
Roxen Internet Software AB





reply via email to

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