minor cleanup for lexer.

refactored is_* functions to have a common funciton

refactored the pattern (and threw it into "is" func) for is_*
is_* will always return explicit bool
Added identifier converter