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.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id 1188621510 for ; Sun, 19 May 2024 22:42:30 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 667E643AE4; Mon, 20 May 2024 06:42:23 +1000 (AEST) Received: from exhmta12.bpe.bigpond.com (exhmta12.bpe.bigpond.com [203.42.40.156]) by minnie.tuhs.org (Postfix) with ESMTPS id 9C38843AE3 for ; Mon, 20 May 2024 06:42:13 +1000 (AEST) Received: from exhprdcmr05 by exhprdomr12 with esmtp (envelope-from ) id 1s8nMB-0002b1-1x for tuhs@tuhs.org; Mon, 20 May 2024 06:42:11 +1000 Received: from [110.141.193.233] (helo=aneurin.horsfall.org) by exhprdcmr05 with esmtp (envelope-from ) id 1s8nMB-0006Qk-1b for tuhs@tuhs.org; Mon, 20 May 2024 06:42:11 +1000 Received: from aneurin.horsfall.org (localhost [127.0.0.1]) by aneurin.horsfall.org (8.15.2/8.15.2) with ESMTP id 44JKgAZP075911 for ; Mon, 20 May 2024 06:42:10 +1000 (EST) (envelope-from dave@horsfall.org) Received: from localhost (dave@localhost) by aneurin.horsfall.org (8.15.2/8.15.2/Submit) with ESMTP id 44JKg9JI075908 for ; Mon, 20 May 2024 06:42:10 +1000 (EST) (envelope-from dave@horsfall.org) X-Authentication-Warning: aneurin.horsfall.org: dave owned process doing -bs Date: Mon, 20 May 2024 06:42:09 +1000 (EST) From: Dave Horsfall To: The Eunuchs Hysterical Society In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.9999 (BSF 287 2018-06-16) X-GPG-Public-Key: http://www.horsfall.org/gpgkey.pub X-GPG-Fingerprint: 05B4 FFBC 0218 B438 66E0 587B EF46 7357 EF5E F58B X-Home-Page: http://www.horsfall.org/ X-Witty-Saying: "chmod 666 the_mode_of_the_beast" MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-tce-ares-id: e{3f863c4e-d4cf-4dfe-9c28-b91910524ce9}1 X-tce-spam-action: no action X-tce-spam-score: 0.0 X-Cm-Analysis: v=2.4 cv=HZ4STDE8 c=1 sm=1 tr=0 ts=664a6423 a=tp40vz5QK/dVXQmd7GLw7w==:117 a=tp40vz5QK/dVXQmd7GLw7w==:17 a=kj9zAlcOel0A:10 a=TpHVaj0NuXgA:10 a=4gbvzTMnow3lJSqpTvMA:9 a=CjuIK1q_8ugA:10 X-Cm-Envelope: MS4xfEP02TYeZqfktzzHtwViIocLkD2Lt9rkuscfqxInBaS8EF4O6kx4oXrvJ+RQBEkQQC3pIPcdA22PQCpizPEdeaqSNyZziBGKaKqf6e/PW9hfvwfGgK1A ZXs1z34xbX0cO0MFJOn13lgbuE7Ai9VcfpkKdaNrx+ZiQPwhzufnhtGQ Message-ID-Hash: KK3KCNXFF2LWKCE7ICITZ64QX3VLX45D X-Message-ID-Hash: KK3KCNXFF2LWKCE7ICITZ64QX3VLX45D X-MailFrom: dave@horsfall.org 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 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: On Sun, 19 May 2024, Douglas McIlroy 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 to be at least as informative as distinct hand-crafted > messages, which almost by definition can't foresee every contingency. > Alas, this elegant scheme seems not to have inspired imitators. I did something like that for our compiler-writing assignment. An ALGOL-like language (I think I used ALGOLW) it would detect when a semicolon was missing, and insert it (with a warning). As a test case, it successfully compiled a program with no semicolons at all... -- Dave