[antlr-interest] How to make your own interpreter?

Flik04 at gmx.de Flik04 at gmx.de
Mon Jul 18 04:18:30 PDT 2005


hello together,

I work on the problem how to create my own programming language.

I have already created the grammar file (.g) for making the parser and the
lexer. Both things work very well.

I also have created the treewalker! now i am able to walk through the AST of
my example file.

The problem I have now is how to go on writing my interpreter:
i have seen the tinybasic example distributed with antlr, but i do not get
any idea of implementing this to my language...

Is there any good documentation to this tinybasic project or a general one
about doing an interpreter?
My problem is that i do not know how to read out variables and store them in
a stack and how to handle for-loops: you know, checking the boolean value,
call an external subrutine and jump back into the loop after executing the
subrutine and so on....

I am a total newbie to the antlr thing....

thanks in advance

Flik

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++


More information about the antlr-interest mailing list