MiniC-Compiler
MiniC Compiler use flex & bison/yacc and C.
The component of Compiler
- Ucode interpreter
- Lexical Analyzer
- reference: a simple game based on finite automata
- Parser
- Intermediate Language Generator
Dependency
- flex
- bison/yacc
Developing Environment
- OS : Ubuntu 16.04 LTS
- Language : C & C++
- Compiler : gcc & g++
How to use
0. Installation
$ git clone https://github.com/KeonHeeLee/MiniC-Compiler
$ cd MiniC-Compiler
$ sudo chmod +0777 setup.sh
$ ./setup.sh
1. Generate Intermediate Language
$ ./minic <Mini-C file(.mc)>
2. Compile '.uco'(ICG) file
$ ./ucodei <ICG file(.uco)>
Demo Snapshots
- Palindrome (pal.mc)
- Bubble Sort (bubble.mc)
- Factorial (factorial.mc)
- Select number (select.mc)
- Selection Sort (selection_sort.mc)