Re: Pre-Parsers

vbdis@aol.com (VBDis)
21 Sep 2000 18:12:23 -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: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 21 Sep 2000 18:12:23 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 00-09-119
Keywords: parse

Im Artikel 00-09-119, saroj@bear.com 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.


DoDi


Post a followup to this message

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