look at PPExpressionParser class.
Hello
I try to extent the example of the arithmetic evaluator[1], I don't
understand the magic underneath nor how you will make it works with
substraction.
Changing method add to:
add
�^ prod, ($+ asParser / $- asParser) trim, term
to parse mixture addition and substraction is wrong:
parser parse: '1 - 2 + 6' �-> #(1 $- #(2 $+ 6))
The precedence is wrong.
How will you make it work? It seems to me the way to handle precedence
in the example is not suited for extension
Thanks
Hilaire
[1] http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/