Assignment -1
1. Given the grammar
ET+E T
TV*TV
V id
Write pseudo code to parse this grammar by recursive descent.
2. Given the grammar
A( A ) A|
Construct First and Follow sets for the nonterminal A.
3. Consider the grammar
lexpatom | list
atomnumber | identifier
list ( lexp-seq )
lexp-seqlexp-seq lexp | lexp
a) Remove the left recursion.
b) Construct First and Follow sets for the nonterminals of the resulting grammar.
4.
Consider the grammar
lexpatom | list
atomnumber | identifier
list ( lexp-seq )
lexp-seqlexp , lexp-seq | lexp
a) Left factor this grammar.
b) Construct First and Follow sets for the nonterminals of the resulting grammar.
NOTE: Here symbol is an epsilon.
Note: Last date of submission is 21-01-2014