Hi, I have two languages that are fairly similar, and I'd like to translate from one to the other. For both languages, I have grammars, and re-write rules that create ASTs. I also have tree grammars that recognize the ASTs and use StringTemplates to output the original source.
That is: Lang1 -> Parser1 -> AST1 -> Template1 -> Lang1 Lang2 -> Parser2 -> AST2 -> Template2 -> Lang2 What I'd like to do is write a tree grammar that recognizes AST1, and creates an AST2, so that I can use the template2 to output the source: Lang1 -> Parser1 -> AST1 -> AST2 -> Template2 -> Lang2 As I understand it, antlr dosn't allow me to specify tree grammars that generate ASTs. Has anyone else tried to do something like this? If so, can you recommend a way to do this? thank you, Robert List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
