Next: Overview of Generated Names
Up: Output
Previous: Predefined Phyla and Operators
File Names, Preprocessor Symbols and Redirection
The system generates at least 5 .c files and 5 .h files from its input.
In particular, for each input file.k, a file.c and a file.h
is generated that contain the functions defined in that input file.
If there is no file argument, Kimwitu reads from standard input and
file then takes the value stdin.
The names of the generated files, and their include structure are given in the following table.
Each .c file also defines a distinguished symbol.
File |
Includes |
Distinguished Symbol |
k.h |
|
KC_TYPES_HEADER |
k.c |
k.h |
KC_TYPES |
file.h |
|
KC_FUNCTIONS_ file_HEADER |
file.c |
k.h file.h |
KC_FUNCTIONS_ file |
rk.c |
k.h rk.h |
KC_REWRITE |
unpk.c |
k.h unpk.h |
KC_UNPARSE |
csgiok.c |
k.h csgiok.h |
KC_CSGIO |
The distinguished symbols can also be used as redirection symbols, as in:
%{ KC_REWRITE
#include "my_fns.h"
%}
Additionally one can use the shorthands from the following table.
Redirection Symbol |
File |
HEADER |
file.h |
CODE |
file.c |
/*empty*/ |
file.c |
The use of distinguished symbols is further illustrated in Section 1.8.
Next: Overview of Generated Names
Up: Output
Previous: Predefined Phyla and Operators
2000-04-17