Re: ambiguity of grammar and LR(k)

"Matt Timmermans" <mtimmerm@microstar.nospam-remove.com>
29 Oct 1999 02:34:48 -0400

          From comp.compilers

Related articles
ambiguity of grammar and LR(k) linlist@fudan.edu (Linlist Leo) (1999-10-27)
Re: ambiguity of grammar and LR(k) hanskamp@introweb.nl (Hans Kamp) (1999-10-28)
Re: ambiguity of grammar and LR(k) hanskamp@introweb.nl (Hans Kamp) (1999-10-29)
Re: ambiguity of grammar and LR(k) Xavier.Nicollin@imag.fr (Xavier Nicollin) (1999-10-29)
Re: ambiguity of grammar and LR(k) henning@makholm.net (Henning Makholm) (1999-10-29)
Re: ambiguity of grammar and LR(k) mtimmerm@microstar.nospam-remove.com (Matt Timmermans) (1999-10-29)
Re: ambiguity of grammar and LR(k) nhartzell@macalester.edu (Nathan Hartzell) (1999-10-29)
Re: ambiguity of grammar and LR(k) Xavier.Nicollin@imag.fr (Xavier Nicollin) (1999-10-31)
Re: ambiguity of grammar and LR(k) Xavier.Nicollin@imag.fr (Xavier Nicollin) (1999-10-31)
Re: ambiguity of grammar and LR(k) henning@makholm.net (Henning Makholm) (1999-10-31)
Re: ambiguity of grammar and LR(k) henning@makholm.net (Henning Makholm) (1999-10-31)
Re: ambiguity of grammar and LR(k) uranus!ikastan@uunet.uu.net (1999-10-31)
[2 later articles]
| List of all articles for this month |
From: "Matt Timmermans" <mtimmerm@microstar.nospam-remove.com>
Newsgroups: comp.theory,comp.compilers
Date: 29 Oct 1999 02:34:48 -0400
Organization: IGS - Information Gateway Services
Distribution: inet
References: 99-10-130
Keywords: parse, theory

Linlist Leo wrote in message 99-10-130...
>What I cannot figure out is whether there is any language that is not
>inherently ambiguous but cannot be LR(k) for any k. I'd appreciate if
>anyone can give me some hints.




Lots of them. Here's an easy one:


S -> A C a | B C b
A -> x
B -> x
C -> c | C c


You will eventually know, by the last symbol, whether or not the first 'x'
is an A or a B, but for any 'k', you may have to look ahead more than k c's
to tell.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.