Copyright © 2007 Gradiance Corporation.
Gradiance Online Accelerated Learning
Parse Trees
1.
Which of the parse trees below yield the same word?
a)
a and d
b)
a and c
c)
a and b
d)
a and f
2.
The folowing is a parse tree in some unknown grammar G:
Which of the following productions is definitely not a production of G?
A → aS
B → CD
None of the other choices.
A → b
3.
Which of the following is a parse tree for the grammar
S → abS, S → ab
(b)
(e)
(d)
(a)
4.
Here is a parse tree that uses some unknown grammar G.
Which of the following productions is surely one of those for grammar G?
B → AS
S → B
S → AB
A → S
5.
The parse tree below represents a rightmost derivation according to the grammar
S → AB, A → aS|a, B → bA
Which of the following is a right-sentential form in this derivation?
aababA
aABba
aaBB
aabAba