Make a parser that parses any number of values and operators, then one extra value to combine in right-to-left (last-to-first) order.
Use rightAssoc1 if the grammar doesn't have an explicit operator between values.
Implementation is based on ab and reduceRight.
A parser for each consecutive value.
A parser for an operator function.
A parser for the last value, also defines the result type (accumulator).
Make a parser that parses any number of values and operators, then one extra value to combine in right-to-left (last-to-first) order.
Use rightAssoc1 if the grammar doesn't have an explicit operator between values.
Implementation is based on ab and reduceRight.