At 07:49 14/10/2008, Tom Smith wrote: >Right now I have a multipass translator to generate code based on >a program written in a DSL (using StringTemplate rewrites). I just >realized that I have enough information in my AST to generate some >other supporting files as well. Is there a straightforward way to >structure this task?
Probably the simplest way to do it would be to just create multiple tree walkers that you run in turn, each one creating one of the outputs. Otherwise you could use a single tree walker and write multiple sets of output to different streams. I'm not sure if this is compatible with use of StringTemplate, though. I thought there was an example somewhere demonstrating writing out .c files together with .h files, but I can't find it at the moment. 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 -~----------~----~----~----~------~----~------~--~---
