bug-bison
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix variadic declaration of yyerror() and yylex() function p


From: Jeannot Langlois
Subject: Re: [PATCH] Fix variadic declaration of yyerror() and yylex() function prototypes
Date: Wed, 25 May 2005 07:27:07 -0400
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Paul Eggert wrote:

Jeannot Langlois <address@hidden> writes:

1- Can you have a look at my attached patch and tell me what you think
of it?

It looks pretty good (comments below).  Thanks for taking
the time to attack this annoyance.

Thanks for looking at the patch, that was really fast ;-).

It has been generated from released Bison-2.0 tree
though... is that okay?

It'd be a bit easier for me if you did it against CVS Bison
<https://savannah.gnu.org/projects/bison>.  CVS is a bit of a hassle
since it requires bleeding-edge development tools, but Bison 2.0a
<ftp://alpha.gnu.org/gnu/bison/bison-2.0a.tar.gz> should be easy.

Ok -- I'll get bison-2.0a and will generate a new patch using that version (as I am not a regular Bison developer, this should be the easiest way...).

2- Would there be a better way to check for the return type of a
user-declared yyerror() prototype that could exist, before my M4
macros generate a potentially-conflicting yyerror() declaration?

How about if we have Bison use "int" when it is running in Yacc mode
(as POSIX requires), but "void" otherwise?  You can communicate this
information to the template, and let the template do its thing.

I guess that would be the best way to solve this issue without modifying the testsuite. However I don't know much about Bison except for the two skeleton files I've been playing with in the last days -- Are there any mechanisms already in place to communicate the presence of this "-ly" option to the skeleton files? (Like any M4 macros already defined, or any symbol?).

3- Why would "int" be used as the return type of user-declared
yyerror() in testcases #117 to #126?  Doesn't Bison recommend to use
"void" as the return type?

It's probably historical accident.  Do any of the examples link with
-ly?  If not, you can change them to "void".

Ok. I'll have to recheck the testsuite to check if any of the testcases use "-ly", and I'll get back to you afterwards.

4- I would appreciate any other comments regarding my current
"tentative" patch, and will hope it might interest you enough to be
considered for inclusion in the next release.... :-)

My main comment is a question: would you be willing to assign the
copyright to the Free Software Foundation, so that we could install it
in Bison?

Thanks again.

Of course I will handover my copyrights for this patch to the FSF -- it was my intention to contribute to the Bison development effort after all ;-). I will be looking at Bison 2.0a and will get back to you on this in a few days. The only problem I have is to find enough free time to work on this eheh :).


Regards,



--
*Jeannot Langlois*
B. Sc.  Computer Science / B. Sc.  Informatique
Software Developer / Programmeur-Analyste
System/Network Administrator / Administrateur Système/Réseau
**
LINUX_LOGO







reply via email to

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