200_Practice_Midterm

200_Practice_Midterm - CS143 Summer2011 Handout20...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS143 Handout 20 Summer 2011 July 15 th , 2011 CS143 Practice Midterm and Solution Exam Facts Wednesday, July 20 th  from 11:00 a.m. – 1:00 p.m. in Gates B01 Format The exam is designed to take roughly 90 minutes, though you will have two hours to  complete the exam.  The exam is open-notes, open-book, open-computer, but closed- network, meaning that you can download any of the handouts and slides that you'd like  in advance, but must not use the Internet, IM, email, etc. during the exam. Material The midterm will cover material on the lectures beginning at scanning and ending at  Earley parsing.  This means you should fully understand the lexical and syntax analysis  phases of traditional compilation. Material similar to the homework will be  emphasized, although you are responsible for all topics presented in lecture and in the  handouts.  Make sure that you have an intuition for the concepts as well as an  understanding, since some of the questions will ask you to think critically about the  different scanning and parsing algorithms. Possible topics for the midterm include •  Overview of a compiler— terminology, general task breakdown •  Regular expressions— writing and understanding regular expressions, NFAs,  and DFAs; conversion from regular expressions to NFAs; and conversion from  NFAs to DFAs. •  Lexical analysis—scanner generators, flex •  Grammars— Parse trees, derivations, ambiguity, writing simple grammars •  Top-down parsing— LL(1) grammars, grammar conditioning (removing  ambiguity, left-recursion, left-factoring), FIRST and FOLLOW set computation,  table-driven predictive parsing • Shift-reduce parsing— building LR(0) and LR(1) configurating sets; parse tables,  tracing parser operation; shift/reduce and reduce/reduce conflicts; differences  between LR, SLR, and LALR; and construction of SLR and LALR lookaheads.
Image of page 1

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

View Full Document Right Arrow Icon
• Earley parsing – scanning, completion, and prediction; recognition versus  parsing; parse-forest grammars; the Earley-on-DFA algorithm. •  Comparisons between parsing techniques—advantages/disadvantages:  grammar restrictions, space/time efficiency, error-handling, etc. The rest of this handout a modified and extended version of a midterm that was given a  few years ago.  Solutions to all problems are given at the end of this handout, but we  encourage you to not look at them until you have worked through the problems  yourself.  Understand that we are in no way obligated to mimic the problem format of  the exam.  Everything up to and including Earley parsing is fair game.
Image of page 2
Image of page 3
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