Fixed lexer token ordering and extended test cases for 24fa74d