[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison patch to help gcc?
From: |
Zack Weinberg |
Subject: |
Re: bison patch to help gcc? |
Date: |
Wed, 26 Mar 2003 22:37:16 -0800 |
User-agent: |
Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) |
Paul Eggert <address@hidden> writes:
>> Our actions are currently cack-handed, a large part of it working
>> around bison issues.
>
> Is there a good summary somewhere of why most of the problems in the
> GCC parser's actions are due to Bison?
>
> Bison can't compete with hand-crafted code in terms of performance.
> Its main advantage over hand-crafted code should be reliability and
> ease of maintenance. If it doesn't provide that, there's something
> wrong.
My understanding is that the basic issue is that GCC's extended C has
a grammar which is not LALR(1). It has thus accreted damage-control
productions and kludges to the point where no one wants to deal with
it. This is not Bison's fault, nor can I say that Bison should even
try to do better. (My idea of "better" would be something like ANTLR,
or Perl 6's hyperextended regular expressions, but generating C.)
zw