Re: Generating a simple hand-coded like recursive descent parser

Hans-Peter Diettrich <DrDiettrich1@aol.com>
19 Dec 2006 01:06:42 -0500

          From comp.compilers

Related articles
[31 earlier articles]
Re: Generating a simple hand-coded like recursive descent parser gneuner2@comcast.net (George Neuner) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser chris.dollin@hp.com (Chris Dollin) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser ajo@andrew.cmu.edu (Arthur J. O'Dwyer) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser 148f3wg02@sneakemail.com (Karsten Nyblad) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser ik@unicals.com (Ivan A. Kosarev) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser walter@bytecraft.com (Walter Banks) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser cfc@shell01.TheWorld.com (Chris F Clark) (2006-12-19)
Re: Generating a simple hand-coded like recursive descent parser bobduff@shell01.TheWorld.com (Robert A Duff) (2006-12-22)
Re: Generating a simple hand-coded like recursive descent parser bobduff@shell01.TheWorld.com (Robert A Duff) (2006-12-23)
Re: Generating a simple hand-coded like recursive descent parser DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-23)
Re: Generating a simple hand-coded like recursive descent parser boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2006-12-23)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: 19 Dec 2006 01:06:42 -0500
Organization: Compilers Central
References: 06-09-029 06-09-042 06-09-048 06-09-060 06-09-078 06-09-093 06-12-064 06-12-066
Keywords: parse, C
Posted-Date: 19 Dec 2006 01:06:42 EST

First I apologize for the unintended re-post of an age old message. My
Mozilla even sent some deleted messages at the same time :-(


Robert A Duff wrote:


> P.S. Why do you say that the "a = (b)-c;" ambiguity is more practical
> than the "x * y;" ambiguity? They seem like more-or-less the same
> thing, to me: the parser wants to know whether each identifier is a type
> name.


In the case of "x * y;" the context can be used, to determine whether
declarations or expressions can occur at all. Even if both are allowed,
one might argue that the result of a multiplication should be used
somehow, e.g. assigned to a variable.


Not a very strong point, of course, but it leaves room for discussions.
The ambiguity of "a = (b)-c;" is out of question, both interpretations
of "(b)-c" result in a syntactically valid expression.


DoDi


Post a followup to this message

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