From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30805 invoked from network); 26 May 2021 06:21:42 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 26 May 2021 06:21:42 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 1EB979B9CB; Wed, 26 May 2021 16:21:41 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0902C9B6B4; Wed, 26 May 2021 16:20:51 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=iitbombay-org.20150623.gappssmtp.com header.i=@iitbombay-org.20150623.gappssmtp.com header.b="d1McWSfQ"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 951409B6B4; Wed, 26 May 2021 16:20:48 +1000 (AEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by minnie.tuhs.org (Postfix) with ESMTPS id 394C49B654 for ; Wed, 26 May 2021 16:20:45 +1000 (AEST) Received: by mail-pg1-f173.google.com with SMTP id i5so111528pgm.0 for ; Tue, 25 May 2021 23:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=FjWIgfKgIAX6r1+01gZGh2uBMjIcXdhip8/zqiiqdkk=; b=d1McWSfQ4MnzjZkLXdnJwQuvvktMHuxIE4tIOzkgYLgb552kWXvqaIyUsd90Jt+6DK qBhYg7x56Gn7IlLJFaW83tcNJlU9HJGjAKd3DemW4kCP20bb9FHI2UeWc3VGacyy03AI rFtZJNv0UtvuM7ys794IVuqZvL4TxjSvKoePL0B+4FBoyRRG7gytbs6jmF963v/Dcytv CpdfJlxcvLs8aOwsunI7fTSrCc1sVQJ1+RCPaAO1VNo3HPD9xEeHzrocdLZ1oVdWyIX2 7Pnu0WggitRFDFw/KJD2EAF28x2grvl6g2b9PQcqHF+OQ47lkRcEUfu0/uZ8iGWPNmmF dBoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=FjWIgfKgIAX6r1+01gZGh2uBMjIcXdhip8/zqiiqdkk=; b=D0ejUFEbbsVKpBcYxmkfaJkvf6B+s6SypTp34mDHJOKFuJrv27nSUI3NS62t16RYTJ 5lAFMo7Kvk/mtU53/BOy2WKC7mo6hRhAYp6npg0E/isWLXpiqkE8Bbe43muVXPUNNMwW 8EEfO/o1RHi345lYnoHriwAqIihOozIbcw9sREzQrotGBEs0z9ZfCt6aTL097yYGAaym Sqn1y/Yu669ljn5430tUCw9uTaTW1mlaQN8G9bOlxEXpkpZInJURu3o5JUVEj5+h3iGe KR5uuEPYQdbhxHHa8kXO1eCIvARK+Df9/+OMUQPYGb0jVDVS1p6PcVSELGK3YpCeIj7l aAEQ== X-Gm-Message-State: AOAM532oTRbPr5BH2urd55oG8xnmBt28uyfBP2EW88PqBuQIJBS25/o2 5BmrNTJedLI/kuWIxbUZaxHjQ6L7eNwoOMsz X-Google-Smtp-Source: ABdhPJwGotJRQmaMcBNQCGwHJZhbWhU/HVjqwsaUDvRZuibXY1qaANrA1s9PDlYlbC6ar/3KOYxy6A== X-Received: by 2002:aa7:9f95:0:b029:2dc:99b9:8e66 with SMTP id z21-20020aa79f950000b02902dc99b98e66mr34392582pfr.30.1622010044041; Tue, 25 May 2021 23:20:44 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id r22sm15971620pgr.1.2021.05.25.23.20.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 May 2021 23:20:43 -0700 (PDT) From: Bakul Shah Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Date: Tue, 25 May 2021 23:20:41 -0700 References: <20210526030341.GD27558@mcvoy.com> To: The Unix Heritage Society mailing list In-Reply-To: <20210526030341.GD27558@mcvoy.com> Message-Id: <2834EEEA-1C32-461B-900B-7480CCC4399B@iitbombay.org> X-Mailer: Apple Mail (2.3654.80.0.2.43) Subject: Re: [TUHS] [tuhs] Dennis Ritchie's couch X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Many existing programming languages do have a simple enough syntax to make it easy to write a recursive descent parser for them but not alll. Handwritten recursive descent parsers are often LL(1) with may be=20 a separate operator-precedence parsing for expressions. If you are defining a new language syntax you can make sure parsing is easy but not all languages are LL(1) (which is a subset of LALR(1), which is a subset of LR(1), which is a subset of GLR). Handwritten parsers for these more general grammars are bound to get more complicated. Even *we* understand parsing, writing a parser for some existing languages which grew "organically" can become tedious, or complicated or adhoc. Often such languages have no well specified grammar (the code is the specification!). A yacc grammar would help. Often one writes a yacc grammar while a new language & its syntax is evolving. Changing a yacc file is more localized & easier than fixing up a handwritten parser. Even Go has such a grammar initially. -- Bakul > On May 25, 2021, at 8:03 PM, Larry McVoy wrote: >=20 > You do, I don't. I'm not alone in my lack of understanding. >=20 > I think that all the things that yacc solved, Steve gets some kudos. > I've used it a bunch and I did not need to be as smart as you or > Steve to get the job done. >=20 > You getting past that is cool but it doesn't make his work less. >=20 > On Wed, May 26, 2021 at 10:37:45AM +1000, Rob Pike wrote: >> And today, we understand parsing so well we don't need yacc. >>=20 >> -rob >>=20 >>=20 >> On Wed, May 26, 2021 at 10:20 AM Nelson H. F. Beebe = >> wrote: >>=20 >>> The last article of the latest issue of the Communications of the = ACM >>> that appeared electronically earlier today is a brief interview with >>> this year's ACM Turing Award winners, Al Aho and Jeff Ullman. >>>=20 >>> The article is >>>=20 >>> Last byte: Shaping the foundations of programming languages >>> https://doi.org/10.1145/3460442 >>> Comm. ACM 64(6), 120, 119, June 2021. >>>=20 >>> and it includes a picture of the two winners sitting on Dennis >>> Ritchie's couch. >>>=20 >>> I liked this snippet from Jeff Ullman, praising fellow list member >>> Steve Johnson's landmark program, yacc: >>>=20 >>>>> ... >>>>> At the time of the first Fortran compiler, it took several >>>>> person-years to write a parser. By the time yacc came around, >>>>> you could do it in an afternoon. >>>>> ... >>>=20 >>>=20 >>> = --------------------------------------------------------------------------= ----- >>> - Nelson H. F. Beebe Tel: +1 801 581 5254 >>> - >>> - University of Utah FAX: +1 801 581 4148 >>> - >>> - Department of Mathematics, 110 LCB Internet e-mail: >>> beebe@math.utah.edu - >>> - 155 S 1400 E RM 233 beebe@acm.org >>> beebe@computer.org - >>> - Salt Lake City, UT 84112-0090, USA URL: >>> http://www.math.utah.edu/~beebe/ - >>>=20 >>> = --------------------------------------------------------------------------= ----- >>>=20 >=20 > --=20 > --- > Larry McVoy lm at mcvoy.com = http://www.mcvoy.com/lm=20