The third project involves writing the semantic analyzer

Assignment Help Computer Engineering
Reference no: EM13380142

The third project involves writing the semantic analyzer for the compiler that was begun in the previous projects. To simplify the semantic error checking, you are to remove the ability to have multiple functions from the grammar and the ability to make function calls.

In order to perform semantic analysis, the symbol table must be completed in this project. The 70 points that you will receive for the functionality portion of your grade on this project will be based on how many of the following errors that you can detect:

Using Boolean Expression with Arithmetic Operator 5 points
Using Boolean Expression with Relational Operator 5 points
Using Arithmetic Expression with Logical Operator 10 points
Conditional Expression Type Mismatch 5 points
If Condition Not Boolean 5 points
Narrowing Variable Initialization 5 points
Variable Initialization Mismatch 5 points
Undeclared Variable 10 points
Duplicate Variable 10 points
Narrowing Function Return 10 points

Test data that contains each of the following errors will be provided.

This project requires modification to the bison input file, so that it defines the semantic checks necessary to produce these errors and the inclusion of a symbol table to keep track of the declared identifiers.

Variables and parameter names have local scope. The scope rules require that all names be declared and prohibit duplicate names within the same scope. The type correspondence rules are as follows:

  • Boolean operators cannot be used with arithmetic or relational operators.
  • Arithmetic expressions cannot be used with logical operators.
  • The two expressions in a conditional expression must match in type. No coercion is performed.
  • The type of the if condition must be Boolean.
  • A narrowing variable initialization or function return occurs when a real value is being forced into integer. Widening is permitted.
  • Boolean types cannot be mixed with numeric types in variable initializations or function returns.
  • Type coercion from an integer to a real type is performed within arithmetic expressions.

Like syntax errors, the compiler should display the semantic errors in the compilation listing, after the line in which they occur.

Reference no: EM13380142

Questions Cloud

Using a random number generator create an input file that : using a random number generator create an input file that contains 25 numbers ranging from 50 to 100 store those
You have been asked to be the project manager for the : you have been asked to be the project manager for the development of an information technology it project. the system
There will be projects that require a last-minute push to : there will be projects that require a last-minute push to meet the scheduled deadline. in spite of all of the careful
Harley-davidsonmanufactures high-end motorcycles and sells : harley-davidsonmanufactures high-end motorcycles and sells them worldwide. the company sells more than 4 billion in
The third project involves writing the semantic analyzer : the third project involves writing the semantic analyzer for the compiler that was begun in the previous projects. to
Your company is currently investigating the use of linux : your company is currently investigating the use of linux. your manager has asked you to research the feasibility of
1 implement both encryption and decryption of the vigenere : 1. implement both encryption and decryption of the vigenere cipher with 26 english letters and 1 space character in
Convolving with user defined kernelsas described previously : convolving with user defined kernelsas described previously the smooth function gives equal weight to the neighbouring
Have you ever visited a web site and wondered what the : have you ever visited a web site and wondered what the company was thinking when they created it? or perhaps youve

Reviews

Write a Review

Computer Engineering Questions & Answers

  Define how a databses management system

describe how a databses management system (DBMS) and data mining can help a motor vehicle maintenance center improve its services, and what tables would be needed in such a database. Also what additional way can the DBMS and data mining be used to..

  Generally the overall report identifies or investigates

generally the overall report identifies or investigates issues as well as problems of itc government in context of poor

  Questionthis is related to principle networks give leads to

questionthis is related to principle networks. give leads to solve this problem second additional question a jewel was

  Similairities and differences between memory management

Discuss the similairities and differences between memory management compaction and disk compaction.

  Modify a for loop that calculates the total

modify a While Loop that lets the user enter a number. The number should be multiplied by 10, and result stored in a variable named product. The loop should iterate as long as product contains a value less than 100.

  Write a program to generate a series of pseudo random number

You will write a program to generate a series of pseudo random numbers, using a linear feedback shift register method. You will start with an arbitrary number (not zero) x with a representation in n bits.

  Questioninline internal procedures deposit and withdraw

questioninline internal procedures deposit and withdraw. that is replace references to them by the bodies of

  Compute the overall return on investment of the project

compute the overall return on investment of the project and then present a breakeven analysis , perform the BEA at what point does breakeven occur.

  What is the efficiency of the link

A block of 200 7-bit ASCII characters (with 1-bit even parity) is to be transmitted over an RS 232 serial link. Calculate the number of bits transmitted and the efficiency of the link if the asynchronous link uses 2 stop bits. What is the efficien..

  How to illustrate decision table to represent treatment

How to illustrate decision table to represent treatment? Create a structured English version based on the following dialogue obtained by the Systems Analyst from the client interview below.

  How using the sequence structure only

As you know, three fundamental control structure are sequence, selection and repetition. Can you write down C program using the sequence structure only.

  Define current and emerging nonvolatile ram technologies

List and explain current and emerging nonvolatile RAM technologies. What advantages are potentially offered by the emerging technologies as compared to current flash RAM technology?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd