Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!sdcsvax!sdcc3!sdcc7!ma168abq From: ma168abq@sdcc7.UUCP (Daniel T. Lau) Newsgroups: net.micro.amiga Subject: Re: Recursive descent compilers (from Re: Amiga OS) Message-ID: <256@sdcc7.UUCP> Date: Fri, 7-Feb-86 15:22:38 EST Article-I.D.: sdcc7.256 Posted: Fri Feb 7 15:22:38 1986 Date-Received: Tue, 11-Feb-86 04:27:34 EST Organization: U.C. San Diego, Academic Computer Center Lines: 25 > > Recursive descent parsers have many advantages over a bottom up parser. The > best advantage is good error recovery and error messages. Recursive descent > doesn't have to be any slower than bottom up, although it isn't necessarily > faster, either. HAH!!! Why does recursive descent have better error recovery than LL(1) parsers?? It doesn't. What matters is how the programmer implements error handling/recovery. It is easier to implement error recovery using Recursive Descent parsing, but if you understand LL(1) parsing, error recovery/handling isn't so bad. Just pop off the bad symbols until you get to a known point, and try to continue parsing from there. If you can't continue.. Oh well. >About the only real advantage to a YACC style parser is that > the language accepted is described in one place, in an abstract fashion that > can be easy to read and maintain (although this doesn't necessarily apply to > the UNIX C compiler). Of course, this is not to say that recursive descent is > hard to maintain. THE REAL ADVANTAGE OF AN LL(1) PARSER IS THAT IT ACCEPTS AS INPUT A WIDER RANGE OF LANGUAGES THAN A RECURSIVE DESCENT PARSER WOULD. > The views expressed above are my opinions only. :-)) Larry D. Laus