Question: 1 0 . Consider the following expression grammar: Terminals = { num , + , * , $ } Non - Terminals = { E
Consider the following expression grammar: Terminals num $ NonTerminals E E Rules E E$; E num; E E E E E EStart Symbol E
a Develop Augmented Grammar
b Create the LR states and transitions for this grammar
Since this grammar is ambiguous, it is not LRk for any k We can, however, create a parsetable for the grammar, using precedence rules to determine when to shift, and when to reduce. Assuming that binds more strongly than and both are left associative, create a parse table using the LR states and transitions. d Test your parse table with the following strings
C
num num num num num num num num num
e Now create an LR parse table for this grammar, this time assuming that binds more strongly than and both are rightassociative. Test your parse table with the followingstrings:
num num num num num num num num num
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
