5 Written questions
5 Matching questions
- enumerated type
- object language
- character class
- type lattice
- a a scalar type consisting of a finite set of enumerated values, e.g. type boolean = (false, true);.
- b the output language of a compiler.
- c 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.
- d a classification of characters, e.g. alphabetic or numeric.
- e 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.
5 Multiple choice questions
- L(G), the set of strings that can be derived from a grammar, beginning with the start symbol.
- a way of writing expressions in which an operator appears after its operands: ab+.
- 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.
- a derivation in which the leftmost nonterminal of the string is replaced at each step.
- a data area consisting of contiguous component fields, which may be of different types.
5 True/False questions
ambiguity → a case where more than one interpretation is possible.
disambiguating rules → a case where more than one interpretation is possible.
precedence → an ordering of operators that specifies that certain operators should be performed before others when no ordering is otherwise specified.
operator → a data value upon which an operation is performed.
parsing → the process of reading a source language, determining its structure, and producing intermediate code for it.