Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | <!DOCTYPE html>\r |
2 | <html lang="en">\r | |
3 | <head>\r | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r | |
5 | <meta name="generator" content="AsciiDoc 8.6.9">\r | |
6 | <title>CKitLibrary</title>\r | |
7 | <link rel="stylesheet" href="./asciidoc.css" type="text/css">\r | |
8 | <link rel="stylesheet" href="./pygments.css" type="text/css">\r | |
9 | \r | |
10 | \r | |
11 | <script type="text/javascript" src="./asciidoc.js"></script>\r | |
12 | <script type="text/javascript">\r | |
13 | /*<![CDATA[*/\r | |
14 | asciidoc.install();\r | |
15 | /*]]>*/\r | |
16 | </script>\r | |
17 | <link rel="stylesheet" href="./mlton.css" type="text/css">\r | |
18 | </head>\r | |
19 | <body class="article">\r | |
20 | <div id="banner">\r | |
21 | <div id="banner-home">\r | |
22 | <a href="./Home">MLton 20180207</a>\r | |
23 | </div>\r | |
24 | </div>\r | |
25 | <div id="header">\r | |
26 | <h1>CKitLibrary</h1>\r | |
27 | </div>\r | |
28 | <div id="content">\r | |
29 | <div id="preamble">\r | |
30 | <div class="sectionbody">\r | |
31 | <div class="paragraph"><p>The <a href="http://www.smlnj.org/doc/ckit">ckit Library</a> is a C front end\r | |
32 | written in SML that translates C source code (after preprocessing)\r | |
33 | into abstract syntax represented as a set of SML datatypes. The ckit\r | |
34 | Library is distributed with SML/NJ. Due to differences between SML/NJ\r | |
35 | and MLton, this library will not work out-of-the box with MLton.</p></div>\r | |
36 | <div class="paragraph"><p>As of 20180119, MLton includes a port of the ckit Library synchronized\r | |
37 | with SML/NJ version 110.82.</p></div>\r | |
38 | </div>\r | |
39 | </div>\r | |
40 | <div class="sect1">\r | |
41 | <h2 id="_usage">Usage</h2>\r | |
42 | <div class="sectionbody">\r | |
43 | <div class="ulist"><ul>\r | |
44 | <li>\r | |
45 | <p>\r | |
46 | You can import the ckit Library into an MLB file with:\r | |
47 | </p>\r | |
48 | <table class="tableblock frame-all grid-all"\r | |
49 | style="\r | |
50 | width:100%;\r | |
51 | ">\r | |
52 | <col style="width:50%;">\r | |
53 | <col style="width:50%;">\r | |
54 | <thead>\r | |
55 | <tr>\r | |
56 | <th class="tableblock halign-left valign-top" >MLB file</th>\r | |
57 | <th class="tableblock halign-left valign-top" >Description</th>\r | |
58 | </tr>\r | |
59 | </thead>\r | |
60 | <tbody>\r | |
61 | <tr>\r | |
62 | <td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span></p></td>\r | |
63 | <td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>\r | |
64 | </tr>\r | |
65 | </tbody>\r | |
66 | </table>\r | |
67 | </li>\r | |
68 | <li>\r | |
69 | <p>\r | |
70 | If you are porting a project from SML/NJ’s <a href="CompilationManager">CompilationManager</a> to\r | |
71 | MLton’s <a href="MLBasis"> ML Basis system</a> using <span class="monospaced">cm2mlb</span>, note that the\r | |
72 | following map is included by default:\r | |
73 | </p>\r | |
74 | <div class="listingblock">\r | |
75 | <div class="content monospaced">\r | |
76 | <pre># ckit Library\r | |
77 | $ckit-lib.cm $(SML_LIB)/ckit-lib\r | |
78 | $ckit-lib.cm/ckit-lib.cm $(SML_LIB)/ckit-lib/ckit-lib.mlb</pre>\r | |
79 | </div></div>\r | |
80 | <div class="paragraph"><p>This will automatically convert a <span class="monospaced">$/ckit-lib.cm</span> import in an input\r | |
81 | <span class="monospaced">.cm</span> file into a <span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span> import in the\r | |
82 | output <span class="monospaced">.mlb</span> file.</p></div>\r | |
83 | </li>\r | |
84 | </ul></div>\r | |
85 | </div>\r | |
86 | </div>\r | |
87 | <div class="sect1">\r | |
88 | <h2 id="_details">Details</h2>\r | |
89 | <div class="sectionbody">\r | |
90 | <div class="paragraph"><p>The following changes were made to the ckit Library, in addition to\r | |
91 | deriving the <span class="monospaced">.mlb</span> file from the <span class="monospaced">.cm</span> file:</p></div>\r | |
92 | <div class="ulist"><ul>\r | |
93 | <li>\r | |
94 | <p>\r | |
95 | <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>.\r | |
96 | </p>\r | |
97 | </li>\r | |
98 | <li>\r | |
99 | <p>\r | |
100 | <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>.\r | |
101 | </p>\r | |
102 | </li>\r | |
103 | <li>\r | |
104 | <p>\r | |
105 | <span class="monospaced">ast/type-util-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.\r | |
106 | </p>\r | |
107 | </li>\r | |
108 | <li>\r | |
109 | <p>\r | |
110 | <span class="monospaced">parser/parse-tree-sig.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span> in signature.\r | |
111 | </p>\r | |
112 | </li>\r | |
113 | <li>\r | |
114 | <p>\r | |
115 | <span class="monospaced">parser/parse-tree.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span>.\r | |
116 | </p>\r | |
117 | </li>\r | |
118 | </ul></div>\r | |
119 | </div>\r | |
120 | </div>\r | |
121 | <div class="sect1">\r | |
122 | <h2 id="_patch">Patch</h2>\r | |
123 | <div class="sectionbody">\r | |
124 | <div class="ulist"><ul>\r | |
125 | <li>\r | |
126 | <p>\r | |
127 | <a href="https://github.com/MLton/mlton/blob/master/lib/ckit-lib/ckit.patch"><span class="monospaced">ckit.patch</span></a>\r | |
128 | </p>\r | |
129 | </li>\r | |
130 | </ul></div>\r | |
131 | </div>\r | |
132 | </div>\r | |
133 | </div>\r | |
134 | <div id="footnotes"><hr></div>\r | |
135 | <div id="footer">\r | |
136 | <div id="footer-text">\r | |
137 | </div>\r | |
138 | <div id="footer-badges">\r | |
139 | </div>\r | |
140 | </div>\r | |
141 | </body>\r | |
142 | </html>\r |