Chapter 5: Semantic Analysis

. How many arguments does a function take?

. Are all invocations of a function consistent with the declaration?

. If an operator/function is overloaded, which function is being invoked?

. Inheritance relationship

. Classes not multiply defined

. Methods in a class are not multiply defined

. The exact requirements depend upon the language

If the compiler has the answers to all these questions only then will it be able to successfully do a semantic analysis by using the generated parse tree. These questions give a feedback to what is to be done in the semantic analysis. These questions help in outlining the work of the semantic analyzer.