Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!hpcea!hpda!hpirs!hpisod2!decot
From: decot@hpisod2.HP (Dave Decot)
Newsgroups: comp.lang.c
Subject: Re: draft ANSI standard: Is a quote a valid preprocessor-token?
Message-ID: <2550003@hpisod2.HP>
Date: Sun, 11-Jan-87 05:40:15 EST
Article-I.D.: hpisod2.2550003
Posted: Sun Jan 11 05:40:15 1987
Date-Received: Mon, 12-Jan-87 18:35:21 EST
References: <1605@hoptoad.uucp>
Lines: 30

> In article <1971@emory.UUCP>, arnold@emory.UUCP writes:
> > #define CTRL(X)	(' ## X ## ' & 037)	/* ascii only */
> >    ...uses the token concatenation operator to produce the character
> > constant....
> > I am sure someone will correct me if I am wrong.
> 
> 	preprocessing-token:
> 		header-name	 (only within a #include directive)
> 		identifier
> 		constant
> 		string-literal
> 		operator
> 		punctuator
> 		each non-white-space character that cannot be one of the above
> 
> Aha!  Since a lone quote is not any of the above, it must be one of those
> "each non white space characters", and it must be a preprocessing-token.
> Right?

' ## X ## ' comes under the heading of "constant".

> Phooey.  There should be specific instructions in the standard on
> lexical analysis of C programs, e.g. an algorithm for parsing, rather
> than this vague English rubbish.

I agree.  It is possible to accurately describe anything in English.
It is not always possible to accurately describe things in vague English.

Dave Decot
hpda!decot