PL / 0
PL / 0 is a simplified programming language . It serves as a pattern to the book compiler of Niklaus Wirth to show how to make a compiler. The language can only deal with numerical values and is not intended to be actually used. PL / 0 is also a subset of the PL / I programming language from IBM .
The syntax rules of the model language in EBNF :
 program    = block "." .
 block      = [ "CONST" ident "=" number { "," ident "=" number } ";" ]
              [ "VAR" ident { "," ident } ";" ]
              { "PROCEDURE" ident ";" block ";" } statement .
 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 ")" .
Web links
- ethoberon.ethz.ch (PDF; 597 kB)
 - sourceforge.net
 - Development of a PL / 0 style compiler based on 'Compiler construction' written in Mocka (Modula-2 for Linux)