Terence> Rules do not return templates by default; you have to set them.
Terence> any that does not returns a null, hence, the list of nulls you
Terence> get :)

Thanks for clarifying this.  Dunno if I could table a configurable
alternative (unmodified-defaults-to-self, or something) as a wishlist
item for some future version --- I'm doing some moderately substantial
rewrites on Java source, and in collecting lists of various kinds like
this (where some of the elements are rewritten and some aren't) I end up
having to modify quite a number of rules to just rewrite themselves as
themselves:

  container: (l+=element) -> template(...) "<l:{...}>" ;

  element
      : foo -> template(self={$text}) "<self>"
      ...
      | actualRewrittenStuff
      ;

Regards,
Conrad

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.

Reply via email to