Java Reference
In-Depth Information
9.3 Summary
Semantic analysis is an essential component of the translation process. Type
checking—the essence of semantic analysis—filters program errors and sets
up e
ective program translation. Because semantic analysis spans many con-
cerns, the use of semantic visitors allows an implementor to divide the overall
analysis into small, easily understood components. Reachability analysis, for
example, can augment standard type checking without obscuring its essential
requirements.
Notions of overloading and inheritance can complicate method calls. It
is important to remember that the basic calling mechanism—evaluate param-
eters and transfer control to a subprogram—is elegant and universal. Suc-
ceeding programming languages will undoubtedly add further refinements to
semantic analysis, but the fundamental principles developed in this chapter
will continue to be at the core of crafting a compiler.
ff
 
Search WWH ::




Custom Search