LL(1) grammar for dangling else?

"Mikel L. Forcada" <MLF@VM.CPD.UA.ES>
Sun, 28 May 1995 22:54:57 GMT

          From comp.compilers

Related articles
LL(1) grammar for dangling else? MLF@VM.CPD.UA.ES (Mikel L. Forcada) (1995-05-28)
Re: LL(1) grammar for dangling else? lumpe@aragorn.unibe.ch (Markus Lumpe) (1995-05-30)
Re: LL(1) grammar for dangling else? leichter@zodiac.rutgers.edu (1995-06-23)
| List of all articles for this month |

Newsgroups: comp.compilers
From: "Mikel L. Forcada" <MLF@VM.CPD.UA.ES>
Keywords: parse, LL(1), question
Organization: Universidad de Alicante
Date: Sun, 28 May 1995 22:54:57 GMT

Dear Colleagues:
the dangling-else problem is a classical one. In every book,
a non-ambiguous grammar based on "matched" and "unmatched"
statements is proposed, but this grammar is not LL(1).
Is it true that there doesn't exist any LL(k) grammar for
this language? Do you have references? A student of mine is
working on an algorithm to extract grammars from manipulated
LL(1) parsers (that is, parsers where multiple entries have
been eliminated (according to some semantics)
and he can't get around to see why the grammars he gets
are never LL(1) for this case. Has anyone worked on this
problem before?


Thanks a lot




Mikel L. Forcada, mlf@vm.cpd.ua.es, mlf@dtic.ua.es
Departament de Tecnologia Informatica i Computacio
Universitat d'Alacant
E-03071 Alacant (Spain)
--


Post a followup to this message

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