Hi list, I have a rule that produces a warning, which I would like to get rid of. However, it seems I can't get further without some help, so I would much appreciate any hint to solve this. The actual grammar is of course more complex but I condensed the problem to this:
a: b (d1 (e)? | d2 a e)*; b: 'b'; d1: 'd1'; d2: 'd2'; e: 'e'; The problem is the recursion of rule a which may end in rule e, but via two alternatives (obviously). I was thinking about extracting the (e)? part somehow like this: a: b ((d1 | d2 a e) (e)?)* but this doesn't feel right. Any better idea? Mike -- www.soft-gems.net
_______________________________________________ antlr-dev mailing list [email protected] http://www.antlr.org/mailman/listinfo/antlr-dev
