add lexer simulation loop