PL/0

PL / 0 is a simplified programming language. It serves as a model to show in the book Compiler Construction by Niklaus Wirth, how to make a compiler. The language can only deal with numeric values ​​and is not intended to be used really. PL / 0 is also a subset of the programming language PL / I of IBM.

The syntax rules of the model language in EBNF:

Block program = ". ".     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

  • Http://sourceforge.net/projects/pl0-compiler
  • Development of a PL / 0 compiler style based on ' compiler construction' written in Mocka ( Modula-2 for Linux )
  • Programming language
652301
de