Make lexer reentrant