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

CSE 401 Compilers Class

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

Details / Original Lex


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

You might also want to visit the extended lex.


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: 09/29/96)

Netscape-HTML Checked!