5 Written Questions
5 Matching Questions
- reduce-reduce conflict
- leftmost derivation
- storage alignment
- a 1. a contiguous set of symbols at the beginning of a string. 2. a way of writing expressions in which an operator appears before its operands: +ab.
- b 1. the requirement of some CPU's that certain data have addresses that fall at even memory word boundaries, so that the data will be contained in whole memory words. 2. in a compiler or assembler, the adjustment of memory addresses so that data will be properly aligned, e.g. by padding.
- c in a grammar for a shift-reduce parser, a case in which an input might be reduced by more than one production.
- d a kind of parser, due to Cocke, Kasami, and Younger, that efficiently produces all possible parses of an input. Also written CYK.
- e a derivation in which the leftmost nonterminal of the string is replaced at each step.
5 Multiple Choice Questions
- the ability to observe the state of a system. For software, the provision of built-in code to allow the internal operations of a program to be easily observed.
- the fractional part of a floating-point number; also, significand.
- a convention in a block-structured programming language that a variable can only be referenced within the block in which it is defined; thus, the scope of a variable is determined at compile time. Also called static scoping. cf. dynamic scoping.
- the hierarchy of formal language types: regular ⊂ context free ⊂ context sensitive ⊂ recursively enumerable; each is a proper subset of the next class.
- a table that associates key values with data by use of a hash function.
5 True/False Questions
cast → a kind of parser, due to Cocke, Kasami, and Younger, that efficiently produces all possible parses of an input. Also written CYK.
optimization → a rule of a context-free grammar, specifying that a nonterminal symbol can be replaced by another string of symbols.
lexer → a basic symbol in a language; e.g., a variable name would be a lexeme for a grammar of a programming language.
bottom-up parsing → the process of reading a source language, determining its structure, and producing intermediate code for it.
object language → a lattice structure that shows which types are higher or derivable from others, e.g. float is higher than integer. When an operation is specified on different types, the arguments may be coerced to the least upper bound of the two types in the lattice.