[antlr-interest] Re: Need help: How to remove comments before parsing?

John D. Mitchell johnm-antlr at non.net
Thu Mar 17 17:50:39 PST 2005


Your sketch of how you're trying to handle C preprocessor constructs
doesn't sound powerful enough to be correct.  It's more complicated than
you think. :-) :-(

I'd suggest getting a copy of the C Standard and particularly studying the
early phases of translation that they explain.  You can also look at the
Standard C ('89) grammar that's part of the GCC bundle that we built
(available on antlr.org) for some help on some of those phased (but not on
the CPP mess).

Hope this helps,
		John


More information about the antlr-interest mailing list