From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id E572C2523D for ; Sun, 19 May 2024 18:22:05 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9201243AD7; Mon, 20 May 2024 02:22:01 +1000 (AEST) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by minnie.tuhs.org (Postfix) with ESMTPS id 6692E43AD5 for ; Mon, 20 May 2024 02:21:55 +1000 (AEST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ee0132a6f3so53985195ad.0 for ; Sun, 19 May 2024 09:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716135715; x=1716740515; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zspcxtg/6jb2X+koETYjl9G71aqrbnpBz5kpvcKJwmM=; b=EourGWPABNSx9739Y7c++kQBZOjs2N4GfFS41c29Z9CyFh2hXsAgChNDEtN8PODCgo 1cGOlzdYMPJdbF/RojZCSCY4OUh8+yL/x8J9nsCF8saFyBj9BYn4kgVKA0T34cFmxZNY TBtFcHCgBAMvHcEgH+wHN5P0Djkq4vvDcw9WHPEq9DvSBMl+pUd9W0fH8nfdakHajqVZ OcH3jObEwCl3rcXYI30ZLUe18JjuUlp/iCK0q4vIEM0u4AqhY4rQLfXpBJ3++8Rg8FeV XuD1LnFn9C3pq4Mfy6wXPYY8bff08zlio9sahyYpGQWGlLetczMBoN8b7MMYEQBDVPA8 Xprg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716135715; x=1716740515; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zspcxtg/6jb2X+koETYjl9G71aqrbnpBz5kpvcKJwmM=; b=UauZU/eOpyf/5I5kzCsHQZ6D2UngVPpuiCF91WAiiGAt+2q8z5D52/Z0Q4MdmsLSvL LpEytFophki19Ww+99XHcZF5ILNBcbTHg2DC6s2eBGxe6Zxo9SuFLsvzJeJYpI1b6GXt x9Oxu7vgT/Ldl7v85v7+77eZrgnZmSPHYYddgIkaafuYKtFK9SFIWTCYYVVWqOYKekaC aTZ8IZP5dsfr4pHGVkhpZk1G8BTvEYxQvcZITbAdUjnc0n05nAB2/ZozIg6c2INvvDaE bbNSGY9UqrIaGMuVlUQYF/irnIBwH3FNC4w2dWwjUqYY8v7FERlWQ4YzxXRZMOR0OiPw i96w== X-Gm-Message-State: AOJu0YxugmRzmrV7E9d1QT7uC/FMV9pULZsjsvK/qGWZGVgat8y4pXcU sNyEWuJFZvOjsjrceELIHHNLlSkiZJ5y8oemVQQiANwZhCbvE20r9aaCiEnqXe6a87StrMnRFpr CSRAbEKVcy3oDjIV1SAsE4O5RlX8= X-Google-Smtp-Source: AGHT+IFLCa6mOsMKmWt6hS/rPErRRl8Nqn394nWB+9DuiCWHnm4A3Nd8wI/7VEq7JyKEYhyszUjGlJQiCW25eYi+rjM= X-Received: by 2002:a17:90b:23c4:b0:2b6:2067:df12 with SMTP id 98e67ed59e1d1-2b6cc757e72mr23513708a91.16.1716135714622; Sun, 19 May 2024 09:21:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Winalski Date: Sun, 19 May 2024 12:21:43 -0400 Message-ID: To: Douglas McIlroy Content-Type: multipart/alternative; boundary="000000000000a815a20618d0fb49" Message-ID-Hash: 3IPMOR5IJN4XS3XG7GZLDGT6XUEL66VU X-Message-ID-Hash: 3IPMOR5IJN4XS3XG7GZLDGT6XUEL66VU X-MailFrom: paul.winalski@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: TUHS main list X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: The 'usage: ...' message. (Was: On Bloat...) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000a815a20618d0fb49 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ack! I finger-fumbled and accidentally sent this message incomplete. Here's the complete version. Sorry about that, Chief! On Sun, May 19, 2024 at 12:18=E2=80=AFPM Paul Winalski wrote: > On Sun, May 19, 2024 at 10:03=E2=80=AFAM Douglas McIlroy < > douglas.mcilroy@dartmouth.edu> wrote: > >> >> Another non-descriptive style of error message that I admired was that o= f >> Berkeley Pascal's syntax diagnostics. When the LR parser could not proce= ed, >> it reported where, and automatically provided a sample token that would >> allow the parsing to progress. I found this uniform convention to be at >> least as informative as distinct hand-crafted messages, which almost by >> definition can't foresee every contingency. Alas, this elegant scheme se= ems >> not to have inspired imitators. >> >> The hazard with this approach is that the suggested syntactic correction > might simply lead the user farther into the weeds. It depends on how far > the parse has gone off the rails before a grammatical error is found. > Pascal and BASIC (at least the original Dartmouth BASIC) have simple, > well-behaved grammars and the suggested syntactic correction is likely to > be correct. It doesn't work as well for more syntactically complicated > languages such as C (consider an error resulting from use of =3D=3D inste= ad of > =3D) or PL/I. And it's nigh on impossible for languages with ill-behaved > grammars such as Fortran and COBOL (among other grammatical evils, Fortra= n > has context-sensitive lexiing). > > Commercial compiler writers avoid this techniq > Commercial compiler writers avoid this technique because it turns into an error report generator. The potential user benefit is outweighed by all of the "your compiler suggested X as a correction when the problem was Y" that need to be answered. -Paul W. --000000000000a815a20618d0fb49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ack!=C2=A0 I finger-fumbled and accidentally sent thi= s message incomplete.=C2=A0 Here's the complete version.=C2=A0 Sorry ab= out that, Chief!

On Sun, May 19, 2024 at 12:18=E2=80=AFPM Paul Winalski = <paul.winalski@gmail.com&= gt; wrote:
On Sun, May 19, 2024 at 10:03=E2=80=AFAM Dougl= as McIlroy <douglas.mcilroy@dartmouth.edu> wrote:

Another non-descriptive style of error message that I admired was= that of Berkeley Pascal's syntax diagnostics. When the LR parser could= not proceed, it reported where, and automatically provided a sample token = that would allow the parsing to progress. I found this uniform convention t= o be at least as informative as distinct hand-crafted messages, which almos= t by definition can't foresee every contingency. Alas, this elegant sch= eme seems not to have inspired imitators.

= The hazard with this approach is that the suggested syntactic correction mi= ght simply lead the user farther into the weeds.=C2=A0 It depends on how fa= r the parse has gone off the rails before a grammatical error is found.=C2= =A0 Pascal and BASIC (at least the original Dartmouth BASIC) have simple, w= ell-behaved grammars and the suggested syntactic correction is likely to be= correct.=C2=A0 It doesn't work as well for more syntactically complica= ted languages such as C (consider an error resulting from use of =3D=3D ins= tead of =3D) or PL/I.=C2=A0 And it's nigh on impossible for languages w= ith ill-behaved grammars such as Fortran and COBOL (among other grammatical= evils, Fortran has context-sensitive lexiing).

Co= mmercial compiler writers avoid this techniq

Commercial compiler writers avoid this technique b= ecause it turns into an error report generator.=C2=A0 The potential user be= nefit is outweighed by all of the "your compiler suggested X as a corr= ection when the problem was Y"=C2=A0 that need to be answered.

-Paul W.
--000000000000a815a20618d0fb49--