bison-patches
[Top][All Lists]
Advanced

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

Re: Interactive parsing with Bison


From: Akim Demaille
Subject: Re: Interactive parsing with Bison
Date: Wed, 05 Jul 2006 19:07:17 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

>>> "rms" == Richard Stallman <address@hidden> writes:

 >     Given the current spreading of C++, do you object (pun not yet
 >     intended) to using it for Bison?

 > I don't think Bison should be written in C++.  C is clearer and
 > simpler.  Anyway, Bison already works.  It would be a waste to rewrite
 > Bison into a different language, even into Lisp, given that it works
 > the way it is.

I am not proposing to rewrite Bison in C++, since Bison, being written
in C, is already in C++.  I'm asking if we can use the rest of the
language.  I would like to use both hands.

There are many places where *simple* C++ would dramatically simplify
Bison.  For instance our symbols, terminal or not, are a typical
simple hierarchy.  As is written today, it's dark magic playing with
integers.  Our task would also be much simpler if we could use
existing list support, rather that implementing it each time we need a
list of a different kind of struct.

C++ is a complex language, with lots of dark corners, agreed.

Lisp, not statically typed, is unsafe and painfully slow, agreed.

C, a portable assembly language not strongly typed, is dangerous,
agreed.

But each language if properly used considerably improves the
extendability and maintainability of some projects.  In the very case
of Bison the base code would be much shorter, much simpler.  As of
today, C makes it hard for contributors to go into bison (ask Satya).


 > There is so much else we can do that will really make a difference
 > for the users.  Let's do that instead.

My point, precisely: to give more to the user, we should give away
less time to C.


PS/  Anyway I would not move to C++ without the consent of my fellows.





reply via email to

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