Skip to content

leok7v/c4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c4 - C in four functions

An exercise in minimalism.

Try the following:

gcc -o c4 c4.c
./c4 hello.c
./c4 -s hello.c

./c4 c4.c hello.c
./c4 c4.c c4.c hello.c

cx - C compiler

An exercise in minimalism. More C89/C99 like features.

Try the following (If your system does not have "cx" use clang or gcc instead):

mkdir -p build
cc -o build/cx cx.c
./build/cx hello.c
./build/cx -s hello.c

./build/cx cx.c hello.c
./build/cx cx.c cx.c hello.c
./build/cx cx.c cx.c tests/all.c

Command Line Options

-s      dump source and assembly
-d      dump debug execution trace
--      end of options (pass remaining arguments to script)

Run tests:

./build/cx tests/all.c

Documentation

  • LANGUAGE.md - EBNF grammar and supported C99 features

About

C in four functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 100.0%