----------------------------------------------------------------------

CSE 401: Compilers

[Home] [Admin] [Details] [Help] [Other]

Details / Original Lex


----------------------------------------------------------------------

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@cs.washington.edu (Last modified: 04/28/98)

Netscape-HTML Checked!