[HN Gopher] Compiler for "Easy" language from "Etudes for Progra...
       ___________________________________________________________________
        
       Compiler for "Easy" language from "Etudes for Programmers" book
       (1978)
        
       Author : begoon
       Score  : 25 points
       Date   : 2025-10-14 12:14 UTC (9 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | dukoid wrote:
       | I was assuming it's something similar to PL/0 but the grammar
       | looks quite extensive...
        
         | Joker_vD wrote:
         | Basically Algol, but with gratuitous "SET" to simplify parsing
         | assignment statements, and without generic "BEGIN" braces:
         | those are baked into "DO"/"THEN"/"ELSE".
         | 
         | You can probably straightforwardly translate it to Golang by
         | running through a C preprocessor with an obvious set of macros.
        
       | ape4 wrote:
       | The "FI" for "endif" is like bash.
       | 
       | The semicolons are like C.
       | 
       | The "PROGRAM" section is like COBOL.
        
         | kragen wrote:
         | The "fi" thing arose during the Algol-68 process, which Steve
         | Bourne participated in, which is why he put it in his shell.
         | (He would have put "od" there too to terminate "do" if it
         | wasn't already used for a hexdumper.) You also find it in, for
         | example, Dijkstra's _Discipline of Programming_.
         | 
         | Semicolons were widely used as statement separators in Algol-
         | family languages, but in Easy they seem to be statement
         | _terminators_ , so they _are_ apparently like C rather than
         | like earlier Algol-family languages such as Pascal.
         | 
         | Pascal also had the "program" thing. I'm not sure if earlier
         | Algol languages did?
        
           | IAmBroom wrote:
           | COBOL precedes Pascal.
        
             | kragen wrote:
             | Yes, of course it does. I didn't mean to imply that COBOL
             | got it from Pascal. I meant that the practice was much more
             | widespread than just COBOL, and given that the rest of Easy
             | is clearly an Algol-family language very similar to Pascal
             | or (then-draft) Ada, that's probably where he got it.
        
         | Rendello wrote:
         | If you're Stephen R. Bourne, "FI" is also like C!
         | 
         | (From the Bourne Shell source): https://www.tuhs.org/cgi-
         | bin/utree.pl?file=V7/usr/src/cmd/sh...
        
       | shrubble wrote:
       | The Etudes book is considered a classic, especially among FSU
       | programmers-the book was licensed for a small amount, translated
       | into Russian and used in many classrooms.
        
         | kragen wrote:
         | It's absolutely a classic!
        
       ___________________________________________________________________
       (page generated 2025-10-23 23:01 UTC)