Re: C comment extraction, or a bag .deb of small commands
On Sun, Jan 19, 2003 at 02:21:58PM +0000, Richard Kettlewell wrote:
> "H. S. Teoh" <email@example.com> writes:
> > But as someone pointed out, this totally doesn't handle /*'s and
> > //'s appearing inside quoted strings. I overlooked that aspect of
> > it. Nevertheless, it *must* be possible to write a regex for it,
> > since mathematically speaking, a finite state machine is powerful
> > enough to tokenize C. Of course, that doesn't say anything about how
> > complex the regex might have to be to cover all cases. :-)
> Rather than producing a new program, why not add the feature you want
> to an existing C preprocessor (say, GCC), since that does the
> tokenization correctly already?
I was just answering somebody else's question, which was to have a regex
one-liner that extracted C comments.
"You are a very disagreeable person." "NO."