Realized for the first time tonight that C++ keywords aren't actually "tokens" in the same way that all the rest of the tokens are...
But only because of the was in which the lexer is constructed. If the token "do" had priority, that wouldn't work!
-
-
So it's very specifically because of the way the maximum munch rule works that these things are the way they are.
-
Well, in my (relatively simplistic language), I read the entire identifier and then see if it matches a keyword (1/2)
- Show replies
New conversation -
-
-
Is there any language with similar syntax that doesn't do (no pun intended) the same?
-
I would assume not. But I only happen to work with C++ :)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.