Related articles |
---|
[3 earlier articles] |
Re: Compiler Compiler Compiler nr@labrador.eecs.harvard.edu (2001-03-26) |
Re: compiler compiler compiler Dr_Feriozi@prodigy.net (2001-03-26) |
Re: Compiler Compiler Compiler kszabo@nortelnetworks.com (Kevin Szabo) (2001-03-27) |
Re: Compiler Compiler Compiler Trevor.Jenkins@suneidesis.com (Trevor Jenkins) (2001-03-27) |
Re: Compiler Compiler Compiler cfc@world.std.com (Chris F Clark) (2001-03-27) |
Re: Compiler Compiler Compiler i.dittmer@fh-osnabrueck.de (Ingo Dittmer) (2001-03-27) |
Re: Compiler Compiler Compiler iank@idiom.com (2001-03-27) |
Re: Compiler Compiler Compiler rog@vitanuova.com (2001-03-31) |
Re: Compiler Compiler Compiler blume@research.bell-labs.com (Matthias Blume) (2001-03-31) |
Re: compiler compiler compiler toon@moene.indiv.nluug.nl (Toon Moene) (2001-03-31) |
Re: Compiler Compiler Compiler joachim_d@gmx.de (Joachim Durchholz) (2001-04-04) |
Re: compiler compiler compiler dr_feriozi@prodigy.net (2001-04-04) |
Re: Compiler Compiler Compiler idbaxter@semdesigns.com (Ira D. Baxter) (2001-04-10) |
[2 later articles] |
From: | iank@idiom.com (Ian L. Kaplan) |
Newsgroups: | comp.compilers |
Date: | 27 Mar 2001 23:45:57 -0500 |
Organization: | Unknown |
References: | 01-03-095 01-03-122 |
Keywords: | parse, tools |
Posted-Date: | 27 Mar 2001 23:45:57 EST |
Mike Dimmick <mike@dimmick.demon.co.uk> wrote:
>The reason for re-writing YACC tends to be that it, and its
>derivatives, are somewhat difficult to work with. Let me expand:
Mike raises many good points. I agree that YACC LALR grammars
without built in semantic predicates can be difficult.
Another reason not to use YACC is the stupid $1, $2,
$3,... notation. There is no way to create a named variable for a
synthesized YACC value (e.g., a value that is passed "upward" during
the parse). As a result, most YACC grammars have comments that
label each part of the grammar with the value returned. In contrast
ANTLR allows the return values to be declared like any other
variable. After using ANTLR I've had to go back and use YACC at
work on a parser that someone else wrote. There really is no
comparision. YACC is nothing but a clunky old tool that is twenty
five years out of date.
> ANTLR 2.x, at http://www.antlr.org (although as
>this second edition is written in Java, I wouldn't personally
>recommend its use for a production compiler tool). I'm using PCCTS
>1.33 Maintenance Release 22 to write a C++ parser as part of my final
>year undergraduate project.
Yes, ANTLR is written in Java. Java is slow for compiler
applications. In fact, for every application I've used Java for,
Java is slow. But the speed that the parser generator generates the
parser is not really an issue, as long as it is not totally
unreasonable. The issue is the speed of the generated parser. And
ANTLR will generate parsers in C++ and these parsers are fast. Or,
at least as fast as those generated by PCCTS. ANTLR has been used
in a number of production (commercial quality) tools.
Ian
iank_at_bearcave.com
www.bearcave.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.