Syntactic Phase Errors
Syntactic Errors are detected during the syntax Analysis Phase, The general syntax errors are:
- Structural Errors
- Missing Operators
- Spelling Errors
- Missing Parenthesis
- Extra Parenthesis
For Example: If the “else” keyword is written as “elsee”
Error Recovery
There are four types of Error Recovery methods that are available:
- Panic Mode Recovery
- Statement Mode Recovery
- Error Production
- Global Correction
Panic Mode Recovery
- In this method, successive characters from the input are removed one at a time until a designated set of synchronizing tokens is found. Synchronizing tokens are deli-meters such as; or }.
- It is easy to implement and does not go into an infinite loop with is an advantage of panic mode recovery.
- A substantial amount of input is omitted without checking for further errors, which is disadvantageous.
Reference Link