Tutorial Week 3 |
Introduction. In this week's tutorial we continue with lexical analysis. If you have not finished last week's tutorial exercises, I suggest you try and finish them too. In particular I recommend that you understand last week's Task 3 really well, since ASTs play a key role in compilation. Task 1. Give a complete
lexical specification of (simple) email addresses such as
Task 2. Implement a
lexer that accepts the
language Task 3. Modify your code
from Task 2 so it accepts the language
Task 4. Install the JFlex lexer generator on your machine if it is not already installed. JFlex is a lexer generator that produces fast, industrial strength lexers. We will use it in later tutorials. |