[antlr-interest] Re: Updated C++ parser

Mike Lischke lists at lischke-online.de
Mon Jul 5 10:03:03 PDT 2004


> I also wanted to deal with preprocessor stuff in within 
> Monty's C grammar. There are a couple of "gotchas": mult-line 
> preprocessor directives and the dreaded "##" operator. Below 
> is what I have.

Sorry, I haven't followed that thread until now but I think I should tell you that I'm working on a preprocessor.
Actually, this Java class is made for MSVC/BCB resource files, but as I have it now it should do fine with any C/C++
file (I have only tested it with rc and some of the standard header files, though). The preprocessor comes with a quite
complete macro handling implementation and also supports all three preprocessor operators (charizing, stringizing and
token pasting). I haven't created the preprocessor from a grammar, though, but implemented it manually. After several
attempts I gave up to use ANTLR for this particular part as the preprocessor depends much on line-per-line processing. 

The preprocessor is part of a converter for rc files, which I plan to publish in a few weeks. If you want I'll can send
you a copy.

Mike
--
www.soft-gems.net 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list