bug-bison
[Top][All Lists]
Advanced

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

Values from immediately preceding action blocks are no longer available


From: Henrik Grubbström
Subject: Values from immediately preceding action blocks are no longer available in bison 1.50.
Date: Fri, 11 Oct 2002 16:04:22 +0200 (MET DST)

In bison 1.50 the following construct is no longer accepted:

nonterm: TERMINAL
  { $<field>$ = val; }
  { code using $<field>2; }
  more non terminals
  ;

An error similar to the following is produced (complaining about the
second action block):

language.yacc:2596.3-2599.62: invalid value: $2

The workaround I currently use is to define an empty nonterminal, and
insert it between the two action blocks:

nonterm: TERMINAL
  { $<field>$ = val; }
  empty
  { code using $<field>2; }
  more non terminals
  ;

empty: /* empty */;

The first construct worked fine in bison 1.28, and all other yacc
lookalikes I've tried.

Thanks,

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





reply via email to

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