|
![]() |
![]() |
![]() |
![]() |
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] |