Cleanup of scanner.

Removed redundancy of keyword definitions and removed some unused token
predicates.
yes, but why do you need the \n in the beginning?