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 166 167 168 169 170 171 172 173 174 175 176 177
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>CKitLibrary</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">
<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>CKitLibrary</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>The <a href="http://www.smlnj.org/doc/ckit">ckit Library</a> is a C front end
written in SML that translates C source code (after preprocessing)
into abstract syntax represented as a set of SML datatypes. The ckit
Library is distributed with SML/NJ. Due to differences between SML/NJ
and MLton, this library will not work out-of-the box with MLton.</p></div>
<div class="paragraph"><p>As of 20130706, MLton includes a port of the ckit Library synchronized
with SML/NJ version 110.76.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_usage">Usage</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
You can import the ckit Library into an MLB file with:
</p>
<table class="tableblock frame-all grid-all"
style="
width:100%;
">
<col style="width:50%;">
<col style="width:50%;">
<thead>
<tr>
<th class="tableblock halign-left valign-top" >MLB file</th>
<th class="tableblock halign-left valign-top" >Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span></p></td>
<td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
</tr>
</tbody>
</table>
</li>
<li>
<p>
If you are porting a project from SML/NJ’s <a href="CompilationManager">CompilationManager</a> to
MLton’s <a href="MLBasis"> ML Basis system</a> using <span class="monospaced">cm2mlb</span>, note that the
following map is included by default:
</p>
<div class="listingblock">
<div class="content monospaced">
<pre># ckit Library
$ckit-lib.cm $(SML_LIB)/ckit-lib
$ckit-lib.cm/ckit-lib.cm $(SML_LIB)/ckit-lib/ckit-lib.mlb</pre>
</div></div>
<div class="paragraph"><p>This will automatically convert a <span class="monospaced">$/ckit-lib.cm</span> import in an input
<span class="monospaced">.cm</span> file into a <span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span> import in the
output <span class="monospaced">.mlb</span> file.</p></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_details">Details</h2>
<div class="sectionbody">
<div class="paragraph"><p>The following changes were made to the ckit Library, in addition to
deriving the <span class="monospaced">.mlb</span> file from the <span class="monospaced">.cm</span> file:</p></div>
<div class="ulist"><ul>
<li>
<p>
<span class="monospaced">ast/ast-sig.sml</span> (modified): Rewrote use of <span class="monospaced">withtype</span> in signature.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/build-ast.sml</span> (modified): Rewrote use of or-patterns.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/initializer-normalizer.sml</span> (modified): Rewrote use of or-patterns.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/pp/pp-ast-adornment-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/pp/pp-ast-ext-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/pp/pp-lib.sml</span> (modified): Rewrote use of or-patterns.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/sizeof.sml</span> (modified): Rewrote use of or-patterns.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/type-util-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
</p>
</li>
<li>
<p>
<span class="monospaced">ast/type-util.sml</span> (modified): Rewrote use of or-patterns.
</p>
</li>
<li>
<p>
<span class="monospaced">parser/grammar/c.lex.sml</span> (modified): Rewrote use of vector literal.
</p>
</li>
<li>
<p>
<span class="monospaced">parser/parse-tree-sig.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span> in signature.
</p>
</li>
<li>
<p>
<span class="monospaced">parser/parse-tree.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span>.
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_patch">Patch</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="https://github.com/MLton/mlton/blob/master/lib/ckit-lib/ckit.patch"><span class="monospaced">ckit.patch</span></a>
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
|