Compiler Design
The repository provides some examples for the compiler design course in Concordia University given by Dr. Joey Paquet.
Lexical Analyser
For the first assignment, you need to implement a lexical analyser. The file lexer.py
implement a lexical analyser
using one of the scanner generator (which the students are not allowed to used). You can run the lexer by the
following command to get an idea of how the scanner work.
python lexer.py input/code.lex
You can find more test file under the input
directory. It takes the file input/code.lex
as input and the tokens
will be output to the screen directly.