Hi, I have a rule in my tree grammar (same in my parser grammar) which has optional attribute which can occur in my input :
className : (('.module')? name1 ) slashedName ; How can i construct a string template to include the optional attribute (here its .module) to be sent as a parameter to the template only if it occurs ... Since it is a keyword, and there is no separate lexer rule written to match '.module' separately, I dono how to pass the .module keyword as optional parameter to the template. .module keyword should be filled in the blank space of the following rewrite rule: className : (('.module')? name1 ) slashedName -> className(....... assemblyname = {$name1.st} methodname={$slashedName.st}) ; Kindly suggest. Best Regards, Jevitha --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address