168 views

1 Answer

0 votes
0 votes

Ambiguous : A grammar is said to be ambiguous if there exists a string which can have more than one parse tree.

Example :

            $A \rightarrow A / \epsilon$

 The derivation for empty string can have parse trees of any length.

Inherently Ambiguous : A Language is said to be inherently ambiguous if all the grammars for that language are ambiguous.

Example : 

           $\left \{ a^{i}b^{j}c^{k} \,|\,i=j\,or \,j=k \right \}$

Related questions

0 votes
0 votes
1 answer
1
prasoon054 asked Dec 7, 2023
184 views
Is countable sets part of GATE CS 2024 syllabus?
3 votes
3 votes
2 answers
2
1 votes
1 votes
1 answer
3