Skip to main content

Attribute Grammars and Analysis

  • Chapter
Principles of Compilers
  • 1292 Accesses

Abstract

In the Chapter 7, we concentrated on the discussion of parsing methods, i.e. the top-down and bottom-up syntactical methods, especially LL(1) and LR(1) syntactical analysis methods. From the discussion, we can see that in order to carry out LL(1) or LR(1) syntactical analysis there is a need for the premise that the grammar to be analyzed is a context-free one, otherwise both methods do not work. In other words, in order to analyze a programming language through the top-down or bottom-up method, the language must be guaranteed to be context-free. Therefore, we need to explore the description or definition of the programming language. Before any programming language is designed, the designers must take into account the requirements from two sides. One is the requirements of the programmers who would use the language to develop programs. Because they want the language explicit, distinct, authoritative, and unambiguous; meanwhile, it should be easy to read and easy to use. Another one is the requirements of the developers of the language compiler, they want the structure of programs in the language easy to implement, or the development of the compiler also easy.

What attributes should a good manager possess? Longman Dictionary of Contemporary English

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Irons ET (1961) A syntax directed compiler for Algol 60. Comm ACM, 4(1): 51-55.

    Google Scholar 

  2. Knuth DE (1968) Semantics of context-free languages. Mathmatical Systems Theory 2(2): 127–145. Etrata 5(1): 95-96.

    Article  MathSciNet  MATH  Google Scholar 

  3. Reps TW (1984) Generating Language-Based Environments. MIT Press, Cambridge.

    MATH  Google Scholar 

  4. Lewis PM, Rosenktrantz DJ, Stearns RE (1974) Attributed translations. J Computer and System Sciences, 9(3): 279–307.

    Article  MATH  Google Scholar 

  5. Mayoh BH (1981) Attribute grammars and mathematical semantics. SiAM J Computing 10(3): 503–518.

    Article  MathSciNet  MATH  Google Scholar 

  6. Kennedy K, Ramanathan J (1979) A deterministic attribute grammar evaluator based on dynamic sequencing. TOPLAS 1(1): 142–160.

    Article  MATH  Google Scholar 

  7. Engelfrief J (1984) Attribute evaluation methods. Lorho pp 103–138.

    Google Scholar 

  8. Cohen R, Harry E (1979) Automatic generation of near-optimal linear-time translators for non-circular attribute grammars. Sixth ACM Symposium on Principles of Programming Languages, pp 121–134.

    Google Scholar 

  9. Kastens U (1980) Ordered attribute grammars. Acta Informatica, 13(3): 229–256.

    Article  MathSciNet  MATH  Google Scholar 

  10. Bochmann GV (1976) Semantics evaluation from left to right. Comm ACM, 19(2): 55–62.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Higher Education Press, Beijing and Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Su, Y., Yan, S.Y. (2011). Attribute Grammars and Analysis. In: Principles of Compilers. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-20835-5_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-20835-5_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-20834-8

  • Online ISBN: 978-3-642-20835-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics