called lex_next() correctly