Compiler is all about impementation.
If an automata is already defined for your statement, then it will be counted as a valid token ,Otherwise it will show lexical error.
Here, mis-spelling of keywords or identifier means error while identifying lexemes(longest common sequence).