Commit | Line | Data |
---|---|---|
fcb6c0fb MW |
1 | %%% -*-latex-*- |
2 | %%% | |
3 | %%% Miscellaneous functionality | |
4 | %%% | |
5 | %%% (c) 2015 Straylight/Edgeware | |
6 | %%% | |
7 | ||
8 | %%%----- Licensing notice --------------------------------------------------- | |
9 | %%% | |
e0808c47 | 10 | %%% This file is part of the Sensible Object Design, an object system for C. |
fcb6c0fb MW |
11 | %%% |
12 | %%% SOD is free software; you can redistribute it and/or modify | |
13 | %%% it under the terms of the GNU General Public License as published by | |
14 | %%% the Free Software Foundation; either version 2 of the License, or | |
15 | %%% (at your option) any later version. | |
16 | %%% | |
17 | %%% SOD is distributed in the hope that it will be useful, | |
18 | %%% but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | %%% GNU General Public License for more details. | |
21 | %%% | |
22 | %%% You should have received a copy of the GNU General Public License | |
23 | %%% along with SOD; if not, write to the Free Software Foundation, | |
24 | %%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
25 | ||
26 | \chapter{Miscellaneous functionality} \label{ch:misc} | |
27 | ||
28 | %%%-------------------------------------------------------------------------- | |
29 | \section{Utilities} \label{sec:misc.utilities} | |
30 | ||
31 | These symbols are defined in the @|sod-utilities| package. | |
32 | ||
c1ac1524 MW |
33 | |
34 | \subsection{Macro utilities} | |
35 | ||
fcb6c0fb | 36 | \begin{describe}{mac} |
020b9e2b MW |
37 | {with-gensyms (@{ @<var> @! (@<var> @[@<name>@]) @}^*) \\ \ind |
38 | @<declaration>^* \\ | |
cac85e0b | 39 | @<form>^*} |
fcb6c0fb MW |
40 | \end{describe} |
41 | ||
42 | \begin{describe}{mac} | |
43 | {once-only (@[[ :environment @<env> @]] | |
020b9e2b MW |
44 | @{ @<var> @! (@<var> @[@<value-form>@]) @}^*) \\ \ind |
45 | @<declaration>^* \\ | |
cac85e0b | 46 | @<form>^*} |
fcb6c0fb MW |
47 | \end{describe} |
48 | ||
49 | \begin{describe}{mac} | |
cac85e0b MW |
50 | {parse-body @<body> \&key :docp :declp |
51 | @> @<doc-string> @<declarations> @<body-forms>} | |
fcb6c0fb MW |
52 | \end{describe} |
53 | ||
7262683b MW |
54 | \begin{describe}{cls}{loc} |
55 | \end{describe} | |
56 | ||
c1ac1524 MW |
57 | \begin{describe}{fun}{symbolicate \&rest @<symbols> @> @<symbol>} |
58 | \end{describe} | |
59 | ||
60 | ||
61 | \subsection{Locatives} | |
62 | ||
7262683b MW |
63 | \begin{describe}{fun}{locp @<object> @> @<generalized-boolean>} |
64 | \end{describe} | |
65 | ||
cac85e0b | 66 | \begin{describe}{mac}{locf @<place> @> @<locative>} |
7262683b MW |
67 | \end{describe} |
68 | ||
69 | \begin{describe*} | |
70 | {\dhead{fun}{ref @<locative> @> @<value>} | |
71 | \dhead{fun}{setf (ref @<locative>) @<value>}} | |
72 | \end{describe*} | |
73 | ||
74 | \begin{describe}{mac} | |
75 | {with-locatives | |
76 | @{ @<var> @! (@{ @<var> @! | |
020b9e2b MW |
77 | (@<var> @[@<locative>@]) @}^*) @} \\ \ind |
78 | @<declaration>^* \\ | |
cac85e0b | 79 | @<form>^*} |
7262683b MW |
80 | \end{describe} |
81 | ||
c1ac1524 MW |
82 | |
83 | \subsection{Anaphorics} | |
84 | ||
fcb6c0fb MW |
85 | \begin{describe}{sym}{it} |
86 | \end{describe} | |
87 | ||
88 | \begin{describe}{mac}{aif @<condition> @<consequent> @[@<alt>@]} | |
89 | \end{describe} | |
90 | ||
3e166443 MW |
91 | \begin{describe}{mac}{aand @<form>^*} |
92 | \end{describe} | |
93 | ||
cac85e0b | 94 | \begin{describe}{mac}{awhen @<condition> @<form>^*} |
fcb6c0fb MW |
95 | \end{describe} |
96 | ||
97 | \begin{describe}{mac}{acond @{ (@<condition> @<form>^*) @}^*} | |
98 | \end{describe} | |
99 | ||
100 | \begin{describe*} | |
101 | {\dhead{mac} | |
102 | {acase @<scrutinee> @{ (@{ @<case> @! (@<case>^*) @} @<form>^*) @}^*} | |
103 | \dhead{mac} | |
104 | {aecase @<scrutinee> @{ (@{ @<case> @! (@<case>^*) @} @<form>^*) @}^*} | |
105 | \dhead{mac}{atypecase @<scrutinee> @{ (@<type> @<form>^*) @}^*} | |
106 | \dhead{mac}{aetypecase @<scrutinee> @{ (@<type> @<form>^*) @}^*}} | |
107 | \end{describe*} | |
108 | ||
109 | \begin{describe}{mac}{asetf @{ @<place> @<value> @}^*} | |
110 | \end{describe} | |
111 | ||
c1ac1524 MW |
112 | |
113 | \subsection{Metaobject protocol utilities} | |
114 | ||
fcb6c0fb MW |
115 | \begin{describe}{gf}{instance-initargs @<instance>} |
116 | \end{describe} | |
117 | ||
118 | \begin{describe*} | |
119 | {\dhead{fun}{copy-instance @<instance> \&rest @<initargs>} | |
120 | \dhead{gf}{copy-instance-using-class @<class> @<instance> | |
121 | \&rest @<initargs>}} | |
122 | \end{describe*} | |
123 | ||
124 | \begin{describe*} | |
125 | {\dhead{gf}{generic-function-methods @<generic-function> @> @<list>} | |
126 | \dhead{gf}{method-specializers @<method> @> @<list>} | |
127 | \dhead{cls}{eql-specializer} | |
128 | \dhead{gf}{eql-specializer-object @<specializer> @> @<value>}} | |
129 | \end{describe*} | |
130 | ||
c1ac1524 MW |
131 | |
132 | \subsection{Other CLOS utilities} | |
133 | ||
134 | \begin{describe}{mac} | |
135 | {default-slot (@<instance> @<slot> @[@<slot-names>@]) \\ \ind | |
136 | @<form>^*} | |
137 | \end{describe} | |
138 | ||
139 | \begin{describe}{mac} | |
140 | {define-on-demand-slot @<class> @<slot> (@<instance>) \\ \ind | |
141 | @[[ @<declaration>^* @! @<doc-string> @]] \\ | |
142 | @<form>^*} | |
143 | \end{describe} | |
144 | ||
145 | ||
146 | \subsection{Building lists} | |
147 | ||
fcb6c0fb MW |
148 | \begin{describe}{fun}{make-list-builder \&optional @<initial> @> @<builder>} |
149 | \end{describe} | |
150 | ||
151 | \begin{describe}{fun}{lbuild-add @<builder> @<item> @> @<builder>} | |
152 | \end{describe} | |
153 | ||
154 | \begin{describe}{fun}{lbuild-add-list @<builder> @<list> @> @<builder>} | |
155 | \end{describe} | |
156 | ||
157 | \begin{describe}{fun}{lbuild-list @<builder> @> @<list>} | |
158 | \end{describe} | |
159 | ||
fcb6c0fb | 160 | |
c1ac1524 | 161 | \subsection{Merging lists} |
17c7c784 | 162 | |
38b78e87 MW |
163 | \begin{describe}{cls} |
164 | {inconsistent-merge-error (error) \&key :candidates :present} | |
fcb6c0fb MW |
165 | \end{describe} |
166 | ||
167 | \begin{describe}{gf}{merge-error-candidates @<error> @> @<list>} | |
168 | \end{describe} | |
169 | ||
38b78e87 MW |
170 | \begin{describe}{gf}{merge-error-present-function @<error> @> @<function>} |
171 | \end{describe} | |
172 | ||
fcb6c0fb | 173 | \begin{describe}{fun} |
e2838dc5 | 174 | {merge-lists @<lists> \&key :pick (:test \#'eql) :present @> @<list>} |
fcb6c0fb MW |
175 | \end{describe} |
176 | ||
c1ac1524 MW |
177 | |
178 | \subsection{Other list utilities} | |
179 | ||
180 | \begin{describe}{fun} | |
181 | {mappend @<function> @<list> \&rest @<more-lists> @> @<result-list>} | |
182 | \end{describe} | |
183 | ||
184 | \begin{describe}{fun} | |
185 | {distinguished-point-shortest-paths @<root> @<neighbours-func> | |
186 | @> @<list>} | |
187 | \end{describe} | |
188 | ||
fcb6c0fb MW |
189 | \begin{describe}{mac} |
190 | {categorize (\=@<item-var> @<items> | |
020b9e2b MW |
191 | @[[ :bind (@{ @<var> @! |
192 | (@<var> @[@<value>@]) @}^*) @]]) | |
193 | \\ \ind\ind | |
194 | (@{ (@<cat-var> @<cat-predicate>) @}^*) \-\\ | |
195 | @<declaration>^* \\ | |
cd35a54e | 196 | @<form>^* |
020b9e2b | 197 | \-\nlret @<value>^*} |
fcb6c0fb MW |
198 | \end{describe} |
199 | ||
42291726 MW |
200 | \begin{describe}{fun}{partial-order-minima @<items> @<order> @> @<list>} |
201 | \end{describe} | |
202 | ||
fcb6c0fb | 203 | \begin{describe}{fun} |
64cbfb65 MW |
204 | {find-duplicates @<report> @<sequence> \&key :identity :test} |
205 | \end{describe} | |
206 | ||
c1ac1524 MW |
207 | |
208 | \subsection{Position tracking} | |
fcb6c0fb | 209 | |
64cbfb65 MW |
210 | \begin{describe}{fun} |
211 | {whitespace-char-p @<character> @> @<generalized-boolean>} | |
fcb6c0fb MW |
212 | \end{describe} |
213 | ||
214 | \begin{describe}{fun} | |
215 | {update-position @<character> @<line> @<column> | |
216 | @> @<new-line> @<new-column>} | |
217 | \end{describe} | |
218 | ||
219 | \begin{describe}{fun} | |
220 | {backtrack-position @<character> @<line> @<column> | |
221 | @> @<old-line> @<old-column>} | |
222 | \end{describe} | |
223 | ||
c34b237d | 224 | |
c1ac1524 | 225 | \subsection{Object printing} |
fcb6c0fb MW |
226 | |
227 | \begin{describe}{mac} | |
020b9e2b MW |
228 | {maybe-print-unreadable-object |
229 | (@<object> @<stream> | |
230 | @[[ :type @<type> @! | |
231 | :identity @<identity> @]]) \\ \ind | |
232 | @<declaration>^* \\ | |
cac85e0b | 233 | @<form>^*} |
fcb6c0fb MW |
234 | \end{describe} |
235 | ||
08b6e064 MW |
236 | \begin{describe}{fun}{print-ugly-stuff @<stream> @<func> @> @<value>^*} |
237 | \end{describe} | |
238 | ||
fcb6c0fb | 239 | |
c1ac1524 | 240 | \subsection{Condition utilities} |
fcb6c0fb | 241 | |
f7b60deb MW |
242 | \begin{describe}{cls} |
243 | {simple-control-error (control-error simple-error) | |
244 | \&key :format-control :format-arguments} | |
245 | \end{describe} | |
246 | ||
db6c3279 MW |
247 | \begin{describe}{fun} |
248 | {designated-condition | |
249 | \=@<default-type> @<datum> @<arguments> \\ | |
250 | \>\&key :allow-pointless-arguments | |
251 | \nlret @<condition>} | |
252 | \end{describe} | |
253 | ||
f7b60deb MW |
254 | \begin{describe}{fun} |
255 | {invoke-associated-restart @<restart> @<condition> \&rest @<arguments>} | |
256 | \end{describe} | |
257 | ||
c884ec24 MW |
258 | \begin{describe*} |
259 | {\dhead{cls}{enclosing-condition (condition) \&key :condition} | |
260 | \dhead{gf}{enclosed-condition @<enclosing-condition> @> @<condition>}} | |
261 | \end{describe*} | |
262 | ||
263 | \begin{describe}{cls}{information (condition) \&key} | |
264 | \end{describe} | |
265 | ||
266 | \begin{describe}{cls} | |
267 | {simple-information (simple-condition information) \\ \ind | |
268 | \&key :format-control :format-arguments} | |
269 | \end{describe} | |
270 | ||
271 | \begin{describe*} | |
272 | {\dhead{fun}{info @<datum> \&rest @<arguments> @> @<flag>} | |
273 | \dhead{rst}{noted} | |
274 | \dhead{fun}{noted \&optional @<condition>}} | |
275 | \end{describe*} | |
276 | ||
277 | \begin{describe}{fun} | |
278 | {promiscuous-cerror @<continue-string> @<datum> \&rest @<arguments>} | |
279 | \end{describe} | |
280 | ||
281 | \begin{describe}{fun}{cerror* @<datum> \&rest @<arguments>} | |
282 | \end{describe} | |
283 | ||
c1ac1524 MW |
284 | |
285 | \subsection{Very miscellaneous utilities} | |
286 | ||
287 | \begin{describe}{fun} | |
288 | {frob-identifier @<string> \&key :swap-case :swap-hyphen | |
289 | @> @<frobbed-string>} | |
290 | \end{describe} | |
291 | ||
292 | \begin{describe}{fun} | |
293 | {compose @<function> \&rest @<more-functions> @> @<function>} | |
294 | \end{describe} | |
295 | ||
296 | \begin{describe}{mac}{defvar-unbound @<name> @<documentation> @> @<name>} | |
297 | \end{describe} | |
298 | ||
fcb6c0fb | 299 | \begin{describe}{mac} |
c1ac1524 MW |
300 | {dosequence (@<var> @<sequence> |
301 | @[[ :start @<start> @! :end @<end> @! | |
302 | :indexvar @<var> @]]) \\ \ind | |
303 | @<declaration>^* \\ | |
304 | @{ @<tag> @! @<statement> @}^*} | |
fcb6c0fb MW |
305 | \end{describe} |
306 | ||
307 | \begin{describe}{mac} | |
c1ac1524 MW |
308 | {define-access-wrapper @<from> @<to> |
309 | @[[ :read-only @<read-only-flag> @]]} | |
fcb6c0fb MW |
310 | \end{describe} |
311 | ||
312 | %%%-------------------------------------------------------------------------- | |
fcb6c0fb MW |
313 | \section{Option parser} \label{sec:misc.optparse} |
314 | ||
054e8f8f | 315 | These symbols are defined in the @|optparse| package. |
fcb6c0fb MW |
316 | |
317 | \begin{describe}{fun}{exit \&optional (@<code> 0) \&key :abrupt} | |
318 | \end{describe} | |
319 | ||
320 | \begin{describe}{var}{*program-name*} | |
321 | \end{describe} | |
322 | ||
323 | \begin{describe}{var}{*command-line*} | |
324 | \end{describe} | |
325 | ||
326 | \begin{describe}{fun}{set-command-line-arguments} | |
327 | \end{describe} | |
328 | ||
fcb6c0fb MW |
329 | \begin{describe}{fun}{moan @<format-string> \&rest @<format-args>} |
330 | \end{describe} | |
331 | ||
332 | \begin{describe}{fun}{die @<format-string> \&rest @<format-args>} | |
333 | \end{describe} | |
334 | ||
335 | \begin{describe}{var}{*options*} | |
336 | \end{describe} | |
337 | ||
338 | \begin{describe}{cls}{option} | |
339 | \end{describe} | |
340 | ||
341 | \begin{describe}{fun}{optionp @<object> @> @<generalized-boolean>} | |
342 | \end{describe} | |
343 | ||
344 | \begin{describe}{fun} | |
020b9e2b MW |
345 | {make-option \=@<long-name> @<short-name> \+\\ |
346 | \&optional @<arg-name> \\ | |
347 | \&key :tag :negated-tag | |
348 | :arg-optional-p :documentation \- | |
fcb6c0fb MW |
349 | \nlret @<option>} |
350 | \end{describe} | |
351 | ||
352 | \begin{describe*} | |
353 | {\dhead{fun}{opt-short-name @<option> @> @<character-or-null>} | |
354 | \dhead{fun}{setf (opt-short-name @<option>) @<character-or-null>} | |
355 | \dhead{fun}{opt-long-name @<option> @> @<string-or-null>} | |
356 | \dhead{fun}{setf (opt-long-name @<option>) @<string-or-null>} | |
357 | \dhead{fun}{opt-tag @<option> @> @<tag>} | |
358 | \dhead{fun}{setf (opt-tag @<option>) @<tag>} | |
359 | \dhead{fun}{opt-negated-tag @<option> @> @<tag>} | |
360 | \dhead{fun}{setf (opt-negated-tag @<option>) @<tag>} | |
361 | \dhead{fun}{opt-arg-name @<option> @> @<string-or-null>} | |
362 | \dhead{fun}{setf (opt-arg-name @<option>) @<string-or-null>} | |
363 | \dhead{fun}{opt-optional-p @<option> @> @<generalized-boolean>} | |
364 | \dhead{fun}{setf (opt-optional-p @<option>) @<generalized-boolean>} | |
365 | \dhead{fun}{opt-documentation @<option> @> @<string-or-null>} | |
366 | \dhead{fun}{setf (opt-documentation @<option>) @<string-or-null>}} | |
367 | \end{describe*} | |
368 | ||
369 | \begin{describe}{cls}{option-parser} | |
370 | \end{describe} | |
371 | ||
372 | \begin{describe}{fun}{option-parser-p @<object> @> @<generalized-boolean>} | |
373 | \end{describe} | |
374 | ||
375 | \begin{describe}{fun} | |
376 | {make-option-parser \&key \=:args :options :non-option :numericp \+ \\ | |
377 | :negated-numeric-p long-only-p \- | |
378 | \nlret @<option-parser>} | |
379 | \end{describe} | |
380 | ||
381 | \begin{describe*} | |
382 | {\dhead{fun}{op-options @<option-parser> @> @<list>} | |
383 | \dhead{fun}{setf (op-options @<option-parser>) @<list>} | |
384 | \dhead{fun}{op-non-option @<option-parser> @> @<action>} | |
385 | \dhead{fun}{setf (op-non-option @<option-parser>) @<action>} | |
386 | \dhead{fun}{op-long-only-p @<option-parser> @> @<generalized-boolean>} | |
387 | \dhead{fun}{setf (op-long-only-p @<option-parser>) @<generalized-boolean>} | |
388 | \dhead{fun}{op-numeric-p @<option-parser> @> @<generalized-boolean>} | |
389 | \dhead{fun}{setf (op-numeric-p @<option-parser>) @<generalized-boolean>} | |
390 | \dhead{fun}{op-negated-numeric-p @<option-parser> @<generalized-boolean>} | |
391 | \dhead{fun}{setf (op-negated-numeric-p @<option-parser>) @<generalized-boolean>} | |
392 | \dhead{fun}{op-negated-p @<option-parser> @> @<generalized-boolean>} | |
393 | \dhead{fun}{setf (op-negated-p @<option-parser>) @<generalized-boolean>}} | |
394 | \end{describe*} | |
395 | ||
396 | \begin{describe}{cls} | |
397 | {option-parse-error (error simple-condition) | |
398 | \&key :format-control :format-arguments} | |
399 | \end{describe} | |
400 | ||
401 | \begin{describe}{fun}{option-parse-remainder @<option-parser>} | |
402 | \end{describe} | |
403 | ||
404 | \begin{describe}{fun}{option-parse-return @<tag> \&optional @<argument>} | |
405 | \end{describe} | |
406 | ||
407 | \begin{describe}{fun}{option-parse-next @<option-parser>} | |
408 | \end{describe} | |
409 | ||
cac85e0b | 410 | \begin{describe}{mac}{option-parse-try @<form>^*} |
fcb6c0fb MW |
411 | \end{describe} |
412 | ||
cac85e0b | 413 | \begin{describe}{mac}{with-unix-error-reporting () @<form>^*} |
fcb6c0fb MW |
414 | \end{describe} |
415 | ||
416 | \begin{describe}{mac} | |
417 | {defopthandler @<name> (@<var> @[@<arg>@]) @<lambda-list> \\ \ind | |
cac85e0b MW |
418 | @[[ @<declaration>^* @! @<doc-string> @]] \\ |
419 | @<form>^*} | |
fcb6c0fb MW |
420 | \end{describe} |
421 | ||
422 | \begin{describe}{fun} | |
423 | {invoke-option-handler @<handler> @<locative> @<arg> @<arguments>} | |
424 | \end{describe} | |
425 | ||
426 | \begin{describe}{opt}{set \&optional @<value>} | |
427 | \end{describe} | |
428 | ||
429 | \begin{describe}{opt}{clear \&optional @<value>} | |
430 | \end{describe} | |
431 | ||
432 | \begin{describe}{opt}{inc \&optional @<maximum> @<step>} | |
433 | \end{describe} | |
434 | ||
a7011782 | 435 | \begin{describe}{opt}{dec \&optional @<minimum> @<step>} |
fcb6c0fb MW |
436 | \end{describe} |
437 | ||
438 | \begin{describe}{opt}{read} | |
439 | \end{describe} | |
440 | ||
441 | \begin{describe}{opt}{int \&key :radix :min :max} | |
442 | \end{describe} | |
443 | ||
444 | \begin{describe}{opt}{string} | |
445 | \end{describe} | |
446 | ||
447 | \begin{describe}{opt}{keyword \&optional @<valid>} | |
448 | \end{describe} | |
449 | ||
450 | \begin{describe}{opt}{list \&optional @<handler> \&rest @<handler-args>} | |
451 | \end{describe} | |
452 | ||
cac85e0b MW |
453 | \begin{describe}{mac} |
454 | {defoptmacro @<name> @<lambda-list> \\ \ind | |
455 | @[[ @<declaration>^* @! @<doc-string> @]] \\ | |
456 | @<form>^*} | |
fcb6c0fb MW |
457 | \end{describe} |
458 | ||
459 | \begin{describe}{fun}{parse-option-form @<form>} | |
460 | \end{describe} | |
461 | ||
462 | \begin{describe}{mac} | |
463 | {options @{ \=@<string> @! \+ \\ | |
464 | @<option-macro> @! (@<option-macro> @<macro-arg>^*) @! \\ | |
465 | (@[[ \=@<character> @! (:short-name @<character>) @! \+ \\ | |
466 | @<string>^* @! @<symbol> @! @<rational> @! | |
467 | (:long-name @<string>) @! \\ | |
468 | (@<string> @<format-arg>^+) @! | |
469 | (:doc @<string> @<format-arg>^*) @! \\ | |
984c3fc3 | 470 | (:arg @<arg-name>) @! (:opt-arg @<arg-name>) @! \\ |
fcb6c0fb MW |
471 | @<keyword> @! (:tag @<tag>) @! |
472 | (:negated-tag @<tag>) @! \\ | |
cac85e0b MW |
473 | @{ (@<handler> @<var> @<handler-arg>^*) @}^* |
474 | @]]) @}^*} | |
fcb6c0fb MW |
475 | \end{describe} |
476 | ||
477 | \begin{describe}{fun} | |
478 | {simple-usage @<option-list> \&optional @<mandatory-args> @> @<list>} | |
479 | \end{describe} | |
480 | ||
481 | \begin{describe}{fun}{show-usage @<prog> @<usage> \&optional @<stream>} | |
482 | \end{describe} | |
483 | ||
484 | \begin{describe}{fun} | |
485 | {show-help @<prog> @<usage> @<option-list> \&optional @<stream>} | |
486 | \end{describe} | |
487 | ||
488 | \begin{describe}{fun}{sanity-check-option-list @<option-list>} | |
489 | \end{describe} | |
490 | ||
491 | \begin{describe*} | |
492 | {\dhead{var}{*help*} | |
493 | \dhead{var}{*version*} | |
494 | \dhead{var}{*usage*}} | |
495 | \end{describe*} | |
496 | ||
497 | \begin{describe}{fun}{do-usage \&optional @<stream>} | |
498 | \end{describe} | |
499 | ||
500 | \begin{describe}{fun}{die-usage} | |
501 | \end{describe} | |
502 | ||
503 | \begin{describe}{optmac} | |
504 | {help-options \&key :short-help :short-version :short-usage} | |
505 | \end{describe} | |
506 | ||
507 | \begin{describe}{fun} | |
508 | {define-program \&key \=:program-name \+ \\ | |
509 | :help :version :usage :full-usage \\ | |
510 | :options} | |
511 | \end{describe} | |
512 | ||
513 | \begin{describe}{mac} | |
514 | {do-options (@[[ :parser @<option-parser> @]]) \\ \ind | |
515 | @{ (@{ @<case> @! (@<case>^*)@} (@[@[@<opt-var>@] @<arg-var>@]) | |
516 | @<form>^*) @}^*} | |
517 | \end{describe} | |
518 | ||
519 | %%%-------------------------------------------------------------------------- | |
520 | \section{Property sets} \label{sec:misc.pset} | |
521 | ||
2c7465ac MW |
522 | \begin{describe}{fun}{property-key @<name> @> @<keyword>} |
523 | \end{describe} | |
524 | ||
525 | \begin{describe}{gf}{decode-property @<raw-value> @> @<type> @<value>} | |
526 | \end{describe} | |
527 | ||
528 | \begin{describe}{cls}{property} | |
529 | \end{describe} | |
530 | ||
531 | \begin{describe}{fun}{propertyp @<object> @> @<generalized-boolean>} | |
532 | \end{describe} | |
533 | ||
534 | \begin{describe}{fun} | |
535 | {make-property @<name> @<raw-value> \&key :type :location :seenp} | |
536 | \end{describe} | |
537 | ||
538 | \begin{describe*} | |
539 | {\dhead{fun}{p-name @<property> @> @<name>} | |
2c7465ac | 540 | \dhead{fun}{p-value @<property> @> @<value>} |
2c7465ac | 541 | \dhead{fun}{p-type @<property> @> @<type>} |
2c7465ac | 542 | \dhead{fun}{p-key @<property> @> @<symbol>} |
2c7465ac MW |
543 | \dhead{fun}{p-seenp @<property> @> @<boolean>} |
544 | \dhead{fun}{setf (p-seenp @<property>) @<boolean>}} | |
545 | \end{describe*} | |
546 | ||
2c7465ac MW |
547 | \begin{describe}{gf} |
548 | {coerce-property-value @<value> @<type> @<wanted> @> @<coerced-value>} | |
549 | \end{describe} | |
550 | ||
551 | \begin{describe}{cls}{pset} | |
552 | \end{describe} | |
553 | ||
554 | \begin{describe}{fun}{psetp @<object> @> @<generalized-boolean>} | |
555 | \end{describe} | |
556 | ||
557 | \begin{describe}{fun}{make-pset @> @<pset>} | |
558 | \end{describe} | |
559 | ||
560 | \begin{describe}{fun}{pset-get @<pset> @<key> @> @<property-or-nil>} | |
561 | \end{describe} | |
562 | ||
563 | \begin{describe}{fun}{pset-store @<pset> @<property> @> @<property>} | |
564 | \end{describe} | |
565 | ||
566 | \begin{describe}{fun}{pset-map @<func> @<pset>} | |
567 | \end{describe} | |
568 | ||
cac85e0b MW |
569 | \begin{describe}{mac} |
570 | {with-pset-iterator (@<iter> @<pset>) @<declaration>^* @<form>^*} | |
2c7465ac MW |
571 | \end{describe} |
572 | ||
573 | \begin{describe}{fun} | |
574 | {store-property @<pset> @<name> @<value> \&key :type :location | |
575 | @> @<property>} | |
576 | \end{describe} | |
577 | ||
578 | \begin{describe}{fun} | |
579 | {get-property @<pset> @<name> @<type> \&optional @<default> | |
580 | @> @<value> @<floc-or-nil>} | |
581 | \end{describe} | |
582 | ||
583 | \begin{describe}{fun} | |
584 | {add-property @<pset> @<name> @<value> \&key :type :location | |
585 | @> @<property>} | |
586 | \end{describe} | |
587 | ||
588 | \begin{describe}{fun}{make-property-set \&rest @<plist> @> @<pset>} | |
589 | \end{describe} | |
590 | ||
591 | \begin{describe}{gf}{property-set @<thing> @> @<pset>} | |
592 | \end{describe} | |
593 | ||
594 | \begin{describe}{fun}{check-unused-properties @<pset>} | |
595 | \end{describe} | |
596 | ||
597 | \begin{describe}{mac} | |
598 | {default-slot-from-property | |
599 | (@<instance> @<slot> @[@<slot-names>@]) \\ \ind\ind | |
600 | (@<pset> @<property> @<type> @[@<prop-var> @<convert-form>^*@]) \- \\ | |
cac85e0b | 601 | @<declaration>^* \\ |
2c7465ac MW |
602 | @<default-form>^*} |
603 | \end{describe} | |
604 | ||
605 | \begin{describe}{fun} | |
b944e68b MW |
606 | {parse-property @<scanner> @<pset> |
607 | @> @<result> @<success-flag> @<consumed-flag>} | |
608 | \end{describe} | |
609 | ||
610 | \begin{describe}{fun} | |
2c7465ac MW |
611 | {parse-property-set @<scanner> |
612 | @> @<result> @<success-flag> @<consumed-flag>} | |
613 | \end{describe} | |
614 | ||
fcb6c0fb | 615 | %%%-------------------------------------------------------------------------- |
8fc2932b | 616 | \section{Miscellaneous translator features} \label{sec:misc.misc} |
fcb6c0fb MW |
617 | |
618 | \begin{describe}{var}{*sod-version*} | |
619 | \end{describe} | |
620 | ||
621 | \begin{describe}{var}{*debugout-pathname*} | |
622 | \end{describe} | |
623 | ||
60529354 MW |
624 | \begin{describe}{fun} |
625 | {test-module @<path> \&key :reason :clear :backtrace @> @<status>} | |
fcb6c0fb MW |
626 | \end{describe} |
627 | ||
4fd69126 MW |
628 | \begin{describe}{fun} |
629 | {test-parse-c-type @<string> | |
630 | @> t @<c-type> @<kernel> @<string> @! nil @<indicator>} | |
631 | \end{describe} | |
632 | ||
bf34c708 MW |
633 | \begin{describe}{fun} |
634 | {test-parse-pset @<string> | |
635 | @> t @<pset> @! nil @<indicator>} | |
636 | \end{describe} | |
637 | ||
3e21ae3f | 638 | \begin{describe}{mac} |
2b7ce7a5 MW |
639 | {test-parser (@<scanner> \&key :backtrace) @<parser> @<input> |
640 | @> @<result> @<status> @<remainder>} | |
3e21ae3f MW |
641 | \end{describe} |
642 | ||
fcb6c0fb MW |
643 | \begin{describe}{fun}{exercise} |
644 | \end{describe} | |
645 | ||
2c7465ac MW |
646 | \begin{describe}{fun}{sod-frontend:main} |
647 | \end{describe} | |
648 | ||
fcb6c0fb MW |
649 | %%%----- That's all, folks -------------------------------------------------- |
650 | ||
651 | %%% Local variables: | |
652 | %%% mode: LaTeX | |
653 | %%% TeX-master: "sod.tex" | |
654 | %%% TeX-PDF-mode: t | |
655 | %%% End: |