GCC Translation Framework

Browse my GCC translation framework at http://www.antlr.org/grammar/cgram or download it at http://www.antlr.org/grammar/cgram/cgram.tgz. It's a complete source to source transformation system based on antlr. Possible applications include extending the C language with type safe pointers, instrumenting code, implementing an Aspect Oriented compiler, source code analysis, or specialized debugging and profiling code generation. It's like having a compiler without the executable generations.

I also wrote a simple parser that understands "noweb" files http://www.cs.virginia.edu/~nr/noweb/. Included is a Java implementation of "notangle". Noweb is a popular literate programming tool which lets you write a program in a non-linear way. The premise of literate programming is that you should be able to write a document explaining the program in the order and at the level of detail you want to, but with the entire source in that document as well. From that document you can produce a TeX or html document plus the machine readable source code. Also included is an experimental class for combining the noweb syntax with JPython http://www.python.org/jpython to allow for dynamically generating source code from noweb templates, Java objects and JPython code. Download it here http://www.antlr.org/grammar/noweb.tar.gz

I wrote a simple ANTLR parser which reads in all the .g files specified as arguments and writes an EMACS TAGS file on stdout. It also creates a Makefile.antlr, with a rule for each .g file and dependencies on superclass and token types. It's pretty new, but seems to work with my massive C project with lots of parser subclasses. It should be trivial to make it work with other TAGS formats. It is based on the 2.6b13 Antlr.g parser, but should be easy to fix if it doesn't work for the latest antlr release. Download it here http://www.antlr.org/showcase/tags.tar.gz