Re: Bottom-up versus Top-down

"Scott Stanchfield" <thetick@magelang.com>
2 Dec 1997 12:09:49 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Bottom-up versus Top-down gnb@itga.com.au (Gregory Bond) (1997-11-28)
Re: Bottom-up versus Top-down gclind01@spd.louisville.edu (1997-11-29)
Re: Bottom-up versus Top-down mkgardne@cs.uiuc.edu (1997-11-30)
Re: Bottom-up versus Top-down henry@zoo.toronto.edu (Henry Spencer) (1997-11-30)
Re: Bottom-up versus Top-down rod.bates@wichita.boeing.com (Rodney M. Bates) (1997-12-02)
Re: Bottom-up versus Top-down henry@zoo.toronto.edu (Henry Spencer) (1997-12-02)
Re: Bottom-up versus Top-down thetick@magelang.com (Scott Stanchfield) (1997-12-02)
Re: Bottom-up versus Top-down dwight@pentasoft.com (1997-12-02)
Re: Bottom-up versus Top-down neitzel@gaertner.de (1997-12-05)
Re: Bottom-up versus Top-down jmccarty@sun1307.spd.dsccc.com (1997-12-05)
Re: Bottom-up versus Top-down sperber@informatik.uni-tuebingen.de (1997-12-07)
Re: Bottom-up versus Top-down henry@zoo.toronto.edu (Henry Spencer) (1997-12-07)
Re: Bottom-up versus Top-down bromage@cs.mu.oz.au (1997-12-07)
[3 later articles]
| List of all articles for this month |

From: "Scott Stanchfield" <thetick@magelang.com>
Newsgroups: comp.compilers
Date: 2 Dec 1997 12:09:49 -0500
Organization: MageLang Institute - http://www.MageLang.com
References: 97-11-123 97-11-155 97-11-180
Keywords: parse, LL(1)

I'd think with the advent of predicated LL(k) (used by PCCTS/ANTLR)
the "power of LALR" advantage disappears. In many areas, LL(k) has a
distinct advantage, especially when it comes to error repair and
recovery due to its "knowing where I've been" context.


I've yet to see a _real_ programming problem that could be solved with
LALR but could not be solved with LL(k).


To go a step further, there are even some languages that are more
difficult to implement in LALR (C++...)




The trick is to cast the mindset from the "LALR" way of writing a
grammar to the "LL(k)" way of writing a grammar. Yes, you have to
deal with left recursion and left-factoring, but it's not _that_ big
of a deal (see http://www.scruz.net/~thetick/lalrtoll.html)


The bigger problem seems to be along the lines of "BetaMax vs VHS" --
VHS had more software; there are more readily-available LALR
grammars... You usually get stuck converting LALR grammars to LL(k)


(Don't tell Frank DeRemer & Tom Pennello I just compared LALR to
VHS... I think I'm still friends with them ;)


-- Scott


=============================================
Scott Stanchfield - http://www.scruz.net/~thetick
MageLang Institute - http://www.magelang.com










--


Post a followup to this message

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