Finish tokenizing algorithm.