Re: LALR1 and LL1

haberg@math.su.se (Hans Aberg)
28 Apr 2005 14:54:46 -0400

          From comp.compilers

Related articles
LALR1 and LL1 neelesh.bodas@gmail.com (Neelesh Bodas) (2005-04-11)
Re: LALR1 and LL1 schmitz@i3s.unice.fr (Sylvain Schmitz) (2005-04-16)
Re: LALR1 and LL1 148f3wg02@sneakemail.com (Karsten Nyblad) (2005-04-26)
Re: LALR1 and LL1 schmitz@i3s.unice.fr (Sylvain Schmitz) (2005-04-26)
Re: LALR1 and LL1 haberg@math.su.se (2005-04-28)
Re: LALR1 and LL1 148f3wg02@sneakemail.com (Karsten Nyblad) (2005-04-30)
Re: LALR1 and LL1 schmitz@i3s.unice.fr (Sylvain Schmitz) (2005-05-02)
Re: LALR1 and LL1 haberg@math.su.se (Hans Aberg) (2005-05-02)
| List of all articles for this month |
From: haberg@math.su.se (Hans Aberg)
Newsgroups: comp.compilers
Date: 28 Apr 2005 14:54:46 -0400
Organization: Mathematics
References: 05-04-023 05-04-041 05-04-059
Keywords: parse, theory
Posted-Date: 28 Apr 2005 14:54:46 EDT

Karsten Nyblad <148f3wg02@sneakemail.com> wrote:


> > [Are LL1 languages, as opposed to grammars, LALR languages? -John]
>
> 1: Any LL(K) language is LR(K).


Sylvain Schmitz <schmitz@i3s.unice.fr> wrote:


> > [Are LL1 languages, as opposed to grammars, LALR languages? -John]
> Yes, they are:
> Any LL(k) language has an LL(k) grammar, which is also LR(k). And
> one can transform this LR(k) grammar into an equivalent SLR(1) grammar.
> So LL languages are also LALR.


Do you have any reference? -- Akim Demaille sent me an example where LL(1)
isn't LR(1). :-) I reposted it here, but I have forgotten when. This seems
to ne of the most often quoted mistakes.


--
    Hans Aberg


Post a followup to this message

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