Both parser- and lexer rules can take parameters of any (Java) type. However, rules in ANTLR are "translated" to methods, and methods aren't first class objects in Java. So providing a rule (read: method) to another rule as parameter is not possible.
Perhaps you can elaborate a bit and explain what problem you're trying to solve? Regards, Bart. On Tue, May 3, 2011 at 7:29 PM, Vladimir VG <gordeev.vladimi...@gmail.com>wrote: > I'm defining some grouping rule ( '(' value ')' ) for operator precedence, > and it will be helpful if I would use rules that takes other rules as > arguments. > > Is that possible? > > 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.