/    /  Compiler Design-Errors in Lexical Analysis

Errors in Lexical Analysis

 

Lexical error is a sequence of characters that does not match the pattern of any token. These errors can be found during the execution phase.

 

During the lexical analysis phase, the following type of errors can be detected. 

  • Spelling errors
  • Grammatical errors
  • Length of identifier or numeric constants being more than specified
  • Presence of illegal characters
  • Replacing a character with a wrong character
  • To delete a character that needs to be present
  • Two characters transposition

 

 

Reference Link

Errors in Lexical Analysis