Skip to main content

Translating Arithmetic Expressions

  • Chapter
Understanding and Writing Compilers

Part of the book series: Macmillan Computer Science Series

  • 61 Accesses

Abstract

Figure 5.1 shows an example arithmetic expression which might appear anywhere in a typical program — say on the right-hand side of an assignment statement — together with the parse tree which describes its structure. It also shows the object code which is the best translation of this expression — ‘best’, that is, if the expression is considered in isolation. The example shows the point from which a compiler-writers’ discussion will start — what translation algorithm will generate this ‘best’ code in practice?

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Copyright information

© 1979 Richard Bornat

About this chapter

Cite this chapter

Bornat, R. (1979). Translating Arithmetic Expressions. In: Understanding and Writing Compilers. Macmillan Computer Science Series. Palgrave, London. https://doi.org/10.1007/978-1-349-16178-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-1-349-16178-2_6

  • Publisher Name: Palgrave, London

  • Print ISBN: 978-0-333-21732-0

  • Online ISBN: 978-1-349-16178-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics