5 Written questions
5 Matching questions
- synthesized translation
- top-down parsing
- a an occurrence of a word, name, or sequence of characters having a meaning as a unit in a language.
- b a method of translating statements, e.g. in a programming language, such that the translation of a phrase is built up from the translations of its components.
- c a way of writing expressions in which an operator appears after its operands: ab+.
- d a predictive form of parsing, such as recursive descent, in which the parse tree of a statement is constructed starting at the root (sentence symbol).
- 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
- placement of a new data item in its proper position in an ordered sequence, such as a list, array, or symbol table.
- parsing and conversion to internal form of the simplest elements of a language, usually specified by a regular grammar, such as variable names, numbers, etc.
- a method of writing a parser in which a grammar rule is written as a procedure that recognizes that phrase, calling subroutines as needed for sub-phrases and producing a parse tree or other data structure as output.
- a parser such as CKY that maintains an array-like data structure called a chart that describes all possible parses in a compact form.
- an operator that makes a type from other types, e.g. array or record.
5 True/False questions
hash with buckets → a set of symbols used in the definition of a language.
subrange → a contiguous subsequence of a sequence, e.g. 1..10 is a subrange of integer.
AVL tree → a data structure that shows how a statement in a language is derived from the context-free grammar of the language; it may be annotated with additional information, e.g. for compilation purposes.
Kleene closure → zero or more occurrences of a grammar item; indicated by a superscript *.
derivation → a statement in a programming language that provides information to the compiler, such as the structure of a data record, but does not specify executable code.