This is not a bug but a suggestion. I implemented an alternative expression tokenizer using an Aho-Corasick automaton. This allows to lex against a list of known symbols and resolve expressions that would be otherwise ambiguous and may help other boolean.py users. You can find it there: https://github.com/nexB/license-expression/tree/56709dc901c97a3722247d4e4158e95594fd69a1/src/license_expression