SHA1 Hash: | 474c4facf0a5727168ecca3177fab903e2231b1d |
---|---|
Date: | 2010-11-25 12:32:41 |
User: | kinaba |
Comment: | Introduced makefile to build documents. sample/macro.pmy is fully reformed. print(x) now returns x, not 0. |
Timelines: | family | ancestors | descendants | both | trunk |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
- branch=trunk inherited from [f65680e1d2]
- sym-trunk inherited from [f65680e1d2]
Modified .poseidon from [836851406ea9429f] to [76daaad38468db8e].
47 <name>tricks\tricks.d</name> 47 <name>tricks\tricks.d</name> 48 </source> 48 </source> 49 <interface /> 49 <interface /> 50 <resource /> 50 <resource /> 51 <othersDMD /> 51 <othersDMD /> 52 <others> 52 <others> 53 <name>build.bat</name> 53 <name>build.bat</name> 54 <name>build.sh</name> < 55 <name>builddoc.bat</name> < 56 <name>doc\candydoc\modules.ddoc</name> 54 <name>doc\candydoc\modules.ddoc</name> 57 <name>index.dd</name> 55 <name>index.dd</name> 58 <name>readme.txt</name> 56 <name>readme.txt</name> 59 </others> 57 </others> 60 </projectFiles> 58 </projectFiles> 61 <includePaths /> 59 <includePaths /> 62 <linkLibrarys /> 60 <linkLibrarys /> 63 <importExpressions /> 61 <importExpressions /> 64 </buildSpec> 62 </buildSpec> 65 </projectDescription> 63 </projectDescription>
Added Makefile version [300aa94f95ae54a3]
> 1 .PHONY : all windows doc > 2 > 3 DC=dmd > 4 DC_OPT=-O -release > 5 SRC = $(wildcard *.d polemy/*.d tricks/*.d) > 6 > 7 > 8 all: > 9 $(DC) $(DC_OPT) -ofbin/polemy $(SRC) > 10 > 11 windows: > 12 $(DC) $(DC_OPT) -ofbin\\polemy $(SRC) > 13 > 14 > 15 > 16 > 17 DOCDIR=doc > 18 DDOC_FILES=$(DOCDIR)/candydoc/candy.ddoc $(DOCDIR)/candydoc/modules.ddoc > 19 DDOC_OPT=-o- -D -Dddoc $(DDOC_FILES) > 20 > 21 VPATH = . polemy tricks > 22 > 23 $(DOCDIR)/%.html: %.d $(DDOC_FILES) > 24 $(DC) $(DDOC_OPT) $< > 25 > 26 $(DOCDIR)/%.html: %.dd $(DDOC_FILES) > 27 $(DC) $(DDOC_OPT) $< > 28 > 29 SRCB = $(notdir $(SRC)) > 30 SRCA = $(addprefix $(DOCDIR)/, $(SRCB)) > 31 DOCS = $(SRCA:.d=.html) $(DOCDIR)/index.html > 32 > 33 doc: $(DOCS)
Deleted build.sh version [34b93de3231b69af]
Deleted builddoc.bat version [3483396bbcf61fe3]
1 @setlocal ENABLEDELAYEDEXPANSION < 2 @set ARGS= < 3 @for %%I in (main.d polemy\*.d tricks\*.d) do @set ARGS=!ARGS! %%I < 4 @if not exist bin mkdir bin < 5 @echo dmd -o- -D -Dddoc index.dd doc\candydoc\candy.ddoc doc\candydoc\modules.dd < 6 @dmd -o- -D -Dddoc index.dd doc\candydoc\candy.ddoc doc\candydoc\modules.ddoc %A <
Modified doc/_common.html from [4967f08e96ea62fb] to [9340890a47c908ed].
22 22 23 The list of modules globaly used inside Polemy.<br><br> 23 The list of modules globaly used inside Polemy.<br><br> 24 24 25 </td></tr> 25 </td></tr> 26 <tr><td id="docfooter"> 26 <tr><td id="docfooter"> 27 Page was generated with 27 Page was generated with 28 <img src="candydoc/img/candydoc.gif" style="vertical-ali 28 <img src="candydoc/img/candydoc.gif" style="vertical-ali 29 on Wed Nov 24 21:12:49 2010 | 29 on Thu Nov 25 12:13:45 2010 30 30 31 </td></tr> 31 </td></tr> 32 </table> 32 </table> 33 </div> 33 </div> 34 <script> 34 <script> 35 explorer.packageExplorer.addModule("index"); 35 explorer.packageExplorer.addModule("index"); 36 explorer.packageExplorer.addModule("main"); 36 explorer.packageExplorer.addModule("main");
Modified doc/ast.html from [abe7fd96d97ab5fa] to [378b6fe37d6f4ecd].
563 <script>explorer.outline.decSymbolLevel();</script> 563 <script>explorer.outline.decSymbolLevel();</script> 564 564 565 565 566 </td></tr> 566 </td></tr> 567 <tr><td id="docfooter"> 567 <tr><td id="docfooter"> 568 Page was generated with 568 Page was generated with 569 <img src="candydoc/img/candydoc.gif" style="vertical-ali 569 <img src="candydoc/img/candydoc.gif" style="vertical-ali 570 on Wed Nov 24 21:12:49 2010 | 570 on Thu Nov 25 12:13:46 2010 571 571 572 </td></tr> 572 </td></tr> 573 </table> 573 </table> 574 </div> 574 </div> 575 <script> 575 <script> 576 explorer.packageExplorer.addModule("index"); 576 explorer.packageExplorer.addModule("index"); 577 explorer.packageExplorer.addModule("main"); 577 explorer.packageExplorer.addModule("main");
Modified doc/eval.html from [8cb6c47f9236dfb9] to [694d60ab663f1749].
128 <script>explorer.outline.decSymbolLevel();</script> 128 <script>explorer.outline.decSymbolLevel();</script> 129 129 130 130 131 </td></tr> 131 </td></tr> 132 <tr><td id="docfooter"> 132 <tr><td id="docfooter"> 133 Page was generated with 133 Page was generated with 134 <img src="candydoc/img/candydoc.gif" style="vertical-ali 134 <img src="candydoc/img/candydoc.gif" style="vertical-ali 135 on Wed Nov 24 21:12:49 2010 | 135 on Thu Nov 25 12:13:46 2010 136 136 137 </td></tr> 137 </td></tr> 138 </table> 138 </table> 139 </div> 139 </div> 140 <script> 140 <script> 141 explorer.packageExplorer.addModule("index"); 141 explorer.packageExplorer.addModule("index"); 142 explorer.packageExplorer.addModule("main"); 142 explorer.packageExplorer.addModule("main");
Modified doc/failure.html from [ad8b9e8445bd882d] to [40513c24ea54cf40].
178 <script>explorer.outline.decSymbolLevel();</script> 178 <script>explorer.outline.decSymbolLevel();</script> 179 179 180 180 181 </td></tr> 181 </td></tr> 182 <tr><td id="docfooter"> 182 <tr><td id="docfooter"> 183 Page was generated with 183 Page was generated with 184 <img src="candydoc/img/candydoc.gif" style="vertical-ali 184 <img src="candydoc/img/candydoc.gif" style="vertical-ali 185 on Wed Nov 24 21:12:49 2010 | 185 on Thu Nov 25 12:13:47 2010 186 186 187 </td></tr> 187 </td></tr> 188 </table> 188 </table> 189 </div> 189 </div> 190 <script> 190 <script> 191 explorer.packageExplorer.addModule("index"); 191 explorer.packageExplorer.addModule("index"); 192 explorer.packageExplorer.addModule("main"); 192 explorer.packageExplorer.addModule("main");
Modified doc/fresh.html from [9086e73b015a5783] to [c181d051b30c5ddc].
46 <script>explorer.outline.decSymbolLevel();</script> 46 <script>explorer.outline.decSymbolLevel();</script> 47 47 48 48 49 </td></tr> 49 </td></tr> 50 <tr><td id="docfooter"> 50 <tr><td id="docfooter"> 51 Page was generated with 51 Page was generated with 52 <img src="candydoc/img/candydoc.gif" style="vertical-ali 52 <img src="candydoc/img/candydoc.gif" style="vertical-ali 53 on Wed Nov 24 21:12:49 2010 | 53 on Thu Nov 25 12:13:47 2010 54 54 55 </td></tr> 55 </td></tr> 56 </table> 56 </table> 57 </div> 57 </div> 58 <script> 58 <script> 59 explorer.packageExplorer.addModule("index"); 59 explorer.packageExplorer.addModule("index"); 60 explorer.packageExplorer.addModule("main"); 60 explorer.packageExplorer.addModule("main");
Modified doc/index.html from [f03a1357a018cf8a] to [720b71facce28489].
765 <dt><span class="decl"> 765 <dt><span class="decl"> 766 <span class="currsymbol">外部とのやりとり</span> 766 <span class="currsymbol">外部とのやりとり</span> 767 <script>explorer.outline.addDecl('外部とのやりとり');</script> 767 <script>explorer.outline.addDecl('外部とのやりとり');</script> 768 768 769 </span></dt> 769 </span></dt> 770 <script>explorer.outline.writeEnabled = false;</script> 770 <script>explorer.outline.writeEnabled = false;</script> 771 771 772 <dd> <table> <tr><th>print</th> <td>(a)</td> <td>a を文字列化標準出力に改行付きで表示</td></tr | 772 <dd> <table> <tr><th>print</th> <td>(a)</td> <td>a を文字列化標準出力に改行付きで表示して、a を返す< 773 <tr><th>argv</th> <td></td> <td>スクリプトに渡された引数文字列のconsリスト</td></tr> 773 <tr><th>argv</th> <td></td> <td>スクリプトに渡された引数文字列のconsリスト</td></tr> > 774 <tr><th>gensym</th> <td>()</td> <td>エセgensym。変数名として他とぶらなそうな文字列を返します</td></t > 775 <tr><th>rand</th> <td>(n)</td> <td>0 以上 n 未満の自然数を31bit以でランダムに生成します</td></tr 774 </table> 776 </table> 775 </dd> 777 </dd> 776 <br /> 778 <br /> 777 779 778 780 779 <script>explorer.outline.writeEnabled = true;</script> 781 <script>explorer.outline.writeEnabled = true;</script> 780 <dt><span class="decl"> 782 <dt><span class="decl"> ................................................................................................................................................................................ 801 <script>explorer.outline.decSymbolLevel();</script> 803 <script>explorer.outline.decSymbolLevel();</script> 802 804 803 805 804 </td></tr> 806 </td></tr> 805 <tr><td id="docfooter"> 807 <tr><td id="docfooter"> 806 Page was generated with 808 Page was generated with 807 <img src="candydoc/img/candydoc.gif" style="vertical-ali 809 <img src="candydoc/img/candydoc.gif" style="vertical-ali 808 on Wed Nov 24 21:12:48 2010 | 810 on Thu Nov 25 12:30:12 2010 809 811 810 </td></tr> 812 </td></tr> 811 </table> 813 </table> 812 </div> 814 </div> 813 <script> 815 <script> 814 explorer.packageExplorer.addModule("index"); 816 explorer.packageExplorer.addModule("index"); 815 explorer.packageExplorer.addModule("main"); 817 explorer.packageExplorer.addModule("main");
Modified doc/layer.html from [53e06d787604d0ed] to [26ac57c2c82a7847].
150 <script>explorer.outline.decSymbolLevel();</script> 150 <script>explorer.outline.decSymbolLevel();</script> 151 151 152 152 153 </td></tr> 153 </td></tr> 154 <tr><td id="docfooter"> 154 <tr><td id="docfooter"> 155 Page was generated with 155 Page was generated with 156 <img src="candydoc/img/candydoc.gif" style="vertical-ali 156 <img src="candydoc/img/candydoc.gif" style="vertical-ali 157 on Wed Nov 24 21:12:49 2010 | 157 on Thu Nov 25 12:13:48 2010 158 158 159 </td></tr> 159 </td></tr> 160 </table> 160 </table> 161 </div> 161 </div> 162 <script> 162 <script> 163 explorer.packageExplorer.addModule("index"); 163 explorer.packageExplorer.addModule("index"); 164 explorer.packageExplorer.addModule("main"); 164 explorer.packageExplorer.addModule("main");
Modified doc/lex.html from [583ce05aaa701505] to [a48f5afeb590d4a5].
307 <script>explorer.outline.decSymbolLevel();</script> 307 <script>explorer.outline.decSymbolLevel();</script> 308 308 309 309 310 </td></tr> 310 </td></tr> 311 <tr><td id="docfooter"> 311 <tr><td id="docfooter"> 312 Page was generated with 312 Page was generated with 313 <img src="candydoc/img/candydoc.gif" style="vertical-ali 313 <img src="candydoc/img/candydoc.gif" style="vertical-ali 314 on Wed Nov 24 21:12:49 2010 | 314 on Thu Nov 25 12:15:05 2010 315 315 316 </td></tr> 316 </td></tr> 317 </table> 317 </table> 318 </div> 318 </div> 319 <script> 319 <script> 320 explorer.packageExplorer.addModule("index"); 320 explorer.packageExplorer.addModule("index"); 321 explorer.packageExplorer.addModule("main"); 321 explorer.packageExplorer.addModule("main");
Modified doc/main.html from [9fdfd4c7d1034144] to [47fac5459c7c889e].
62 <script>explorer.outline.decSymbolLevel();</script> 62 <script>explorer.outline.decSymbolLevel();</script> 63 63 64 64 65 </td></tr> 65 </td></tr> 66 <tr><td id="docfooter"> 66 <tr><td id="docfooter"> 67 Page was generated with 67 Page was generated with 68 <img src="candydoc/img/candydoc.gif" style="vertical-ali 68 <img src="candydoc/img/candydoc.gif" style="vertical-ali 69 on Wed Nov 24 21:12:49 2010 | 69 on Thu Nov 25 12:15:04 2010 70 70 71 </td></tr> 71 </td></tr> 72 </table> 72 </table> 73 </div> 73 </div> 74 <script> 74 <script> 75 explorer.packageExplorer.addModule("index"); 75 explorer.packageExplorer.addModule("index"); 76 explorer.packageExplorer.addModule("main"); 76 explorer.packageExplorer.addModule("main");
Modified doc/parse.html from [0556ccaeaa174e09] to [bff389c3a8da9e67].
56 <script>explorer.outline.decSymbolLevel();</script> 56 <script>explorer.outline.decSymbolLevel();</script> 57 57 58 58 59 </td></tr> 59 </td></tr> 60 <tr><td id="docfooter"> 60 <tr><td id="docfooter"> 61 Page was generated with 61 Page was generated with 62 <img src="candydoc/img/candydoc.gif" style="vertical-ali 62 <img src="candydoc/img/candydoc.gif" style="vertical-ali 63 on Wed Nov 24 21:12:49 2010 | 63 on Thu Nov 25 12:15:05 2010 64 64 65 </td></tr> 65 </td></tr> 66 </table> 66 </table> 67 </div> 67 </div> 68 <script> 68 <script> 69 explorer.packageExplorer.addModule("index"); 69 explorer.packageExplorer.addModule("index"); 70 explorer.packageExplorer.addModule("main"); 70 explorer.packageExplorer.addModule("main");
Modified doc/repl.html from [712f2862bf0c7df9] to [bbc57ada8c3877f2].
156 <script>explorer.outline.decSymbolLevel();</script> 156 <script>explorer.outline.decSymbolLevel();</script> 157 157 158 158 159 </td></tr> 159 </td></tr> 160 <tr><td id="docfooter"> 160 <tr><td id="docfooter"> 161 Page was generated with 161 Page was generated with 162 <img src="candydoc/img/candydoc.gif" style="vertical-ali 162 <img src="candydoc/img/candydoc.gif" style="vertical-ali 163 on Wed Nov 24 21:12:49 2010 | 163 on Thu Nov 25 12:15:06 2010 164 164 165 </td></tr> 165 </td></tr> 166 </table> 166 </table> 167 </div> 167 </div> 168 <script> 168 <script> 169 explorer.packageExplorer.addModule("index"); 169 explorer.packageExplorer.addModule("index"); 170 explorer.packageExplorer.addModule("main"); 170 explorer.packageExplorer.addModule("main");
Modified doc/runtime.html from [35487d5e4b345dff] to [c03951e325eae3e8].
42 <script>explorer.outline.decSymbolLevel();</script> 42 <script>explorer.outline.decSymbolLevel();</script> 43 43 44 44 45 </td></tr> 45 </td></tr> 46 <tr><td id="docfooter"> 46 <tr><td id="docfooter"> 47 Page was generated with 47 Page was generated with 48 <img src="candydoc/img/candydoc.gif" style="vertical-ali 48 <img src="candydoc/img/candydoc.gif" style="vertical-ali 49 on Wed Nov 24 21:12:49 2010 | 49 on Thu Nov 25 12:30:12 2010 50 50 51 </td></tr> 51 </td></tr> 52 </table> 52 </table> 53 </div> 53 </div> 54 <script> 54 <script> 55 explorer.packageExplorer.addModule("index"); 55 explorer.packageExplorer.addModule("index"); 56 explorer.packageExplorer.addModule("main"); 56 explorer.packageExplorer.addModule("main");
Modified doc/test.html from [aa27a0b83e9de985] to [3cf05b87d24962dc].
90 <script>explorer.outline.addDecl('assert_lt');</script> 90 <script>explorer.outline.addDecl('assert_lt');</script> 91 91 92 ; 92 ; 93 </span></dt> 93 </span></dt> 94 <script>explorer.outline.writeEnabled = false;</script> 94 <script>explorer.outline.writeEnabled = false;</script> 95 95 96 96 97 <dd>asserts two operands are <<br><br> | 97 <dd>asserts two operands are <<br><br> 98 98 99 </dd> 99 </dd> 100 100 101 <script>explorer.outline.writeEnabled = true;</script> 101 <script>explorer.outline.writeEnabled = true;</script> 102 <dt><span class="decl">alias 102 <dt><span class="decl">alias 103 <span class="currsymbol">assert_le</span> 103 <span class="currsymbol">assert_le</span> 104 <script>explorer.outline.addDecl('assert_le');</script> 104 <script>explorer.outline.addDecl('assert_le');</script> ................................................................................................................................................................................ 143 <script>explorer.outline.decSymbolLevel();</script> 143 <script>explorer.outline.decSymbolLevel();</script> 144 144 145 145 146 </td></tr> 146 </td></tr> 147 <tr><td id="docfooter"> 147 <tr><td id="docfooter"> 148 Page was generated with 148 Page was generated with 149 <img src="candydoc/img/candydoc.gif" style="vertical-ali 149 <img src="candydoc/img/candydoc.gif" style="vertical-ali 150 on Wed Nov 24 21:12:49 2010 | 150 on Thu Nov 25 12:15:08 2010 151 151 152 </td></tr> 152 </td></tr> 153 </table> 153 </table> 154 </div> 154 </div> 155 <script> 155 <script> 156 explorer.packageExplorer.addModule("index"); 156 explorer.packageExplorer.addModule("index"); 157 explorer.packageExplorer.addModule("main"); 157 explorer.packageExplorer.addModule("main");
Modified doc/tricks.html from [7c435a81bebd30e5] to [67d9668f00ab5789].
91 <span class="currsymbol">SimpleToHash</span> 91 <span class="currsymbol">SimpleToHash</span> 92 <script>explorer.outline.addDecl('SimpleToHash');</script> 92 <script>explorer.outline.addDecl('SimpleToHash');</script> 93 93 94 ()</span></dt> 94 ()</span></dt> 95 <script>explorer.outline.writeEnabled = false;</script> 95 <script>explorer.outline.writeEnabled = false;</script> 96 96 97 97 98 <dd>Mixing-in the MOST-DERIVED-member-wise comparator for a class<br><br> | 98 <dd>Mixing-in the MOST-DERIVED-member-wise comparator for a class > 99 BE SURE THAT THIS IS CONSISTENT WITH opCmp and opEquals<br><br> 99 100 100 101 101 <script>explorer.outline.incSymbolLevel();</script> 102 <script>explorer.outline.incSymbolLevel();</script> 102 <dl> 103 <dl> 103 <script>explorer.outline.writeEnabled = true;</script> 104 <script>explorer.outline.writeEnabled = true;</script> 104 <dt><span class="decl">const hash_t 105 <dt><span class="decl">const hash_t 105 <span class="currsymbol">toHash</span> 106 <span class="currsymbol">toHash</span> ................................................................................................................................................................................ 117 <script>explorer.outline.decSymbolLevel();</script> 118 <script>explorer.outline.decSymbolLevel();</script> 118 119 119 120 120 </dd> 121 </dd> 121 122 122 <script>explorer.outline.writeEnabled = true;</script> 123 <script>explorer.outline.writeEnabled = true;</script> 123 <dt><span class="decl">template 124 <dt><span class="decl">template 124 <span class="currsymbol">SimpleCompare</span> | 125 <span class="currsymbol">SimpleCompareWithoutToHash</span> 125 <script>explorer.outline.addDecl('SimpleCompare');</script> | 126 <script>explorer.outline.addDecl('SimpleCompareWithoutToHash');</script> 126 127 127 ()</span></dt> 128 ()</span></dt> 128 <script>explorer.outline.writeEnabled = false;</script> 129 <script>explorer.outline.writeEnabled = false;</script> 129 130 130 131 131 <dd>Mixing-in the MOST-DERIVED-member-wise comparator for a class<br><br> 132 <dd>Mixing-in the MOST-DERIVED-member-wise comparator for a class<br><br> 132 133 ................................................................................................................................................................................ 134 <script>explorer.outline.incSymbolLevel();</script> 135 <script>explorer.outline.incSymbolLevel();</script> 135 <dl> 136 <dl> 136 <script>explorer.outline.writeEnabled = true;</script> 137 <script>explorer.outline.writeEnabled = true;</script> 137 <dt><span class="decl">const bool 138 <dt><span class="decl">const bool 138 <span class="currsymbol">opEquals</span> 139 <span class="currsymbol">opEquals</span> 139 <script>explorer.outline.addDecl('opEquals');</script> 140 <script>explorer.outline.addDecl('opEquals');</script> 140 141 141 (Object <span class="funcparam">rhs_</span>); | 142 (Object <span class="funcparam">rhs</span>); 142 </span></dt> 143 </span></dt> 143 <script>explorer.outline.writeEnabled = false;</script> 144 <script>explorer.outline.writeEnabled = false;</script> 144 145 145 146 146 <dd>member-by-member equality<br><br> 147 <dd>member-by-member equality<br><br> 147 148 148 </dd> 149 </dd> ................................................................................................................................................................................ 160 <dd>member-by-member compare<br><br> 161 <dd>member-by-member compare<br><br> 161 162 162 </dd> 163 </dd> 163 </dl> 164 </dl> 164 <script>explorer.outline.decSymbolLevel();</script> 165 <script>explorer.outline.decSymbolLevel();</script> 165 166 166 167 > 168 </dd> > 169 > 170 <script>explorer.outline.writeEnabled = true;</script> > 171 <dt><span class="decl">template > 172 <span class="currsymbol">SimpleCompare</span> > 173 <script>explorer.outline.addDecl('SimpleCompare');</script> > 174 > 175 ()</span></dt> > 176 <script>explorer.outline.writeEnabled = false;</script> > 177 > 178 > 179 <dd>Mixing-in the MOST-DERIVED-member-wise comparator for a class<br><br> > 180 167 </dd> 181 </dd> 168 182 169 <script>explorer.outline.writeEnabled = true;</script> 183 <script>explorer.outline.writeEnabled = true;</script> 170 <dt><span class="decl">template 184 <dt><span class="decl">template 171 <span class="currsymbol">SimpleToString</span> 185 <span class="currsymbol">SimpleToString</span> 172 <script>explorer.outline.addDecl('SimpleToString');</script> 186 <script>explorer.outline.addDecl('SimpleToString');</script> 173 187 ................................................................................................................................................................................ 221 <span class="currsymbol">firstParam</span> 235 <span class="currsymbol">firstParam</span> 222 <script>explorer.outline.addDecl('firstParam');</script> 236 <script>explorer.outline.addDecl('firstParam');</script> 223 237 224 (T)</span></dt> 238 (T)</span></dt> 225 <script>explorer.outline.writeEnabled = false;</script> 239 <script>explorer.outline.writeEnabled = false;</script> 226 240 227 241 228 <dd>Will be used for dynamic overload resolution pattern<br><br> | 242 <dd>Utility<br><br> 229 243 230 </dd> 244 </dd> 231 </dl> 245 </dl> 232 <script>explorer.outline.decSymbolLevel();</script> 246 <script>explorer.outline.decSymbolLevel();</script> 233 247 234 248 235 </td></tr> 249 </td></tr> 236 <tr><td id="docfooter"> 250 <tr><td id="docfooter"> 237 Page was generated with 251 Page was generated with 238 <img src="candydoc/img/candydoc.gif" style="vertical-ali 252 <img src="candydoc/img/candydoc.gif" style="vertical-ali 239 on Wed Nov 24 21:12:49 2010 | 253 on Thu Nov 25 12:15:09 2010 240 254 241 </td></tr> 255 </td></tr> 242 </table> 256 </table> 243 </div> 257 </div> 244 <script> 258 <script> 245 explorer.packageExplorer.addModule("index"); 259 explorer.packageExplorer.addModule("index"); 246 explorer.packageExplorer.addModule("main"); 260 explorer.packageExplorer.addModule("main");
Modified doc/value.html from [34785dddb366db48] to [c36eaebf49fd7834].
104 <dd>Context (variable environment) 104 <dd>Context (variable environment) 105 Simlar to prototype chain of ECMAScript etc. 105 Simlar to prototype chain of ECMAScript etc. 106 But extended with the notion of "Layer"<br><br> 106 But extended with the notion of "Layer"<br><br> 107 107 108 108 109 <script>explorer.outline.incSymbolLevel();</script> 109 <script>explorer.outline.incSymbolLevel();</script> 110 <dl> 110 <dl> > 111 <script>explorer.outline.writeEnabled = true;</script> > 112 <dt><span class="decl">void > 113 <span class="currsymbol">set</span> > 114 <script>explorer.outline.addDecl('set');</script> > 115 > 116 (string <span class="funcparam">i</span>, Layer <span class="funcparam">lay</spa > 117 </span></dt> > 118 <script>explorer.outline.writeEnabled = false;</script> > 119 > 120 > 121 <dd>Set the value <span class="funcparam">v</span> to the index <span class="fun > 122 > 123 </dd> > 124 > 125 <script>explorer.outline.writeEnabled = true;</script> > 126 <dt><span class="decl">const bool > 127 <span class="currsymbol">has</span> > 128 <script>explorer.outline.addDecl('has');</script> > 129 > 130 (string <span class="funcparam">i</span>, Layer <span class="funcparam">lay</spa > 131 </span></dt> > 132 <script>explorer.outline.writeEnabled = false;</script> > 133 > 134 > 135 <dd>True if index <span class="funcparam">i</span> > 136 <span class="currsymbol">has</span> > 137 <script>explorer.outline.addDecl('has');</script> > 138 > 139 value in layer <span class="funcparam">lay</span><br><br> > 140 > 141 </dd> > 142 > 143 <script>explorer.outline.writeEnabled = true;</script> > 144 <dt><span class="decl">Value > 145 <span class="currsymbol">get</span> > 146 <script>explorer.outline.addDecl('get');</script> > 147 > 148 (string <span class="funcparam">i</span>, Layer <span class="funcparam">lay</spa > 149 </span></dt> > 150 <script>explorer.outline.writeEnabled = false;</script> > 151 > 152 > 153 <dd>Return the value of index <span class="funcparam">i</span> at layer <span cl > 154 > 155 </dd> > 156 > 157 <script>explorer.outline.writeEnabled = true;</script> > 158 <dt><span class="decl">T > 159 <span class="currsymbol">access</span> > 160 <script>explorer.outline.addDecl('access');</script> > 161 > 162 (T, S...)(Layer <span class="funcparam">lay</span>, string <span class="funcpara > 163 </span></dt> > 164 <script>explorer.outline.writeEnabled = false;</script> > 165 > 166 > 167 <dd>t. > 168 <span class="currsymbol">access</span> > 169 <script>explorer.outline.addDecl('access');</script> > 170 > 171 !T(lay,a,b,...) returns t.get(a,lay).get(b,lay).... if exists > 172 and has type T. Returns <b>null</b> otherwise<br><br> > 173 > 174 </dd> > 175 111 <script>explorer.outline.writeEnabled = true;</script> 176 <script>explorer.outline.writeEnabled = true;</script> 112 <dt><span class="decl">bool 177 <dt><span class="decl">bool 113 <span class="currsymbol">empty</span> 178 <span class="currsymbol">empty</span> 114 <script>explorer.outline.addDecl('empty');</script> 179 <script>explorer.outline.addDecl('empty');</script> 115 180 116 (); 181 (); 117 </span></dt> 182 </span></dt> ................................................................................................................................................................................ 148 (); 213 (); 149 </span></dt> 214 </span></dt> 150 <script>explorer.outline.writeEnabled = false;</script> 215 <script>explorer.outline.writeEnabled = false;</script> 151 216 152 217 153 <dd>Regard table as a cons-list and convert to an array<br><br> 218 <dd>Regard table as a cons-list and convert to an array<br><br> 154 219 > 220 </dd> > 221 > 222 <script>explorer.outline.writeEnabled = true;</script> > 223 <dt><span class="decl">Tuple!(string,string,Value)[] > 224 <span class="currsymbol">direct_entries</span> > 225 <script>explorer.outline.addDecl('direct_entries');</script> > 226 > 227 (); > 228 </span></dt> > 229 <script>explorer.outline.writeEnabled = false;</script> > 230 > 231 > 232 <dd>Get the list of direct entries ignoring prototypes in sorted order<br><br> > 233 > 234 </dd> > 235 > 236 <script>explorer.outline.writeEnabled = true;</script> > 237 <dt><span class="decl">Tuple!(string,string,Value)[] > 238 <span class="currsymbol">entries</span> > 239 <script>explorer.outline.addDecl('entries');</script> > 240 > 241 (); > 242 </span></dt> > 243 <script>explorer.outline.writeEnabled = false;</script> > 244 > 245 > 246 <dd>Get the whole list of observable > 247 <span class="currsymbol">entries</span> > 248 <script>explorer.outline.addDecl('entries');</script> > 249 > 250 in unspecified order<br><br> > 251 155 </dd> 252 </dd> 156 </dl> 253 </dl> 157 <script>explorer.outline.decSymbolLevel();</script> 254 <script>explorer.outline.decSymbolLevel();</script> 158 255 159 256 160 </dd> 257 </dd> 161 </dl> 258 </dl> ................................................................................................................................................................................ 162 <script>explorer.outline.decSymbolLevel();</script> 259 <script>explorer.outline.decSymbolLevel();</script> 163 260 164 261 165 </td></tr> 262 </td></tr> 166 <tr><td id="docfooter"> 263 <tr><td id="docfooter"> 167 Page was generated with 264 Page was generated with 168 <img src="candydoc/img/candydoc.gif" style="vertical-ali 265 <img src="candydoc/img/candydoc.gif" style="vertical-ali 169 on Wed Nov 24 21:12:49 2010 | 266 on Thu Nov 25 12:15:07 2010 170 267 171 </td></tr> 268 </td></tr> 172 </table> 269 </table> 173 </div> 270 </div> 174 <script> 271 <script> 175 explorer.packageExplorer.addModule("index"); 272 explorer.packageExplorer.addModule("index"); 176 explorer.packageExplorer.addModule("main"); 273 explorer.packageExplorer.addModule("main");
Modified doc/valueconv.html from [21597c550ad00a0c] to [86d592872cc32a6a].
84 <script>explorer.outline.decSymbolLevel();</script> 84 <script>explorer.outline.decSymbolLevel();</script> 85 85 86 86 87 </td></tr> 87 </td></tr> 88 <tr><td id="docfooter"> 88 <tr><td id="docfooter"> 89 Page was generated with 89 Page was generated with 90 <img src="candydoc/img/candydoc.gif" style="vertical-ali 90 <img src="candydoc/img/candydoc.gif" style="vertical-ali 91 on Wed Nov 24 21:12:49 2010 | 91 on Thu Nov 25 12:15:47 2010 92 92 93 </td></tr> 93 </td></tr> 94 </table> 94 </table> 95 </div> 95 </div> 96 <script> 96 <script> 97 explorer.packageExplorer.addModule("index"); 97 explorer.packageExplorer.addModule("index"); 98 explorer.packageExplorer.addModule("main"); 98 explorer.packageExplorer.addModule("main");
Modified index.dd from [d00c8d535d50e1e2] to [caf492581281c25d].
597 整数演算の種類が少ないのは、D 言語の std.bigint がビット演算などをサポートしてないためです。 597 整数演算の種類が少ないのは、D 言語の std.bigint がビット演算などをサポートしてないためです。 598 文字列が結合しかできないのは、単に手抜きです。 598 文字列が結合しかできないのは、単に手抜きです。 599 </p> 599 </p> 600 )) 600 )) 601 601 602 $(SECTION 外部とのやりとり, $(SECBODY 602 $(SECTION 外部とのやりとり, $(SECBODY 603 $(TABLE 603 $(TABLE 604 $(TR $(TH print) $(TD (a)) $(TD a を文字列化標準出力に改行付きで表示)) | 604 $(TR $(TH print) $(TD (a)) $(TD a を文字列化標準出力に改行付きで表示して、a を返す)) 605 $(TR $(TH argv) $(TD ) $(TD スクリプトに渡された引数文字列のconsリスト)) 605 $(TR $(TH argv) $(TD ) $(TD スクリプトに渡された引数文字列のconsリスト)) 606 $(TR $(TH gensym) $(TD ()) $(TD エセgensym。変数名として他とかぶらなそうな文字列を返します)) 606 $(TR $(TH gensym) $(TD ()) $(TD エセgensym。変数名として他とかぶらなそうな文字列を返します)) 607 $(TR $(TH rand) $(TD (n)) $(TD 0 以上 n 未満の自然数を31bit以内でランダムに生成します)) 607 $(TR $(TH rand) $(TD (n)) $(TD 0 以上 n 未満の自然数を31bit以内でランダムに生成します)) 608 ) 608 ) 609 )) 609 )) 610 <br /> 610 <br /> 611 611
Modified polemy/runtime.d from [6911dbe256744186] to [f71ff7dc6628e423].
78 t2.set(s.data, ValueLayer, v); 78 t2.set(s.data, ValueLayer, v); 79 return t2; 79 return t2; 80 }); 80 }); 81 e.addPrimitive("{}", ValueLayer, (){ 81 e.addPrimitive("{}", ValueLayer, (){ 82 return new Table; 82 return new Table; 83 }); 83 }); 84 // IO and others 84 // IO and others 85 e.addPrimitive("print", ValueLayer, (Value a){ writeln(a); return new In | 85 e.addPrimitive("print", ValueLayer, (Value a){ writeln(a); return a; }); 86 e.addPrimitive("gensym", ValueLayer, (){ return new StrValue(freshVarNam 86 e.addPrimitive("gensym", ValueLayer, (){ return new StrValue(freshVarNam 87 auto rand = Mt19937(unpredictableSeed); 87 auto rand = Mt19937(unpredictableSeed); 88 e.addPrimitive("rand", ValueLayer, (IntValue n){ 88 e.addPrimitive("rand", ValueLayer, (IntValue n){ 89 return new IntValue( uniform(0,cast(int)n.data.toInt(),rand) ); 89 return new IntValue( uniform(0,cast(int)n.data.toInt(),rand) ); 90 }); 90 }); 91 } 91 }
Modified readme.txt from [50a2d18cbf87ea26] to [d03287608e84fd60].
1 ----------------------------------------------------------------------------- 1 ----------------------------------------------------------------------------- 2 Polemy 0.1.0 2 Polemy 0.1.0 3 by k.inaba (www.kmonos.net) 3 by k.inaba (www.kmonos.net) 4 Nov 24, 2010 | 4 Nov 25, 2010 5 ----------------------------------------------------------------------------- 5 ----------------------------------------------------------------------------- 6 6 7 [How to Build] 7 [How to Build] 8 8 9 - Install DMD 9 - Install DMD 10 http://www.digitalmars.com/d/2.0/changelog.html 10 http://www.digitalmars.com/d/2.0/changelog.html 11 Version 2.050 is recommended. Older or newer version may not work. 11 Version 2.050 is recommended. Older or newer version may not work. 12 12 13 - Build 13 - Build 14 (for Windows) Run build.bat | 14 Run 15 (for Unix) Run sh build.sh | 15 (on Windows) build.bat > 16 (on Unix) make 16 or use your favorite build tools upon main.d and polemy/*.d. | 17 or use your favorite build tools upon "main.d polemy/*.d tricks/*.d". 17 18 18 Then you will get the executable "polemy" in the "bin" directory. 19 Then you will get the executable "polemy" in the "bin" directory. 19 20 20 21 21 22 22 [License] 23 [License] 23 24
Deleted sample/ast.pmy version [7e23af883e94d990]
1 def reverse(lst, acc) < 2 { < 3 case(lst) < 4 when {car:a, cdr: d}: reverse(d, {car:a, cdr:acc}) < 5 when {}: acc < 6 }; < 7 < 8 @macro reverseArgs(e) {@value( < 9 var ev = @macro(e); < 10 case(ev) < 11 when {is:"App", fun:f, args:a}: < 12 ( < 13 ev {args: reverse(a, {})} < 14 # {is:"App", fun:f, args:reverse(a, {})} < 15 ) < 16 when _ : < 17 ( < 18 ev < 19 ) < 20 )}; < 21 < 22 def main() < 23 { < 24 print( reverseArgs(1 + 2) ); < 25 print( reverseArgs(1 - 2) ); < 26 }; < 27 < 28 main() <
Modified sample/macro.pmy from [b31646ec7576a8a6] to [996468a22f9d9a8e].
> 1 ######################################## > 2 print("----------"); > 3 1 @macro twice = fun(x) { x; x }; | 4 @macro twice = fun(x) { x; x }; # Hello Hello 2 @macro max(x,y) { < 3 var _x = x; # no hygenic macro btw.... < 4 var _y = y; # no hygenic macro btw.... < 5 if(_x<_y)then _y else _x | 5 twice( print("Hello") ); 6 }; < 7 def maxNormal(x,y) { < > 6 > 7 ######################################## 8 if(x<y) | 8 print("----------"); 9 then: y < 10 else: x < 11 }; < > 9 12 @macro maxBad(x,y) { 10 @macro maxBad(x,y) { 13 if x<y: y else: x | 11 if x<y then y else x > 12 }; > 13 @macro maxGood(x,y) { > 14 var _x = x; # NOTE: no hygenic macro > 15 var _y = y; > 16 if _x < _y then _y else _x 14 }; 17 }; 15 < 16 @macro LetItBe(x, y) { let it = x in y }; < 17 < 18 @macro pow10(x) { < 19 @value( < 20 def pow(y, n) { < > 18 def maxFun(x,y) { 21 if( n == 1 ) then y | 19 if x<y then y else x 22 else < 23 @macro( @value(y) * @value(pow(y,n-1)) ) < 24 } < 25 in < 26 pow(@macro(x+1),10) < 27 ) < 28 }; 20 }; > 21 @macro maxGreat(x,y){@value( > 22 var nx = gensym(); # generate fresh symbol > 23 var ny = gensym(); > 24 @macro _x = @macro(nx) {name: nx}; # cheating to create {is:"Var" .. } > 25 @macro _y = @macro(ny) {name: ny}; # at macro layer > 26 {is: "Let", name: nx, layer: "", init: @macro(x), expr: > 27 {is: "Let", name: ny, layer: "", init: @macro(y), expr: > 28 @macro(if _x < _y then _y else _x)}} # the expression > 29 )}; 29 30 30 @macro pow10Hard(x) { | 31 print( maxGood(print(1), print(2)) ); # 1 2 2 31 @value( | 32 print( maxBad(print(1), print(2)) ); # 1 2 2 2 32 def pow(x, n) { | 33 print( maxFun(print(1), print(2)) ); # 1 2 2 33 if( n == 1 ) then x | 34 print( maxGreat(print(1), print(2)) ); # 1 2 2 34 else | 35 print( maxGreat(print(2), print(1)) ); # 2 1 2 35 @macro( @value(x) * @value(pow(x,n-1)) ) < 36 } | 36 > 37 ######################################## 37 in | 38 print("----------"); 38 pow(@macro(x+1),10) < 39 ) | 39 > 40 # the variable "it" is inserted to the scope > 41 @macro LetItBe(x, y) { let it = x in y }; > 42 print( LetItBe("myself", "when I find " ~ it ~ " in times of trouble") ); > 43 > 44 ######################################## > 45 print("----------"); > 46 > 47 # layerd parameter can also be used for @macro > 48 # you can mix @macro and normal parameters!! > 49 def 3way(n, c1 @macro, c2 @macro, c3 @macro) > 50 { > 51 case n*n > 52 when 0: c1 > 53 when 1: c2 > 54 when 4: c3 40 }; 55 }; 41 56 42 def printAndReturn(x) | 57 3way( rand(3), print("One"), print("Two"), print("Three") ); > 58 3way( rand(3), print("One"), print("Two"), print("Three") ); > 59 3way( rand(3), print("One"), print("Two"), print("Three") ); 43 { | 60 > 61 ######################################## 44 print(x); | 62 print("----------"); 45 x | 63 > 64 # Conversely, we can mix @value parameter in the macro definition > 65 @macro times(n @value, e) { @value( > 66 if n == 1 then > 67 @macro(e) > 68 else > 69 @macro(e; times(n-1,e)) 46 }; | 70 )}; > 71 times(7, print("Ichimen no Nanohana")); > 72 > 73 # Here, n is bound to the integer 7, not the AST of it. > 74 > 75 ######################################## > 76 print("----------"); > 77 > 78 # Explicit manipulation of AST. > 79 # Reverse the order of arguments of the function call expression > 80 @macro reverseArgs(e) {@value( > 81 def rev(xs, acc) { > 82 case xs when {car:x, cdr:xs}: rev(xs, {car:x, cdr:acc}) when {}: > 83 }; > 84 case @macro(e) > 85 when {is:"App", fun:f, args:as}: {is:"App", fun:f, args:rev(as,{ > 86 when e : e > 87 )}; > 88 print( reverseArgs(1+2) ); # 2+1 == 3 > 89 print( reverseArgs(1-2) ); # 2-1 == 1 > 90 > 91 ######################################## > 92 print("----------"); > 93 > 94 # Both prints "original". Macro respects the neutral layer's "let y=" > 95 # and "fun(y)". It does not alter the inner scope y > 96 @macro test1(y) { fun(y){y}("original") }; > 97 @macro test2(y) { let y = "original" in y }; > 98 print( test1("replaced?") ); > 99 print( test2("replaced?") ); > 100 > 101 ######################################## > 102 print("----------"); > 103 > 104 # Macro expansion is done only at the first call. > 105 # So by using @macro parameter, it can remember the argument > 106 # of the first call. > 107 def remember1( x @macro, y ) { if x == y then "yes" else "no" }; > 108 print( remember1(1, 1) ); # yes 1 == 1 > 109 print( remember1(2,1) ); # yes "1" == 1 > 110 print( remember1(2,2) ); # no "1" != 2 > 111 > 112 # exactly the same function, but called in different order > 113 def remember2( x @macro, y ) { if x == y then "yes" else "no" }; > 114 print( remember2(2, 2) ); # yes "2" == 2 > 115 print( remember2(2, 1) ); # no "2" != 1 > 116 print( remember2(1, 1) ); # no "2" != 1 > 117 > 118 # Is this a good thing or a bad thing?? 47 119 48 def main() < 49 { < 50 twice( print("foo") ); < > 120 ######################################## 51 print("--------------"); | 121 print("----------"); 52 print(max(printAndReturn(100),printAndReturn(200))); < 53 print("--------------"); < 54 print(maxNormal(printAndReturn(100),printAndReturn(200))); < 55 print("--------------"); < 56 print(maxBad(printAndReturn(100),printAndReturn(200))); < 57 print("--------------"); < 58 print( LetItBe( 1+2+3, it*it ) ); < 59 print("--------------"); < 60 print(pow10(1)); < 61 print(pow10(2)); < 62 print("--------------"); < 63 print(pow10Hard(1)); < 64 print(pow10Hard(2)); < 65 }; < 66 122 67 main(); | 123 # Trick to extract the AST of a function > 124 def foo(x) { x + x }; > 125 print( @macro(@value(foo)(arg1)) ); # prints AST for "arg1 + arg1" 68 126 > 127 # If we wrote @macro(foo(arg1)), it is the AST of "foo(arg1)" > 128 # Here, by @value(foo) we obtain the "usual" behavior of foo, > 129 # not the macro-like bahavior to construct AST "foo(??)". > 130 # But still, by @macro( ... ) layer, the "usual" function is run in 69 @macro foo(y) | 131 # macro mode. 70 { < 71 fun(y){y}(300) < 72 # let y = 300 in y < 73 }; < 74 < 75 print("--------------"); < 76 print(foo(200)); <