[Mono-list] Status of Bison port to C#

Laurent Guerby guerby@acm.org
Sun, 24 Feb 2002 14:39:37 +0100

Miguel de Icaza wrote:
>>If there's very little to gain, why do you guys even consider porting
>>from one parser to another?
> To achieve perfection.  That being said, perfection is one notch down
> from feature completeness.

If perfection is defined by ultra high quality error messages,
then I don't believe that the switch from yacc to bison
will achieve that, from my (limited) experience, the best
parsers, defined as fast and producing very good human readable messages,
are all hand written top down recursive with a few hacks tailored
to frequent human programming errors.

Tools like yacc and bison are good for getting the job done "quick & dirty"
but IMHO they get in the way of some definition of perfection.

The C++ parser of GCC is being rewritten to move away from bison
I believe for these very reason, so may be mono can benefit
from this wisom and just skip the bison step, wait until
the current yacc parser looks real bad against competition
and until other things are reasonably complete, and then hand rewrite the
parser with "perfection" of error messages in mind. Plus
we'll benefit from frequent C# mistakes data if we wait a bit.

Since most compiler writers, even in the industry,
don't care about crappy error messages (call that the C/C++ syndrome :)
it is relatively easy to look very good :).

Laurent Guerby <guerby@acm.org>