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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE302: Compiler Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University April 17, 2007 Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/17/07 Outline ¡ Recap ¡ Intermediate code generation ¡ Things related to project part II ¡ Summary Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/17/07 Translation of Control Flows ¡ S → if ( B ) S1 ¡ S → if ( B ) S1 else S2 ¡ S → while ( B ) S1 Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/17/07 Translation of Boolean Expressions ¡ B → B1 || B2 ¡ B → B1 && B2 ¡ B → !B1 ¡ B → true ¡ B → false ¡ B → E1 rel E2 Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/17/07 Three-address Code of Switch ¡ switch ( E ) { case V1 : S1 case V2 : S2 … case Vn-1 : Sn-1 default : Sn } Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/17/07 Three-address Code of Procedures ¡ n=f(a[i]); ¡ t1 = i*4 ¡ t2 = a[t1] ¡ param t2 ¡ t3 = call f,1 ¡ n = t3 Instructor: Dr. Liang ChengInstructor: Dr....
View Full Document

This note was uploaded on 08/06/2008 for the course CSE 302 taught by Professor Cheng during the Spring '07 term at Lehigh University .

Page1 / 16

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

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

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