PL/0
PL/0 ist eine vereinfachte Programmiersprache. Sie dient als Muster, um im Buch Compilerbau von Niklaus Wirth zu zeigen, wie man einen Compiler herstellt. Die Sprache kann nur mit Zahlenwerten umgehen und ist nicht dazu gedacht, wirklich eingesetzt zu werden. PL/0 ist außerdem eine Untermenge der Programmiersprache PL/I von IBM.
Die Syntaxregeln der Modellsprache 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 ")" .
Weblinks
- Niklaus Wirth: Compiler construction. Addison-Wesley Pub. Co, Harlow, England 1996, ISBN 0-201-40353-6 (überarbeitete Version Zürich, Mai 2017 (englisch, mit der Sprache Oberon-0 statt PL/0) [abgerufen am 12. März 2023]).
- sourceforge.net
- Development of a PL/0 style compiler based on 'Compiler construction' written in Mocka (Modula-2 for Linux)
- Category:PL/0 In PL/0 auf rosettacode.org implementierte Aufgaben
- https://github.com/hindermath/TinyPl0 (Portierung von PL/0 mit Agentic-AI zu .Net10/C# 14 als CLI- und TUI-Apps)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.