From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 17 Jan 93 22:49:22 GMT From: enterpoop.mit.edu!world!iecc!compilers-sender@gatech.edu (Andrew Dunstan ) Subject: Re: Compiler Construction in Ada Message-ID: <93-01-121@comp.compilers> List-Id: 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.