Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!usc!samsung!uunet!portal!cup.portal.com!pkturner From: pkturner@cup.portal.com (Prescott K Turner) Newsgroups: comp.std.c Subject: Re: Macro names imbedded in pp-numbers [repost] Message-ID: <24191@cup.portal.com> Date: 18 Nov 89 19:23:54 GMT References: <11134@riks.csl.sony.co.jp> Organization: The Portal System (TM) Lines: 18 > Both the standard and the rationale say that in the pp-number > 0x7e-getchar() > it is illegal for my preprocessor to expand the getchar() macro. > If there is a real getchar() function, it is guaranteed that the > real function must be invoked by this expression. The draft standard says, "Each preprocessing token is converted into a token". Since 0x7e-getchar cannot be converted into a token, there is an error, and the real getchar() function need not be invoked. > I will have to add code to my scanner, and slow it down, so that > it will not call the preprocessor if it finds a macro in the middle > of a pp-number. "getchar" in the middle of a pp-number should give a scanner no more difficulty than "getchar" in the middle of an identifier, e.g. mygetchar -- Prescott K. Turner, Jr. 13 Burning Tree Rd., Natick, MA 01760 USA (508) 653-0357 UUCP: ...sun!cup.portal.com!pkturner Internet: pkturner@cup.portal.com