Mar29 - CSE302: Compiler Design Instructor: Dr. Liang Cheng...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE302: Compiler Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering Lehigh University March 29, 2007
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/29/07 Outline ± Recap ± Yacc ± Syntax-directed translation (Chapter 5) ± Summary and homework
Background image of page 2
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/29/07 Yacc ± Take a specification file (grammar) and produce an output file for the parser ± Input: <filename>.y ± {definitions} ± %% ± {productions/rules} ± %% ± {auxiliary routines} ± Output: y.tab.c ± LALR parser
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/29/07 Outline ± Recap ± Syntax-directed translation (Chapter 5) ± Summary and homework
Background image of page 4
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/29/07 Syntax-Directed Techniques ± Syntax-directed definition ± Attach a semantic rule to each production ± Syntax-directed translation ± Add program fragment(s) to some production(s) ± Applications of SDT ± Compute the values of the attributes associated with the symbols in the productions ± Type checking ± Generate side effects ± Code generation, print results, modify symbol table, …
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/29/07 ± Let X 0 X 1 ... X n be a production ± If the computing rule of X 0 ’s attribute is of the
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

Mar29 - CSE302: Compiler Design Instructor: Dr. Liang Cheng...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online