Optimized Lexer and parser