refining lexer