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

Info iconThis preview shows pages 1–5. 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 April 19, 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 04/19/07 Outline ± Recap ± Intermediate code generation ± Things related to project part II ± Summary
Background image of page 2
Instructor: Dr. Liang Cheng CSE302: Compiler Design 04/19/07 Translation of Boolean Expressions (1) ± S if( {B.true=newlabel(); B.false=S.next;} B) S1 {S.code= B.code || label(B.true) || S1.code ± if B goto L1 ± goto L2 ± L1: S1 ± L2: ± B B1 || B2 ± S if( {B.true=newlabel(); B.false=S.next; B1.true=B.true; B1.false=newlabel(); B2.true=B.true; B2.false=B.false;} B1||B2) {B.code= B1.code || label(B1.false) || B2.code } S1 {S.code=B.code || label(B.true) || S1.code ± if B1 goto L1 ± goto L2 ± L2: if B2 goto L1 ± goto L3 ± L1: S1 ± L3:
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 04/19/07 Translation of Boolean Expressions (2)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the 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 / 14

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

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

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