You might also want to visit the extended lex (but this link won't work until after HW#2 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> |
![]()
401admin at cs.washington.edu (Last modified: 10/02/98)