[antlr-interest] Sample Interpreter and Compiler
Scott Fortmann-Roe
scottfr at gmail.com
Thu May 3 11:24:01 PDT 2007
Hi,
I developed a simple interpreter and compiler for a subset of C
supporting if-statements, loops, integers, functions, and arrays. The
interpreter is implemented using a tree grammar and the compiler
targets LLVM's [http://LLVM.org] intermediate representation
This was developed for a course and is very limited, but could be
instructive to people attempting to learn how to accomplish a wide
variety of tasks.
This was my "learn java", "learn antlr", "learn LLVM", and "learn
stringtemplate" project so the code is pretty hairy.
These were tested with ANTLR 3.0b7.
Hope this helps some folks.
-Scott
--
Scott Fortmann-Roe
500 College Ave
Swarthmore, Pa 19081
(510) 866-5296
More information about the antlr-interest
mailing list