bastikr / boolean.py

Implements boolean algebra in one module.
BSD 2-Clause "Simplified" License
76 stars 34 forks source link

implement support for XOR, XNOR, NAND operators #84

Closed cyfrost closed 5 years ago

cyfrost commented 5 years ago

Hi, first off, Thanks for this great module. It's proving to be quite useful for my research use-cases and probably to others with similar ones.

I'm trying to parse some boolean expressions involving the XOR, XNOR, NAND operators but the parser fails to parse the said expressions since they're not recognised as known operators.

In the current scenario, an expression involving such operators would need to be simplified by hand (since XOR, XNOR, NAND translate into forms of AND, OR, NOT eventually) before the boolean.py parser can handle them. Is there any simpler way to achieve this?

Thanks!