Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 1.21 KB

README.md

File metadata and controls

63 lines (42 loc) · 1.21 KB

MiniC-Compiler

MiniC Compiler use flex & bison/yacc and C.

The component of Compiler

  1. Ucode interpreter
  2. Lexical Analyzer
  3. Parser
  4. 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

  1. Palindrome (pal.mc)

  1. Bubble Sort (bubble.mc)

  1. Factorial (factorial.mc)

  1. Select number (select.mc)

  1. Selection Sort (selection_sort.mc)