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.
- Grammars and Parsing
(Lecture on Grammars and Parsing)
- Mini Language and Interpreter
(Lecture on Mini Language)
- Dynamic Memory Allocation and Garbage Collection
(Lecture on Memory Allocation and Garbage Collection)
- Mini Language Compiler
(Lecture on Mini Language Compiler)
- Parser and Scanner Generation
(Lecture on Parser Generation)
What you should be able to do
- Create a grammar (including attribute grammar), construct and decorate a parse tree, show that a grammar is ambigous.
- Write a simple recursive descent parser
- Be able to use bison/flex to create a parser
- 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.)
- Understand and extend the mini-language parser and interpreter (including the version that supports functions).
- Demonstrate how dynamic memory and garbage collection works.
- Compile a mini language (possibly extended) statements and expressions to RAL.
- Build and use activation records for compiling procedures
- Trace through the steps of a LL or LR parser.
- Create FIRST, FOLLOW and PREDICT sets for a predictive parser
- 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.