Re: Pre-Parsers
15 Sep 2000 01:39:51 -0400

          From comp.compilers

Related articles
Pre-Parsers (Jim Granville) (2000-09-08)
Re: Pre-Parsers (Randall Hyde) (2000-09-09)
Re: Pre-Parsers (2000-09-13)
Re: Pre-Parsers (2000-09-15)
Re: Pre-Parsers (2000-09-21)
Re: Pre-Parsers (Hans-Bernhard Broeker) (2000-10-08)
Re: Pre-Parsers (2000-10-10)
Re: Pre-Parsers (2000-10-12)
Re: Pre-Parsers (2000-10-12)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 15 Sep 2000 01:39:51 -0400
Organization: - Before you buy.
References: 00-09-065 00-09-093
Keywords: parse (VBDis) wrote:
> Im Artikel 00-09-065, Jim Granville
> <> 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.