KC(1) | General Commands Manual | KC(1) |
kc - generate C code from Kimwitu input
kc [ file.k ... ]
kc --version
kc reads the abstract syntax definition, function definitions, rewrite rules and unparse rules from the files given on the command line, or from the standard input if no file arguments were given, and generates for each file.k input file a pair of file.c and a file.h files that contain the translation of the functions defined in the corresponding file.k, in addition to the files that are always generated: csgiok.[ch], rk.[ch] and unpk.[ch] files, that contain respectively the CSGIO-, the rewrite- and the unparse-functions, and the k.c and k.h files that contain the grammar tables and the remaining `default' functions. If no command line file arguments are given, the translation of the user-defined functions will be generated in stdin.[ch] files.
kc does not unnecessarily overwrite a file: if a file would be overwritten with its own (identical) contents, it will not be touched. This makes it easy to write an efficient Makefile.
If an error is encountered in the Kimwitu input, an apropriate error message will be written on standard error, code generation will be suppressed and a non-zero exit value will be returned. The error messages should be self-explanatory.
Axel Belinfante, University of Twente, the Netherlands.
By Email: <kimwitu@cs.utwente.nl>
This manual page documents kc V3_* and newer.
May 13, 1996 |