Parsing an equation using parboiled and applying to values

301 Views Asked by At

I need to parse an equation and then apply it to values. For example, I would like to parse

(x+4)*y

and then apply it to an array of values for x and y. I am able to use the calculator example to evaluate individual equations like

(3+4)*5

but I am not sure how to make this generic. I am using Parboiled for Java. Any direction would be highly appreciated.

0

There are 0 best solutions below