Question
Compilation errors can be loosely divided into two categories: syntax errors and semantic errors. Syntax errors include missing or incorrectly placed tokens, such as the
Compilation errors can be loosely divided into two categories: syntax errors and semantic errors. Syntax errors include missing or incorrectly placed tokens, such as the missing right parenthesis in the arithmetic expression (2+3. Semantic errors include incorrect types in expressions and undeclared variables, such as the assignment x=2, where x is an array variable.
a.Give two more examples of errors of each kind in a language of your choice;
b.Pick a compiler with which you are familiar and determine if it lists all syntax errors before semantic errors or if syntax and semantic errors are intermixed. What implication does this have for the number of passes? Use a sample code to test your result. Show the name of your compiler, the example code, the compilation errors and your analysis result.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started