• retagged by
2,393 views
0 0 votes
If the grammar be left recursive then is it always be ambiguous?

1 Answer

0 0 votes
No, Not necessary if a grammar is left recursive then it may or may not be ambiguous.

Let's take one small example

A-> Aa/ε

this grammar is left recursive but not ambiguous.
Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
1.5k
1.5k views
A_i_$_h asked Dec 23, 2017
1,488 views
$E→E−T ∣ T$$T→T/F ∣ F$$F→(E) ∣ id$(E is the start symbol)This grammar is unambiguous but shouldn't it be ambiguous because it has left recursion?
1 1 vote
1 1 answer
1.3k
1.3k views
1 1 vote
1 answers 1 answer
561
561 views
learner_geek asked Aug 3, 2017
561 views
A Grammar which is only left recursive or right recursive can be ambiguous grammar???Or it should have both left recursive and right recursive to be ambiguous???
0 0 votes
1 answers 1 answer
1.7k
1.7k views
vaishali jhalani asked Nov 22, 2016
1,727 views
Consider the following two statements:S1: A grammar is ambiguous if it generates more than two parse trees for a stringS2: A grammar is ambiguous if it generates more tha...