Re: Compiler Compiler Compiler (Ian L. Kaplan)
27 Mar 2001 23:45:57 -0500

          From comp.compilers

Related articles
[3 earlier articles]
Re: Compiler Compiler Compiler (2001-03-26)
Re: compiler compiler compiler (2001-03-26)
Re: Compiler Compiler Compiler (Kevin Szabo) (2001-03-27)
Re: Compiler Compiler Compiler (Trevor Jenkins) (2001-03-27)
Re: Compiler Compiler Compiler (Chris F Clark) (2001-03-27)
Re: Compiler Compiler Compiler (Ingo Dittmer) (2001-03-27)
Re: Compiler Compiler Compiler (2001-03-27)
Re: Compiler Compiler Compiler (2001-03-31)
Re: Compiler Compiler Compiler (Matthias Blume) (2001-03-31)
Re: compiler compiler compiler (Toon Moene) (2001-03-31)
Re: Compiler Compiler Compiler (Joachim Durchholz) (2001-04-04)
Re: compiler compiler compiler (2001-04-04)
Re: Compiler Compiler Compiler (Ira D. Baxter) (2001-04-10)
[2 later articles]
| List of all articles for this month |

From: (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 <> 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 (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.


Post a followup to this message

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