Skip to content
No description, website, or topics provided.
C C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.gitignore
Makefile
README.md
analyzer.c
analyzer.h
arena.c
arena.h
asm_x86_64.c
asm_x86_64.h
cc.c
cc.h
ir.c
ir.h
ir_bb.c
ir_bb.h
ir_bb_arena.c
ir_bb_arena.h
ir_inst.c
ir_inst.h
ir_inst_defs.h
lexer.c
lexer.h
log.h
main.c
map.c
map.h
node.c
node.h
node_arena.c
node_arena.h
parser.c
parser.h
token.c
token.h
type.c
type.h
type_arena.c
type_arena.h
vector.c
vector.h

README.md

cc

cc is a C compiler for my study purpose. A aim of this project is to create a C compiler which is modularized, no memory leaks, easy to modify codes and able to self hosting! Currently, highly work in progress.

This compiler has 5 phases to generate an assembly.

  • Lexing
  • Parsing
  • Analyzing
  • IR generating
  • ASM generating

How to build

> make

How to use

> ./cc examples/simple_00.c

Currently, a name of the generated executable is fixed to a.out.

> ./a.out
Hello world

Author

@yutopp

You can’t perform that action at this time.