Re: Compiler Construction in Ada

Andrew Dunstan <andrewd@cs.adelaide.edu.au>
Sun, 17 Jan 1993 22:49:22 GMT

          From comp.compilers

Related articles
[8 earlier articles]
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)
Top-Down Parser Construction Conjectures bart@cs.uoregon.edu (1993-01-18)
| List of all articles for this month |
Newsgroups: comp.lang.ada,comp.compilers
From: Andrew Dunstan <andrewd@cs.adelaide.edu.au>
Organization: The University of Adelaide
Date: Sun, 17 Jan 1993 22:49:22 GMT
Keywords: courses, Ada, parse
References: 93-01-048 93-01-104

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
--


Post a followup to this message

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