I have some variables
var a = true;
var b = false;
var c = true;
and propositional logic expression (in infix=a | b & c
) as postfix
a b | c &
I want to evaluate the truth value.
I have found http://eddmann.com/posts/small-rpn-implementation-in-javascript/ which does it for arithmetic.
How can I do the same for just logical symbols?