Comment recognition in Lex, again

merlyn at sequent.UUCP merlyn at sequent.UUCP
Mon May 7 09:41:41 AEST 1984


> From: chris at umcp-cs.UUCP
> Message-ID: <6879 at umcp-cs.UUCP>
> Date: Thu, 3-May-84 20:59:25 PDT
> 
> A Lex expression that matches C comments:
> 
> 	comment			"/*"(\*[^/]|[^*]*)*"*/"
> 
> (The * after the first ] shouldn't be necessary, I think, but you
> did specify that the expression come from working code...)

Funny, your "working code" doesn't match /***/ .. try it!

Randal L. ("no comment") Schwartz, esq. (merlyn at sequent.UUCP)
	(Official legendary sorcerer of the 1984 Summer Olympics)
Sequent Computer Systems, Inc. (503)626-5700 (sequent = 1/quosine)
UUCP: ...!XXX!sequent!merlyn where XXX is one of:
	decwrl nsc ogcvax pur-ee rocks34 shell teneron unisoft vax135 verdix



More information about the Comp.unix.wizards mailing list