{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Mar27 - CSE302 Compiler Design Instructor Dr Liang Cheng...

Info icon This preview shows pages 1–9. 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 P.C. Rossin College of Engineering & Applied Science Lehigh University March 27, 2007
Image of page 1

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

View Full Document Right Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Outline Recap General/Canonical LR(1) parsing Lookahead LR(1) / LALR(1) parsing Yacc Syntax-directed translation (Chapter 5) Summary and homework
Image of page 2
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Outline Recap General/Canonical LR(1) parsing Lookahead LR(1) / LALR(1) parsing Yacc Syntax-directed translation (Chapter 5) Summary and homework
Image of page 3

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

View Full Document Right Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Yacc Introduction Yet Another Compiler-Compiler Public domain versions: Bison 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
Image of page 4
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Definition Section Information about tokens, data types Any code that must go directly into the output file #include directives May be empty
Image of page 5

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

View Full Document Right Arrow Icon
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Production Section Grammar rules with action codes is replaced by : A semicolon ends each production
Image of page 6
Instructor: Dr. Liang Cheng CSE302: Compiler Design 03/27/07 Auxiliary Routine Section Procedure and function declarations that are needed to complete the parser May be empty
Image of page 7

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

View Full Document Right Arrow Icon
Instructor: Dr. Liang Cheng
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern