move tokenizer from io.c to util.c