re-organized and generating lexer