[antlr-interest] caching AST and parsed information

daniel_raichle daniel.raichle at etas.de
Tue Jan 20 01:37:51 PST 2004


Hi,

I am using antlr to instrument multiple (small) C-files automatically
with Monty's C-grammar.

Now I have the problem that all of my C-files include a file called
"temp.h" in which some macros are defined and which includes some
other project specific .h-files and some standard .h-files (eg.
stdio.h, math.h, ...). Because of the macros and typedefs in the
project-specific .h-files I am using a preprocessor before parsing
with antlr and I am getting very large files because of all the
includes, mainly the standard .h-files. Therefore parsing those files
is very slow.

Now my thoughts are: as all of my C-files only include this single
.h-file, I could possibly parse the temp.h file first and then cache
all the informations, antlr has parsed up to this point. After that I
could parse my c-files directly without using a preprocessor before
and ignoring the #include "temp.h"-directive.

How could I do that? Is this possible with antlr?

Thanks,
Daniel Raichle


 

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