tokenizer: moved some stuff around
tokenizer: use string as state names

it's not only easier to debug, but also much faster