Gavin, thanks for the idea. In addition to Gavin's suggestion, I guess it is possible to have a single tree walker that uses different StringTemplate groups to form the output. Does anyone have thoughts on the workability of these approaches?
Thanks, Tom. On Mon, Oct 13, 2008 at 4:11 PM, Gavin Lambert <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---
