views:

46

answers:

0

I have been through the ANTLR tutorial series by Scott Stanchfield and am also going through the ANTLR book... My project requires me to build a multipass language translator to translate code from one language to another both the languages are similar in syntax with the difference being that the source language has support for classes and the destination language does not. So the Major purpose of the translator would be to break open the class hierarchy into individual variables and functions.

Is there a good tutorial for creating a multipass translator?

Any advice on how to proceed?

I already have the grammar in place. I was planning to build a tree walker which would recursively parse and expand each class and dump out the resultant code.