5 Written questions
5 Matching questions
- data area
- type lattice
- recursive descent
- a 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.
- b a list of steps that shows how a sentence in a language is derived from a grammar by application of grammar rules.
- c a contiguous area of memory, specified by its base address and size. Data within the area are referenced by the base address of the area and the offset, or relative address, of the data within the area.
- d the process of reading a source language, determining its structure, and producing intermediate code for it.
- e 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.
5 Multiple choice questions
- the phase of a compiler in which executable output code is generated from intermediate code.
- a table that associates key values with data by use of a hash function.
- a self-balancing binary search tree.
- Backus-Naur Form, a syntax for writing context-free grammars that describe computer languages.
- lexical analyzer.
5 True/False questions
declaration → 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.
nondeterministic finite automaton → a finite automaton that has multiple state transitions from a single state for a given input symbol, or that has a null transition, not requiring an input symbol. Abbreviated NFA.
regular expression → an algebraic expression that denotes a regular language. Regular expressions are usually easier to write than an equivalent regular grammar.
syntax directed translation → 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.
lexeme → 1. in a hash table storage scheme, to calculate a new hash value for an item when the previous hash value caused a collision with an existing item. 2. the algorithm used to calculate the new hash value.