Related articles |
---|
[2 earlier articles] |
Re: LR Grammars not in LALR(1) or LR(1) idbaxter@semdesigns.com (Ira Baxter) (2002-09-08) |
Re: LR Grammars not in LALR(1) or LR(1) tbandrow@unitedsoftworks.com (tj bandrowsky) (2002-09-12) |
Re: LR Grammars not in LALR(1) or LR(1) tbandrow@unitedsoftworks.com (tj bandrowsky) (2002-09-12) |
Re: LR Grammars not in LALR(1) or LR(1) haberg@matematik.su.se (Hans Aberg) (2002-09-12) |
Re: LR Grammars not in LALR(1) or LR(1) soenke.kannapinn@wincor-nixdorf.com (=?Windows-1252?Q?S=F6nke_Kannapinn?=) (2002-09-14) |
Re: LR Grammars not in LALR(1) or LR(1) haberg@matematik.su.se (Hans Aberg) (2002-09-14) |
Re: LR Grammars not in LALR(1) or LR(1) thp@cs.ucr.edu (2002-09-20) |
Re: LR Grammars not in LALR(1) or LR(1) haberg@matematik.su.se (Hans Aberg) (2002-09-22) |
Re: LR Grammars not in LALR(1) or LR(1) thp@cs.ucr.edu (2002-09-25) |
Re: LR Grammars not in LALR(1) or LR(1) Mark.van.den.Brand@cwi.nl (M.G.J. van den Brand) (2002-09-25) |
Re: LR Grammars not in LALR(1) or LR(1) Mark.van.den.Brand@cwi.nl (M.G.J. van den Brand) (2002-09-29) |
Re: LR Grammars not in LALR(1) or LR(1) haberg@matematik.su.se (Hans Aberg) (2002-09-29) |
Re: LR Grammars not in LALR(1) or LR(1) joachim_d@gmx.de (Joachim Durchholz) (2002-09-29) |
[7 later articles] |
From: | thp@cs.ucr.edu |
Newsgroups: | comp.compilers |
Date: | 20 Sep 2002 02:53:10 -0400 |
Organization: | University of California, Riverside |
References: | 02-09-014 02-09-029 02-09-068 02-09-092 02-09-097 |
Keywords: | parse, LR(1) |
Posted-Date: | 20 Sep 2002 02:53:10 EDT |
Hans Aberg <haberg@matematik.su.se> wrote:
[...]
+ It is also a problem when trying to rewrite a language from LR(k) to
+ LR(1) because the rewriting may not be useful with respect to the
+ semantics.
Right. And, IMHO, that is an under-appreciated problem. For purposes
of syntax-directed translation, grammars that "generate" the language
are not of interest. Rather, we need grammars whose syntax trees
reflect the semantics of the language.
There is another reason that the traditional grammar categories are
not so interesting as textbooks make them seem. Almost every parser-
generation tool has some form of disambiguation rules, so nobody in
their right mind submits an LALR(1) grammar to, say, YACC. Rather,
they submit a more intuitive and compact ambiguous grammar, one that
reflects the semantics of the language, and then use the disambuation
rules to make it parsable.
Tom Payne
Return to the
comp.compilers page.
Search the
comp.compilers archives again.