1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>File Names, Preprocessor Symbols and Redirection</TITLE>
<META NAME="description" CONTENT="File Names, Preprocessor Symbols and Redirection">
<META NAME="keywords" CONTENT="tpman">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="tpman.css">
<LINK REL="next" HREF="node20.html">
<LINK REL="previous" HREF="node18.html">
<LINK REL="up" HREF="node15.html">
<LINK REL="next" HREF="node20.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html359"
HREF="node20.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html355"
HREF="node15.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html349"
HREF="node18.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html357"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<A NAME="tex2html358"
HREF="node58.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="/usr/share/latex2html/icons/index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html360"
HREF="node20.html">Overview of Generated Names</A>
<B> Up:</B> <A NAME="tex2html356"
HREF="node15.html">Output</A>
<B> Previous:</B> <A NAME="tex2html350"
HREF="node18.html">Predefined Phyla and Operators</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00074000000000000000"> </A>
<A NAME="gen-file"> </A>
<BR>
File Names, Preprocessor Symbols and Redirection
</H2>
The system generates at least 5 <I>.c</I> files and 5 <I>.h</I> files from its input.
In particular, for each input <EM>file</EM><I>.k</I>, a <EM>file</EM><I>.c</I> and a <EM>file</EM><I>.h</I>
is generated that contain the functions defined in that input file.
If there is no file argument, <EM>Kimwitu</EM> reads from standard input and
<EM>file</EM> then takes the value <I>stdin</I>.
The names of the generated files, and their include structure are given in the following table.
Each <I>.c</I> file also defines a distinguished symbol.<A NAME="795"> </A>
<P><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="LEFT">File</TD>
<TD ALIGN="LEFT">Includes</TD>
<TD ALIGN="LEFT">Distinguished Symbol</TD>
</TR>
<TR><TD ALIGN="LEFT">k.h</TD>
<TD ALIGN="LEFT"> </TD>
<TD ALIGN="LEFT">KC_TYPES_HEADER</TD>
</TR>
<TR><TD ALIGN="LEFT">k.c</TD>
<TD ALIGN="LEFT">k.h</TD>
<TD ALIGN="LEFT">KC_TYPES</TD>
</TR>
<TR><TD ALIGN="LEFT"><EM> file</EM>.h</TD>
<TD ALIGN="LEFT"> </TD>
<TD ALIGN="LEFT">KC_FUNCTIONS_<EM> file</EM>_HEADER</TD>
</TR>
<TR><TD ALIGN="LEFT"><EM> file</EM>.c</TD>
<TD ALIGN="LEFT">k.h <EM> file</EM>.h</TD>
<TD ALIGN="LEFT">KC_FUNCTIONS_<EM> file</EM></TD>
</TR>
<TR><TD ALIGN="LEFT">rk.c</TD>
<TD ALIGN="LEFT">k.h rk.h</TD>
<TD ALIGN="LEFT">KC_REWRITE</TD>
</TR>
<TR><TD ALIGN="LEFT">unpk.c</TD>
<TD ALIGN="LEFT">k.h unpk.h</TD>
<TD ALIGN="LEFT">KC_UNPARSE</TD>
</TR>
<TR><TD ALIGN="LEFT">csgiok.c</TD>
<TD ALIGN="LEFT">k.h csgiok.h</TD>
<TD ALIGN="LEFT">KC_CSGIO</TD>
</TR>
</TABLE>
<P>
The distinguished symbols can also be used as redirection symbols, as in:
<PRE><HR><!--lgrindfile: include_redirection_symbol_example.k 14:54 Jul 22 1996-->
%{ KC_REWRITE
<B>#include</B> <code>"my_fns.h"</code>
%}
<HR></PRE>
<P>
Additionally one can use the shorthands from the following table.
<P><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="LEFT">Redirection Symbol</TD>
<TD ALIGN="LEFT">File</TD>
</TR>
<TR><TD ALIGN="LEFT">HEADER</TD>
<TD ALIGN="LEFT"><EM> file</EM>.h</TD>
</TR>
<TR><TD ALIGN="LEFT">CODE</TD>
<TD ALIGN="LEFT"><EM> file</EM>.c</TD>
</TR>
<TR><TD ALIGN="LEFT"><EM> /*empty*/</EM></TD>
<TD ALIGN="LEFT"><EM> file</EM>.c</TD>
</TR>
</TABLE>
<P>
The use of distinguished symbols is further illustrated in Section <A HREF="node14.html#incl-code">1.8</A>.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html359"
HREF="node20.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html355"
HREF="node15.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html349"
HREF="node18.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html357"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<A NAME="tex2html358"
HREF="node58.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="/usr/share/latex2html/icons/index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html360"
HREF="node20.html">Overview of Generated Names</A>
<B> Up:</B> <A NAME="tex2html356"
HREF="node15.html">Output</A>
<B> Previous:</B> <A NAME="tex2html350"
HREF="node18.html">Predefined Phyla and Operators</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I></I>
<BR><I>2000-04-17</I>
</ADDRESS>
</BODY>
</HTML>
|