Syntax Error Handling - PPTX cc1
Syntax Error Handling - PPTX cc1
HANDLING
Compiler construction
Phases of compiler
Source program Lexical analysis
Token error
• Some common error are known to the compiler design that may occur in the code
• In addition the designer can create augmented grammar to be used as a production
that generate erroneous construct when error is occur
• Example
5X
5*X
Global corrections
• The parser consider a program as whole and its tries to figure out that what program
indented to do.
• Parser tries to find the closest match for it which is error free
• When an erroneous statement is fed it allows a parse tree for some closest minimal
changes in the code
• This practice isn’t using yet because of its time taking and complexity.