480 views
0 votes
0 votes

The following is an ambiguous grammar:

  • $S\rightarrow AS\mid b$
  • $A\rightarrow SA\mid a$

Construct for this grammar its collection of sets of $LR(0)$ items. If we try to build an LR-parsing table for the grammar, there are certain conflicting actions. What are they? Suppose we tried to use the parsing table by nondeterministically choosing a possible action whenever there is a conflict. Show all the possible sequences of actions on input $abab$. 

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
4
admin asked Aug 20, 2019
381 views
Construct thecanonical LR, andLALR sets of items for the grammar $S\rightarrow S S + \mid S S \ast \mid a$ of Question $4.2.1$.