From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 5ee53427 for ; Mon, 3 Dec 2018 20:11:22 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id C56C9A1D09; Tue, 4 Dec 2018 06:11:21 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id AC030A1CE4; Tue, 4 Dec 2018 06:10:49 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 34F01A1CE4; Tue, 4 Dec 2018 06:10:41 +1000 (AEST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by minnie.tuhs.org (Postfix) with ESMTPS id 6D4F194A37 for ; Tue, 4 Dec 2018 06:10:35 +1000 (AEST) Received: by mail-lj1-f170.google.com with SMTP id c19-v6so12646624lja.5 for ; Mon, 03 Dec 2018 12:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/H3/TvP3WJmO+flsntFtlYezGdCIPbb3zyyU2iuhFi4=; b=BXkcpI7xZFRUCrvWoUdXSm8ejIyClW4pN30g9TRC36pJJEv5WQ87xc2DMb0DIPSl6d YoRlqexHF25yeYUV/6Htze+0FncI99Q8BfNNKW/M9NECCbC8SHqzRf9S1emn1giINJmb ANJSk5kzRgRO9hG1FDBSvThYNaKFSl7KX49cpwYbwmq3Dtr7A/hR4DUKq0LRgsISAiTS Z8fuB9giGXKwZdwU4ZPP/Uo1i1JN0rpdMQikRX4/58Av90xTl1wlEW0jjg4Ird9cuPtU IcmDWjsAcczLaFZZpUWLfoeByOd6d3nLdYjGqyWjlIa+OQ+PqATQaU/Psm3SavAiPyr4 mE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/H3/TvP3WJmO+flsntFtlYezGdCIPbb3zyyU2iuhFi4=; b=hXk6IU87XLf+pOd7/nmuWA/g3o5gHk2yAjYaXrt0e3/W91ekZ1Xe5hUbJuV+CRTC0A yny3tv4mRR2uPIrg0jiApu/U9sdExbnJoBKVxqZE9wXyCclKKqPUu0wejF2audhkkNew O5MOhDu/TvkdcYbmQFGaS+q0F6giOo+ibNlcl9zWP9tz5k0Xd1CZhXY80dSBZJR1v9kb Y3515c3nesmYT/P2KZvEo/TN7IJ3a7A6MROq45iUFeystzeBI1QPaLhTtolnORdYwv66 117bhd1t/Ectn2QH1iLzi0DactDDQrah314+zSXSIF4Cl/HRnsu7EG3GfPgRwX1dyJh6 s1rw== X-Gm-Message-State: AA+aEWZgyvXraRGPB1pP90LfrUcnEIHV2/FzQksXgfqduoqyP+2OdZZg x8J4shkNezrip3bjnQdTn7HMu9aWhuleA3zdfys= X-Google-Smtp-Source: AFSGD/W+sSuhhAiPLU/FD4LOnGis030E8ltxcnmnYRLpyeZ3ZbXBDBwB5II5IBnR8xo1+7HMZkHGcqdXqcGUd5OCGOw= X-Received: by 2002:a2e:8156:: with SMTP id t22-v6mr6091271ljg.32.1543867833477; Mon, 03 Dec 2018 12:10:33 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a2e:3a11:0:0:0:0:0 with HTTP; Mon, 3 Dec 2018 12:10:32 -0800 (PST) In-Reply-To: <7E.F0.08702.4CFB40C5@smtp04.onyx.dfw.sync.lan> References: <201812030336.wB33axfq080387@tahoe.cs.Dartmouth.EDU> <7E.F0.08702.4CFB40C5@smtp04.onyx.dfw.sync.lan> From: Paul Winalski Date: Mon, 3 Dec 2018 15:10:32 -0500 Message-ID: To: Ron Young Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] > there is no way that FORTRAN can be described in any syntax X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 12/3/18, Ron Young wrote: > > John Levine wrote a ftn77 subset parser using lex and yacc (the shar > file that I have is dated Nov 1988). > Just curious--what parts of Fortran 77 did he leave out? Unfortunately the Fortran language was being developed at the same time that Chomsky was first doing his research on formal grammars. Languages such as Algol, C, PL/I, and Pascal were designed to be easily split into a lexical regular grammar and a context-free grammar (the lex/yacc paradigm). Fortran has some nasty grammatical quirks that make it a bear to parse--context-sensitive lexical analysis, for example. Given the string: DO10I=1,10 you don't know whether to lex it as: DO10I = 1 or: DO 10 I = 1 until you see the comma. Yes, full Fortran can be expressed in BNF and other formal syntax mechanisms. But I don't think you can use lex and yacc to generate a compiler for it. -Paul W.