next up previous
Next: About this document

Computer Science 3675
Summer 2000
Quiz 1

  1. Write a clearly legible T to the left of each of the following that is true, and a clearly legible F to the left of each that is false.
    1. All compilers translate to machine language.
    2. All programming language implementations are compilers.
    3. A simple value is a value that has no visible internal structure.
    4. Integers are typically considered complex values.
    5. A data structure that changes over time is not considered to be a value.
    6. A token can only have one associated lexeme.
    7. A variable name is typically a single lexeme in a program.
    8. Backus-Naur Form is a notation for giving precise definitions of syntax.
    9. Pattern matching can be used to bind names by solving simple equations.
    10. In C++, every block begins at the start of a function, and ends at the end of the function.
  2. An implementation of a programming language is not an adequate definition of the language. Why not? What would be the consequences of using an implementation as a definition?
  3. What is an important advantage of the linked representation of sequences over the sequential representation?
  4. What is an important advantage of the sequential representation of sequences over the linked representation?
  5. Show that the following BNF grammar is ambiguous. The start symbol is tex2html_wrap_inline21 .

    eqnarray12

  6. Show a parse tree for string aacacab according to the following grammar, where the start symbol is tex2html_wrap_inline21 .

    eqnarray15





Karl Abrahamson
Mon Jun 19 13:38:41 EDT 2000