Cecil


Read this file if you want to call some Eiffel features from C code (to call C functions/macros from Eiffel see man/external file).

In order to call some Eiffel feature from C, you must use the -cecil <cecil_file> option with command compile or compile_to_c. The <cecil_file> allow you to give the list of features you want to call from C.
When the -cecil option is used, command compile_to_c produce an additional C heading file which includes the needed C prototypes.

The <cecil_file> must have at least two lines. The first line is the name of the C heading file to produce (it may be useful if you need to create a C library). Other lines have the following structure:

<c_name> <living_type> <feature_name>
The <c_name> is the name of the C function defined by compile_to_c to wrap the Eiffel call. The couple <living_type> <feature_name> gives the complete name of the Eiffel feature to call.

Keep in mind that the <living_type> must be really alive: if <living_type> is ARRAY[INTEGER] for example, your Eiffel program is suppose to create at least one ARRAY[INTEGER]. The name of the feature to call, <feature_name> may be an infix or a prefix feature name (the syntax if the same as the one used in Eiffel source).
As <cecil_file> is parsed by the SmallEiffel parser, it may contains Eiffel comments.

See examples in directory SmallEiffel/lib_show/cecil/example*.

[Line]
Copyright © Dominique COLNET and Suzanne COLLIN - <colnet@loria.fr>
Last update: Saturday November 22, 1997