

While performing correction, utmost care should be taken for not going in an infinite loop.The correction can be deletion of extra semicolons, replacing the comma with semicolons, or inserting a missing semicolon.In this method, when a parser encounters an error, it performs the necessary correction on the remaining input so that the rest of the input statement allows the parser to parse ahead.The advantage is that it’s easy to implement and guarantees not to go into an infinite loop.Synchronizing tokens are deli-meters such as or } In this method, successive characters from the input are removed one at a time until a designated set of synchronizing tokens is found.Hence, an “Unidentified keyword/identifier” error occurs.Įrror recovery for syntactic phase recovery: The keyword switch is incorrectly written as a switch. These errors are detected during the syntax analysis phase. The disadvantage is that a considerable amount of input is skipped without checking it for additional errors.The advantage is that it is easy to implement and guarantees not to go into an infinite loop.Synchronizing tokens are delimiters such as or } This is an lexical error since end of comment is present but beginning is not present This is a lexical error since an illegal character $ appears at the end of statement. Exceeding length of identifier or numeric constants.

These errors are detected during the lexical analysis phase. ISRO CS Syllabus for Scientist/Engineer ExamĬompile-time errors are of three types:- Lexical phase errors.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.
