Re: C comments

[email protected] (Damian Conway)
Newsgroups perl.recdescent
Message-ID <[email protected]>
Andrew asked:

   > Since there is no separate lexer in recdescent. And it is top down. Is
   > there anyway to deal w/ removing C comments that could be anywhere.

Sure. Treat them as whitespace!

Do something like this:

	program: <skip: qr{\s* (/[*] .*? [*]/ \s*)*}x> statement(s)

	statement: # etc...

Damian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.