|[6 earlier articles]|
|Re: Compiler Construction in Ada firstname.lastname@example.org (1993-01-08)|
|Re: Compiler Construction in Ada email@example.com (1993-01-10)|
|Re: Compiler Construction in Ada firstname.lastname@example.org (1993-01-11)|
|Re: Compiler Construction in Ada email@example.com (1993-01-12)|
|Re: Compiler Construction in Ada firstname.lastname@example.org (1993-01-13)|
|Re: Compiler Construction in Ada email@example.com.Virginia.EDU (1993-01-15)|
|Re: Compiler Construction in Ada firstname.lastname@example.org (1993-01-15)|
|Re: Compiler Construction in Ada email@example.com (1993-01-15)|
|Re: Compiler Construction in Ada firstname.lastname@example.org (Andrew Dunstan) (1993-01-17)|
|From:||email@example.com (John Hagerman)|
|Organization:||Carnegie Mellon University|
|Date:||Fri, 15 Jan 1993 16:59:44 GMT|
firstname.lastname@example.org.Virginia.EDU (Heracleitus) writes:
>... The shift-reduce parser was
>difficult but not impossible, but coding it contributed little to the
>fundamental understanding, and table-based interpretations that led to the
>introduction of yacc helped the students to grasp the concept much better
>than coding did. The semantic analyzer was by far the hardest part of the
>project, and unfortunately, after coding the parser and syntactic analyzer
>etc., there was little enthusiasm left for it.
I had a class experience which gave me a different perspective. In this
class (at UMass, but not taught by Eliot :-), we implemented a subset of
ADA using Pascal; the underlying machine was a simulator that executed the
tuple form, so we could learn about machine- independent optimizations.
We wrote our own lexical analyzers, and a parser generator tool was
available, but I wrote my own instead. I followed Chapter 6 of the
(first) Dragon Book, going from an LR(0) to an LALR(1) generator. This
gave me a thorough understanding of LR parsing. Since then, I have
noticed that people who use LEX and YACC and have *not* been exposed to
the gory theory tend to write bad grammars (e.g., so ambiguous that they
are hard to modify). I have forgotten many of the details of LR parsing,
but my exposure gave me intuition about what makes a grammar good; I'm
very glad of it, since my current work is compiler-related.
Now, I still agree with Eliot and Doug. The point of a first compiler
course is to expose CS majors to that aspect of computing, and types and
so on are very important. But I think that anyone who wants to do real
compiler work would benefit from the experience of digging into parsers
and parser generation.
Return to the
Search the comp.compilers archives again.