Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following grammar. S aAbB Bc . A aAa l a , B Bb | Ab | CC | AC , C

ID: 3727937 • Letter: C

Question

Consider the following grammar. S aAbB Bc . A aAa l a , B Bb | Ab | CC | AC , C c , is it suitable for recursive descent parsing? a. Yes b. *No Consider the following grammar. S AcB . A Aa l caa , B bB | , is the grammar suitable for recursive descent parsing? a. No b. *Yes Consider the following grammar. S A-B) , A B l a) , B aB I a , is it SLR(1)? a. Yes b. No Consider the following grammar. S aAbB Bc . A aAa l a , B Bb | Ab | CC | AC , C c , calculate Follow(S) a. S O b c. (a, c) d. All of the answers above are incorrect

Explanation / Answer

1)

The first and follow sets of grammar are disjoint set so it is not suitable for recursive descent.

2)

yes the given grammar is suitable.

3)

No

By observing the grammar we cannot get the expected parse grammar of lALR(1) and Lr(1) grammars.

4)

Option C

As the follow of s will be leads to the constants a and c.

Thank You

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote