|
![]() |
![]() |
![]() |
![]() |
This page formally descibes the lexical elements of the base PL/0 language, i.e., PL/0 as implemented by the base compiler distributed to you at the begining of the quarter.
You might also want to visit the extended lex (but this link won't work until after HW#1 is turned in).
Program | ::= | (Token | Whitespace)* |
Token | ::= | Id | Integer | Keyword | Operator | Punctuation |
Punctuation | ::= | ; | : | . | , | ( | ) |
Keyword | ::= |
module | procedure |
begin | end |
const | var | int |
if | then |
while | do | input | output | odd |
Operator | ::= | := | * | / | + | - | = | <> | <= | < | >= | > |
Integer | ::= | Digit+ |
Id | ::= | Letter AlphaNumeric* |
AlphaNumeric | ::= | Letter | Digit |
Digit | ::= | 0 | ... | 9 |
Letter | ::= | a | ... | z | A | ... | Z |
Whitespace | ::= | <space> | <tab> | <newline> |
![]() |
Department of Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to cse401-webmaster] |