ALGOLW parser

gah4 <gah4@u.washington.edu>
Tue, 26 Jul 2022 23:31:33 -0700 (PDT)

          From comp.compilers

Related articles
ALGOLW parser gah4@u.washington.edu (gah4) (2022-07-26)
Re: ALGOLW parser gah4@u.washington.edu (gah4) (2022-07-27)
Re: ALGOLW parser gah4@u.washington.edu (gah4) (2022-07-27)
| List of all articles for this month |
From: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Tue, 26 Jul 2022 23:31:33 -0700 (PDT)
Organization: Compilers Central
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

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]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.