2011 | OriginalPaper | Chapter
Attribute Grammars and Analysis
Authors : Prof. Yunlin Su, Prof. Song Y. Yan
Published in: Principles of Compilers
Publisher: Springer Berlin Heidelberg
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
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.