comp.lang.ada
 help / color / mirror / Atom feed
From: agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state
Subject: Re: Compiler Construction in Ada
Date: 15 Jan 93 16:59:44 GMT	[thread overview]
Message-ID: <93-01-108@comp.compilers> (raw)

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
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.

             reply	other threads:[~1993-01-15 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-01-15 16:59 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-01-17 22:49 Compiler Construction in Ada enterpoop.mit.edu!world!iecc!compilers-sender
1993-01-15 16:58 Robert I. Eachus
1993-01-15 14:00 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state
1993-01-15 13:14 Robert Firth
1993-01-15  2:04 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state
1993-01-13 19:53 Eliot Moss
1993-01-12  0:12 agate!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!spdcc!iecc!compile
1993-01-11  3:08 Brent Burton
1993-01-10 17:58 Michael Feldman
1993-01-08 20:41 swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-sta
1993-01-08 14:24 James Crigler
1993-01-07 23:28 enterpoop.mit.edu!usc!wupost!uwm.edu!ogicse!das-news.harvard.edu!spdcc!ie
1993-01-07 12:42 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox