in reply to Re^6: Parsing Boolean expressions (hack)
in thread Parsing Boolean expressions
there is not only binary vs postfix, also operator precedence and associativity to be respected!
see perlop#Operator-Precedence-and-Associativity
e.g A+B*C must be A+(B*C)
I just presumed Perl rules for the interpretation and was lucky Perl has two level of logical ops allowing me to emulate the postfix negation with an xor.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Parsing Boolean expressions (hack)
by Anonymous Monk on Apr 23, 2017 at 18:01 UTC |