Lexical analysis rework