We created this compiler of the Go language as our semester project for the "Formal Languages and Compilers" course which was the biggest and most difficult coures project during our bachelor's degree. We are proud to say that we received almost full points for it because it is a course that many people fail because of this project.
From a UNIX like terminal run these commands:
make
./ifj20-compiler < input.txt
Lexical analyzer for any finite automata.
Sample FA definition in finite_automata.c sample FA graph drawing in finite_automata_graph.jpg.
Run / Debug configuration should be set to - "CMake Application": Configuration should look like this:
- Target: ifj20_compiler (should be set automatically or should exist in dropdown menu)
- Executable: ifj20_compiler (should be set automatically or should exist in dropdown menu)
- Program arguments: input_files/input_1.txt or any other file in that folder
- Working directory: C:\full path to your project directory\ifj20-compiler or any other file in that folder
- Else remains blank / default
- File -> "Reload CMake Project"
For running in CLion change "Program arguments" setting in "Edit configurations" to input_files/input_name.txt