Re: Compiler Books? Parsers?

Jeff Kenton <Jeffrey.Kenton@comcast.net>
21 Nov 2003 00:45:03 -0500

          From comp.compilers

Related articles
Compiler Books? vicky7909@rediffmail.com (2003-10-27)
Re: Compiler Books? vbdis@aol.com (2003-10-31)
Re: Compiler Books? Parsers? napi@cs.indiana.edu (2003-11-01)
Re: Compiler Books? Parsers? napi@cs.indiana.edu (2003-11-01)
Re: Compiler Books? Parsers? henry@spsystems.net (2003-11-02)
Re: Compiler Books? Parsers? henry@spsystems.net (2003-11-08)
Re: Compiler Books? Parsers? Jeffrey.Kenton@comcast.net (Jeff Kenton) (2003-11-21)
Re: Compiler Books? Parsers? cfc@shell01.TheWorld.com (Chris F Clark) (2003-12-03)
Re: Compiler Books? Parsers? rbates@southwind.net (Rodney M. Bates) (2003-12-08)
Re: Compiler Books? Parsers? nick.roberts@acm.org (Nick Roberts) (2003-12-08)
Re: Compiler Books? Parsers? marcov@stack.nl (Marco van de Voort) (2003-12-20)
Re: Compiler Books? Parsers? cfc@world.std.com (Chris F Clark) (2003-12-21)
Re: Compiler Books? Parsers? cdc@maxnet.co.nz (Carl Cerecke) (2003-12-23)
[6 later articles]
| List of all articles for this month |
From: Jeff Kenton <Jeffrey.Kenton@comcast.net>
Newsgroups: comp.compilers
Date: 21 Nov 2003 00:45:03 -0500
Organization: Comcast Online
References: 03-10-113 03-10-145 03-11-010
Keywords: tools
Posted-Date: 21 Nov 2003 00:45:03 EST

My two cents:


1. Efficiency: someone I work with, who's often right, claims that you
can always write a parser by hand that's faster than what yacc and lex
produce. Other people claim exactly the opposite.


2. Readability and maintainability: probably goes to the tools,
although some of that is superficial. There's often a lot of magic
hidden in the details that isn't as obvious on second read as you
thought it was the first time through.


3. Ease of development: here's where I dislike lex and yacc. The
actual code produced is impossible to read, and it's really painful to
debug when you get it wrong. Furthermore, you always have to invent
trickery to handle certain cases. It's often at the boundary between
lexing and parsing, or between the parser and whatever calls it, where
you start to think the tools are hurting you more than they're
helping.


Overall, I prefer to hand write my own. I find it easier to get
exactly what I need that way, and haven't found that execution speed
or development time suffers.


Mohd Hanafiah Abdullah wrote:
> I have never used parser generators such as yacc/bison or antlr.
> Would be nice to know people's opinion on manual implementation vs
> automation of parsers, especially from those who have done both; in
> terms of efficiency, readability, maintainability,
> ease-of-development, and so forth.


--


-------------------------------------------------------------------------
= Jeff Kenton Consulting and software development =
= http://home.comcast.net/~jeffrey.kenton =
-------------------------------------------------------------------------


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.