The idea of this project is to show some steps that the compiler does, for example create a symbol table with the occurrences and a token flow.
- Go 1.11 - This project uses go modules as a package manager, so you need to use at least Go 1.11 for development mode.
Development mode
mkdir results
go run main.go [path/to/the/file]
Teacher Mode - As it is an University project, and to avoid the need of installing GoLang locally, I am sending the binaries to the most common OS
Just run in your command line:
mkdir results
executable/lexicalAnalysis-[your-OS] [path/to/the/file]
Example:
executable/lexicalAnalysis-Windows-Intel.exe examples/math/simple.txt
It will generate 2 new files that you can find at results
:
symbolTable_[youFileName]
tokenFlow_[youFileName]
PS: We are facing some problems with LF and CRLF files with Notepad for breaking lines, so we higlhy encourage the usage of another text file editor (Eg. Notepad++).