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

Chariton Karamitas <chakaram@auth.gr>
Mon, 01 Feb 2010 14:58:42 +0200

          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)
[7 later articles]
| List of all articles for this month |
From: Chariton Karamitas <chakaram@auth.gr>
Newsgroups: comp.compilers
Date: Mon, 01 Feb 2010 14:58:42 +0200
Organization: Compilers Central
Keywords: LL(1), theory
Posted-Date: 01 Feb 2010 18:26:27 EST

Hello,


I don't think your assumption that any LL(k) can be transformed into
an LL(k-1) is correct. The 'k' in LL(k) is assumed to be the supremum
of lookahead symbols that you need in order to parse your input. So,
suppose you have an LL(2) grammar, then you cannot convert it to an
LL(1) since the LL(1) equivalent won't have disjoint FIRST/FOLLOW sets!


I am not yet very experienced when it comes to compilers, so, if my
answer is wrong correct me please! :-)


Regards
./ck
--
Chariton Karamitas
Undergraduate Student
Electrical Engineering and Computer Engineering Department
Fuculty of Engineering
Aristotle University of Thessaloniki, Greece



Post a followup to this message

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