C comment stripper

John Rupley rupley at arizona.edu
Fri Mar 24 10:57:34 AEST 1989


In article <1453 at wpi.wpi.edu>, lfoard at wpi.wpi.edu (Lawrence C Foard) writes:
> I just made this C comment stripper, I tried it on it self and it works
> ok. If any one finds code it pukes on tell me (there is probably still
> something I missed).

It pukes ... try:

	/***/ main() {printf("hi there\n");} /* */

Score, anyone? (recent postings tested on K&R-I-syntax code)

	sed        1/1 correct
	Lex        2/2 correct
	C          2/2 wrong

Hmmm.

John Rupley
rupley!local at megaron.arizona.edu



More information about the Comp.lang.c mailing list