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

Chris Dollin <chris.dollin@hp.com>
19 Dec 2006 01:04:21 -0500

          From comp.compilers

Related articles
[26 earlier articles]
Re: Generating a simple hand-coded like recursive descent parser DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-09-28)
Re: Generating a simple hand-coded like recursive descent parser phaywood@alphalink.com.au (2006-09-30)
Re: Generating a simple hand-coded like recursive descent parser DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-16)
Re: Generating a simple hand-coded like recursive descent parser bobduff@shell01.TheWorld.com (Robert A Duff) (2006-12-17)
Re: Generating a simple hand-coded like recursive descent parser tommy.thorn@gmail.com (Tommy Thorn) (2006-12-19)
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)
[5 later articles]
| List of all articles for this month |

From: Chris Dollin <chris.dollin@hp.com>
Newsgroups: comp.compilers
Date: 19 Dec 2006 01:04:21 -0500
Organization: HP labs, Bristol
References: 06-09-02906-09-042 06-09-048 06-09-060 06-09-078 06-09-093 06-12-064
Keywords: C
Posted-Date: 19 Dec 2006 01:04:21 EST

Hans-Peter Diettrich wrote:


> As a solution for this problem in my LL(1.5) C parser, I leave the
> distinction to a stage between the lexer and parser, inside the
> preprocessor. Only in this stage "words" are mapped into keywords,
> typenames and other identifiers. The according "symbol" table is
> initialized with the C keywords, the preprocessor adds to it all
> #defined names, and the parser adds all encountered typedef
> names. This procedure works fine, provided that typedefs always have
> global scope, as is required in C.


Didn't we go round this a while ago? C typedefs can have non-global
scope.


--
Chris "HO. HO. HO." Dollin
[Oops, we did, didn't we. -John]





Post a followup to this message

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