Implement a Lex conditions-like system