CPrime online

CPrime is a C compiler that can explicitly instantiate functions.

See github project

One file Disable implicit function tag

ouput

New name

I am looking for a new name for this project and I accept sugestions

About Function tags

Function tag is something that tells what functions does.
It is similar of operator overloading. operator + should do something known.
The known function tags are: init, destroy, create, delete , push, reserve

Automatic function tag

If the option 'Disable implicit function tag' is not checked
then the compiler will tag functions automatically.
If the function name has a suffix (case insensitive) create, init, destroy, delete, reserve, pushback the the function is tagged with the corresponding tag.

Auto qualifier for pointers

The qualifier auto can be added to pointers and it tells to the
compiler that the pointer is the owner of the pointed object.
The generation of destroy and delete is affected.
I also want to use this qualifier to do static analisys in the future.

[Size] qualifier for pointers

A qualifier with [name] can be added to pointers. It tells the compiler
that the pointer is pointing for n items defined by the idenfier name.
Currently it is used only for destroy and delete of auto pointers member of structs.
I also want to use this qualifier to do static analisys in the future.

Especial comments

C' compiler ignores '/*@' and '*/' these two sequences are removed in early phases.
That means that you can transform C' code to C adding it. (see samples)

Lambdas

C' allows lambdas like C++ but without capture.
Normally C' compiler can compile to C with annotations
back to C'. So far, lambda information is lost in C with annotations.