What is Wonky:
Wonky is supposed to be a c99 compiler. Sadly at the moment it does not compile to machine code, or asm.
What can I do with it?
Nothing interesting at the moment.
You could compile a hello world program to nasm if you use extern int printf(const char *,...) instead
of including stdio ( which wonky can't preprocess at the moment ).
> wonky hello.c > a.asm ; nasm a.asm -f elf64 -o a.o
( then link the thing to some libc )
How to build it:
Use cmake out of the repository, for example /tmp/build
You can compile wonky with make and run tests with make test
How to contibute:
If you have added code or documentation you can send it to me
via email gts@volconst.com
Wonky C99 compiler command line arguments
--print-tokens
prints the tokens after preprocessing
--print-ast
prints 'ast' of the program after parsing
--compile-asm or -asm
outputs asm to stdout. Mostly NOPs and segfaults at the moment.
--compile-nasm or -nasm ( DEFAULT )
outputs nasm to stdout. Its the output of -asm but with things added
to please the nasm assembler.