Re c̲o̲m̲m̲e̲n̲t̲ This file is: https://gtoal.com/languages/algol60/x1algol/x1algol.a60 which is my attempt to recreate the source text of the Algol60 compiler for the X8 in Algol60, based on the PDF scan of an old listing, at https://gtoal.com/languages/algol60/x1algol/x1algol.a60.pdf (Extracted from the original documentation at https://ir.cwi.nl/pub/13069 and https://ir.cwi.nl/pub/13069/13069D.pdf ) Although there was some OCR in the PDF to use as a starting point, almost every line contained multiple OCR errors, so this recreation is as much a re-keying as it is an OCR. I want to store the raw data in 'plain' unicode text files which look as close to the original intent as possible, with a utility to output any awkward constructs in even more appropriate HTML, *but* without the need to use CSS to position items in HTML - just classic plain HTML but using unicode code points if needed. I'm now attempting to copy the indentation/spacing faithfully. Alternatively can reformat with the original SOAP or equivalent, or if all else fails, by hand. Note that as well as having a copy of the SOAP source, I also found a couple of "Algol Editor"s online. Basically lexers with an output routine. Although I've been careful with typing variable names, I'm sure some errors will remain, but I expect the compiler to catch most of them - once I've converted the source to a form of Algol 60 that I can find a compiler for (using my unicode_to_ascii utility in this directory). Note that pseudo-Algol 60 compilers which do not support stropping will not compile this, as this source code contains many variables with the same names as keywords. The PDF file contained underlined keywords. I have reproduced them here using Unicode underlining. The underlining was added as a separate pass to keywords which were entered using initial '%' stropping. It's possible there remain some underlining errors. Again the compiler will catch those when the code is re-output by the unicode_to_ascii filter, to create a proper stropped format that can be fed to a compiler. Previously I was stropping by using \uCCB2 to place an underline after the character, but now I think it is better to use \u0332 instead Be aware of some potentially ambiguous scanning errors, as there is both a "DO" variable and a "d0" variable, in addition to the keyword "do" and the literal string "do"! Here are some unicode symbols I've used to represent the original intent and character set (The original very likely coming from a Friden Flexowriter): ÷ Integer Divide Originally represented as an underlined ':'. × Multiply ¬ Not Appearance in original document is more vertical, like a raised ┐ (which is actually a box drawing symbol so not appropriate) Likewise inappropriate is \u2142 TURNED SANS-SERIF CAPITAL L (⅂) The 'not' symbol (¬) is used UNDERLINED (¬̲) once, in procedure Intassign. I wonder if perhaps this is a squared-off representation of 'IMPL' (⊃) (represented by &sup: in HTML as it looks like the Superset symbol \u2283. This symbol doesn't render on my system. If so then \u2290 SQUARE ORIGINAL OF could be used except it too does not render on my system (⊐)) Also ⸧ \u2E27 Right Sideways U Bracket ≠ Not equals The original document uses a vertical overstrike over an '=' sign. ∧ AND ∨ OR ≤ LE ≥ GE '<' overstruck with '|' has been rekeyed as '{' these don't render: <⃓ <⃦ '>' overstruck with '|' has been rekeyed as '}' { and } are not otherwise used. I did consider using French guillemets instead. Unicode does not support simple overstriking of arbitrary characters, and long vertical bar overstriking although defined is not well implemented yet. { and } represent opening and closing quotes around strings, as used in PRINTTEXT() calls. In SOAP I'm experimenting with [̲ ]̲ which looks correct when editing a text file but looks a bit iffy in standard HTML. I could intercept it in unicode_to_html.c and use [ which would look better. I have not yet done so. In other Algol documents, '[' and ']' are used instead, with '<' and '>' overstrikes. In an example in http://sw.ccs.bcs.org/KDF9/Wichmann/ISO1538.pdf (which is not really a true algol listing) we see a symbol somewhat like this: ┎ being used for an opening string quote. I haven't found a good opening and closing version of that in Unicode yet. Likewise I haven't found a good version of the hard space character which looks like an underline with the ends turned up. UPDATE: Yes I have :-) ⎵ https://www.compart.com/en/unicode/U+23B5 - unfortunately although it renders OK on web pages/Windows, it doesn't render on my current Linux system. %: is described (in Dutch) in https://www.cs.utexas.edu/~EWD/MCReps/CR1970-013.PDF - It is integer division. Although it is an overstruck ":" and "_", it makes more sense as an overstruck ":" and "-", i.e. an old style division symbol: ÷ In IMP it would have been "//". Real division ('/') does not appear to be used in this compiler. AND (∧) and OR (∨) use the standard Algol symbols, and LESS THAN OR EQUAL TO (≤) and GREATER THAN OR EQUAL TO (≥) use the Unicode symbol rather than underlined '<' and '>'. subscript 10 will have to be replaced by subscript 1 (₁ (U+2081)) followed by subscript 0 (₀ (U+2080)) or in ascii as '@'. Unfortunately the subscripted numbers are not supported on my linux. BUT NO! there is Unicode Character “⏨” (U+23E8) - Decimal Exponent Symbol \u23E8 ^ represents vertical bar superimposed on %and symbol - not | and * as in Atlas Autocode. Though perhaps ⭡ would be better? true and false are frequently underlined below - but sometimes they are not, e.g. as in Simple Boolean. I had to remove the underlined cases so that the file would parse with my reformatter. If the use of underlining were consistent it would have been better to fix the reformatter, but with some underlined and some not, I've removed all the underlining below so that the file is consistent and used the same convention as my reformatter which I believe is correct (it was based on the Edinburgh Algol 60 grammar). The file you are looking at does look mostly correct when edited with an editor which understands Unicode, on an operating system which understands Unicode, when connected to that computer using a terminal emulator which understands Unicode. If you're not in a Unicode environment, you can still see a faithful rendition of this file by converting it to HTML with my unicode_to_html utility (also in this directory) and viewing the resulting HTML on a web browser that supports Unicode. (As in https://gtoal.com/languages/algol60/x1algol/xalgol.a60.html ) (If utils/unicode_to_html.c doesn't convert this file properly, PLEASE FIX IT!) If even that is not possible for you, then convert the file to old-fashioned plain 7-bit ASCII (using unicode_to_ascii) as you would do to compile the file and view that instead. (Like this: https://gtoal.com/languages/algol60/x1algol/xalgol.a60.txt ) By the way, I've added comments to delineate each page of the paper listing. Otherwise the source following this comment is as per the original. Note that the author of the Algol60 compiler created variables l0 through l5 ! (L0 through L5) - perhaps those were distinguisable from numbers 10 through 15 on his screen, but on his printer as per the PDF listing, they're almost impossible to tell apart! I think I have transcribed those correctly from context, but if the code does not run correctly that would be a perfect area to examine more closely! I'm just relieved he didn't also declare a variable 'O' :-) On a related note - I think they're OK, but check stock1/stockl (one vs L) and stock1 vs stack1 (O vs A). There may be some case differences in some variable names, especially single-letter ones. Unfortunately Algol60 is case-insensitive so in this instance the compiler will not detect those for us. The two obscure Algol 60 Boolean operators explained: b1 IMPLIES b2 == (NOT b1) OR b2 b1 EQUIV b2 == NOT (b1 XOR b2) == (b1 == b2) SEE ALSO: https://ir.cwi.nl/pub/13677/ A comparison between the ALGOL 60 implementations on the Electrologica X1 and the Electrologica X8 https://ir.cwi.nl/pub/13069/ An ALGOL 60 compiler in ALGOL 60 : text of the MC-compiler for the EL-X8 (8Mb) https://ir.cwi.nl/pub/13070/ An ALGOL 60 compiler in ALGOL 60 : text of the MC-compiler for the EL-X8 (12Mb) https://www.softwarepreservation.org/projects/ALGOL/algol60impl/#X8_MC ;