Errors detected in lexical Analysis:
1. Numeric literals that are too long.
2. Long identifiers.
3. Ill-formed numeric literals ex: int X= $ 12345.
4. Input character that is not part of the source of language.
1. Panic mode recovery: Delete the unknown character.example: "chhar" is corrected as "char".
2. Transpose: bases on certain rules, we transpose two characters. example: "while "if written as" wheil". here e and i are transposed.
3. Replace: it is based on replacing one character by another character .examp;e: "chhr "can be corrected as "char "by replacing second 'h' with 'a'
4. Insert: An extra or missing character is inserted to form a meaningful word. example: "cha" is corrected as "char "by inserting 'a'.