Use chained comparisons in lexer where previously it would fail