说明: PL0是一种类似于Pascal的编程语言,但比Pascal简单。1976年,Niklaus Wirth在《算法+数据结构=程序》一书中介绍
(PL 0 is a programming language similar to, but simpler than, Pascal. Introduced in the book Algorithms + Data Structures = Programs by Niklaus Wirth in 1976)
# PL/0 Programming Language [[1]](https://github.com/ngospina/PL-0/blob/master/#1)
PL/0 is a programming language intended as an educational language similar to, but simpler than, **Pascal** (a general-purpose programming language). It was introduced in the book **Algorithms + Data Structures = Programs** by **Niklaus Wirth** in 1976
|Directory|Description |
|---------|---------------------------------------|
|Examples |PL/0 examples |
|Pascal |PL/0 Compiler-Interpreter (Free Pascal)|
**EBNF Grammar:**
```
program = block " ." .
block = [ "CONST" ident "=" number { "," ident "=" number } ";" ]
[ "VAR" ident { "," ident } ";" ]
{ "PROCEDURE" ident ";" block ";" } statement .
statement = [ ident ":=" expression
| "CALL" ident
| "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 ")" .
```
[1]
**Original PL/0 version (1976) source:** [GitHub](https://github.com/ngospina/PL-0/blob/master/https://github.com/classic-tools/PL-0/)