[lex] Fix some minor issues of regular lexical definition and improve the consistence

This patch tries to fix some inconsistent or minor issues I found in C++ lexical definition.