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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started