Handle EOF like a character such that in-progress tokens can terminate.

Fixes identifiers and reserved words at the end of files.