Re: Bottom-up versus Top-down

gclind01@spd.louisville.edu (George C. Lindauer)
29 Nov 1997 00:03:58 -0500

          From comp.compilers

Related articles
Bottom-up versus Top-down jacko@post8.tele.dk (Jack Olsen) (1997-11-23)
Re: Bottom-up versus Top-down thetick@magelang.com (Scott Stanchfield) (1997-11-24)
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)
[11 later articles]
| List of all articles for this month |
From: gclind01@spd.louisville.edu (George C. Lindauer)
Newsgroups: comp.compilers
Date: 29 Nov 1997 00:03:58 -0500
Organization: University of Louisville
References: 97-11-123
Keywords: parse

Jack Olsen (jacko@post8.tele.dk) wrote:
> Could anyone enlighten me about bottom-up versus top-down parsing?


In top-down parsing you use each incoming token as a decision point to
determine the next step of the parsing; in bottom-up parsing you group
the incoming tokens together and look for a group that matches one of
the known patterns of the grammar. Then you start grouping groups
together, and when a match is made for the pattern 'program' parsing
is complete. Top down parsing is much easier to implement, but,
bottom-up parsing is more efficient. YACC and other code generators
tend to generate the type of state tables required to do bottom-up
parsing efficiently...


david




--


Post a followup to this message

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