http://qs321.pair.com?node_id=858659


in reply to Re: Eliminating the common prefix from a Parse::RecDescent rule
in thread Operator Associativity and Eliminating Left-Recursion in Parse::RecDescent

You must check that nothing follows what sum matches.
evaluate : sum /\Z/ { $item[1] } ->evaluate($expr)