ZhiHanZ / c-to-mips-compiler

C to MIPS Assembly Compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

c-to-mips-compiler

Compiles C code into MIPS Assembly. Source code is in the wjw13 folder

Takes in C code on stdin, spits out MIPS Assembly on stdout

Developed with good old Flex and Bison

Usage

cd c-to-mips-compiler/wjw13/ && make builds the project

cd bin && cat test1.c | ./c_compiler for an example usage

You should now see some generated MIPS assembly code

  .text
  .align 2
  .globl main
  .ent    main
  .type main,@function

About

C to MIPS Assembly Compiler


Languages

Language:C 41.9%Language:C++ 28.9%Language:OCaml 11.8%Language:Yacc 6.8%Language:Lex 5.3%Language:Assembly 4.2%Language:Makefile 0.9%Language:Shell 0.2%Language:Standard ML 0.0%