Moved lexer states into parser_internal.h

Renamed lexer states to begin with L_ rather than T_, so that they may be
distinguished from parser states.