where should I use the setHiddenAfter / setHiddenBefore methods? Please let me know
vasanthi. On Thu, May 7, 2009 at 4:19 PM, Andreas Meyer <[email protected]>wrote: > If you just skip the comment token, it will be discarded. If you want to > retain it, you have to use the "setHiddenAfter" / "setHiddenBefore" > methods mentioned in the antlr wiki. Once the comments are stored there, > you have to take care that you print them while traversing the tree for > output. > > Andreas > > vasanthi a schrieb: > > HI All > > > > I have the below code for java grammar comment > > > > > > // Single-line comments > > > > SL_COMMENT > > > > : "//" (~('\r'|'\n'))* {$setType(Token.SKIP);} > > > > ; > > > > After instrumenting the java code, it is removing the java comments . > > Can you please let me know how to retain the comments > > > > after instrumenting the code.. > > > > > > > > Please let me know, as I am stuck up with this from quite long time > > > > > > > > Vasanthi. > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > 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 [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 -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
