help-bison
[Top][All Lists]
Advanced

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

Re: compiling expr.y from NetBSD source tree in bison


From: Dennis Yurichev
Subject: Re: compiling expr.y from NetBSD source tree in bison
Date: Mon, 26 Nov 2012 21:27:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt)

Akim Demaille <address@hidden> writes:

>> I'm trying to compile simple expr.y file from NetBSD source tree and
>> when I use bison (GNU Bison) 2.4.2, I'm getting these errors:
>> 
>> expr.y:75.14: syntax error, unexpected =
>> expr.y:82.29: syntax error, unexpected =
>> 
>> What's wrong with the file, how it should be fixed?
>> 
>> The file can be downloaded at:
>> http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/bin/expr/expr.y?rev=1.38&content-type=text/plain&only_with_tag=MAIN
>
> Hi,
>
> The original Yacc accepted an optional '=' before the actions:
>
> exp: exp '+' exp = { $$ = $1 + $3; }
>
> Bison no longer supports this `=', write this:
>
> exp: exp '+' exp   { $$ = $1 + $3; }

Thank you very much!

> I don't understand why they stick to the old syntax, I fail to see the
> point, as Yacc supported perfectly well the latter.  Maybe we should
> suggest to adjust this file?  Or would you do it?

I'm not a maintainer, but I'll forward to them. Thanks!



reply via email to

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