As I mentioned, I'm trying to parse code (like C or C++ or Java) with doc-comments (like javadoc or doxygen). I'm interested in the doc-comments, so I don't want to just throw them away.
Without some way to parse text that is notionally “skipped” (that is, as far as the “real” grammar—that of the programming language—is concerned), I realize I'm looking at injecting comments into the programming language grammar as additional productions. But since comments can occur anywhere that whitespace can, this is going to get verbose. So I was looking for a Better Way.
| [reply] |