Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Reactor error - core dumped!


devel / comp.compilers / Re: ALGOLW parser

SubjectAuthor
* ALGOLW parsergah4
`* Re: ALGOLW parsergah4
 `- Re: ALGOLW parsergah4

1
ALGOLW parser

<22-07-048@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=518&group=comp.compilers#518

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: ALGOLW parser
Date: Tue, 26 Jul 2022 23:31:33 -0700 (PDT)
Organization: Compilers Central
Lines: 46
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-07-048@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="47711"; mail-complaints-to="abuse@iecc.com"
Keywords: algol60, history, question, comment
Posted-Date: 27 Jul 2022 11:23:23 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: gah4 - Wed, 27 Jul 2022 06:31 UTC

I am looking at the source for the OS/360 ALGOLW compiler,
written by Wirth in about 1969.

There is a file which seems to be for a parser generator
that starts out like this:

<K REG> ::= <ID>
<T CELL ID> ::= <ID>
<PROC ID> ::= <ID>
<FUNC ID> ::= <ID>
<T CELL> ::= <T CELL ID>
<T CELL1> )
<T CELL2> )
<T CELL1> ::= <T CELL2> <ARITH OP> <T NUMBER>
<T CELL3> <T NUMBER>
<T CELL2> ::= <T CELL3> <K REG>
<T CELL3> ::= <T CELL ID>
<UNARY OP> ::= ABS
NEG
NEG ABS
<ARITH OP> ::= +
-
*
/
+ +
- -
<LOG OP> ::= AND
OR
XOR
<K REG ASS> ::= <K REG> := <T CELL>
<K REG> := <T NUMBER>
<K REG> := <STRING>
<K REG> := <T CELL>

It looks like actual input to a program, and there is some output
from the processor, but I don't know what program it is.

This seems a little too early for lex/yacc.
[Algol W was written in PL360, a very nice little assembler with
Algol-like syntax. I'm pretty sure it used a hand-written parser and
what you have is part of the documentation. I also believe I saw a
thread somewhere saying the source code for both was lost, although
PL360 was used for other stuff and there may be later versions of it.
-John]

Re: ALGOLW parser

<22-07-050@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=520&group=comp.compilers#520

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: ALGOLW parser
Date: Wed, 27 Jul 2022 10:39:16 -0700 (PDT)
Organization: Compilers Central
Lines: 42
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-07-050@comp.compilers>
References: <22-07-048@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="79434"; mail-complaints-to="abuse@iecc.com"
Keywords: tools, history, comment
Posted-Date: 27 Jul 2022 14:01:06 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-07-048@comp.compilers>
 by: gah4 - Wed, 27 Jul 2022 17:39 UTC

(I wrote)

> I am looking at the source for the OS/360 ALGOLW compiler,
> written by Wirth in about 1969.

> There is a file which seems to be for a parser generator

(snip)

> It looks like actual input to a program, and there is some output
> from the processor, but I don't know what program it is.

And our moderator replied:

> [Algol W was written in PL360, a very nice little assembler with
> Algol-like syntax. I'm pretty sure it used a hand-written parser and
> what you have is part of the documentation. I also believe I saw a
> thread somewhere saying the source code for both was lost, although
> PL360 was used for other stuff and there may be later versions of it.
> -John]

There is a scanned listing of at least some parts of ALGOLW, and yes
mostly PL360, and some assembler. And this file is from that listing.

It seems to be output of a program, so I believe not only documentation.

Looking more closely, though, it is related to the syntax of PL360,
and not of ALGOLW, even though it is in the middle of source listings
of the ALGOLW compiler.

The listings are here:

http://bitsavers.org/pdf/stanford/listing/Algol_W_Listing_Nov69.pdf

and it is on about page 101.

It seems that in addition to the listings, the source of the MTS
ALGOLW compiler from some years later is available. The low
level I/O routines and other OS specific parts will be different,
but the internal compiler routines should be close.
[Well, whaddaya know. The PL360 table generator that reads the BNF is
just before the BNF, starting on page 81. -John]

Re: ALGOLW parser

<22-07-051@comp.compilers>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=521&group=comp.compilers#521

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: gah...@u.washington.edu (gah4)
Newsgroups: comp.compilers
Subject: Re: ALGOLW parser
Date: Wed, 27 Jul 2022 13:36:09 -0700 (PDT)
Organization: Compilers Central
Lines: 36
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-07-051@comp.compilers>
References: <22-07-048@comp.compilers> <22-07-050@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="7518"; mail-complaints-to="abuse@iecc.com"
Keywords: parse, history, comment
Posted-Date: 27 Jul 2022 17:47:19 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-07-050@comp.compilers>
 by: gah4 - Wed, 27 Jul 2022 20:36 UTC

On Wednesday, July 27, 2022 at 11:01:09 AM UTC-7, gah4 wrote:
> (I wrote)

> It seems that in addition to the listings, the source of the MTS
> ALGOLW compiler from some years later is available. The low
> level I/O routines and other OS specific parts will be different,
> but the internal compiler routines should be close.

And our moderator wrote:
> [Well, whaddaya know. The PL360 table generator that reads the BNF is
> just before the BNF, starting on page 81. -John]

Aha!

Since I didn't know where to start, and especially as I want to compare to the
MTS source, I was going through looking for PROCEDURE statements
(and for CSECT in the assembly code). I wanted a rough idea about
how the modules went together, without too many details.

I did notice that the one on page 81 didn't start with PROCEDURE,
and thought that was strange, but it didn't occur to me that it was a
completely different program.

(Even though that is the obvious reason.)

So, what was usual for parser generators in 1969?

I also noted a linkage editor map for a PL/I (F) program named ALPHA,
though the program itself seems not to be there. I was, just a little,
suspecting that was the program to read it.

thanks!
[My recollection is that there were a lot of programs that would read some
form of BNF and create parser tables, but yacc was the first one that let
you interspese the rules and the action code which made it a lot easier
to use. -John]

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor