Me and my colleague, Nicole Freites, wrote a compiler for the PL/0 language. In this assignment me and my colleague implemented a lexical analyzer for the programming language PL/0. Our program is capable to read in a source program written in PL/0, identify some errors, and produce, as output, the source program, the source program lexeme table, and a list of lexemes.
To compile code from command line: gcc lexicalAnalyzer.c
To run the program: ./a.out INSERT_FILENAME_HERE.txt
- Make sure you insert your preferred input.txt file where it says INSERT_FILENAME_HERE.txt
The output will print directly to the terminal.
If there is a comment, starting with /*, that has no end */, then nothing will print.
Nicole Freites