[antlr-interest] more on left-recursive rules

Terence Parr parrt at cs.usfca.edu
Wed Feb 23 16:05:10 PST 2011


On Feb 23, 2011, at 2:19 PM, Alan Rooks wrote:
> What do you get for "a-b+c"?
> 
> I hope it's "(+ (- a b) c)" and not "(- a (+ b c)".

Yep. added test case:

			"a-b+c",	"(+ (- a b) c)",

i'm adding right associativity now.

Ter


More information about the antlr-interest mailing list