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: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:Like syntax
errors the compiler should display the semantic errors in the
compilation listing after the line in which they occur.