The Gateway to Computer Science Excellence
0 votes


  1. UGCNET-DEC2018-II-200
  2. UGCNET-DEC2018-II-200
  3. UGCNET-DEC2018-II-200
  4. UGCNET-DEC2018-II-200

The grammar $S \rightarrow (S) \mid SS \mid \epsilon$ is not suitable for predictive parsing because the grammar is

  1. Right recursive
  2. Left recursive
  3. Ambiguous
  4. An operator grammar
in Others by Veteran (423k points)
edited by | 119 views
A grammar which have left recursive and right recursive on a specific Non-Terminal is Ambiguous grammar.

So, option C is preferrable.

1 Answer

0 votes
This grammar is Left as well as Right recursive, it is Ambiguous Grammar for sure.
Also, if you will try for some strings, you will be getting more than 1 ways for that, hence Ambiguous
by Junior (873 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
50,650 questions
56,242 answers
95,940 users