tokenize: support mode
Merge pull request #191 from naoa/tokenize-support-mode

tokenize: support mode

Patch by Naoya Murakami. Thanks!!!
tokenize: remove needless output on error
tokenize: don't use overspec code
tokenize: remove needless output on error
tokenize: remove needless prefix
tokenize: add missing mode name length check