An oddity in this lexer is that it allows numbers followed by an identifier with no separation: "99foo" turns into two tokens, number "99" and identifier "foo".
If this is an error in the language, the parser easily catches it.
Some languages AFAIR allow "units" to be attached to numbers so some use cases are actually valid. In any case, it's a higher-level decision the parser makes.
42 // int
42U // unsigned int
42LL // long long
42ULL // unsigned long long
42.0 // double
42.0f // float
Edit: except that whitespace isn't allowed here. "42 LL" is not legal. So that's kind of the opposite case!In the C standard, numeric tokens include signs, floating point dots, type specifiers (U, L, etc.), and much more. For the gory details see: https://github.com/eliben/pycparser/blob/master/pycparser/c_...
But in the end, it's all in the same token.
If the grammar allows for example "2x" as a "shortcut" for "2 * x" (if you parse mathematical expressions) it would make sense.
Nitpick: Depending on the syntax the lexer might also yield 99f (float literal) and the identifier "oo".