Question: Q4 - Syntax Analysis A) Given the following context free grammar, find the FIRST set of each production and the FOLLOW set for each nonterminal

 Q4 - Syntax Analysis A) Given the following context free grammar,

Q4 - Syntax Analysis A) Given the following context free grammar, find the FIRST set of each production and the FOLLOW set for each nonterminal that is null-able. Finally, find the selection set for each production. Note that the terminal symbols of this grammar are id num E Therefore, =, ze, and-. In the grammar below, the terminals are highlighted in bold id num :- 3 SCompareexpr::- compare expr, > : := - : := - 9 SCompare op>::- 10 Scompare op>::- | | | : := B) Fill the LL(1) parsing table associated with the above given grammar (by writing the rule number rather than the rule itself in the table cells, if no rule leave the cell blank) compare_expir compare expr' compare op C) Based on your parsing table, can you conclude that the grammar is LL(1)? Justify your answer. Q4 - Syntax Analysis A) Given the following context free grammar, find the FIRST set of each production and the FOLLOW set for each nonterminal that is null-able. Finally, find the selection set for each production. Note that the terminal symbols of this grammar are id num E Therefore, =, ze, and-. In the grammar below, the terminals are highlighted in bold id num :- 3 SCompareexpr::- compare expr, > : := - : := - 9 SCompare op>::- 10 Scompare op>::- | | | : := B) Fill the LL(1) parsing table associated with the above given grammar (by writing the rule number rather than the rule itself in the table cells, if no rule leave the cell blank) compare_expir compare expr' compare op C) Based on your parsing table, can you conclude that the grammar is LL(1)? Justify your

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!