Error which are present in compiler construction process
Answers
The tasks of the Error Handling process are to detect each error, report it to the user, and then make some recover strategy and implement them to handle error. During this whole process processing time of program should not be slow. An Error is the blank entries in the symbol table.
Types or Sources of Error – There are two types of error: run-time and compile-time error:
A run-time error is an error which takes place during the execution of a program, and usually happens because of adverse system parameters or invalid input data. The lack of sufficient memory to run an application or a memory conflict with another program and logical error are example of this. Logic errors, occur when executed code does not produce the expected result. Logic errors are best handled by meticulous program debugging.
Compile-time errors rises at compile time, before execution of the program. Syntax error or missing file reference that prevents the program from successfully compiling is the example of this.
Classification of Compile-time error –
Lexical : This includes misspellings of identifiers, keywords or operators
Syntactical : missing semicolon or unbalanced parenthesis
Semantical : incompatible value assignment or type mismatches between operator and operand
Logical : code not reachable, infinite loop.