Re: Pre-Parsers (VBDis)
21 Sep 2000 18:12:23 -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 |

From: (VBDis)
Newsgroups: comp.compilers
Date: 21 Sep 2000 18:12:23 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG
References: 00-09-119
Keywords: parse

Im Artikel 00-09-119, schreibt:

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

I often found source code with something like:

#if sizeof(int)==2 ...

Here sizeof() must be evaluated by the preprocessor.

More weird conventions exist with preprocessing. AFAIR the Sinix
compiler (a Unix derivate) required that the preprocessor does macro
substitution also within string literals. I'm not sure whether the
according lines in the syslib header files only abused the inability
of the preprocessor, to handle string literals properly, or whether it
was a documented feature.

At least you should know that a preprocessor in most cases *must* have
some built-in functions and operators, and that the specification of
these functions requires some careful considerations.


Post a followup to this message

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