forked from bobrippling/ucc-c-compiler
fuel-pcbox/ucc-c-compiler
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
It should be fairly obvious what this program does It doesn't use system include files nor libraries yet, just some simple ones in lib/ Requirements ======================== nasm (I have version 2.09.10, not sure what the lowest required is) ld (any form should be fine) Obviously you need a compiler to compiler this compiler with. Compiling (the compiler) ======================== ./configure [--nasm=path/to/nasm] make Compiling C files ================= Pretty much the standard args I haven't made an install make target yet, ucc finds libraries + includes locally All programs compiled by ucc are staticly linked. Major C-Features Todo ============= floating point numbers, long + short types (asm_backend_recode branch) Examples ======== ./ucc -o hello hello.c - preprocess, compile, assemble and link hello.c into hello ./ucc -o- -S test.c - output assmebly code for test.c ./ucc -o- -S -Xprint test.c - show the abstract parse tree with type annotation and stack offsets, etc ./ucc -c test.c - (preprocess) compile and assemble test.c -> test.o ./ucc -c test.s - assemble test.s -> test.o (preprocessing and compilation are skipped) ./ucc -fenglish -Xprint -o- test.c - (-fenglish) show the abstract parse tree with output decls in english e.g.: int *(*const (*x)(void))(int); becomes: "x": pointer to function(taking no arguments) returning const pointer to function(int) returning pointer to int ./ucc test.c a.o -o out b.a - preprocess + compile test.c, and link with a.o and b.a to form the executable out ./ucc a.o b.c -E - preprocess b.c - a.o is ignored since it's not linked with
About
A simple C compiler
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published