Re: Pre-Parsers

saroj@bear.com
15 Sep 2000 01:39:51 -0400

          From comp.compilers

Related articles
Pre-Parsers jim.granville@designtools.co.nz (Jim Granville) (2000-09-08)
Re: Pre-Parsers rhyde@cs.ucr.edu (Randall Hyde) (2000-09-09)
Re: Pre-Parsers vbdis@aol.com (2000-09-13)
Re: Pre-Parsers saroj@bear.com (2000-09-15)
Re: Pre-Parsers vbdis@aol.com (2000-09-21)
Re: Pre-Parsers broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2000-10-08)
Re: Pre-Parsers fjh@cs.mu.OZ.AU (2000-10-10)
Re: Pre-Parsers brynjulv.hauksson@sds.no (2000-10-12)
Re: Pre-Parsers jthorn@galileo.thp.univie.ac.at (2000-10-12)
| List of all articles for this month |
From: saroj@bear.com
Newsgroups: comp.compilers
Date: 15 Sep 2000 01:39:51 -0400
Organization: Deja.com - Before you buy.
References: 00-09-065 00-09-093
Keywords: parse

    vbdis@aol.com (VBDis) wrote:
> Im Artikel 00-09-065, Jim Granville
> <jim.granville@designtools.co.nz> schreibt:
>
> > I am looking into pre-parsers, esp those that also include
> >MACRO capability, with the usual define/ifdef/endif.
>
[snipped good description about preprocessor implementation]


> Some features can require more processing, like the evaluation of
> sizeof(x) in C. In this case all type and variable declarations must
> also be stored by the parser, so that the size of every declared
> symbol can be evaluated in conditional expressions. At the same time
> nested scopes must be implemented, so that the parser can find the
> appropriate definition of a symbol within the current nesting of
> subroutine declarations etc. Such features are closesly related to a
> specific compiler, and that's why you'll never find a "general"
> preprocessor for the current C standard. Even the stand-alone
> preprocessors, shipped with some C compilers, may be usable for some
> general preprocessing, but may fail to produce correct output for a
> different C compiler.


Why do you need to parse 'sizeof' if all you are interested is a
preprocessor (macro capability)? Or do you need some other capability?


Thank you,
Saroj Mahapatra


Post a followup to this message

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