comp.lang.ada
 help / color / mirror / Atom feed
From: enterpoop.mit.edu!world!iecc!compilers-sender@gatech.edu  (Andrew Dunstan
Subject: Re: Compiler Construction in Ada
Date: 17 Jan 93 22:49:22 GMT	[thread overview]
Message-ID: <93-01-121@comp.compilers> (raw)

Hmm. We've had several rounds of language wars in this newsgroup. Perhaps
its time to have a round of parser wars :-)

Creating a shift-reduce parser for as non-trivial language is a pain in
the neck.  If you insist on doing it this way, then I agree, by all means
use a parser generator - in this group I hope that means using ayacc.

For Compiler Construction courses, it seems to me that there is a benefit
in teaching students how to make a parser from scratch, in just the same
way that we teach kids to do arithmetic manually before letting them loose
on calculators - so that they get an understanding of how it works. Given
the above, this seems to indicate using top-down methods - typically
recursive descent. Interestingly, the GNAT compiler will be using
hand-coded recursive descent, and very impressive performance stats have
been reported in this group. So this technique is of more than simple
academic interest.

I agree with previous posters that too much emphasis in compiler
construction courses can be placed on syntax processing. However, there is
one related topic that is frequently given insufficient attention, as far
as I can gather - syntax error recovery. It is perhaps a matter of taste,
and error recovery is certainly an art rather than a science :-) but I
believe that top-down parsing methods have a distinct edge here.
--
Andrew Dunstan
Department of Computer Science
University of Adelaide
South Australia
net: andrewd@cs.adelaide.edu.au
-- 
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-17 22:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-01-17 22:49 enterpoop.mit.edu!world!iecc!compilers-sender [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-01-15 16:59 Compiler Construction in Ada agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state
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