Index of /dee/PL0

Name                    Last modified      Size  Description
Parent Directory                             -   
Linux/                  2017-10-21 17:11    -   
README.html             2020-05-02 17:30  1.2K  
x64/                    2017-10-21 17:11    -   

Here lies the PL0 compiler and interpreter from N. E. Wirth's Algorithms + Data Structures = Programs (1976). It is does not include later additions from various editions of Compilerbau. Binaries are 64-bit only. Following is the EBNF (described on pages 299-300) syntax for PL0, based on the syntax diagrams of figure 5.4 (pages 308-310), essentially exercise 5.5.:

program = block "." .
block = [ "const" ident "=" number {"," ident "=" number} ";"]
        [ "var" ident {"," ident} ";"]
        { "procedure" ident ";" block ";" } statement .
ident = letter {letter | digit}
number = digit {digit}
letter = { "a" | ... | "z" | "A" | ... | "Z" }
digit = { "0" | ... | "9" }
statement = [ ident ":=" expression | "call" ident 
              | "?" ident | "!" expression 
              | "begin" statement {";" statement } "end" 
              | "if" condition "then" statement 
              | "while" condition "do" statement ].
condition = "odd" expression |
            expression ("="|"#"|"<"|"<="|">"|">=") expression .
expression = [ "+"|"-"] term { ("+"|"-") term}.
term = factor {("*"|"/") factor}.
factor = ident | number | "(" expression ")".