From: Francis Cianfrocca Date: 2006-09-15T11:32:33+09:00 Subject: Re: Regular expression question. ------=_Part_6984_285919.1158287506407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/14/06, Tom Copeland wrote: > > I'm not sure if it's impossible to parse out C-style comments using a > regular expression, but the various JavaCC grammars I've seen all use > lexical states to do it instead. Another complication is trigraphs (*), > although I think those are unrecognized by default in most C > preprocessors. One more point. Someone upthread gave an example similar to this: /* printf ("*/"); */ Considered strictly as a lexical construction, I think this is regular. However, I have a funny feeling that this: /* printf ("/*......*/"); */ is actually context-free. Does anyone know for sure? ------=_Part_6984_285919.1158287506407--