Move lexer state to the header file