CD Project Mini GO Compiler (While and Switch statements)
- Generate assembly code
- Lex 2.6.4
- Yacc 1.9 (sudo apt-get install byacc flex)
- python3
- vis.js package
- cd Mini-GO-compiler/Phase1
- lex symbol.l
- gcc lex.yy.c
- ./a.out output.go
- cd Mini-GO-compiler/Phase2
- chmod +x ex.sh
- ./ex.sh (if doesnt work chmod +x ex.sh)
- cd Mini-GO-compiler/Phase4
- chmod +x ex.sh
- ./ex.sh (if doesnt work chmod +x ex.sh)
- outputs has the AST
- three address code in generated
- cd Mini-GO-compiler/Phase5
- chmod +x ex.sh
- ./ex.sh (if doesnt work chmod +x ex.sh)
- AST is found in Output Tree Floder
- Unptimized and Optimized Three address code are generated
- Code Optimization techniques (Constant folding and constant propogation)
- cd Mini-GO-compiler/Phase6
- chmod +x ex.sh
- ./ex.sh (if doesnt work chmod +x ex.sh)
- AST is found in Output Tree Floder
- Unptimized and Optimized Three address code are generated
- Code Optimization techniques (Constant folding and constant propogation)
- Code also displays the assembly code generated (ARM based)
https://drive.google.com/file/d/1XPOOsHY8MwMgSpWuOZyXLKgryM9BA-qx/view?usp=sharing