Chapter 5 --- Little Quiz                                                                

1. Which is incorrect? (a) CFG's are string generators.(b) A CFG generates strings by productions.(c) A CFG is represented by a 4-tuple.(d) A production of a CFG is A ® a with A being a variable and a a string of terminals.

2. Which is incorrect from the viewpoint of computational model? (a) A CFG is a generator.(b) The regular expression is an acceptor.(c) The finite automaton is an acceptor.(d) The sequential machine is a transducer.

3. Which is incorrect? (a) The name of YACC is an acronym for “Yet Another Compiler Compiler.”(b) A parser is the part of a compiler that tries to make syntactic sense of the source code.(c) YACC generates the code for the parser in the C programming language.(d) The computer program YACC is a parser itself, instead of a parser generator.

4. Which is incorrect? (a) Recursive inferences, derivations, & parse trees are all equivalent ways for generating terminal strings.(b) CFG’s can be used to describe all natural languages.(c) The family of languages generated by CFG’s is larger than the family of RL’s.(d) The set of strings of matching pairs of parentheses is not an RL.

5. Which is incorrect? (a) A derivation has an equivalent leftmost one.(b) Recursive inference is a way of string generation by a CFG.(c) A CFG language is the set of strings derived from the start symbol.(d) CFG’s generate all and only RL’s.