retagged by
1,320 views
1 votes
1 votes
retagged by

1 Answer

2 votes
2 votes

There are unambiguous context-free grammars for most practical languages (ignoring context-sensitive features such as variable declarations, whitespace sensitivity, etc.).

But there is no algorithm which can find an unambiguous grammar given an ambiguous grammar. Furthermore, there is not even an algorithm which can tell you for certain whether a given grammar is ambiguous. These are both undecidable problems.

And, to answer your question, there are context-free languages for which there is no unambiguous grammar. Such languages are said to be inherently ambiguous. Hence no all ambiguous grammar cannot be converted to unambiguous grammar.

Related questions

2 votes
2 votes
3 answers
1
Rahul Ranjan 1 asked May 28, 2018
1,391 views
If a grammar( $CFG$ ) has more than one Right most derivation, Can it be called ambiguous ?Or we say a grammar is ambiguous only when it has more than one left most deriv...
2 votes
2 votes
1 answer
2
learner_geek asked Aug 5, 2017
981 views
Make this grammer into unambiguous
2 votes
2 votes
1 answer
3
Prakash059 asked May 3, 2016
1,945 views
If a grammer(CFG) is ambiguous then we can construct the topdown and bottomup parsing is possible directly???or we will make them into unambiguous then we will construct?...
1 votes
1 votes
2 answers
4
Prateek Arora asked Oct 27, 2016
617 views
Is the given grammar ambiguous?S->ABA->aB->b