[antlr-interest] Sample Interpreter and Compiler

Terence Parr parrt at cs.usfca.edu
Thu May 3 13:36:30 PDT 2007


I have added to file sharing area of antlr.org.  Great!
Thanks,
Ter
On May 3, 2007, at 11:24 AM, Scott Fortmann-Roe wrote:

> 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