Related articles |
---|
[6 earlier articles] |
Re: Compiler Construction in Ada robichau@lambda.msfc.nasa.gov (1993-01-08) |
Re: Compiler Construction in Ada mfeldman@seas.gwu.edu (1993-01-10) |
Re: Compiler Construction in Ada bpb9204@tamsun.tamu.edu (1993-01-11) |
Re: Compiler Construction in Ada eifrig@beanworld.cs.jhu.edu (1993-01-12) |
Re: Compiler Construction in Ada moss@cs.cmu.edu (1993-01-13) |
Re: Compiler Construction in Ada dtl8v@holmes.acc.Virginia.EDU (1993-01-15) |
Re: Compiler Construction in Ada hagerman@ece.cmu.edu (1993-01-15) |
Re: Compiler Construction in Ada adam@microware.com (1993-01-15) |
Re: Compiler Construction in Ada andrewd@cs.adelaide.edu.au (Andrew Dunstan) (1993-01-17) |
Newsgroups: | comp.lang.ada,comp.compilers |
From: | hagerman@ece.cmu.edu (John Hagerman) |
Organization: | Carnegie Mellon University |
Date: | Fri, 15 Jan 1993 16:59:44 GMT |
Keywords: | courses |
References: | 93-01-048 93-01-104 |
dtl8v@holmes.acc.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.
- John
--
hagerman@ece.cmu.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.