Slide 11
Slide 11 text
Lexer
• Package declaration
• Characters and character sets
– Char, Decimal, Hex, Range, Union, Difference
etc
• Regular Expressions
– line comment = '/' '/' [[0 .. 0xFFFF] - [10 +
13]]* (10 |13 | 10 13)
• Helpers (not macros)
– h = ‘a’ | ‘b’, t = ‘a’ h ‘b’ (t can be “aab”, “abb”,
textual replacement would be a pitfall)
• Tokens with optional lookahead
• States (e.g. bol, inline, incomment)
Aggelos Biboudis 11