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