Code for lexer only