Given grammar Grammar M following:
1 - - > begin end
2 - - >
3 - - > < statement >
4 - - > ?
5 - - > Id : = ;
6 - - > read ( ) ;
7 - - > write ( ) ;
8 - - >Id
9 - - > , Id
10 - - > ?
11 - - >
12 - - > ,
13 - - > ?
14 - - >
15 - - >
16 - - > ?
17 - - > ()
18 - - > Id
19 - - > INTLIT
20 - - > +
21 - - > -
22 - - > $
1) Write the code, using recursive decent parser
2) Write the code, using a table-driven parser