PL/0: Difference between revisions
m Reverted 1 edit by 200.39.29.221 identified as test/vandalism using STiki |
Small grammar fix |
||
(47 intermediate revisions by 33 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Programming language}} |
|||
At least two [[programming language]]s are known as '''PL/0'''. One is a subset of IBM's [[general-purpose programming language]] [[PL/I]]. |
|||
{{about|the programming language introduced by Niklaus Wirth|the subset of a programming language from IBM|PL/I}} |
|||
'''PL/0''' is a [[programming language]], intended as an [[educational programming language]], that is similar to but much simpler than [[Pascal (programming language)|Pascal]], a [[general-purpose programming language]]. It serves as an example of how to construct a [[compiler]]. It was originally introduced in the book, ''[[Algorithms + Data Structures = Programs]]'', by [[Niklaus Wirth]] in 1976. It features quite limited language constructs: there are no real numbers, very few basic arithmetic operations and no control-flow constructs other than "if" and "while" blocks. While these limitations make writing real applications in this language impractical, it helps the compiler remain compact and simple. |
|||
== Features == |
|||
The other '''PL/0''', covered here, is similar to but much simpler than the general-purpose programming language [[Pascal (programming language)|Pascal]], intended as an [[educational programming language]]. It serves as an example of how to construct a [[compiler]]. It was originally introduced in the book, ''[[Algorithms + Data Structures = Programs]]'', by [[Niklaus Wirth]] in 1975. It features quite limited language constructs: there are no real numbers, very few basic arithmetic operations and no control-flow constructs other than "if" and "while" blocks. While these limitations make writing real applications in this language impractical, it helps the compiler remain compact and simple. |
|||
All [[Constant (computer programming)|constants]] and [[Variable (computer science)|variables]] used must be declared explicitly. |
|||
The only [[data type]]s are [[Integer (computer science)|integers]]. The only operators are arithmetic and comparison operators. There is an <code>odd</code> function that tests whether the argument is odd. |
|||
In the original implementation presented by Wirth, there are no [[Input/output|input and output]] routines. The compiler prints the value as a given variable changes. So the program: |
|||
<syntaxhighlight lang="pascal"> |
|||
var i, s; |
|||
begin |
|||
i := 0; s := 0; |
|||
while i < 5 do |
|||
begin |
|||
i := i + 1; |
|||
s := s + i * i |
|||
end |
|||
end. |
|||
</syntaxhighlight> |
|||
gives the output: |
|||
<pre> |
|||
0 |
|||
0 |
|||
1 |
|||
1 |
|||
2 |
|||
5 |
|||
3 |
|||
14 |
|||
4 |
|||
30 |
|||
5 |
|||
55 |
|||
</pre> |
|||
However, most implementations have single input and single output routines. |
|||
[[Control flow|Flow control structures]] are <code>[[Conditional (computer programming)|if-then]]</code> and <code>[[While loop|while-do]]</code> constructs and user-defined [[Function (computer programming)|procedures]]. Procedures cannot accept parameters. |
|||
==Grammar== |
==Grammar== |
||
The following is the syntax rules of the model language defined in [[ |
The following is the syntax rules of the model language defined in [[extended Backus–Naur form|EBNF]]: |
||
< |
<syntaxhighlight lang="ebnf"> |
||
program = block "." |
program = block "." ; |
||
block = [ "const" ident "=" number {"," ident "=" number} ";"] |
block = [ "const" ident "=" number {"," ident "=" number} ";"] |
||
[ "var" ident {"," ident} ";"] |
[ "var" ident {"," ident} ";"] |
||
{ "procedure" ident ";" block ";" } statement |
{ "procedure" ident ";" block ";" } statement ; |
||
statement = [ ident ":=" expression | "call" ident |
statement = [ ident ":=" expression | "call" ident |
||
Line 17: | Line 53: | ||
| "begin" statement {";" statement } "end" |
| "begin" statement {";" statement } "end" |
||
| "if" condition "then" statement |
| "if" condition "then" statement |
||
| "while" condition "do" statement ] |
| "while" condition "do" statement ]; |
||
condition = "odd" expression | |
condition = "odd" expression | |
||
expression ("="|"#"|"<"|"<="|">"|">=") expression |
expression ("="|"#"|"<"|"<="|">"|">=") expression ; |
||
expression = [ "+"|"-"] term { ("+"|"-") term} |
expression = [ "+"|"-"] term { ("+"|"-") term}; |
||
term = factor {("*"|"/") factor} |
term = factor {("*"|"/") factor}; |
||
factor = ident | number | "(" expression ")" |
factor = ident | number | "(" expression ")"; |
||
</syntaxhighlight> |
|||
</source> |
|||
It is rather easy for students to write a [[recursive descent parser]] for such a simple syntax. Therefore, the PL/0 compiler is still widely used in courses on compiler construction throughout the world. Due to the lack of features in the original specification, students usually spend most of their time with extending the language and their compiler. They usually start with introducing < |
It is rather easy for students to write a [[recursive descent parser]] for such a simple syntax. Therefore, the PL/0 compiler is still widely used in courses on compiler construction throughout the world. Due to the lack of features in the original specification, students usually spend most of their time with extending the language and their compiler. They usually start with introducing <code>REPEAT .. UNTIL</code> and continue with more advanced features like parameter passing to procedures or data structures like arrays, strings or floating point numbers. |
||
==Use in education== |
==Use in education== |
||
The main article on [[compiler]]s honours PL/0 for introducing several influential concepts (stepwise refinement, recursive descent parsing, EBNF, P-code, T-diagrams) to the field by educating students to use these concepts. Over the last 3 decades, most university courses on compiler construction that used PL/0 have followed Wirth strictly in employing these techniques (see references below). Some years ago university courses |
The main article on [[compiler]]s honours PL/0{{Citation needed|reason=No mention of PL/0 in that article|date=November 2022}} for introducing several influential concepts (stepwise refinement, recursive descent parsing, EBNF, P-code, T-diagrams) to the field by educating students to use these concepts. Over the last 3 decades, most university courses on compiler construction that used PL/0 have followed Wirth strictly in employing these techniques (see references below). Some years ago university courses deviated from the course set by Wirth with the replacement of the classical recursive descent parsing technique by a (nonetheless classical) Unix-like approach of employing [[Lex (software)|lex]] and [[yacc]]. Only recently an implementation ([https://programming.dojo.net.nz/study/pl0-language-tools/index PL/0 Language Tools]) along this way has also combined modern concepts like object-orientation and design patterns with a modern scripting language ([[Python (programming language)|Python]]), allowing students to consume the source text of the implementation in a contemporary programming style. |
||
==Compiler construction== |
==Compiler construction== |
||
In December 1976, Wirth wrote a small booklet about compiler construction, containing the full source code of the PL/0 compiler. The syntax rules above were taken from this first edition of Wirth's book ''Compilerbau''.<ref name="Wirth, 1986">Wirth, 1986</ref> In later editions of this book (under the influence of his ongoing research) Wirth changed the syntax of PL/0. He changed the spelling of keywords like < |
In December 1976, Wirth wrote a small booklet about compiler construction, containing the full source code of the PL/0 compiler. The syntax rules above were taken from this first edition of Wirth's book ''Compilerbau''.<ref name="Wirth, 1986">Wirth, 1986</ref> In later editions of this book (under the influence of his ongoing research) Wirth changed the syntax of PL/0. He changed the spelling of keywords like <code>const</code> and <code>procedure</code> to uppercase. This change made PL/0 resemble [[Modula-2]] more closely. At the same time, Wirth's friend and collaborator [[C. A. R. Hoare]] was working on his influential [[communicating sequential processes]] concept, which used the exclamation mark ''!'' and the question mark ''?'' to denote communication primitives. Wirth added both symbols to the PL/0 language, but he did not mention their semantics in the book. |
||
==Examples== |
==Examples== |
||
The following example is taken from such an extended language called PL/0E.<ref>[http://www.ntecs.de/old-hp/uu9r/lang/html/pl0.en.html PL/0E]</ref> |
|||
This program<ref>[http://www.ntecs.de/old-hp/uu9r/lang/html/pl0.en.html PL/0] {{webarchive|url=https://web.archive.org/web/20120221073635/http://www.ntecs.de/old-hp/uu9r/lang/html/pl0.en.html|date=2012-02-21}}</ref> outputs the squares of numbers from 1 to 10. Most courses in compiler construction today have replaced the exclamation mark with the <code>WriteLn</code> procedure. |
|||
<source lang="pli"> |
|||
<syntaxhighlight lang="pascal"> |
|||
VAR x, squ; |
VAR x, squ; |
||
Line 57: | Line 93: | ||
END |
END |
||
END. |
END. |
||
</syntaxhighlight> |
|||
</source> |
|||
This program |
This following program prints the prime numbers from 1 to 100. The write statement corresponds to '!' statement in the EBNF syntax above. |
||
<syntaxhighlight lang="pascal"> |
|||
The following example was taken from the second edition of Wirth's book Compilerbau,<ref name="Wirth, 1986"/> which appeared in 1986 in Germany. |
|||
const max = 100; |
|||
var arg, ret; |
|||
procedure isprime; |
|||
<source lang="pascal"> |
|||
var i; |
|||
CONST |
|||
begin |
|||
m = 7, |
|||
ret := 1; |
|||
i := 2; |
|||
while i < arg do |
|||
begin |
|||
if arg / i * i = arg then |
|||
begin |
|||
ret := 0; |
|||
i := arg |
|||
end; |
|||
i := i + 1 |
|||
end |
|||
end; |
|||
procedure primes; |
|||
VAR |
|||
begin |
|||
x, y, z, q, r; |
|||
arg := 2; |
|||
while arg < max do |
|||
begin |
|||
call isprime; |
|||
if ret = 1 then write arg; |
|||
arg := arg + 1 |
|||
end |
|||
end; |
|||
call primes |
|||
. |
|||
</syntaxhighlight> |
|||
The following example was taken from the second edition of Wirth's book Compilerbau,<ref name="Wirth, 1986"/> which appeared in 1986 in Germany. |
|||
<syntaxhighlight lang="pascal"> |
|||
VAR x, y, z, q, r, n, f; |
|||
PROCEDURE multiply; |
PROCEDURE multiply; |
||
VAR a, b; |
VAR a, b; |
||
BEGIN |
BEGIN |
||
a := x; |
a := x; |
||
b := y; |
b := y; |
||
z := 0; |
z := 0; |
||
WHILE b > 0 DO BEGIN |
WHILE b > 0 DO |
||
BEGIN |
|||
IF ODD b THEN z := z + a; |
IF ODD b THEN z := z + a; |
||
a := 2 * a; |
a := 2 * a; |
||
Line 92: | Line 158: | ||
w := y; |
w := y; |
||
WHILE w <= r DO w := 2 * w; |
WHILE w <= r DO w := 2 * w; |
||
WHILE w > y DO BEGIN |
WHILE w > y DO |
||
BEGIN |
|||
q := 2 * q; |
q := 2 * q; |
||
w := w / 2; |
w := w / 2; |
||
IF w <= r THEN BEGIN |
IF w <= r THEN |
||
BEGIN |
|||
r := r - w; |
r := r - w; |
||
q := q + 1 |
q := q + 1 |
||
Line 107: | Line 175: | ||
f := x; |
f := x; |
||
g := y; |
g := y; |
||
WHILE f # g DO BEGIN |
WHILE f # g DO |
||
BEGIN |
|||
IF f < g THEN g := g - f; |
IF f < g THEN g := g - f; |
||
IF g < f THEN f := f - g |
IF g < f THEN f := f - g |
||
END; |
END; |
||
z := f |
z := f |
||
END; |
|||
PROCEDURE fact; |
|||
BEGIN |
|||
IF n > 1 THEN |
|||
BEGIN |
|||
f := n * f; |
|||
n := n - 1; |
|||
CALL fact |
|||
END |
|||
END; |
END; |
||
BEGIN |
BEGIN |
||
x |
?x; ?y; CALL multiply; !z; |
||
?x; ?y; CALL divide; !q; !r; |
|||
y := n; |
|||
CALL |
?x; ?y; CALL gcd; !z; |
||
?n; f := 1; CALL fact; !f |
|||
y := 3; |
|||
CALL divide; |
|||
x := 84; |
|||
y := 36; |
|||
CALL gcd |
|||
END. |
END. |
||
</syntaxhighlight> |
|||
</source> |
|||
==Oberon-0== |
==Oberon-0== |
||
In the third and last edition of his book on compiler construction, Wirth replaced PL/0 with Oberon-0. The |
In the third and last edition of his book on compiler construction, Wirth replaced PL/0 with [[Oberon (programming language)|Oberon-0]]. The language Oberon-0 is much more complex than PL/0. For example, Oberon-0 offers arrays, records, type declarations and procedure parameters. The publisher of Wirth's books (Addison-Wesley) has decided to phase out all his books, but Wirth has published revised editions of his book beginning in 2004.<ref>The [http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf revised third edition] {{Webarchive|url=https://web.archive.org/web/20170217071020/http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf |date=2017-02-17 }} (2005) of ''Compiler Construction'', Niklaus Wirth, 1996, {{ISBN|0-201-40353-6}} has never seen the printing press, but it is available online.</ref> {{As of|2017|August}}, the most recent revision available is from May 2017.<ref>{{cite web|title=Compiler Construction|first=Niklaus|last=Wirth|author-link=Niklaus Wirth|date=2017-05-28|access-date=2017-08-25|url=https://www.inf.ethz.ch/personal/wirth/CompilerConstruction/}}</ref><ref>{{cite web|title=news.txt|first=Niklaus|last=Wirth|author-link=Niklaus Wirth|date=2017-08-18|access-date=2017-08-25|archive-date=2017-08-25|archive-url=https://web.archive.org/web/20170825151832/https://www.inf.ethz.ch/personal/wirth/news.txt|url=https://www.inf.ethz.ch/personal/wirth/news.txt}}</ref> |
||
== See also == |
== See also == |
||
*[[P-code machine]] |
*[[P-code machine]] |
||
*[[City & Guilds Mnemonic Code]] |
|||
==Notes== |
==Notes== |
||
Line 142: | Line 217: | ||
==References== |
==References== |
||
{{refbegin}} |
{{refbegin}} |
||
* Liffick, Blaise W., Ed (1979), ''The Byte Book of Pascal'', ISBN |
* Liffick, Blaise W., Ed (1979), ''The Byte Book of Pascal'', {{ISBN|0-07-037823-1}} |
||
* Wirth, Niklaus (1975), [http://www.inf.ethz.ch/personal/wirth/books/AlgorithmE0/ ''Algorithms + Data Structures = Programs''], ISBN |
* Wirth, Niklaus (1975), [https://web.archive.org/web/20130207170133/http://www.inf.ethz.ch/personal/wirth/books/AlgorithmE0/ ''Algorithms + Data Structures = Programs''], {{ISBN|0-13-022418-9}} |
||
* Wirth, Niklaus (1986), [http://www.inf.ethz.ch/personal/wirth/books/Compilerbau0/ ''Compilerbau''], B.G. Teubner, Stuttgart ISBN |
* Wirth, Niklaus (1986), [https://web.archive.org/web/20120603011556/http://www.inf.ethz.ch/personal/wirth/books/Compilerbau0/ ''Compilerbau''], B.G. Teubner, Stuttgart {{ISBN|3-519-32338-9}} |
||
{{refend}} |
{{refend}} |
||
==External links== |
==External links== |
||
*The [http://www. |
*The [http://www.standardpascaline.org/plzero.pas compiler (.pas file)] from the first edition of the ''Compilerbau'' book, written in [[Pascal (programming language)|Pascal]] |
||
* [http://pascal.hansotten.com/niklaus-wirth/pl0/ Another copy of the compiler] at Pascal for small machines site |
|||
*The [[P-code machine#Example machine|interpreter]] from "Algorithms + Data Structures = Programs" book, written in [[Pascal (programming language)|Pascal]] |
*The [[P-code machine#Example machine|interpreter]] from "Algorithms + Data Structures = Programs" book, written in [[Pascal (programming language)|Pascal]] |
||
*Development of a [http://fruttenboel.verhoeven272.nl/m4m/index.html PL/0 style compiler] based on 'Compiler construction' written in Mocka (Modula-2 for Linux) |
*Development of a [http://fruttenboel.verhoeven272.nl/m4m/index.html PL/0 style compiler] based on 'Compiler construction' written in Mocka (Modula-2 for Linux) |
||
*A paper explaining the use of [ |
*A paper explaining the use of [https://web.archive.org/web/20120717010607/http://www.cs.rochester.edu/courses/254/PLzero/guide.pdf PL/0 at the University of Rochester] |
||
*The homepage of the PL/0 reference book, "Algorithms + Data Structures = Programs" [http://www.inf.ethz.ch/personal/wirth/books/AlgorithmE0/] |
*The homepage of the PL/0 reference book, "Algorithms + Data Structures = Programs" [https://web.archive.org/web/20130207170133/http://www.inf.ethz.ch/personal/wirth/books/AlgorithmE0/] |
||
*http://sourceforge.net/projects/pl0-compiler (written in C/C++, uses QT framework) |
*http://sourceforge.net/projects/pl0-compiler (written in C/C++, uses QT framework) |
||
*https:// |
*https://modernc.org/pl0 (written in Go, runs in terminal, cross platform) |
||
*https://github.com/dodobyte/plzero (a very small compiler produces windows executable) |
|||
*https://github.com/MarcRochkind/pl0compiler (compiler for IBM 701 written in C; generates 701 assembler) |
|||
* [http://rosettacode.org/wiki/Category:PL/0 Category:PL/0] Tasks implemented in PL/0 on [http://rosettacode.org rosettacode.org] |
|||
{{DEFAULTSORT:Pl 0}} |
{{DEFAULTSORT:Pl 0}} |
||
[[Category: |
[[Category:Pascal programming language family]] |
||
[[Category:Procedural programming languages]] |
[[Category:Procedural programming languages]] |
||
[[Category:Structured programming languages]] |
[[Category:Structured programming languages]] |
Latest revision as of 17:59, 13 August 2024
PL/0 is a programming language, intended as an educational programming language, that is similar to but much simpler than Pascal, a general-purpose programming language. It serves as an example of how to construct a compiler. It was originally introduced in the book, Algorithms + Data Structures = Programs, by Niklaus Wirth in 1976. It features quite limited language constructs: there are no real numbers, very few basic arithmetic operations and no control-flow constructs other than "if" and "while" blocks. While these limitations make writing real applications in this language impractical, it helps the compiler remain compact and simple.
Eigenschaften
[edit]All constants and variables used must be declared explicitly.
The only data types are integers. The only operators are arithmetic and comparison operators. There is an odd
function that tests whether the argument is odd.
In the original implementation presented by Wirth, there are no input and output routines. The compiler prints the value as a given variable changes. So the program:
var i, s;
begin
i := 0; s := 0;
while i < 5 do
begin
i := i + 1;
s := s + i * i
end
end.
gives the output:
0 0 1 1 2 5 3 14 4 30 5 55
However, most implementations have single input and single output routines.
Flow control structures are if-then
and while-do
constructs and user-defined procedures. Procedures cannot accept parameters.
Grammar
[edit]The following is the syntax rules of the model language defined 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 ")";
It is rather easy for students to write a recursive descent parser for such a simple syntax. Therefore, the PL/0 compiler is still widely used in courses on compiler construction throughout the world. Due to the lack of features in the original specification, students usually spend most of their time with extending the language and their compiler. They usually start with introducing REPEAT .. UNTIL
and continue with more advanced features like parameter passing to procedures or data structures like arrays, strings or floating point numbers.
Use in education
[edit]The main article on compilers honours PL/0[citation needed] for introducing several influential concepts (stepwise refinement, recursive descent parsing, EBNF, P-code, T-diagrams) to the field by educating students to use these concepts. Over the last 3 decades, most university courses on compiler construction that used PL/0 have followed Wirth strictly in employing these techniques (see references below). Some years ago university courses deviated from the course set by Wirth with the replacement of the classical recursive descent parsing technique by a (nonetheless classical) Unix-like approach of employing lex and yacc. Only recently an implementation (PL/0 Language Tools) along this way has also combined modern concepts like object-orientation and design patterns with a modern scripting language (Python), allowing students to consume the source text of the implementation in a contemporary programming style.
Compiler construction
[edit]In December 1976, Wirth wrote a small booklet about compiler construction, containing the full source code of the PL/0 compiler. The syntax rules above were taken from this first edition of Wirth's book Compilerbau.[1] In later editions of this book (under the influence of his ongoing research) Wirth changed the syntax of PL/0. He changed the spelling of keywords like const
and procedure
to uppercase. This change made PL/0 resemble Modula-2 more closely. At the same time, Wirth's friend and collaborator C. A. R. Hoare was working on his influential communicating sequential processes concept, which used the exclamation mark ! and the question mark ? to denote communication primitives. Wirth added both symbols to the PL/0 language, but he did not mention their semantics in the book.
Examples
[edit]This program[2] outputs the squares of numbers from 1 to 10. Most courses in compiler construction today have replaced the exclamation mark with the WriteLn
procedure.
VAR x, squ;
PROCEDURE square;
BEGIN
squ:= x * x
END;
BEGIN
x := 1;
WHILE x <= 10 DO
BEGIN
CALL square;
! squ;
x := x + 1
END
END.
This following program prints the prime numbers from 1 to 100. The write statement corresponds to '!' statement in the EBNF syntax above.
const max = 100;
var arg, ret;
procedure isprime;
var i;
begin
ret := 1;
i := 2;
while i < arg do
begin
if arg / i * i = arg then
begin
ret := 0;
i := arg
end;
i := i + 1
end
end;
procedure primes;
begin
arg := 2;
while arg < max do
begin
call isprime;
if ret = 1 then write arg;
arg := arg + 1
end
end;
call primes
.
The following example was taken from the second edition of Wirth's book Compilerbau,[1] which appeared in 1986 in Germany.
VAR x, y, z, q, r, n, f;
PROCEDURE multiply;
VAR a, b;
BEGIN
a := x;
b := y;
z := 0;
WHILE b > 0 DO
BEGIN
IF ODD b THEN z := z + a;
a := 2 * a;
b := b / 2
END
END;
PROCEDURE divide;
VAR w;
BEGIN
r := x;
q := 0;
w := y;
WHILE w <= r DO w := 2 * w;
WHILE w > y DO
BEGIN
q := 2 * q;
w := w / 2;
IF w <= r THEN
BEGIN
r := r - w;
q := q + 1
END
END
END;
PROCEDURE gcd;
VAR f, g;
BEGIN
f := x;
g := y;
WHILE f # g DO
BEGIN
IF f < g THEN g := g - f;
IF g < f THEN f := f - g
END;
z := f
END;
PROCEDURE fact;
BEGIN
IF n > 1 THEN
BEGIN
f := n * f;
n := n - 1;
CALL fact
END
END;
BEGIN
?x; ?y; CALL multiply; !z;
?x; ?y; CALL divide; !q; !r;
?x; ?y; CALL gcd; !z;
?n; f := 1; CALL fact; !f
END.
Oberon-0
[edit]In the third and last edition of his book on compiler construction, Wirth replaced PL/0 with Oberon-0. The language Oberon-0 is much more complex than PL/0. For example, Oberon-0 offers arrays, records, type declarations and procedure parameters. The publisher of Wirth's books (Addison-Wesley) has decided to phase out all his books, but Wirth has published revised editions of his book beginning in 2004.[3] As of August 2017[update], the most recent revision available is from May 2017.[4][5]
See also
[edit]Notes
[edit]- ^ a b Wirth, 1986
- ^ PL/0 Archived 2012-02-21 at the Wayback Machine
- ^ The revised third edition Archived 2017-02-17 at the Wayback Machine (2005) of Compiler Construction, Niklaus Wirth, 1996, ISBN 0-201-40353-6 has never seen the printing press, but it is available online.
- ^ Wirth, Niklaus (2017-05-28). "Compiler Construction". Retrieved 2017-08-25.
- ^ Wirth, Niklaus (2017-08-18). "news.txt". Archived from the original on 2017-08-25. Retrieved 2017-08-25.
References
[edit]- Liffick, Blaise W., Ed (1979), The Byte Book of Pascal, ISBN 0-07-037823-1
- Wirth, Niklaus (1975), Algorithms + Data Structures = Programs, ISBN 0-13-022418-9
- Wirth, Niklaus (1986), Compilerbau, B.G. Teubner, Stuttgart ISBN 3-519-32338-9
External links
[edit]- The compiler (.pas file) from the first edition of the Compilerbau book, written in Pascal
- Another copy of the compiler at Pascal for small machines site
- The interpreter from "Algorithms + Data Structures = Programs" book, written in Pascal
- Development of a PL/0 style compiler based on 'Compiler construction' written in Mocka (Modula-2 for Linux)
- A paper explaining the use of PL/0 at the University of Rochester
- The homepage of the PL/0 reference book, "Algorithms + Data Structures = Programs" [1]
- http://sourceforge.net/projects/pl0-compiler (written in C/C++, uses QT framework)
- https://modernc.org/pl0 (written in Go, runs in terminal, cross platform)
- https://github.com/dodobyte/plzero (a very small compiler produces windows executable)
- https://github.com/MarcRochkind/pl0compiler (compiler for IBM 701 written in C; generates 701 assembler)
- Category:PL/0 Tasks implemented in PL/0 on rosettacode.org