Hi, Maybe you can take a look how a walker is done in this example (download the code and look at the methods in MessageContractAssembler.cs): http://abdullin.com/journal/2010/10/12/teach-visual-studio-your-own-language -easy.html
In addition, it is a good idea to simplify your AST before walking through it. I have used rewrite rules. You might find this tutorial useful: http://floris.briolas.nl/floris/2008/08/antlr-ast-and-rewriting-rules/ -mari -----Original Message----- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-bounces@antlr. org] On Behalf Of ??? Sent: Sunday, November 13, 2011 3:37 PM To: antlr-interest@antlr.org Subject: [antlr-interest] [C# target]about efficiency of the code Hello all I write a very small script language in C#. I have to use box and unbox again and again in C# code to walk through the AST tree, and a lot of method use reflection, so i worry about the code efficiency. anyone have experience walk through tree in C#? how to do more effectively? can give me some hints? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.