Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions