methods for read_next_symbol and read ident