Question: Problem 1) given the following Grammar: where = {, , } , = { or, and, not, i, (, )} and is the start symbol
Problem 1) given the following Grammar: where = {, , } , = { or, and, not, i, (, )} and is the start symbol
1) The given grammar is not LL(1), explain why? and, then transform it into LL(1) 2) Compute FIRST, FOLLOW, PREDICT sets . 3) construct the top-down predictive parser(one procedure for each NT). 4) construct the LL(1) parsing table. 5) Parse the following input: i and not i and i $ using predictive parser. 6) Parse the following input: i and (not i) and i $ using LL(1) parsing table. **note:If possible, the solution would be simple and tidy without explanation
E::=E or TT T::=T and FF F::=notF(E)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
