3 %%% Description of the parsing machinery
5 %%% (c) 2015 Straylight/Edgeware
8 %%%----- Licensing notice ---------------------------------------------------
10 %%% This file is part of the Sensible Object Design, an object system for C.
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.
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.
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.
26 \chapter{Parsing} \label{ch:parsing}
28 %%%--------------------------------------------------------------------------
29 \section{The parser protocol} \label{sec:parsing.proto}
31 For the purpose of Sod's parsing library, \emph{parsing} is the process of
32 reading a sequence of input items, in order, and computing an output value.
34 A \emph{parser} is an expression which consumes zero or more input items and
35 returns three values: a \emph{result}, a \emph{success flag}, and a
36 \emph{consumed flag}. The two flags are (generalized) booleans. If the
37 success flag is non-nil, then the parser is said to have \emph{succeeded},
38 and the result is the parser's output. If the success flag is nil then the
39 parser is said to have \emph{failed}, and the result is a list of
40 \emph{indicators}. Finally, the consumed flag is non-nil if the parser
41 consumed any input items.
43 \begin{describe}{fun}{combine-parser-failures @<failures> @> @<list>}
46 \begin{describe}{fun}{parse-empty \&optional @<value> @> @<function>}
50 {parse-fail @<indicator> \&optional @<consumedp> @> @<function>}
53 %%%--------------------------------------------------------------------------
54 \section{File locations} \label{sec:parsing.floc}
56 \begin{describe}{cls}{file-location}
59 \begin{describe}{fun}{file-location-p @<object> @> @<generalized-boolean>}
63 {make-file-location @<filename> \&optional @<line> @<column>
68 {\dhead{fun}{file-location-filename @<floc> @> @<string-or-nil>}
69 \dhead{fun}{file-location-line @<floc> @> @<fixnum-or-nil>}
70 \dhead{fun}{file-location-column @<floc> @> @<fixnum-or-nil>}}
73 \begin{describe}{gf}{file-location @<object> @> @<floc>}
74 \begin{describe}{meth}{file-location (@<floc> file-location) @> @<floc>}
76 \begin{describe}{meth}{file-location (@<stream> stream) @> @<floc>}
78 \begin{describe}{meth}{file-location (@<any> t) @> @<floc>}
82 \begin{describe}{cls}{condition-with-location (condition) \&key :location}
85 \begin{describe}{meth}
86 {file-location (@<condition> condition-with-location) @> @<floc>}
92 {error-with-location (condition-with-location error) \\ \>
95 {warning-with-location (condition-with-location warning) \\ \>
98 {enclosing-error-with-location
99 (enclosing-error-with-location error) \\ \>
100 \&key :condition :location}
102 {enclosing-warning-with-location
103 (enclosing-condition-with-location warning) \\ \>
104 \&key :condition :location}
106 {simple-condition-with-location
107 (condition-with-location simple-condition) \\ \>
108 \&key :format-control :format-arguments :location}
110 {simple-error-with-location
111 (error-with-location simple-error) \\ \>
112 \&key :format-control :format-arguments :location}
114 {simple-warning-with-location
115 (warning-with-location simple-warning) \\ \>
116 \&key :format-control :format-arguments :location}}
120 {enclosing-condition-with-location-type @<condition> @> @<symbol>}
123 \begin{describe}{fun}
124 {make-condition-with-location @<default-type> @<floc>
125 @<datum> \&rest @<arguments>
126 \nlret @<condition-with-location>}
130 {\dhead{fun}{error-with-location @<floc> @<datum> \&rest @<arguments>}
131 \dhead{fun}{cerror-with-location @<floc> @<continue-string>
132 @<datum> \&rest @<arguments>}
133 \dhead{fun}{cerror*-with-location @<floc> @<datum> \&rest @<arguments>}
134 \dhead{fun}{warn-with-location @<floc> @<datum> \&rest @<arguments>}}
137 \begin{describe}{mac}
138 {with-default-error-location (@<floc>) @<declaration>^* @<form>^*
142 \begin{describe}{mac}
143 {count-and-report-errors () @<declaration>^* @<form>^*
144 @> @<value> @<n-errors> @<n-warnings>}
147 %%%--------------------------------------------------------------------------
148 \section{Scanners} \label{sec:parsing.scanner}
150 A \emph{scanner} is an object which keeps track of a parser's progress as it
151 works through its input. There's no common base class for scanners: a
152 scanner is simply any object which implements the scanner protocol described
155 A scanner maintains a sequence of items to read. It can step forwards
156 through the items, one at a time, until it reaches the end (if, indeed, the
157 sequence is finite, which it needn't be). Until that point, there is a
158 current item, though there's no protocol for accessing it at this level
159 because the nature of the items is left unspecified.
161 Some scanners support an additional \emph{place-capture} protocol which
162 allows rewinding the scanner to an earlier point in the input so that it can
165 \subsection{Basic scanner protocol} \label{sec:parsing.scanner.basic}
167 The basic protocol supports stepping the scanner forward through its input
168 sequence, and detecting the end of the sequence.
170 \begin{describe}{gf}{scanner-step @<scanner>}
171 Advance the @<scanner> to the next item, which becomes current.
173 It is an error to step the scanner if the scanner is at end-of-file.
176 \begin{describe}{gf}{scanner-at-eof-p @<scanner> @> @<generalized-boolean>}
177 Return non-nil if the scanner is at end-of-file, i.e., there are no more
180 If nil is returned, there is a current item, and it is safe to step the
181 scanner again; otherwise, it is an error to query the current item or to
185 \subsection{Place-capture scanner protocol} \label{sec:parsing.scanner.place}
187 The place-capture protocol allows rewinding to an earlier point in the
188 sequence. Not all scanners support the place-capture protocol.
190 To rewind a scanner to a particular point, that point must be \emph{captured}
191 as a \emph{place} when it's current -- so you must know in advance that this
192 is an interesting place that's worth capturing. The type of place returned
193 depends on the type of scanner. Given a captured place, the scanner can be
194 rewound to the position held in it.
196 Depending on how the scanner works, holding onto a captured place might
197 consume a lot of memory or case poor performance. For example, if the
198 scanner is reading from an input stream, having a captured place means that
199 data from that point on must be buffered in case the program needs to rewind
200 the scanner and read that data again. Therefore it's possible to
201 \emph{release} a place when it turns out not to be needed any more.
203 \begin{describe}{gf}{scanner-capture-place @<scanner> @> @<place>}
204 Capture the @<scanner>'s current position as a place, and return the place.
207 \begin{describe}{gf}{scanner-restore-place @<scanner> @<place>}
208 Rewind the @<scanner> to the state it was in when @<place> was captured.
209 In particular, the item that was current when the @<place> was captured
210 becomes current again.
212 It is an error to restore a @<place> that has been released, or if the
213 @<place> wasn't captured from the @<scanner>.
216 \begin{describe}{gf}{scanner-release-place @<scanner> @<place>}
217 Release the @<place>, to avoid having to maintaining the ability to restore
218 it after it's not needed any more..
220 It is an error if the @<place> wasn't captured from the @<scanner>.
223 \begin{describe}{mac}
224 {with-scanner-place (@<place> @<scanner>) @<declarations>^* @<form>^*
226 Capture the @<scanner>'s current position as a place, evaluate the @<form>s
227 as an implicit progn with the variable @<place> bound to the captured
228 place. When control leaves the @<form>s, the place is released. The
229 return values are the values of the final @<form>.
232 \subsection{Scanner file-location protocol} \label{sec:parsing.scanner.floc}
234 Some scanners participate in the file-location protocol
235 (\xref{sec:parsing.floc}). They implement a method on @|file-location| which
236 collects the necessary information using scanner-specific functions described
239 \begin{describe}{fun}{scanner-file-location @<scanner> @> @<file-location>}
240 Return a @|file-location| object describing the current position of the
243 This calls the @|scanner-filename|, @|scanner-line| and @|scanner-column|
244 generic functions on the scanner, and uses these to fill in an appropriate
247 Since there are default methods on these generic functions, it is not an
248 error to call @|scanner-file-location| on any kind of value, but it might
249 not be very useful. This function exists to do the work of appropriately
250 specialized methods on @|file-location|.
254 {\dhead{gf}{scanner-filename @<scanner> @> @<string>}
255 \dhead{gf}{scanner-line @<scanner> @> @<integer>}
256 \dhead{gf}{scanner-column @<scanner> @> @<integer>}}
257 Return the filename, line and column components of the @<scanner>'s current
258 position, for use in assembling a @<file-location>: see the
259 @|scanner-file-location| function.
261 There are default methods on all three generic functions which simply
265 \subsection{Character scanners} \label{sec:parsing.scanner.char}
267 Character scanners are scanners which read sequences of characters.
269 \begin{describe}{cls}{character-scanner () \&key}
270 Base class for character scanners. This provides some very basic
273 Not all character scanners are subclasses of @|character-scanner|.
276 \begin{describe}{gf}{scanner-current-char @<scanner> @> @<character>}
277 Returns the current character.
280 \begin{describe}{gf}{scanner-unread @<scanner> @<character>}
281 Rewind the @<scanner> by one step. The @<chararacter> must be the previous
282 current character, and becomes the current character again. It is an error
283 if: the @<scanner> has reached end-of-file; the @<scanner> is never been
284 stepped; or @<character> was not the previous current character.
288 {scanner-interval @<scanner> @<place-a> \&optional @<place-b>
290 Return the characters in the @<scanner>'s input from @<place-a> up to (but
291 not including) @<place-b>.
293 The characters are returned as a string. If @<place-b> is omitted, return
294 the characters up to (but not including) the current position. It is an
295 error if @<place-b> precedes @<place-a> or they are from different
298 This function is a character-scanner-specific extension to the
299 place-capture protocol; not all character scanners implement the
300 place-capture protocol, and some that do may not implement this function.
303 \subsubsection{Stream access to character scanners}
304 Sometimes it can be useful to apply the standard Lisp character input
305 operations to the sequence of characters held by a character scanner.
307 \begin{describe}{gf}{make-scanner-stream @<scanner> @> @<stream>}
308 Returns a fresh input @|stream| object which fetches input characters from
309 the character scanner object @<scanner>. Reading characters from the
310 stream steps the scanner. The stream will reach end-of-file when the
311 scanner reports end-of-file. If the scanner implements the file-location
312 protocol then reading from the stream will change the file location in an
315 This is mostly useful for applying standard Lisp stream functions, most
316 particularly the @|read| function, in the middle of a parsing operation.
319 \begin{describe}{cls}{character-scanner-stream (stream) \&key :scanner}
320 A Common Lisp input @|stream| object which works using the character
321 scanner protocol. Any @<scanner> which implements the base scanner and
322 character scanner protocols is suitable. See @|make-scanner-stream|.
325 \subsection{String scanners} \label{sec:parsing.scanner.string}
327 A \emph{string scanner} is a simple kind of character scanner which reads
328 input from a string object. String scanners implement the character scanner
329 and place-capture protocols.
331 \begin{describe}{cls}{string-scanner}
332 The class of string scanners. The @|string-scanner| class is not a
333 subclass of @|character-scanner|.
336 \begin{describe}{fun}{string-scanner-p @<value> @> @<generalized-boolean>}
337 Return non-nil if @<value> is a @|string-scanner| object; otherwise return
341 \begin{describe}{fun}
342 {make-string-scanner @<string> \&key :start :end @> @<string-scanner>}
343 Construct and return a fresh @|string-scanner| object. The new scanner
344 will read characters from @<string>, starting at index @<start> (which
345 defaults to zero), and continuing until it reaches index @<end> (defaults
346 to the end of the @<string>).
349 \subsection{Character buffer scanners} \label{sec:parsing.scanner.charbuf}
351 A \emph{character buffer scanner}, or \emph{charbuf scanner} for short, is an
352 efficient scanner for reading characters from an input stream. Charbuf
353 scanners implements the basic scanner, character buffer, place-capture, and
354 file-location protocols.
356 \begin{describe}{cls}
357 {charbuf-scanner (character-scanner)
358 \&key :stream :filename :line :column}
359 The class of charbuf scanners. The scanner will read characters from
360 @<stream>. Charbuf scanners implement the file-location protocol: the
361 initial location is set from the given @<filename>, @<line> and @<column>;
362 the scanner will update the location as it reads its input.
365 \begin{describe}{cls}{charbuf-scanner-place}
366 The class of place objects captured by a charbuf scanner.
369 \begin{describe}{fun}
370 {charbuf-scanner-place-p @<value> @> @<generalized-boolean>}
371 Type predicate for charbuf scanner places: returns non-nil if @<value> is a
372 place captured by a charbuf scanner, and nil otherwise.
376 {charbuf-scanner-map @<scanner> @<func> \&optional @<fail>
377 \nlret @<result> @<successp> @<consumedp>}
378 Read characters from the @<scanner>'s buffers.
380 This is intended to be an efficient and versatile interface for reading
381 characters from a scanner in bulk. The function @<func> is invoked
384 (multiple-value-bind (@<donep> @<used>) \\ \ind\ind
385 (funcall @<func> @<buf> @<start> @<end>) \-\\
388 The argument @<buf> is a simple string; @<start> and @<end> are two
389 nonnegative fixnums, indicating that the subsequence of @<buf> between
390 @<start> (inclusive) and @<end> (exclusive) should be processed. If
391 @<func>'s return value @<donep> is nil then @<used> is ignored: the
392 function has consumed the entire buffer and wishes to read more. If
393 @<donep> is non-nil, then it must be a fixnum such that $@<start> \le
394 @<used> \le @<end>$: the function has consumed the buffer as far as @<used>
395 (exclusive) and has completed successfully.
397 If end-of-file is encountered before @<func> completes successfully then it
398 fails: the @<fail> function is called with no arguments, and is expected to
399 return two values. If omitted, @<fail> defaults to
405 The @|charbuf-scanner-map| function returns three values. The first value
406 is the non-nil @<donep> value returned by @<func> if @|charbuf-scanner-map|
407 succeeded, or the first value returned by @<fail>; the second value is @|t|
408 on success, or the second value returned by @<fail>; the third value is
409 non-nil if @<func> consumed any input, i.e., it returned with @<donep> nil
410 at least once, or with $@<used> > @<start>$.
413 \subsection{Token scanners} \label{sec:parsing.scanner.token}
415 \begin{describe}{cls}
416 {token-scanner () \&key :filename (:line 1) (:column 0)}
419 \begin{describe}{gf}{token-type @<scanner> @> @<type>}
422 \begin{describe}{gf}{token-value @<scanner> @> @<value>}
425 \begin{describe}{gf}{scanner-token @<scanner> @> @<type> @<value>}
428 \begin{describe}{ty}{token-scanner-place}
431 \begin{describe}{fun}
432 {token-scanner-place-p @<value> @> @<generalized-boolean>}
435 \subsection{List scanners}
437 \begin{describe}{ty}{list-scanner}
440 \begin{describe}{fun}{list-scanner-p @<value> @> @<generalized-boolean>}
443 \begin{describe}{fun}{make-list-scanner @<list> @> @<list-scanner>}
446 %%%--------------------------------------------------------------------------
447 \section{Parsing syntax}
449 \begin{describe}{gf}{expand-parser-spec @<context> @<spec> @> @<form>}
453 {expand-parser-form @<context> @<head> @<tail> @> @<form>}
456 \begin{describe}{gf}{wrap-parser @<context> @<form> @> @<wrapped-form>}
459 \begin{describe}{mac}
460 {defparse @<name> (@[[ :context (@<var> @<context-class>) @]]
461 @<destructuring-lambda-list-item>^*) \\ \ind
462 @[[ @<declaration>^* @! @<doc-string> @]] \\
467 \begin{describe}{mac}
469 (@<context-class> @{ @<init-keyword> @<value> @}^*) \\ \ind
475 \begin{describe}{lmac}
476 {parse @<parser> @> @<result> @<success-flag> @<consumed-flag>}
479 \begin{describe}{mac}
480 {parser @<lambda-list>
481 @[[ @<declaration>^* @! @<doc-string> @]]
486 \begin{describe}{gf}{parser-at-eof-p @<context> @> @<form>}
489 \begin{describe}{gf}{parser-step @<context> @> @<form>}
492 \begin{describe}{sym}{it}
495 \begin{describe}{mac}
496 {if-parse (@[[ \=:result @<result-var> @!
497 :expected @<expected-var> @! \+\\
498 :consumedp @<consumed-var> @]]) \-\\ \ind\ind
505 \begin{describe}{mac}
506 {when-parse (@[@<result-var>@]) @<parser> \\ \ind
511 \begin{describe}{mac}
512 {cond-parse (@[[ \=:result @<result-var> @!
513 :expected @<expected-var> @! \+\\
514 :consumedp @<consumed-var> @]]) \-\\ \ind
515 @{ (@<parser> @<form>^*) @}^*
519 \begin{describe}{parse}{:eof}
522 \begin{describe}{parseform}{lisp @<form>^*}
525 \begin{describe}{parseform}{label @<parser>}
528 \begin{describe}{parse}{t}
531 \begin{describe}{parseform}{t @<value>}
534 \begin{describe}{parse}{nil}
537 \begin{describe}{parseform}{nil @<indicator>}
540 \begin{describe}{parseform}{when @<cond> @<parser>}
543 \begin{describe}{parseform}
544 {seq (@{ @<atomic-parser-spec> @!
545 (@[@<var>@] @<parser>) @}^*) \\ \ind
549 \begin{describe}{parseform}{and @<parser>^*}
552 \begin{describe}{parseform}{or @<parser>^*}
555 \begin{describe}{parseform}{? @<parser> @[@<default>@]}
558 \begin{describe}{parseform}
559 {many (\=@<accumulator-var> @<init-form> @<update-form> \+\\
560 @[[ \=:new @<new-var> @! :final @<final-form> @! \+\\
561 :min @<minimum> @! :max @<maximum> @! \\
562 :commitp @<commitp> @]]) \-\-\\ \ind
563 @<item-parser> @[@<sep-parser>@]}
566 \begin{describe}{parseform}
567 {list (@[[ :min @<minimum> @! :max @<maximum> @!
568 :commitp @<commitp> @]]) \\ \ind
569 @<item-parser> @[@<sep-parser>@]}
572 \begin{describe}{parseform}
573 {skip-many (@[[ :min @<minimum> @! :max @<maximum> @!
574 :commitp @<commitp> @]]) \\ \ind
575 @<item-parser> @[@<sep-parser>@]}
578 \begin{describe}{fun}{call-pluggable-parser @<symbol> \&rest @<args>}
581 \begin{describe}{parseform}{plug @<symbol> @<arg>^*}
584 \begin{describe}{fun}
585 {pluggable-parser-add @<symbol> @<tag> @<parser-function>}
588 \begin{describe}{mac}
589 {define-pluggable-parser @<symbol> @<tag> @<lambda-list>
590 @[[ @<declaration>^* @! @<doc-string> @]]
594 \begin{describe}{gf}{parser-capture-place @<context> @> @<form>}
597 \begin{describe}{gf}{parser-restore-place @<context> @<place> @> @<form>}
600 \begin{describe}{gf}{parser-release-place @<context> @<place> @> @<form>}
604 {parser-places-must-be-released-p @<context> @> @<generalized-boolean>>}
607 \begin{describe}{mac}
608 {with-parser-place (@<place-var> @<context>)
609 @[[ @<declaration>^* @! @<doc-string> @]]
613 \begin{describe}{parseform}{peek @<parser>}
616 \begin{describe}{parseform}{commit}
619 \begin{describe}{cls}{character-parser-context () \&key}
622 \begin{describe}{gf}{parser-current-char @<context> @> @<form>}
625 \begin{describe}{parseform}
626 {if-char (@[@<result-var>@]) @<condition> @<consequent> @<alternative>}
629 \begin{describe}{parseform}{char @<character>}
632 \begin{describe}[char]{parse}{@<character>}
635 \begin{describe}[string]{parse}{@<string>}
638 \begin{describe}{parse}{:any}
641 \begin{describe}{parseform}{satisfies @<predicate>}
644 \begin{describe}{parseform}{not @<character>}
647 \begin{describe}{parseform}{filter @<predicate>}
650 \begin{describe}{parse}{:whitespace}
653 \begin{describe}{cls}{token-parser-context () \&key}
656 \begin{describe}{gf}{parser-token-type @<context> @> @<form>}
659 \begin{describe}{gf}{parser-token-value @<context> @> @<form>}
662 \begin{describe}{parseform}{token @<type> @[@<value>@] @[:peekp @<peek>@]}
665 \begin{describe}[atom]{parse}{@<atom>}
668 \begin{describe}[string]{parse}{@<string>}
671 \begin{describe}{cls}{scanner-context () \&key :scanner}
674 \begin{describe}{gf}{parse-scanner @<context> @> @<symbol>}
677 \begin{describe}{cls}
678 {character-scanner-context (scanner-context character-parser-context)
682 \begin{describe}{cls}
683 {token-scanner-context (scanner-context token-parser-context)
687 \begin{describe}{gf}{push-operator @<operator> @<state>}
690 \begin{describe}{gf}{push-value @<value> @<state>}
693 \begin{describe}{gf}{apply-operator @<operator> @<state>}
696 \begin{describe}{gf}{operator-push-action @<left> @<right>}
699 \begin{describe}{parseform}
700 {expr \=(@[[ :nestedp @<nestedp-var> @]]) \+\\
701 @<operand-parser> @<binop-parser>
702 @<preop-parser> @<postop-parser>}
705 \begin{describe}{gf}{operator-left-precedence @<operator> @> @<prec>}
708 \begin{describe}{gf}{operator-right-precedence @<operator> @> @<prec>}
711 \begin{describe}{gf}{operator-associativity @<operator> @> @<assoc>}
714 \begin{describe}{cls}{prefix-operator () \&key}
717 \begin{describe}{cls}{simple-operator () \&key :name :function}
720 \begin{describe}{cls}
721 {simple-unary-operator (simple-operator) \&key :name :function}
726 \dhead{cls}{simple-binary-operator (simple-operator) \\ \>
727 \&key :name :function
728 :lprec :rprec :associativity}
729 \dhead{cls}{simple-postfix-operator (simple-unary-operator) \\ \>
730 \&key :name :function :lprec :rprec}
731 \dhead{cls}{simple-prefix-operator
732 (prefix-operator simple-unary-operator) \\ \>
733 \&key :name :function :rprec}}
737 {\dhead{mac}{preop @<name> (@<operand-var> @<lprec>)
738 @<declaration>^* @<form>^*
739 @> @<prefix-operator>}
740 \dhead{mac}{postop @<name>
741 (@<operand-var> @<lprec> @[[ :rprec @<rprec> @]])
742 @<declaration>^* @<form>^*
743 \nlret @<postfix-operator>}
744 \dhead{mac}{binop @<name> (@<operand-var> @<lprec> @<rprec> @<assoc>)
745 @<declaration>^*@<form>^*
746 @> @<binary-operator>}}
750 {\dhead{cls}{parenthesis () \&key :tag}
751 \dhead{cls}{open-parenthesis (parenthesis prefix-operator) \&key :tag}
752 \dhead{cls}{close-parenthesis (parenthesis) \&key :tag}}
756 {\dhead{fun}{lparen @<tag> @> @<open-paren>}
757 \dhead{fun}{rparen @<tag> @> @<close-paren>}}
760 %%%-------------------------------------------------------------------------
761 \section{Lexical analyser}
763 \begin{describe}{cls}
764 {sod-token-scanner (token-scanner)
765 \&key :filename (:line 1) (:column 0) :char-scanner}
768 \begin{describe}{fun}{define-indicator @<indicator> @<description>}
771 \begin{describe}{fun}
772 {syntax-error @<scanner> @<expected> \&key :continuep :location}
775 \begin{describe}{fun}
776 {lexer-error @<char-scanner> @<expected> \&key :location}
779 \begin{describe}{parseform}
780 {skip-until (@[[ :keep-end @<keep-end-flag> @]]) @<token-type>^*}
783 \begin{describe}{parseform}
784 {error (@[[ :ignore-unconsumed @<flag> @]]) \\ \ind
785 @<sub-parser> @<recover-parser>}
788 \begin{describe}{fun}
789 {scan-comment @<char-scanner>
790 @> @<result> @<success-flag> @<consumed-flag>}
793 %%%----- That's all, folks --------------------------------------------------
797 %%% TeX-master: "sod.tex"