Related articles |
---|
LL Parsing ravesta@sandia.gov (R. Anthony Vestal) (2000-10-19) |
Re: LL Parsing LLkParsing@aol.com (2000-10-22) |
Re: LL Parsing vbdis@aol.com (2000-10-22) |
Re: LL Parsing rhyde@cs.ucr.edu (Randall Hyde) (2000-10-23) |
From: | vbdis@aol.com (VBDis) |
Newsgroups: | comp.compilers |
Date: | 22 Oct 2000 01:31:33 -0400 |
Organization: | AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com |
References: | 00-10-138 |
Keywords: | parse, comment |
"R. Anthony Vestal" <ravesta@sandia.gov> schreibt:
>Is there a class of applications that benefit by top-down parsing?
IMO *every* application will benefit from top-down parsing. A parser
usually will not only interpret some source code in the context of
some grammar, but shall execute some actions, whenever something
what-requires-action is recognized. In a top-down (procedural)
approach the expected context is quite clear, in contrast to the
context in a bottom-up state machine.
Perhaps I'm wrong with this opinion, but I also like to learn more
about bottom-up and top-down parsing in practice.
Perhaps a mix of both approaches might be the best solution, resulting
in compact code when a state machine can be used, and with other
benefits when a procedural approach is used for other parts of the
grammar?
DoDi
[The original Ritchie C compiler used top-down recursive descent for most
of the parsing, but bottom-up operator precedence for expressions. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.