gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ISO FORWARD is now implemented


From: Gaius Mulley
Subject: Re: ISO FORWARD is now implemented
Date: Sat, 07 Dec 2024 17:39:56 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

"Fischlin  Andreas" <andreas.fischlin@env.ethz.ch> writes:

> Hi Gaius,
>
> I doubt this is correct, as PIM does (unofficially for sure as of PIM3) also 
> know about FORWARD. E.g. in Wirth et al., 1992 (attached) we wrote
>
>  Procedures referenced before declaration must be declared in advance by a 
> FORWARD
>  declaration. The format is
>
>  PROCEDURE P(parameter list); FORWARD;
>
>  The corresponding procedure must have the full header repeated and must lie 
> at the same
>  nesting level as the FORWARD declaration.
>
> And in EBNF this means
>
>  ProcedureDeclaration = ProcedureHeading ";"
>  (block ident | FORWARD | CODE digit {hexDigit}"H").
>
> As all 1-pass Modula-2 compilers coming from N. Wirth tolerated above 
> extension of the language, I would suggest to leave it in for all PIM 
> variants (e.g.
> Wirth, 1985a,b; Wirth, 1987; Wirth et al., 1992). This may also matter for 
> recursive use of procedures, which is not only a 1-pass compiler issue, but 
> may
> matter quite importantly for code making use of recursive procedure calls.
>
> Regards,
> Andreas
>
> Cited References:
> ------------------------
>
> Wirth, N., 1985a. A single-pass Modula-2 compiler for Lilith. Institut für 
> Informatik, ETH, Zürich: 3.    Wi269
>
> Wirth, N., 1985b. A fast and compact compiler for Modula-2. Institut für 
> Informatik, ETH, Zürich. Internal Report 64, 1-22.    Wi261
>
> Wirth, N., 1987. From Modula to Oberon. Institut für Computersysteme ETHZ, 
> Swiss Federal Institute of Technology, Zürich, Switzerland. Internal report 
> 82,
> 3-10.  doi: 10.3929/ethz-a-005363226   Wi031
>
> Wirth, N., Gutknecht, J., Heiz, W., Schär, H., Seiler, H., Vetterli, C. & 
> Fischlin, A., 1992. MacMETH.  A fast Modula-2 language system for the Apple 
> Macintosh. 
> User Manual.  4th, completely revised ed. Department of Computer Sciences 
> (ETH), Zürich, Switzerland. User Manual , 116pp.
> https://www.sysecol2.ethz.ch/SimSoftware/RAMSES/Documents/MacMETH_Manual.pdf  
>  Wi068
>
> ETH Zurich
> Prof. em. Dr. Andreas Fischlin
> Formerly IPCC Vice-Chair WGII
> Systems Ecology - Institute of Biogeochemistry and Pollutant Dynamics
> CHN E 24
> Universitaetstrasse 16
> 8092 Zurich
> SWITZERLAND
>
> andreas.fischlin@env.ethz.ch
> www.sysecol.ethz.ch/people/andreas.fischlin.html
>
> +41 44 633-6090 phone
> +41 79 595-4050 mobile
>
>              Make it as simple as possible, but distrust it!

Hi Andreas,

ah thanks for the references and attachments - I had forgotten the
existence of the "A Single-pass Modula-2 Compiler for Lilith" document.
As suggested I'll leave it in for all PIM variants (or possibly
introduce a command line option for gm2-15 to enable forward with pim)

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]