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 | |
fcb6c0fb MW |
163 | \begin{describe}{cls}{inconsistent-merge-error (error) \&key :candidates} |
164 | \end{describe} | |
165 | ||
166 | \begin{describe}{gf}{merge-error-candidates @<error> @> @<list>} | |
167 | \end{describe} | |
168 | ||
169 | \begin{describe}{fun} | |
e2838dc5 | 170 | {merge-lists @<lists> \&key :pick (:test \#'eql) :present @> @<list>} |
fcb6c0fb MW |
171 | \end{describe} |
172 | ||
c1ac1524 MW |
173 | |
174 | \subsection{Other list utilities} | |
175 | ||
176 | \begin{describe}{fun} | |
177 | {mappend @<function> @<list> \&rest @<more-lists> @> @<result-list>} | |
178 | \end{describe} | |
179 | ||
180 | \begin{describe}{fun} | |
181 | {distinguished-point-shortest-paths @<root> @<neighbours-func> | |
182 | @> @<list>} | |
183 | \end{describe} | |
184 | ||
fcb6c0fb MW |
185 | \begin{describe}{mac} |
186 | {categorize (\=@<item-var> @<items> | |
020b9e2b MW |
187 | @[[ :bind (@{ @<var> @! |
188 | (@<var> @[@<value>@]) @}^*) @]]) | |
189 | \\ \ind\ind | |
190 | (@{ (@<cat-var> @<cat-predicate>) @}^*) \-\\ | |
191 | @<declaration>^* \\ | |
cd35a54e | 192 | @<form>^* |
020b9e2b | 193 | \-\nlret @<value>^*} |
fcb6c0fb MW |
194 | \end{describe} |
195 | ||
42291726 MW |
196 | \begin{describe}{fun}{partial-order-minima @<items> @<order> @> @<list>} |
197 | \end{describe} | |
198 | ||
fcb6c0fb | 199 | \begin{describe}{fun} |
64cbfb65 MW |
200 | {find-duplicates @<report> @<sequence> \&key :identity :test} |
201 | \end{describe} | |
202 | ||
c1ac1524 MW |
203 | |
204 | \subsection{Position tracking} | |
fcb6c0fb | 205 | |
64cbfb65 MW |
206 | \begin{describe}{fun} |
207 | {whitespace-char-p @<character> @> @<generalized-boolean>} | |
fcb6c0fb MW |
208 | \end{describe} |
209 | ||
210 | \begin{describe}{fun} | |
211 | {update-position @<character> @<line> @<column> | |
212 | @> @<new-line> @<new-column>} | |
213 | \end{describe} | |
214 | ||
215 | \begin{describe}{fun} | |
216 | {backtrack-position @<character> @<line> @<column> | |
217 | @> @<old-line> @<old-column>} | |
218 | \end{describe} | |
219 | ||
c34b237d | 220 | |
c1ac1524 | 221 | \subsection{Object printing} |
fcb6c0fb MW |
222 | |
223 | \begin{describe}{mac} | |
020b9e2b MW |
224 | {maybe-print-unreadable-object |
225 | (@<object> @<stream> | |
226 | @[[ :type @<type> @! | |
227 | :identity @<identity> @]]) \\ \ind | |
228 | @<declaration>^* \\ | |
cac85e0b | 229 | @<form>^*} |
fcb6c0fb MW |
230 | \end{describe} |
231 | ||
08b6e064 MW |
232 | \begin{describe}{fun}{print-ugly-stuff @<stream> @<func> @> @<value>^*} |
233 | \end{describe} | |
234 | ||
fcb6c0fb | 235 | |
c1ac1524 | 236 | \subsection{Condition utilities} |
fcb6c0fb | 237 | |
f7b60deb MW |
238 | \begin{describe}{cls} |
239 | {simple-control-error (control-error simple-error) | |
240 | \&key :format-control :format-arguments} | |
241 | \end{describe} | |
242 | ||
db6c3279 MW |
243 | \begin{describe}{fun} |
244 | {designated-condition | |
245 | \=@<default-type> @<datum> @<arguments> \\ | |
246 | \>\&key :allow-pointless-arguments | |
247 | \nlret @<condition>} | |
248 | \end{describe} | |
249 | ||
f7b60deb MW |
250 | \begin{describe}{fun} |
251 | {invoke-associated-restart @<restart> @<condition> \&rest @<arguments>} | |
252 | \end{describe} | |
253 | ||
c1ac1524 MW |
254 | |
255 | \subsection{Very miscellaneous utilities} | |
256 | ||
257 | \begin{describe}{fun} | |
258 | {frob-identifier @<string> \&key :swap-case :swap-hyphen | |
259 | @> @<frobbed-string>} | |
260 | \end{describe} | |
261 | ||
262 | \begin{describe}{fun} | |
263 | {compose @<function> \&rest @<more-functions> @> @<function>} | |
264 | \end{describe} | |
265 | ||
266 | \begin{describe}{mac}{defvar-unbound @<name> @<documentation> @> @<name>} | |
267 | \end{describe} | |
268 | ||
fcb6c0fb | 269 | \begin{describe}{mac} |
c1ac1524 MW |
270 | {dosequence (@<var> @<sequence> |
271 | @[[ :start @<start> @! :end @<end> @! | |
272 | :indexvar @<var> @]]) \\ \ind | |
273 | @<declaration>^* \\ | |
274 | @{ @<tag> @! @<statement> @}^*} | |
fcb6c0fb MW |
275 | \end{describe} |
276 | ||
277 | \begin{describe}{mac} | |
c1ac1524 MW |
278 | {define-access-wrapper @<from> @<to> |
279 | @[[ :read-only @<read-only-flag> @]]} | |
fcb6c0fb MW |
280 | \end{describe} |
281 | ||
282 | %%%-------------------------------------------------------------------------- | |
283 | \section{Condition utilities} \label{sec:misc.condition} | |
284 | ||
285 | These symbols are defined in the @|sod-parser| package. | |
286 | ||
287 | \begin{describe}{cls}{enclosing-condition (condition) \&key :condition} | |
288 | \end{describe} | |
289 | ||
290 | \begin{describe}{gf} | |
291 | {enclosed-condition @<enclosing-condition> @> @<condition>} | |
292 | \end{describe} | |
293 | ||
db6c3279 MW |
294 | \begin{describe}{cls}{information (condition) \&key} |
295 | \end{describe} | |
296 | ||
297 | \begin{describe}{cls} | |
298 | {simple-information (simple-condition information) \\ \ind | |
299 | \&key :format-control :format-arguments} | |
300 | \end{describe} | |
301 | ||
302 | \begin{describe}{fun}{info @<datum> \&rest @<arguments> @> @<flag>} | |
303 | \end{describe} | |
304 | ||
e43bd955 MW |
305 | \begin{describe*} |
306 | {\dhead{rst}{noted} | |
307 | \dhead{fun}{noted \&optional @<condition>}} | |
308 | \end{describe*} | |
db6c3279 | 309 | |
fcb6c0fb MW |
310 | \begin{describe}{fun}{cerror* @<datum> \&rest @<arguments>} |
311 | \end{describe} | |
312 | ||
313 | %%%-------------------------------------------------------------------------- | |
314 | \section{Option parser} \label{sec:misc.optparse} | |
315 | ||
054e8f8f | 316 | These symbols are defined in the @|optparse| package. |
fcb6c0fb MW |
317 | |
318 | \begin{describe}{fun}{exit \&optional (@<code> 0) \&key :abrupt} | |
319 | \end{describe} | |
320 | ||
321 | \begin{describe}{var}{*program-name*} | |
322 | \end{describe} | |
323 | ||
324 | \begin{describe}{var}{*command-line*} | |
325 | \end{describe} | |
326 | ||
327 | \begin{describe}{fun}{set-command-line-arguments} | |
328 | \end{describe} | |
329 | ||
fcb6c0fb MW |
330 | \begin{describe}{fun}{moan @<format-string> \&rest @<format-args>} |
331 | \end{describe} | |
332 | ||
333 | \begin{describe}{fun}{die @<format-string> \&rest @<format-args>} | |
334 | \end{describe} | |
335 | ||
336 | \begin{describe}{var}{*options*} | |
337 | \end{describe} | |
338 | ||
339 | \begin{describe}{cls}{option} | |
340 | \end{describe} | |
341 | ||
342 | \begin{describe}{fun}{optionp @<object> @> @<generalized-boolean>} | |
343 | \end{describe} | |
344 | ||
345 | \begin{describe}{fun} | |
020b9e2b MW |
346 | {make-option \=@<long-name> @<short-name> \+\\ |
347 | \&optional @<arg-name> \\ | |
348 | \&key :tag :negated-tag | |
349 | :arg-optional-p :documentation \- | |
fcb6c0fb MW |
350 | \nlret @<option>} |
351 | \end{describe} | |
352 | ||
353 | \begin{describe*} | |
354 | {\dhead{fun}{opt-short-name @<option> @> @<character-or-null>} | |
355 | \dhead{fun}{setf (opt-short-name @<option>) @<character-or-null>} | |
356 | \dhead{fun}{opt-long-name @<option> @> @<string-or-null>} | |
357 | \dhead{fun}{setf (opt-long-name @<option>) @<string-or-null>} | |
358 | \dhead{fun}{opt-tag @<option> @> @<tag>} | |
359 | \dhead{fun}{setf (opt-tag @<option>) @<tag>} | |
360 | \dhead{fun}{opt-negated-tag @<option> @> @<tag>} | |
361 | \dhead{fun}{setf (opt-negated-tag @<option>) @<tag>} | |
362 | \dhead{fun}{opt-arg-name @<option> @> @<string-or-null>} | |
363 | \dhead{fun}{setf (opt-arg-name @<option>) @<string-or-null>} | |
364 | \dhead{fun}{opt-optional-p @<option> @> @<generalized-boolean>} | |
365 | \dhead{fun}{setf (opt-optional-p @<option>) @<generalized-boolean>} | |
366 | \dhead{fun}{opt-documentation @<option> @> @<string-or-null>} | |
367 | \dhead{fun}{setf (opt-documentation @<option>) @<string-or-null>}} | |
368 | \end{describe*} | |
369 | ||
370 | \begin{describe}{cls}{option-parser} | |
371 | \end{describe} | |
372 | ||
373 | \begin{describe}{fun}{option-parser-p @<object> @> @<generalized-boolean>} | |
374 | \end{describe} | |
375 | ||
376 | \begin{describe}{fun} | |
377 | {make-option-parser \&key \=:args :options :non-option :numericp \+ \\ | |
378 | :negated-numeric-p long-only-p \- | |
379 | \nlret @<option-parser>} | |
380 | \end{describe} | |
381 | ||
382 | \begin{describe*} | |
383 | {\dhead{fun}{op-options @<option-parser> @> @<list>} | |
384 | \dhead{fun}{setf (op-options @<option-parser>) @<list>} | |
385 | \dhead{fun}{op-non-option @<option-parser> @> @<action>} | |
386 | \dhead{fun}{setf (op-non-option @<option-parser>) @<action>} | |
387 | \dhead{fun}{op-long-only-p @<option-parser> @> @<generalized-boolean>} | |
388 | \dhead{fun}{setf (op-long-only-p @<option-parser>) @<generalized-boolean>} | |
389 | \dhead{fun}{op-numeric-p @<option-parser> @> @<generalized-boolean>} | |
390 | \dhead{fun}{setf (op-numeric-p @<option-parser>) @<generalized-boolean>} | |
391 | \dhead{fun}{op-negated-numeric-p @<option-parser> @<generalized-boolean>} | |
392 | \dhead{fun}{setf (op-negated-numeric-p @<option-parser>) @<generalized-boolean>} | |
393 | \dhead{fun}{op-negated-p @<option-parser> @> @<generalized-boolean>} | |
394 | \dhead{fun}{setf (op-negated-p @<option-parser>) @<generalized-boolean>}} | |
395 | \end{describe*} | |
396 | ||
397 | \begin{describe}{cls} | |
398 | {option-parse-error (error simple-condition) | |
399 | \&key :format-control :format-arguments} | |
400 | \end{describe} | |
401 | ||
402 | \begin{describe}{fun}{option-parse-remainder @<option-parser>} | |
403 | \end{describe} | |
404 | ||
405 | \begin{describe}{fun}{option-parse-return @<tag> \&optional @<argument>} | |
406 | \end{describe} | |
407 | ||
408 | \begin{describe}{fun}{option-parse-next @<option-parser>} | |
409 | \end{describe} | |
410 | ||
cac85e0b | 411 | \begin{describe}{mac}{option-parse-try @<form>^*} |
fcb6c0fb MW |
412 | \end{describe} |
413 | ||
cac85e0b | 414 | \begin{describe}{mac}{with-unix-error-reporting () @<form>^*} |
fcb6c0fb MW |
415 | \end{describe} |
416 | ||
417 | \begin{describe}{mac} | |
418 | {defopthandler @<name> (@<var> @[@<arg>@]) @<lambda-list> \\ \ind | |
cac85e0b MW |
419 | @[[ @<declaration>^* @! @<doc-string> @]] \\ |
420 | @<form>^*} | |
fcb6c0fb MW |
421 | \end{describe} |
422 | ||
423 | \begin{describe}{fun} | |
424 | {invoke-option-handler @<handler> @<locative> @<arg> @<arguments>} | |
425 | \end{describe} | |
426 | ||
427 | \begin{describe}{opt}{set \&optional @<value>} | |
428 | \end{describe} | |
429 | ||
430 | \begin{describe}{opt}{clear \&optional @<value>} | |
431 | \end{describe} | |
432 | ||
433 | \begin{describe}{opt}{inc \&optional @<maximum> @<step>} | |
434 | \end{describe} | |
435 | ||
436 | \begin{describe}{opt}{dec \&optional <minimum> <step>} | |
437 | \end{describe} | |
438 | ||
439 | \begin{describe}{opt}{read} | |
440 | \end{describe} | |
441 | ||
442 | \begin{describe}{opt}{int \&key :radix :min :max} | |
443 | \end{describe} | |
444 | ||
445 | \begin{describe}{opt}{string} | |
446 | \end{describe} | |
447 | ||
448 | \begin{describe}{opt}{keyword \&optional @<valid>} | |
449 | \end{describe} | |
450 | ||
451 | \begin{describe}{opt}{list \&optional @<handler> \&rest @<handler-args>} | |
452 | \end{describe} | |
453 | ||
cac85e0b MW |
454 | \begin{describe}{mac} |
455 | {defoptmacro @<name> @<lambda-list> \\ \ind | |
456 | @[[ @<declaration>^* @! @<doc-string> @]] \\ | |
457 | @<form>^*} | |
fcb6c0fb MW |
458 | \end{describe} |
459 | ||
460 | \begin{describe}{fun}{parse-option-form @<form>} | |
461 | \end{describe} | |
462 | ||
463 | \begin{describe}{mac} | |
464 | {options @{ \=@<string> @! \+ \\ | |
465 | @<option-macro> @! (@<option-macro> @<macro-arg>^*) @! \\ | |
466 | (@[[ \=@<character> @! (:short-name @<character>) @! \+ \\ | |
467 | @<string>^* @! @<symbol> @! @<rational> @! | |
468 | (:long-name @<string>) @! \\ | |
469 | (@<string> @<format-arg>^+) @! | |
470 | (:doc @<string> @<format-arg>^*) @! \\ | |
984c3fc3 | 471 | (:arg @<arg-name>) @! (:opt-arg @<arg-name>) @! \\ |
fcb6c0fb MW |
472 | @<keyword> @! (:tag @<tag>) @! |
473 | (:negated-tag @<tag>) @! \\ | |
cac85e0b MW |
474 | @{ (@<handler> @<var> @<handler-arg>^*) @}^* |
475 | @]]) @}^*} | |
fcb6c0fb MW |
476 | \end{describe} |
477 | ||
478 | \begin{describe}{fun} | |
479 | {simple-usage @<option-list> \&optional @<mandatory-args> @> @<list>} | |
480 | \end{describe} | |
481 | ||
482 | \begin{describe}{fun}{show-usage @<prog> @<usage> \&optional @<stream>} | |
483 | \end{describe} | |
484 | ||
485 | \begin{describe}{fun} | |
486 | {show-help @<prog> @<usage> @<option-list> \&optional @<stream>} | |
487 | \end{describe} | |
488 | ||
489 | \begin{describe}{fun}{sanity-check-option-list @<option-list>} | |
490 | \end{describe} | |
491 | ||
492 | \begin{describe*} | |
493 | {\dhead{var}{*help*} | |
494 | \dhead{var}{*version*} | |
495 | \dhead{var}{*usage*}} | |
496 | \end{describe*} | |
497 | ||
498 | \begin{describe}{fun}{do-usage \&optional @<stream>} | |
499 | \end{describe} | |
500 | ||
501 | \begin{describe}{fun}{die-usage} | |
502 | \end{describe} | |
503 | ||
504 | \begin{describe}{optmac} | |
505 | {help-options \&key :short-help :short-version :short-usage} | |
506 | \end{describe} | |
507 | ||
508 | \begin{describe}{fun} | |
509 | {define-program \&key \=:program-name \+ \\ | |
510 | :help :version :usage :full-usage \\ | |
511 | :options} | |
512 | \end{describe} | |
513 | ||
514 | \begin{describe}{mac} | |
515 | {do-options (@[[ :parser @<option-parser> @]]) \\ \ind | |
516 | @{ (@{ @<case> @! (@<case>^*)@} (@[@[@<opt-var>@] @<arg-var>@]) | |
517 | @<form>^*) @}^*} | |
518 | \end{describe} | |
519 | ||
520 | %%%-------------------------------------------------------------------------- | |
521 | \section{Property sets} \label{sec:misc.pset} | |
522 | ||
2c7465ac MW |
523 | \begin{describe}{fun}{property-key @<name> @> @<keyword>} |
524 | \end{describe} | |
525 | ||
526 | \begin{describe}{gf}{decode-property @<raw-value> @> @<type> @<value>} | |
527 | \end{describe} | |
528 | ||
529 | \begin{describe}{cls}{property} | |
530 | \end{describe} | |
531 | ||
532 | \begin{describe}{fun}{propertyp @<object> @> @<generalized-boolean>} | |
533 | \end{describe} | |
534 | ||
535 | \begin{describe}{fun} | |
536 | {make-property @<name> @<raw-value> \&key :type :location :seenp} | |
537 | \end{describe} | |
538 | ||
539 | \begin{describe*} | |
540 | {\dhead{fun}{p-name @<property> @> @<name>} | |
2c7465ac | 541 | \dhead{fun}{p-value @<property> @> @<value>} |
2c7465ac | 542 | \dhead{fun}{p-type @<property> @> @<type>} |
2c7465ac | 543 | \dhead{fun}{p-key @<property> @> @<symbol>} |
2c7465ac MW |
544 | \dhead{fun}{p-seenp @<property> @> @<boolean>} |
545 | \dhead{fun}{setf (p-seenp @<property>) @<boolean>}} | |
546 | \end{describe*} | |
547 | ||
2c7465ac MW |
548 | \begin{describe}{gf} |
549 | {coerce-property-value @<value> @<type> @<wanted> @> @<coerced-value>} | |
550 | \end{describe} | |
551 | ||
552 | \begin{describe}{cls}{pset} | |
553 | \end{describe} | |
554 | ||
555 | \begin{describe}{fun}{psetp @<object> @> @<generalized-boolean>} | |
556 | \end{describe} | |
557 | ||
558 | \begin{describe}{fun}{make-pset @> @<pset>} | |
559 | \end{describe} | |
560 | ||
561 | \begin{describe}{fun}{pset-get @<pset> @<key> @> @<property-or-nil>} | |
562 | \end{describe} | |
563 | ||
564 | \begin{describe}{fun}{pset-store @<pset> @<property> @> @<property>} | |
565 | \end{describe} | |
566 | ||
567 | \begin{describe}{fun}{pset-map @<func> @<pset>} | |
568 | \end{describe} | |
569 | ||
cac85e0b MW |
570 | \begin{describe}{mac} |
571 | {with-pset-iterator (@<iter> @<pset>) @<declaration>^* @<form>^*} | |
2c7465ac MW |
572 | \end{describe} |
573 | ||
574 | \begin{describe}{fun} | |
575 | {store-property @<pset> @<name> @<value> \&key :type :location | |
576 | @> @<property>} | |
577 | \end{describe} | |
578 | ||
579 | \begin{describe}{fun} | |
580 | {get-property @<pset> @<name> @<type> \&optional @<default> | |
581 | @> @<value> @<floc-or-nil>} | |
582 | \end{describe} | |
583 | ||
584 | \begin{describe}{fun} | |
585 | {add-property @<pset> @<name> @<value> \&key :type :location | |
586 | @> @<property>} | |
587 | \end{describe} | |
588 | ||
589 | \begin{describe}{fun}{make-property-set \&rest @<plist> @> @<pset>} | |
590 | \end{describe} | |
591 | ||
592 | \begin{describe}{gf}{property-set @<thing> @> @<pset>} | |
593 | \end{describe} | |
594 | ||
595 | \begin{describe}{fun}{check-unused-properties @<pset>} | |
596 | \end{describe} | |
597 | ||
598 | \begin{describe}{mac} | |
599 | {default-slot-from-property | |
600 | (@<instance> @<slot> @[@<slot-names>@]) \\ \ind\ind | |
601 | (@<pset> @<property> @<type> @[@<prop-var> @<convert-form>^*@]) \- \\ | |
cac85e0b | 602 | @<declaration>^* \\ |
2c7465ac MW |
603 | @<default-form>^*} |
604 | \end{describe} | |
605 | ||
606 | \begin{describe}{fun} | |
b944e68b MW |
607 | {parse-property @<scanner> @<pset> |
608 | @> @<result> @<success-flag> @<consumed-flag>} | |
609 | \end{describe} | |
610 | ||
611 | \begin{describe}{fun} | |
2c7465ac MW |
612 | {parse-property-set @<scanner> |
613 | @> @<result> @<success-flag> @<consumed-flag>} | |
614 | \end{describe} | |
615 | ||
fcb6c0fb | 616 | %%%-------------------------------------------------------------------------- |
8fc2932b | 617 | \section{Miscellaneous translator features} \label{sec:misc.misc} |
fcb6c0fb MW |
618 | |
619 | \begin{describe}{var}{*sod-version*} | |
620 | \end{describe} | |
621 | ||
622 | \begin{describe}{var}{*debugout-pathname*} | |
623 | \end{describe} | |
624 | ||
60529354 MW |
625 | \begin{describe}{fun} |
626 | {test-module @<path> \&key :reason :clear :backtrace @> @<status>} | |
fcb6c0fb MW |
627 | \end{describe} |
628 | ||
4fd69126 MW |
629 | \begin{describe}{fun} |
630 | {test-parse-c-type @<string> | |
631 | @> t @<c-type> @<kernel> @<string> @! nil @<indicator>} | |
632 | \end{describe} | |
633 | ||
bf34c708 MW |
634 | \begin{describe}{fun} |
635 | {test-parse-pset @<string> | |
636 | @> t @<pset> @! nil @<indicator>} | |
637 | \end{describe} | |
638 | ||
3e21ae3f | 639 | \begin{describe}{mac} |
2b7ce7a5 MW |
640 | {test-parser (@<scanner> \&key :backtrace) @<parser> @<input> |
641 | @> @<result> @<status> @<remainder>} | |
3e21ae3f MW |
642 | \end{describe} |
643 | ||
fcb6c0fb MW |
644 | \begin{describe}{fun}{exercise} |
645 | \end{describe} | |
646 | ||
2c7465ac MW |
647 | \begin{describe}{fun}{sod-frontend:main} |
648 | \end{describe} | |
649 | ||
fcb6c0fb MW |
650 | %%%----- That's all, folks -------------------------------------------------- |
651 | ||
652 | %%% Local variables: | |
653 | %%% mode: LaTeX | |
654 | %%% TeX-master: "sod.tex" | |
655 | %%% TeX-PDF-mode: t | |
656 | %%% End: |