Course Solutions Uncategorized (Solved) : Homework 1 Write Grammars N B 2n B Ab N N Multiple 3 C N B N 1 D C Proc Def Id Paramlist Q26894569 . . . .

(Solved) : Homework 1 Write Grammars N B 2n B Ab N N Multiple 3 C N B N 1 D C Proc Def Id Paramlist Q26894569 . . . .

 

Homework:

1. Write grammars for:

a. a n b 2n

b. ab n a :n is multiple of 3

c. a n b a n+1

d . C proc def: <type> id ( param_list )

where a param_list is 0 or more declarations of form“<type> id ;”

2 . Consider the grammar:

1,2: S — > aAbB | Bc

3,4: A — > aAa | a

5,6,7,8: B — > Bb | Ab | cC | AC

9: C — > c

a. Find the FIRST and FOLLOW sets for S, A, B, C

b. This grammar is not suitable for recursive descent. Whynot?

c. Rewrite productions 3 & 4 to eliminate the common

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post