[antlr-interest] Using ANTLR to expand C Macros

Nick Vlassopoulos nvlassopoulos at gmail.com
Fri Jul 31 08:10:38 PDT 2009


Hi Thomas,

I am not sure if this is what you are looking for, but there is a C
preprocessor in the example
grammars (http://www.antlr.org/grammar/1166665121622/Cpp.tar). I think the
parts you are looking
for are in the macroDefine, macroExecution (CppTree.g) and in the
getExpansion method in
"FunctionMacro.java"

Hope this helps,

Nikos

On Fri, Jul 31, 2009 at 3:38 PM, Thomas Jackson <
thomas.jackson.iii at gmail.com> wrote:

> Maybe kinda off topic, but does anyone know of any project to expand C
> macros in code?  I figured someone must have used the ANTLR C Grammar to
> do this, but so far my searches have been unsuccessful.
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090731/9524a331/attachment.html 


More information about the antlr-interest mailing list