ANSI Parsing/Preproc questions

Eric Wayne Sink esink at turia.dit.upm.es
Mon Oct 15 20:08:44 AEST 1990


What does ANSI say about comments within tokens ?  ie, is the
following legal ?

int variable;

vari/* in the middle */able = 5;

Also, does ANSI say anything about the preprocessor contructing tokens
?  I can't think of an example of this right now, but it would be
something like:

#define macro(X) variX
/* obviously, some operator is needed above, if this is legal at all
*/

macro(5) = 3; /* expands to: vari5 = 3 */

Finally, can anyone send me/point me to examples of C code which
causes problems for parsers/preprocessors ?  I've heard something of a
C torture test...

Thanks in advance, and please email iff these questions have been
hashed over too many times.  (if appropriate, perhaps someone could
email FAQ to me ?)

Eric W. Sink
esink at turia.dit.upm.es



More information about the Comp.lang.c mailing list