removing parser dependency in lexer