Preparation for CSCI 439 Quiz 1 (2025)
As per the exams page,
the quiz will be closed book, closed notes, no electronics, and held in the lab
during your scheduled lab section. You will have 50 minutes to complete the quiz.
You are permitted one double-sided 8.5x11" page of notes ('cheat sheet').
This first quiz is primarily theory, focused on the lecture material up to and including
context-sensitive checking material through Jan. 31st. The quiz will not
cover yacc/lex.
There will be four questions with an emphasis on the following:
- Topic: scanning/tokenizing and regular expressions
- e.g. given plain text descriptions of several desired token types,
provide a regex for each and explain where there is overlap between the
regexes and therefor the required order of rule checking
- Topic: context free grammars and ambiguity
- e.g. given a token set and context free grammar rules, show the grammar is ambiguous
by providing a token sequence and two different valid parse trees for the sequence
- Topic: context free grammars and associativity/precedence in expressions
- e.g. rewrite the following grammar rules to enforce the following precedence
and associativity rules (would be given a starting set of grammar rules and
operators and specs on the desired associativity and precedence for each operator)
- Topic: augmenting context free grammars to handle context sensitive checking
(type checking, scope checking, declaration checking)
- e.g. given a set of CFG rules and desired type-checking rules, for each rule
outline what would need to be specifically checked in that rule and when