Abstract
Some required properties of programs cannot be described by context-free grammars. These properties are described by context-conditions. Fundamental for these requirements are the rules of the programming language for validity, and visibility of identifiers. This chapter presents examples for context conditions together with techniques how these conditions can be checked. The corresponding algorithms run on the syntax tree of the program. Instead of hand-crafting their implementations, they can be nicely specified by means of attribute grammars, for which evaluators can be automatically generated.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Wilhelm, R., Seidl, H., Hack, S. (2013). Semantic Analysis. In: Compiler Design. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17540-4_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-17540-4_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-17539-8
Online ISBN: 978-3-642-17540-4
eBook Packages: Computer ScienceComputer Science (R0)