Re: An "open" letter to Karsten Nyblad (and other compiler compiler implementors)

SM Ryan <wyrmwif@tsoft.org>
24 Jun 2005 09:55:16 -0400

          From comp.compilers

Related articles
An "open" letter to Karsten Nyblad (and other compiler compiler implem cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-18)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im vtsikoza@yahoo.com (2005-06-21)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im wyrmwif@tsoft.org (SM Ryan) (2005-06-22)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk) (2005-06-23)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-23)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im wyrmwif@tsoft.org (SM Ryan) (2005-06-24)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im vtsikoza@yahoo.com (2005-06-24)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im wyrmwif@tsoft.org (SM Ryan) (2005-06-24)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im cfc@shell01.TheWorld.com (Chris F Clark) (2005-06-24)
Re: An "open" letter to Karsten Nyblad (and other compiler compiler im schmitz@i3s.unice.fr (Sylvain Schmitz) (2005-06-26)
| List of all articles for this month |

From: SM Ryan <wyrmwif@tsoft.org>
Newsgroups: comp.compilers
Date: 24 Jun 2005 09:55:16 -0400
Organization: Quick STOP Groceries
References: 05-06-111
Keywords: parse, LALR

Chris F Clark <cfc@shell01.TheWorld.com> wrote:
# Vit wrote:
# > I only wonder, have not languages designers become cleverer in the
# > recent decades to invent languages that do not require the full
# > strength of LR(k)?
#
# SM Ryan:
# > Why not just use LR(k)? Inertia? Methods to avoid the combinatorial
# > explosion of lookaheads have been known for years.
#
# Many practical languages are both LALR(1) and nearly LL(1) (LL(k <=
# ~4) with some hacks to handle nested if-then-else). It doesn't
# generally buy one much to go to full LR(k).


Peruse past posting about people struggling to make a grammar LALR(1).
Or struggling with yacc's various "improvements" to overcome LALR
problem. You can continue to patch a broken program, or start over and
do it right.


# However, that said many recent languages: C++, Perl, (I believe also


C++ is ambiguous. It carries forward C's NIH arrogrance (who else
remembers the =+ fiasco before Ritchie realised why Algol 68 used +:=
instead of :=+) of not understanding why other languages are the way
they are. I don't know, but I wonder if C++ ambguities came about
because of yacc's willingness to resolve SR and RR conflicts instead
of demanding a proper grammar.


Part of the reason for yacc rules is because LALR is a pain in the
butt.


--
SM Ryan http://www.rawbw.com/~wyrmwif/


Post a followup to this message

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