Abstract
Although attribute grammars allow us to generate context processing programs automatically, their level of automation has not yet reached that of lexical analyzer and parser generators, and much context processing programming is still done at a lower level, by writing code in a traditional language like C or C++.We will give here two non-automatic methods to collect context information from the AST; one is completely manual and the other uses some reusable software. Whether this collected information is then stored in the nodes (as with an attribute grammar), stored in compiler tables, or consumed immediately is immaterial here: since it is all handy-work, it is up to the compiler writer to decide where to put the information.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer Science+Business Media New York
About this chapter
Cite this chapter
Grune, D., van Reeuwijk, K., Bal, H.E., Jacobs, C.J.H., Langendoen, K. (2012). Manual Context Handling. In: Modern Compiler Design. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-4699-6_5
Download citation
DOI: https://doi.org/10.1007/978-1-4614-4699-6_5
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-4698-9
Online ISBN: 978-1-4614-4699-6
eBook Packages: Computer ScienceComputer Science (R0)