Skip to content

biran0079/RanC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RanC Build Status codecov

A self-hosting compiler for a subset of C.

How to use

$ make ranc                      # bootstrap ranc
$ ./ranc > a.s <<EOF             
void printf();
int main() {
  printf("hello world\n");
  return 0;
}
EOF                              # compile C code to assembly
$ gcc -m32 a.s                   # use gcc to assemble and link into binary executable
$ ./a.out                        # run your program

How to test

$ make test

Acknowledge

Many ideas are borrowed from https://github.com/Fedjmike/mini-c.

About

a self-hosting compiler for a subset of C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published