Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A lightweight compiler for a subset of the C language, featuring lexical analysis, recursive descent parsing, symbol table management, and intermediate code generation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages