Refactor yylex func
Merge pull request #2620 from suzukaze/refactor-yylex

Refactor yylex func