Updated tokenizer to throw exceptions when EOI is hit