[antlr-interest] new interpreter example

Terence Parr parrt at cs.usfca.edu
Fri Jan 30 13:24:59 PST 2009


Howdy.  I just finished the implementation of a really cool  
interpreter that can handle any object-oriented language understands  
closures/lambdas natively. It's meant to demonstrate a very clean and  
powerful interpreter, one that is easy to target from a compiler. It  
is not efficient which is not usually a concern for most interpreters  
for DSLs.

http://www.antlr.org/wiki/display/CS652/Command+interpreter

Take look and let me know what you think. I cannot release the (tiny)  
900 lines of source code because my students need to build it sometime  
in March, but I will release it after they finish the project. It will  
also be explained in detail as an example in my language book.

You'll love the solution. It's extremely regular and simple. It would  
be suitable for embedded languages or even as a byte code compiler  
target. For example, with a few extra instructions, this could easily  
be a Python interpreter.

Ter


More information about the antlr-interest mailing list