computer programming language concept computer programming language concept Ther
ID: 3565205 • Letter: C
Question
computer programming language concept
computer programming language concept There is a sample answer bellow The following questions refer to the grammar shown below. S right arrow aAb | bBA Please let me know A right arrow ab I a.AB if you need more B right arrow aB | b (a) Give a rightmost deiivation of the sentence aaababb. (b) List all phrases in the sentence aaababb. (c) List all sim ple phrases in the sentence aaababb. (d) What is the handle of the sentence aaababb? Here is a sample with answer Given the following grammar and the right sentential form. draw a parse tree and show the phrases and simple phrases. as well as the handle: S right arrow aAb I bBA A right arrow ab | aAB B right arrow aB I b a) aaAbb b) aBab Answers are bellow c) aaabBb (c) aaabBb (a) aaAbb (b) bBabExplanation / Answer
a. Rightmost derivation of the sentence aaababb
S -> aAb [from the rule S->aAb]
-> aaABb [from the rule A->aAB]
-> aaabBb [from the rule A->ab]
-> aaabaBb [from the rule B->aB]
-> aaababb [from the rule B->b]
b. All pharases in the sentence aaababb
aaababb, aabab, abab, b
c. All simple phrases in the sentence aaababb
aaababb, aabab, abab, b
d. handle of the sentence aaababb
b
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.