Monday, January 25, 2010
Compiler design
1.Recursive descent parsing is an example of
a)top-down parsing b)bottom-up
c)predictive d)none
2.Which of the following is the most powerful parser
a)SLR b)LALR
c)Canonical LR d)operator-precedence
3.Choose the incorrect statement
a)LL(k) grammar has to be CFG.
b)LL(k) grammar has to be unambiguous
c)There are LL(k) grammars that are not context-free
d)LL(k) grammars can't have left recursive non-terminals.
4.The grammar E -->E+E| E*E | a,is
a)ambiguous c)ambiguous or not depends on the given sentence.
b)unambiguous d)none
Answers:
1.a
2.c
3.c
4.a
0 comments:
Post a Comment