Compiler Design Question
Compiler Design Question
(a) two or more productions have the same non-terminal on the left hand side
(b) a derivation tree has more than one associated sentence
(c) there is a sentence with more than one derivation tree corresponding to it
(d) parenthesis are not present in the grammar
(a) Topological sort can be used to obtain an evaluation order of a dependency graph
(b) Evaluation order for a dependency graph dictates the order in which the semantic
rules are done
(c) code generation depends on the order in which the semantic actions are performed
4. A syntax tree
(a) is another name for a parse tree (b) is a condensed form of parse tree
(c) should not have keywords as leaves (d) none of the above
(a) have the same number of states (b) have the same number of edge
(c) have the same number of states and edges (d) recognize the same set of tokens
1
6. For which of the following situations, inherited attribute is a natural choice?
7. If two finite state machines M and N are isomorphic then M can be transformed to N by re-
labeling
10. The best wat to compare the different implementations of a symbol table is to compare the
time required to
11. Which of the following symbol table implementations makes efficient use of memory?
2
12. Syntax directed translation scheme is desirable because
3
(a) checking type compatibility (b) suppressing duplicate error messages
(c) storage allocation (d) all of the above
19. Which of the following symbol table implementations is based on the property of locality of
reference?