I suck at this, clearly I don't get it. It feels like I've made zero progress in weeks.
I finally got to the point where I can output a simple AST with one grammar, and I'm trying to use a tree grammar to translate that into the target language using templates. My simple tree: (DOCUMENT (GET 'variable')) My tree grammar: document : ^(DOCUMENT statement*) -> using() ; statement: getExpr; getExpr: ^(GET LITERAL) -> print() ; My template: > > group CSharpGenerator; > > using() ::= << > foo >>> > > print() ::= << > System.Console.WriteLine; >>> When I run the parsers tree through the tree grammar passing in the template, all I get is this: foo orint() seems to never be called. If I change the tree grammar to output AST and print that tree, I get the same tree, which seems to imply my tree grammar is fine. What am I missing? 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-interest@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 -~----------~----~----~----~------~----~------~--~---