|Top-Down Parser Construction Conjectures firstname.lastname@example.org (1993-01-18)|
|Automatic Transformation of CFG to LL/LR email@example.com (1993-01-29)|
|Re: Automatic Transformation of CFG to LL/LR firstname.lastname@example.org (1993-02-02)|
|Re: Automatic Transformation of CFG to LL/LR email@example.com (1993-02-03)|
|From:||firstname.lastname@example.org (Ramki Thurimella)|
|Date:||Wed, 3 Feb 1993 21:24:52 GMT|
email@example.com (Barton Christopher Massey) writes
>I'll check the ref, but note that detecting, much less eliminating, CFG
>ambiguity is undecidable, which is sufficient to show that converting an
>arbitrary CFG to a necessarily unambiguous LL(1) or LR(1) grammar is
>undecidable. My conjectures thus were limited to unambiguous CFGs -- it
Could you elaborate on how the ambiguity problem can be reduced to that of
transforming a CFG to LL grammar. I certainly see one of the directions,
i.e. if transformation is successful, then the original grammar is not
ambiguous. How does the converse follow, i.e. if there is does not exist a
transformation, how can you conclude that CFG is ambiguous?
On a separate note, your conjecture when limited to unambiguous CFGs to LL
seem to be false, given the following exercise from the book on theory of
parsing by Aho and Ullman (exercise 5.2.13, pp. 397):
"Show that it is undecidable whether an LR(k) grammar is an LL grammar."
Return to the
Search the comp.compilers archives again.