search
Log In
1 vote
203 views

If in the state table of a LR parser, in some row, we have more than one SR or RR conflict, then is it considered a single conflict?

Reference:- https://gateoverflow.in/113114/slr-parsing-table#c113505

in Compiler Design 203 views
0

A Grammar is said to be SLR(1) if and only if, for each and every state s in the SLR(1) automaton, none of the following conditions are violated:

  1. For any reducible rule A → a • Xb in state s (where X is some terminal), there must not exist some irreducible rule, B → a • in the same state s such that the follow set of B contains the terminal X. In more formal terms, the intersection of set containing the terminal X and the follow set of B must be empty. Violation of this rule is a Shift-Reduce Conflict.
  2. For any two complete items A → a • and B → b • in sFollow(A) and Follow(B) are disjoint (their intersection is the empty set). Violation of this rule is a Reduce-Reduce Conflict.
0
in one state it is considered as single SR or RR conflicts
0
Thank you!!

Please log in or register to answer this question.

Related questions

4 votes
1 answer
1
267 views
If a grammar is LL(1) then it would be definitely CLR(1) i.e. LR(1) or LALR(1)
asked Jan 18, 2018 in Compiler Design mohit kumar 5 267 views
0 votes
1 answer
2
351 views
Can lookahead symbol be epsilon in LR(1) parsing? and pls give the LR(1) diagram for the following grammar? A->AB | a B->*AC | Cb | ∈ C->+ABc | ∈
asked Mar 26, 2019 in Compiler Design aditi19 351 views
0 votes
0 answers
3
104 views
WHAT IS A VALID ITEM FOR A VIABLE PREFIX? CAM SOMEONE EXPLAIN IN EASY WAY.
asked Jan 1, 2019 in Compiler Design sushmita 104 views
1 vote
0 answers
4
120 views
In Fig. $4.56$ is a grammar for certain statements, similar to that discussed in Question $4.4.12$. Again, $e$ and $s$ are terminals standing for conditional expressions and "other statements," respectively. Build an LR parsing table for this grammar, resolving conflicts in the usual way ... your parser on the following inputs: if e then s ; if e then s end while e do begin s ; if e then s ; end
asked Aug 20, 2019 in Compiler Design Lakshman Patel RJIT 120 views
...