Re: An example LL(K) language that is not LL(K-1) ?

fortunatus <daniel.eliason@excite.com>
Thu, 4 Feb 2010 09:22:51 -0800 (PST)

          From comp.compilers

Related articles
An example LL(K) language that is not LL(K-1) ? klyjikoo@gmail.com (klyjikoo) (2010-01-26)
Re: An example LL(K) language that is not LL(K-1) ? haberg_20080406@math.su.se (Hans Aberg) (2010-01-28)
An example LL(K) language that is not LL(K-1) ? chakaram@auth.gr (Chariton Karamitas) (2010-02-01)
Re: An example LL(K) language that is not LL(K-1) ? klyjikoo@gmail.com (klyjikoo) (2010-02-02)
Re: An example LL(K) language that is not LL(K-1) ? cfc@shell01.TheWorld.com (Chris F Clark) (2010-02-03)
Re: An example LL(K) language that is not LL(K-1) ? kkylheku@gmail.com (Kaz Kylheku) (2010-02-03)
Re: An example LL(K) language that is not LL(K-1) ? daniel.eliason@excite.com (fortunatus) (2010-02-04)
Re: An example LL(K) language that is not LL(K-1) ? slkpg@cox.net (SLK Mail) (2010-02-05)
Re: An example LL(K) language that is not LL(K-1) ? cfc@shell01.TheWorld.com (Chris F Clark) (2010-02-05)
Re: An example LL(K) language that is not LL(K-1) ? kkylheku@gmail.com (Kaz Kylheku) (2010-02-06)
Re: An example LL(K) language that is not LL(K-1) ? klyjikoo@gmail.com (klyjikoo) (2010-02-06)
Re: An example LL(K) language that is not LL(K-1) ? slkpg@cox.net (SLK Mail) (2010-02-06)
Re: An example LL(K) language that is not LL(K-1) ? kkylheku@gmail.com (Kaz Kylheku) (2010-02-10)
[3 later articles]
| List of all articles for this month |

From: fortunatus <daniel.eliason@excite.com>
Newsgroups: comp.compilers
Date: Thu, 4 Feb 2010 09:22:51 -0800 (PST)
Organization: Compilers Central
References: 10-02-009 10-02-015
Keywords: LL(1)
Posted-Date: 05 Feb 2010 17:32:32 EST

On Feb 2, 6:57 am, klyjikoo <klyji...@gmail.com> wrote:
>
> Thanks to Hans, Consider this example :


You have indeed offered an example of and LL(2) grammar that is
equivalent to an LL(1) grammar.


However both grammars (if the derivation is correct) accept the same
language.


So that language could be said to be LL(1), in that only an LL(1)
grammar is required to generate it. One would not say that the
language is LL(2), even though it is possible to write an LL(2)
grammar to generate it.


As Hans has suggested, a truly LL(2) language would have an LL(2)
grammer that could not be reduced to an LL(1) grammar.


(As an analogy: it is possible to write a CFG to generate a Regular
language. In that case the CFG could be converted to an RE. The CFG
just would not have any important recursions that produce anything
more complex than simple repitition.)



Post a followup to this message

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