chomik.tech

chomik_compiler

Please take the chomik compiler project chomik_compiler-0.0.2.tar.gz. (It has just been started and is far from being finished!) It requires LLVM (https://www.llvm.org/).

Configure it, make it and install just as any other autotools project. Then go the the src folder and type:


chomik_compiler t.chomik

It will produce an object file a.o in the tests folder. Then go to the tests folder and make all. It will compile mytest.cc file and link it against the a.o produced by my compiler.

If everything went well then you will be able to execute mytest in the tests folder:


./mytest

It should print out something like the below text:

start
creating a machine 0x1b3786c0
created 0x1b3786c0
now delete 0x1b3786c0
destroying a machine

Feel free to dig in the chomik compiler code!