help-bison
[Top][All Lists]
Advanced

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

Re: how to get left hand side symbol in action


From: Akim Demaille
Subject: Re: how to get left hand side symbol in action
Date: Tue, 9 Jun 2020 07:58:56 +0200

Hi Christian,

> Le 8 juin 2020 à 13:32, Christian Schoenebeck <schoenebeck@crudebyte.com> a 
> écrit :
> 
> On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote:
>> 
>> 
>> YYTERROR was not a documented feature.  I'm curious: how did you use it?
> 
> I need it for the auto completion feature that we discussed before and which I
> am using as parser injected code in some projects here and there, e.g.:
> 
> http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/linuxsampler/trunk/src/network/lscp.y?revision=3054&view=markup#l1605

Ah, I see.  All this should be replaced by Bison's native support now.

> I received reports that the missing YYTERROR macro (weird macro name BTW)

Yes.  I guess it meant "token error", and had to avoid the collision with 
YYERROR.  I faced the exact same problem, and went for YYerror instead for the 
token kind.  After all the name of the error token is "error", not "ERROR", so 
YYerror is not cute, but logical.


>> Yup.  What is your current requirement?
> 
> Actually that ifdef solution should be enough to fix the current compiler
> error with Bison >= 3.6.0, so fortunately that avoids Bison version checks.

My question was really about the base requirement.  But I see no %require at 
all, not even say %require "3.0".

I'm curious: why don't you require a modern Bison, *and ship the generated 
files*?  Waiting for the end users to have installed recent versions of the 
generators does not buy you a lot of freedom, and forces you to uglify your 
parser.

Cheers!


reply via email to

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