The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

Consider the following grammar:

  • $S \rightarrow S$
  • $S \rightarrow SS \mid a \mid \epsilon$

Indicate the shift-reduce and reduce-reduce conflict (if any) in the various states of the LR(0) parser.

asked in Compiler Design by Veteran (115k points)
recategorized by | 273 views

Here  S→  ϵ will take as reduce/ shift action or not effect on LR(0)  DFA??

2 Answers

+1 vote
Both conflicts are present .

SR and RR
answered by Active (1.3k points)
grammar is ambiguous.
–1 vote
only RR conflict
answered by Junior (741 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
48,719 questions
52,807 answers
68,470 users