Final Exam Studyguide

CS 550 Programming Languages
Sections 501 and 900 (online)
Instructor: Jeremy Johnson
Format: online take home exam with fixed amount of time Midterm exam date: anytime between Fri. May 3 at 9am and Thur. May 9 at 9:00 am.


  1. Grammars and Parsing (Lecture on Grammars and Parsing)
  2. Mini Language and Interpreter (Lecture on Mini Language)
  3. Dynamic Memory Allocation and Garbage Collection (Lecture on Memory Allocation and Garbage Collection)
  4. Mini Language Compiler (Lecture on Mini Language Compiler)
  5. Parser and Scanner Generation (Lecture on Parser Generation)

What you should be able to do

  1. Create a grammar (including attribute grammar), construct and decorate a parse tree, show that a grammar is ambigous.
  2. Write a simple recursive descent parser
  3. Be able to use bison/flex to create a parser
  4. Use attribute grammars (and attributes in bison/flex) to build a data structure associated with parsing (e.g. abstract syntax tree, list, parse tree, etc.)
  5. Understand and extend the mini-language parser and interpreter (including the version that supports functions).
  6. Demonstrate how dynamic memory and garbage collection works.
  7. Compile a mini language (possibly extended) statements and expressions to RAL.
  8. Build and use activation records for compiling procedures
  9. Trace through the steps of a LL or LR parser.
  10. Create FIRST, FOLLOW and PREDICT sets for a predictive parser
  11. Construct a characteristic finite state machine for an LR parser


Students will have five hours to take the exam once it is started. The exam is open book and open notes including online links from the lecture notes and assignment solutions. The exam must be taken in the window which it is available. The exam must be done alone using only the explicitly mentioned resources. I trust everyone to follow these instructions and failure to do so will result in explusion from the class.

There will be five questions (with multiple parts): 1) grammars, ambiguity, attribute grammars, and parsing 2) mini language and the mini language interpreter, along with extensions discussed and in the assignments, 3) dynamic memory and garbage collection,along with extensions discussed and in the assignments, 4) mini language compiler 5) one question building on the material presented and the mini language assignments that students have done.