code.ivysaur.me

pint

A minimal expression evaluator with pluggable functions.

By using the precedence climbing method, it (A) respects infix order of operations, and (B) clocks in at 4x fewer lines than my earlier fxe.

Tags: PL

See Also

Precedence Climbing: https://en.wikipedia.org/wiki/Operator_precedence_parser#Precedence_climbing_method

Download