This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Hand-written rec-descent parser of GCC-4.1 is WRONG!!!.
On 16 Mar 2005, Joe Buck stated:
> On Wed, Mar 16, 2005 at 02:41:12AM +0100, jc-nospam@jr-pizarro.jazztel.es wrote:
>> Writing Hand-written recursive-descent parser miss-cleans the source code
>> and goes hardfully to maintain it!!!
>
> Not if you know how to write one correctly.
... and I must say that Mark's parser is a joy to behold.
>> The best option is a clean grammar in Yacc/Bison!.
>
> GCC had such parsers for over a decade, and yet they are being replaced.
Well, actually, the C++ parser was never *clean*, and the C/ObjC parser
wasn't/isn't exactly nice to look at either. :)
The best option is a clean and maintainable parser. Whether it uses a
parser generator or not is comparatively academic...
--
This is like system("/usr/funky/bin/perl -e 'exec sleep 1'");
--- Peter da Silva