But I have broken the assignments into 5 stages and done some extensions in the last stage. You can run the generated assembly of stage 5 and 6 in a 8086 assembly emulator.
- Lexical Analysis
- Adding Grammar Rules
- Syntaxt Analysis | Symbol Table and Parse Tree
- Semantic Analysis
- Code Generation | Generating Assembly Code
- Extension | Covering more syntax
- Install
flex
andbison
using
sudo apt install flex bison
- Install
gcc
using
sudo apt install gcc
- Clone the repo using git clone or download the zip file.
- Go to the directory of the stage you want to run.
- Run the following commands
make run
- After compilation you will be prompted to enter the input file name. Check out the example input files.
- The input file should be
- In the same directory as the stage directory
- Have the syntax supported by this context free grammar
- The output will be generated in the same directory as the stage directory.
- To clean the directory run
make clean
- Lexical Analysis
- Adding Grammar Rules
- Syntax Analysis
- Semantic Analysis
- Code Generation
- Extension
- regexr | regex tester