lexer function inserted in a impl(lexer functionality updated)