{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

CSE302: Compiler Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University March 15, 2007

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

View Full Document
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/15/07 Outline Recap Top-down parsing (Section 4.4) Bottom-up parsing (Section 4.5) Summary and homework
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/15/07 Top-Down Parsing Finding a leftmost derivation for an input string Recursive-descent parsing Predictive parsing for LL(1) grammars Non-recursive version

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

View Full Document
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/15/07 LL(1) Parsing: A Schematic View Top-down parsing Leftmost derivations and left-sentential forms Parsing stack Input buffer Actions \$StartSymbol InputString\$ lookahead one token, decide A- production ... ... \$ \$ accept
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/15/07 LR Parsing: A Schematic View Bottom-up parsing Rightmost derivations and right-sentential forms Parsing stack Input buffer Actions \$ InputString\$ lookahead zero or one token, decide S/R ... ... \$StartSymbol \$ accept

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

View Full Document
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/15/07 An Example Balanced parentheses S ( S ) S | ε Input string: ( ) Parsing stack Input buffer Action
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}