Sunday, February 15, 2004 07:08 PM
How do I make ANTLR generate an AST that associates to the right instead of to the left?
I.e I want to parse something like this (just an example)
a -> b -> c
To a tree that has this structure:
Generating left-associative trees seems quite easy (using the ^ notation). Is there a similarly easy way to generate the right associative trees as well?