sod
4 years agoSTYLE: Make this document cover multiple languages.
Mark Wooding [Sat, 27 Jul 2019 13:15:41 +0000 (14:15 +0100)]
STYLE: Make this document cover multiple languages.

Add a language-neutral section to the top, and demote all of the Lisp
stuff by a level.

4 years agoSTYLE: Add more on horizontal whitespace issues.
Mark Wooding [Sat, 27 Jul 2019 13:14:15 +0000 (14:14 +0100)]
STYLE: Add more on horizontal whitespace issues.

4 years agoSTYLE: Expand on a couple of remarks.
Mark Wooding [Sat, 27 Jul 2019 13:12:26 +0000 (14:12 +0100)]
STYLE: Expand on a couple of remarks.

4 years agodoc/syntax.tex: Add property definitions to module syntax.
Mark Wooding [Sat, 27 Jul 2019 13:10:51 +0000 (14:10 +0100)]
doc/syntax.tex: Add property definitions to module syntax.

Currently not defined, which is a shame.

4 years agodoc/syntax.tex: Add module- and class-level productions for extensions.
Mark Wooding [Sat, 27 Jul 2019 13:10:11 +0000 (14:10 +0100)]
doc/syntax.tex: Add module- and class-level productions for extensions.

4 years agodoc/syntax.tex: Expand on what modules are.
Mark Wooding [Sat, 27 Jul 2019 13:09:54 +0000 (14:09 +0100)]
doc/syntax.tex: Expand on what modules are.

4 years agodoc/syntax.tex: Hoist `Properties' to section level and expand.
Mark Wooding [Sat, 27 Jul 2019 12:29:16 +0000 (13:29 +0100)]
doc/syntax.tex: Hoist `Properties' to section level and expand.

4 years agodoc/syntax.tex: Hoist `C-types' to section level.
Mark Wooding [Sat, 27 Jul 2019 12:27:50 +0000 (13:27 +0100)]
doc/syntax.tex: Hoist `C-types' to section level.

4 years agodoc/syntax.tex: Promote `Integer literals' to subsection.
Mark Wooding [Sat, 27 Jul 2019 12:25:51 +0000 (13:25 +0100)]
doc/syntax.tex: Promote `Integer literals' to subsection.

For consistency.  This was just a mistake, or a half-finished edit.

4 years agodoc/concepts.tex: Fix description of merging keyword argument lists.
Mark Wooding [Sat, 27 Jul 2019 12:07:49 +0000 (13:07 +0100)]
doc/concepts.tex: Fix description of merging keyword argument lists.

It doesn't matter whether the applicable methods come from different
superclasses: we have to merge everything.

4 years agodoc/concepts.tex: Add cross-ref to conversions in slot-access description.
Mark Wooding [Sat, 27 Jul 2019 11:59:32 +0000 (12:59 +0100)]
doc/concepts.tex: Add cross-ref to conversions in slot-access description.

4 years agodoc/concepts.tex: Delete fixme-ref to direct instances.
Mark Wooding [Sat, 27 Jul 2019 12:04:56 +0000 (13:04 +0100)]
doc/concepts.tex: Delete fixme-ref to direct instances.

They've been defined for ages, and this is established terminology by
now.

4 years agodoc/structures.tex: Put two spaces between sentences.
Mark Wooding [Sat, 27 Jul 2019 11:57:34 +0000 (12:57 +0100)]
doc/structures.tex: Put two spaces between sentences.

4 years agodoc/refintro.tex: Describe a fancy feature of the syntax notation.
Mark Wooding [Sat, 27 Jul 2019 11:56:34 +0000 (12:56 +0100)]
doc/refintro.tex: Describe a fancy feature of the syntax notation.

4 years agodoc/concepts.tex: Fix vertical space above subsections.
Mark Wooding [Sat, 27 Jul 2019 11:52:13 +0000 (12:52 +0100)]
doc/concepts.tex: Fix vertical space above subsections.

4 years agodoc/concepts.tex: Replace prose description by a source example.
Mark Wooding [Sat, 27 Jul 2019 11:40:52 +0000 (12:40 +0100)]
doc/concepts.tex: Replace prose description by a source example.

4 years agodoc/concepts.tex: Fix superclass/subclass confusion.
Mark Wooding [Sat, 27 Jul 2019 11:39:26 +0000 (12:39 +0100)]
doc/concepts.tex: Fix superclass/subclass confusion.

4 years agodoc/concepts.tex: Fix directed-graph terminology.
Mark Wooding [Sat, 27 Jul 2019 11:38:18 +0000 (12:38 +0100)]
doc/concepts.tex: Fix directed-graph terminology.

Vertex/edge are for undirected graphs; node/arc are for directed ones.

4 years agodoc/*.tex: Prefer @|...| over @"..." for general typeset-as-code.
Mark Wooding [Sat, 27 Jul 2019 00:10:55 +0000 (01:10 +0100)]
doc/*.tex: Prefer @|...| over @"..." for general typeset-as-code.

The latter is strictly for literal tokens, rather than general code.

4 years agosrc/pset-impl.lisp: Decode C fragments as property values.
Mark Wooding [Sat, 27 Jul 2019 11:51:27 +0000 (12:51 +0100)]
src/pset-impl.lisp: Decode C fragments as property values.

4 years agosrc/pset-{proto,impl}.lisp: Move `decode-property' methods to `impl'.
Mark Wooding [Sat, 27 Jul 2019 00:05:41 +0000 (01:05 +0100)]
src/pset-{proto,impl}.lisp: Move `decode-property' methods to `impl'.

Most of these don't count as part of the protocol.

4 years agosrc/pset-parse.lisp: Report `{' and `<' as expected tokens in errors.
Mark Wooding [Sat, 27 Jul 2019 00:04:30 +0000 (01:04 +0100)]
src/pset-parse.lisp: Report `{' and `<' as expected tokens in errors.

For fragments and types, respectively.

4 years agosrc/pset-parse.lisp: Mention fragment and type expressions in docstring.
Mark Wooding [Sat, 27 Jul 2019 00:03:36 +0000 (01:03 +0100)]
src/pset-parse.lisp: Mention fragment and type expressions in docstring.

4 years agosrc/pset-impl.lisp: Improve boolean literal handling.
Mark Wooding [Sat, 27 Jul 2019 00:01:47 +0000 (01:01 +0100)]
src/pset-impl.lisp: Improve boolean literal handling.

  * Allow `on' and `off'.

  * Recognize literals case-insensitively.

4 years agosrc/optparse.lisp: Quote literals properly.
Mark Wooding [Sat, 27 Jul 2019 00:01:22 +0000 (01:01 +0100)]
src/optparse.lisp: Quote literals properly.

4 years agosrc/module-{proto,impl}.lisp: Publish fragments properly.
Mark Wooding [Sat, 27 Jul 2019 00:00:40 +0000 (01:00 +0100)]
src/module-{proto,impl}.lisp: Publish fragments properly.

Not sure why this was languishing in `module-impl.lisp'.

4 years agosrc/sod.asd.in: Note missing dependency of `module-proto' on `pset-proto'.
Mark Wooding [Sat, 27 Jul 2019 11:53:59 +0000 (12:53 +0100)]
src/sod.asd.in: Note missing dependency of `module-proto' on `pset-proto'.

The definition of the `module' class includes a `pset' object.

4 years agoSTYLE: Explain how to indent lambda-lists.
Mark Wooding [Sat, 27 Jul 2019 11:23:47 +0000 (12:23 +0100)]
STYLE: Explain how to indent lambda-lists.

4 years agosrc/: Improve formatting of big lambda-lists.
Mark Wooding [Fri, 26 Jul 2019 23:50:49 +0000 (00:50 +0100)]
src/: Improve formatting of big lambda-lists.

4 years agosrc/c-types-impl.lisp: Remember `signed' as a C-level synonym for `int'.
Mark Wooding [Fri, 26 Jul 2019 23:48:46 +0000 (00:48 +0100)]
src/c-types-impl.lisp: Remember `signed' as a C-level synonym for `int'.

4 years agolib/keyword.h: Fix typo in commentary.
Mark Wooding [Fri, 26 Jul 2019 23:47:13 +0000 (00:47 +0100)]
lib/keyword.h: Fix typo in commentary.

4 years agolib/Makefile: Fix bogus formatting.
Mark Wooding [Fri, 26 Jul 2019 23:44:31 +0000 (00:44 +0100)]
lib/Makefile: Fix bogus formatting.

4 years agodoc/concepts.tex: Start work on documenting metaclasses.
Mark Wooding [Sat, 27 Jul 2019 13:44:43 +0000 (14:44 +0100)]
doc/concepts.tex: Start work on documenting metaclasses.

4 years agodoc/concepts.tex: Add class-precedence-list examples, with diagrams.
Mark Wooding [Sat, 27 Jul 2019 13:43:14 +0000 (14:43 +0100)]
doc/concepts.tex: Add class-precedence-list examples, with diagrams.

4 years agodoc/concepts.tex: Mention class-slot initializers; cross-ref to metaclasses.
Mark Wooding [Sat, 27 Jul 2019 13:42:18 +0000 (14:42 +0100)]
doc/concepts.tex: Mention class-slot initializers; cross-ref to metaclasses.

4 years agodoc/concepts.tex: Rearrange message-sending documentation.
Mark Wooding [Sat, 27 Jul 2019 13:41:14 +0000 (14:41 +0100)]
doc/concepts.tex: Rearrange message-sending documentation.

Replace `Vtables' stub under `C language integration' with `Sending
messages', and write some stuff.  Rename `Sending messages in C' under
`Messages and methods' to `Method entries'.

4 years agodoc/concepts.tex: Fix cross-reference to compatibility section.
Mark Wooding [Sat, 27 Jul 2019 13:40:55 +0000 (14:40 +0100)]
doc/concepts.tex: Fix cross-reference to compatibility section.

4 years agodoc/*.tex: Use `\fixme' macro rather than `[FIXME]' in prose.
Mark Wooding [Sat, 27 Jul 2019 13:40:36 +0000 (14:40 +0100)]
doc/*.tex: Use `\fixme' macro rather than `[FIXME]' in prose.

4 years agodoc/concepts.tex: Missing blank line before subsection.
Mark Wooding [Sat, 27 Jul 2019 13:38:37 +0000 (14:38 +0100)]
doc/concepts.tex: Missing blank line before subsection.

4 years agodoc/concepts.tex: Centre the (overwide) method-combination diagram.
Mark Wooding [Sat, 27 Jul 2019 13:35:26 +0000 (14:35 +0100)]
doc/concepts.tex: Centre the (overwide) method-combination diagram.

4 years agodoc/sod.sty: Add `lit' TikZ style for literal text.
Mark Wooding [Sat, 27 Jul 2019 13:44:13 +0000 (14:44 +0100)]
doc/sod.sty: Add `lit' TikZ style for literal text.

5 years ago.gitignore: Ignore `makeindex' debris.
Mark Wooding [Mon, 9 Jul 2018 12:08:20 +0000 (13:08 +0100)]
.gitignore: Ignore `makeindex' debris.

5 years agodoc/: A bibliography! With citations!
Mark Wooding [Mon, 9 Jul 2018 12:06:16 +0000 (13:06 +0100)]
doc/: A bibliography!  With citations!

Currently this uses pieces of Nelson Beebe's computer science
bibliography directly.  At some point I'll extract the pieces I need.

5 years agosrc/class-make-impl.lisp (check-method-argument-lists): Fix docstring.
Mark Wooding [Mon, 9 Jul 2018 12:05:29 +0000 (13:05 +0100)]
src/class-make-impl.lisp (check-method-argument-lists): Fix docstring.

5 years agosrc/module-parse.lisp (parse-class-body): Check for duplicate superclasses.
Mark Wooding [Mon, 9 Jul 2018 12:04:38 +0000 (13:04 +0100)]
src/module-parse.lisp (parse-class-body): Check for duplicate superclasses.

It turns out that this is a thing that can happen.  Catch it early
rather than waiting for a less helpful message during CPL construction.

5 years agosrc/module-parse.lisp (parse-class-body): Refactor superclass list.
Mark Wooding [Mon, 9 Jul 2018 12:03:48 +0000 (13:03 +0100)]
src/module-parse.lisp (parse-class-body): Refactor superclass list.

Arrange to be able to do more computation on the direct superclass
list.  No functional change for now.

5 years agosrc/utilities.lisp, src/class-finalize-impl.lisp: Add `find-duplicates'.
Mark Wooding [Mon, 9 Jul 2018 11:56:28 +0000 (12:56 +0100)]
src/utilities.lisp, src/class-finalize-impl.lisp: Add `find-duplicates'.

Replace the internal `check-list' function in `check-sod-class' with a
proper, if strangely shaped, utility function.

5 years agosrc/: Check that methods are compatible during class finalization.
Mark Wooding [Mon, 9 Jul 2018 11:53:52 +0000 (12:53 +0100)]
src/: Check that methods are compatible during class finalization.

This is the payoff from the previous refactoring.  Check, specifically,
that the keyword argument types among the applicable methods are
compatible.  Otherwise we only find out about this during effective-
method computation, which happens during output, and it's too late to
stop the presses.

5 years agosrc/: Lift keyword-argument protocol from effective methods to messages.
Mark Wooding [Mon, 9 Jul 2018 11:48:26 +0000 (12:48 +0100)]
src/: Lift keyword-argument protocol from effective methods to messages.

We're going to want to use this stuff during class finalization, before
we've made the effective methods.

This also refactors the machinery somewhat, introducing a new function
`compute-effective-method-keyword-arguments' to do the slightly fiddly
work in initializing `effective-method'.

5 years agosrc/class-layout-impl.lisp: Abstract out `sod-message-applicable-methods'.
Mark Wooding [Mon, 9 Jul 2018 11:19:19 +0000 (12:19 +0100)]
src/class-layout-impl.lisp: Abstract out `sod-message-applicable-methods'.

We shall want this more later.

5 years agodoc/sod.sty, doc/concepts.tex: Pull out common style features.
Mark Wooding [Sat, 7 Jul 2018 20:55:36 +0000 (21:55 +0100)]
doc/sod.sty, doc/concepts.tex: Pull out common style features.

Thicker lines, stealth arrows.

5 years agodoc/sod.sty: Add `\fixme' macro for making omissions more obvious.
Mark Wooding [Sat, 7 Jul 2018 13:56:07 +0000 (14:56 +0100)]
doc/sod.sty: Add `\fixme' macro for making omissions more obvious.

5 years agodoc/sod.tex: Number mathematical things within sections.
Mark Wooding [Sat, 7 Jul 2018 13:54:31 +0000 (14:54 +0100)]
doc/sod.tex: Number mathematical things within sections.

Maybe this should be within subsections, but that makes the numbers
awfully long.

5 years agosrc/package.lisp: Have `sod-user' use `sod-parser' and the `utilities'.
Mark Wooding [Sat, 7 Jul 2018 13:36:45 +0000 (14:36 +0100)]
src/package.lisp: Have `sod-user' use `sod-parser' and the `utilities'.

I'm not so sure about the utilities, but the parser machinery exports
lots of useful things such as `cerror*-with-location' which extensions
will definitely need.

5 years agosrc/classes.lisp: Fix docstring formatting.
Mark Wooding [Fri, 6 Jul 2018 23:12:23 +0000 (00:12 +0100)]
src/classes.lisp: Fix docstring formatting.

Is this the last holdout of the CAPITAL symbol names?

5 years agosrc/utilities.lisp (merge-lists): Fix garbled documentation.
Mark Wooding [Sat, 7 Jul 2018 13:41:23 +0000 (14:41 +0100)]
src/utilities.lisp (merge-lists): Fix garbled documentation.

5 years agosrc/utilities.lisp (once-only): Ensure that the BINDS argument is a list.
Mark Wooding [Fri, 6 Jul 2018 23:03:38 +0000 (00:03 +0100)]
src/utilities.lisp (once-only): Ensure that the BINDS argument is a list.

5 years agotest/test.sod: Test that class initializers work properly.
Mark Wooding [Fri, 6 Jul 2018 23:03:10 +0000 (00:03 +0100)]
test/test.sod: Test that class initializers work properly.

5 years agotest/test.sod: Add a licensing notice.
Mark Wooding [Sat, 7 Jul 2018 13:55:53 +0000 (14:55 +0100)]
test/test.sod: Add a licensing notice.

5 years agosrc/class-output.lisp: Generate more general class-object macros.
Mark Wooding [Fri, 6 Jul 2018 23:08:11 +0000 (00:08 +0100)]
src/class-output.lisp: Generate more general class-object macros.

We need a macro picking out the most specific class in each of the
metaclass's chains.  If the root metaclass is the most specific class in
its chain then the existing `Foo__class' macro will do for one of these.

5 years agosrc/module-{proto,impl}.lisp, etc.: Don't output erroneous modules.
Mark Wooding [Fri, 6 Jul 2018 22:58:45 +0000 (23:58 +0100)]
src/module-{proto,impl}.lisp, etc.: Don't output erroneous modules.

Add a new reader `module-errors' which reports the number of errors
found while processing the module.  Notice (but decline to handle)
errors while loading modules.  And, in the front-end, don't try to
output erroneous modules.

This fixes an annoying problem where errors are reported and cause
`make' to fail, and then a subsequent `make' apparently succeeds,
possibly with bogus C code.

5 years agosrc/class-finalize-{proto,impl}.lisp: Check class slot initializers.
Mark Wooding [Fri, 6 Jul 2018 22:55:33 +0000 (23:55 +0100)]
src/class-finalize-{proto,impl}.lisp: Check class slot initializers.

User-defined class slots must have initializers, or we get very sad
during output.  Builtin slots mustn't have initializers, or (in
practice) they'll be ignored in favour of the builtin magic.

Introduce a new function `check-class-initializer', as part of the class
finalization sanity-check protocol, which verifies that class slots are
initialized -- or not -- as required.

5 years agosrc/class-finalize-impl.lisp (clos-tiebreaker): Search from the right end.
Mark Wooding [Sat, 7 Jul 2018 13:41:55 +0000 (14:41 +0100)]
src/class-finalize-impl.lisp (clos-tiebreaker): Search from the right end.

The docstring clearly says that we take the candidate whose direct
subclass is rightmost in the SO-FAR list, but the code searches SO-FAR
from the left and takes the first match.  As far as I can make out, this
has always been wrong: the earliest version of `merge-lists' builds the
output list in order, and the earliest version of `clos-tiebreaker'
searched from the left anyway.

Just reverse the list before scanning.

5 years agosrc/class-finalize-impl.lisp (check-sod-class): Remove `w/del' wrapper.
Mark Wooding [Fri, 6 Jul 2018 22:52:47 +0000 (23:52 +0100)]
src/class-finalize-impl.lisp (check-sod-class): Remove `w/del' wrapper.

The around method on `finalize-sod-class' has already set the error
location, so remove the extra wrapper here.  Everything moves over two
spaces again, and Git makes a proper mess of the diff.  I've reflowed
some of the error messages by hand.

5 years agosrc/class-finalize-impl.lisp (check-sod-class): Fix indentation.
Mark Wooding [Fri, 6 Jul 2018 22:50:47 +0000 (23:50 +0100)]
src/class-finalize-impl.lisp (check-sod-class): Fix indentation.

A lot of it was two spaces further over than it should have been.

5 years agosrc/: Make `find-class-initializer' be a proper part of the interface.
Mark Wooding [Fri, 6 Jul 2018 22:36:21 +0000 (23:36 +0100)]
src/: Make `find-class-initializer' be a proper part of the interface.

5 years agosrc/: Guess the metaclass early, unless we're explicitly bootstrapping.
Mark Wooding [Fri, 6 Jul 2018 22:18:01 +0000 (23:18 +0100)]
src/: Guess the metaclass early, unless we're explicitly bootstrapping.

Otherwise we hit unbound-slot errors if we try to resolve class
initializers.

Introduce an internal property `%bootstrapping' to tell the class
initialization machinery to leave the metaclass slot alone, and use this
in `bootstrap-classes'.  Otherwise, have the `sod-class'
`shared-initialize' method go off and call `guess-metaclass'
immediately.

Move `guess-metaclass' back into `class-make-impl.lisp' and fix up the
documentation stubs.

This partially reverts 981b6fb624186a54320cea34e53e16276aee2bdb.

5 years agosrc/class-make-impl.lisp: Fix docstring: `metaclass' is left unbound.
Mark Wooding [Fri, 6 Jul 2018 22:32:40 +0000 (23:32 +0100)]
src/class-make-impl.lisp: Fix docstring: `metaclass' is left unbound.

This was changed back in 981b6fb624186a54320cea34e53e16276aee2bdb.

5 years agosrc/pset-impl.lisp: Introduce a property type for booleans.
Mark Wooding [Fri, 6 Jul 2018 22:23:45 +0000 (23:23 +0100)]
src/pset-impl.lisp: Introduce a property type for booleans.

5 years agosrc/parser/floc-proto.lisp: Associate restarts when resignalling.
Mark Wooding [Sat, 7 Jul 2018 13:38:28 +0000 (14:38 +0100)]
src/parser/floc-proto.lisp: Associate restarts when resignalling.

`with-default-error-location*' catches conditions and maybe resignals
versions of them with error location information.  But the new
conditions don't have the same restarts associated with them, so
functions like `muffle-warning' will fail.

Fixing this is a little fiddly, but a general solution is possible.

5 years agosrc/final.lisp: Add a new function for testing property-set parsing.
Mark Wooding [Fri, 6 Jul 2018 23:06:53 +0000 (00:06 +0100)]
src/final.lisp: Add a new function for testing property-set parsing.

5 years agosrc/final.lisp (test-parse-c-type): Abstract out the tedious setup stage.
Mark Wooding [Fri, 6 Jul 2018 23:06:15 +0000 (00:06 +0100)]
src/final.lisp (test-parse-c-type): Abstract out the tedious setup stage.

5 years agosrc/pset-{proto,impl}.lisp: Move `string-to-symbol' to implementation.
Mark Wooding [Fri, 6 Jul 2018 22:28:12 +0000 (23:28 +0100)]
src/pset-{proto,impl}.lisp: Move `string-to-symbol' to implementation.

It's not used by anything else, and it's really weirdly shaped.

5 years agosrc/pset-proto.lisp: Export `default-slot-from-property'.
Mark Wooding [Sat, 7 Jul 2018 13:53:53 +0000 (14:53 +0100)]
src/pset-proto.lisp: Export `default-slot-from-property'.

This is really useful for extensions defining new metaobjects.  It was
already documented as an external symbol, but not actually exported.

5 years agodoc/sod.sty: Make spacing in `\lit' be more even.
Mark Wooding [Fri, 22 Jun 2018 01:18:45 +0000 (02:18 +0100)]
doc/sod.sty: Make spacing in `\lit' be more even.

5 years agodoc/sod.tex: Don't print the `Index' header in uppercase.
Mark Wooding [Thu, 21 Jun 2018 19:31:08 +0000 (20:31 +0100)]
doc/sod.tex: Don't print the `Index' header in uppercase.

Silliness from the `idxlayout' package which took ages to track down.

5 years agodoc/: Some minor tweaks and corrections.
Mark Wooding [Thu, 21 Jun 2018 18:43:51 +0000 (19:43 +0100)]
doc/: Some minor tweaks and corrections.

5 years agodoc/sod.tex: Capture `\label' from inside `\part{...}' title.
Mark Wooding [Thu, 21 Jun 2018 18:42:49 +0000 (19:42 +0100)]
doc/sod.tex: Capture `\label' from inside `\part{...}' title.

Otherwise we capture the wrong page number because `\part' implicitly
flushes two pages.

5 years agodoc/structures.tex, lib/sod-structs.3: Fix description of class pointers.
Mark Wooding [Sat, 9 Jun 2018 02:52:37 +0000 (03:52 +0100)]
doc/structures.tex, lib/sod-structs.3: Fix description of class pointers.

There's really only one in the vtable for each metaclass chain, and
the types of the pointers vary as we descend the superclass graph.

5 years agodoc/intro.tex: Strengthen the argument about C++ a bit.
Mark Wooding [Sat, 9 Jun 2018 02:49:35 +0000 (03:49 +0100)]
doc/intro.tex: Strengthen the argument about C++ a bit.

5 years agodoc/: Fix various unfortunate garblings.
Mark Wooding [Sat, 9 Jun 2018 02:49:16 +0000 (03:49 +0100)]
doc/: Fix various unfortunate garblings.

5 years agodoc/concepts.tex: Fix description of standard method combination.
Mark Wooding [Sat, 9 Jun 2018 02:48:03 +0000 (03:48 +0100)]
doc/concepts.tex: Fix description of standard method combination.

5 years agodoc/concepts.tex: Typeset method rôle names as identifiers.
Mark Wooding [Sat, 9 Jun 2018 02:44:40 +0000 (03:44 +0100)]
doc/concepts.tex: Typeset method rôle names as identifiers.

5 years agodoc/: Consistently write `rôle', rather than `role', in prose.
Mark Wooding [Sat, 9 Jun 2018 02:43:41 +0000 (03:43 +0100)]
doc/: Consistently write `rôle', rather than `role', in prose.

Obviously there's no diacritic in identifiers.

5 years agoMerge branches 'mdw/doc-reorg' and 'mdw/parser-fixes'
Mark Wooding [Fri, 8 Jun 2018 19:09:02 +0000 (20:09 +0100)]
Merge branches 'mdw/doc-reorg' and 'mdw/parser-fixes'

* mdw/doc-reorg: (34 commits)
  doc/refintro.tex, src/sod-module.5: Fix slightly garbled text.
  doc/syntax.tex: Delete (wrong) duplicate rule for <argument-declarator>.
  doc/syntax.tex: Consistently use baseline-level ellipses in syntax.
  doc/concepts.tex: Fix a rather distant demonstrative.
  test/: Add a simple rational-number class.
  src/method-impl.lisp: Initialize `suppliedp' flags properly.
  src/class-output.lisp: Fix missing parentheses around `me' in message macros.
  doc/concepts.tex: Fix garbled fragment ordering rules.
  doc/runtime.tex: Fix name of `SOD_XCHAIN' macro.
  doc/structures.tex, lib/sod-structs.3: Fix in-chain ichain exemplar.
  src/optparse.lisp: Indent a line correctly.
  test/test.sod: Abbreviate the T1 class nicknames.
  src/method-impl.lisp: Mark `sod__obj' as ignorable in effective methods.
  src/method-aggregate.lisp: Allow useful behaviour if no primary methods.
  doc/intro.tex: Begin a (rather extensive) comparison with C++.
  doc/Makefile.am, doc/sod.tex: Actually include the stub intro.
  doc/intro.tex: Fix erroneous `\manpage' to correct `\man'.
  doc/concepts.tex: Include diagram of standard method combination.
  doc/Makefile.am: Enable `\nonstopmode' in TeX processing.
  doc/Makefile.am: Abstract out repeated TeX arguments into a variable.
  ...

* mdw/parser-fixes: (97 commits)
  src/class-finalize.lisp: Improve reporting of CPL construction errors.
  src/class-finalize-impl.lisp: Move error reporting to `merge-class-lists'.
  src/class-finalize-impl.lisp (clos-cpl, dylan-cpl): Improve formatting.
  src/class-finalize-impl.lisp (clos-tiebreaker): Refactor.
  src/class-finalize.lisp (merge-class-lists): Zap pointless `:present' arg.
  src/module-impl.lisp (c-fragment): Fix docstring formatting.
  src/module-parse.lisp: Improve error recovery for core class items.
  src/module-parse.lisp: Abstract out `parse-maybe-dotted-name'.
  src/module-parse.lisp: Use `quote', not `list', to make constant lists.
  src/module-parse.lisp: Use `dotted-name', not `dotted-identifier'.
  src/module-parse.lisp: Catch errors during class-item construction.
  src/module-parse.lisp: Factor out slot and maybe-initializer creation.
  src/module-parse.lisp: Improve error recovery for `class' item framing.
  src/class-utilities.lisp: Permit `temporary-name' objects as class names.
  src/class-utilities.lisp: Improve reporting of multiple root classes.
  src/module-parse.lisp: Improve error recovery for `initarg' class-items.
  src/module-parse.lisp: Improve error recovery for `lisp' items.
  src/module-parse.lisp: Improve error recovery for `load' and `import' items.
  src/module-parse.lisp: Improve error recovery for `test' items.
  src/module-parse.lisp: Improve error recovery for `code' items.
  ...

5 years agodoc/refintro.tex, src/sod-module.5: Fix slightly garbled text.
Mark Wooding [Wed, 16 May 2018 09:09:02 +0000 (10:09 +0100)]
doc/refintro.tex, src/sod-module.5: Fix slightly garbled text.

5 years agodoc/syntax.tex: Delete (wrong) duplicate rule for <argument-declarator>.
Mark Wooding [Wed, 16 May 2018 09:08:16 +0000 (10:08 +0100)]
doc/syntax.tex: Delete (wrong) duplicate rule for <argument-declarator>.

5 years agodoc/syntax.tex: Consistently use baseline-level ellipses in syntax.
Mark Wooding [Wed, 16 May 2018 09:07:06 +0000 (10:07 +0100)]
doc/syntax.tex: Consistently use baseline-level ellipses in syntax.

5 years agodoc/concepts.tex: Fix a rather distant demonstrative.
Mark Wooding [Wed, 16 May 2018 01:12:05 +0000 (02:12 +0100)]
doc/concepts.tex: Fix a rather distant demonstrative.

5 years agotest/: Add a simple rational-number class.
Mark Wooding [Tue, 15 May 2018 10:44:56 +0000 (11:44 +0100)]
test/: Add a simple rational-number class.

This found a surprising number of bugs.  I wasn't even intending for it
to be a test, but it seems to work well as one.

5 years agosrc/method-impl.lisp: Initialize `suppliedp' flags properly.
Mark Wooding [Tue, 15 May 2018 10:39:03 +0000 (11:39 +0100)]
src/method-impl.lisp: Initialize `suppliedp' flags properly.

More foolishness.  The standalone C library gets this right,
embarrassingly enough.

5 years agosrc/class-output.lisp: Fix missing parentheses around `me' in message macros.
Mark Wooding [Tue, 15 May 2018 10:04:53 +0000 (11:04 +0100)]
src/class-output.lisp: Fix missing parentheses around `me' in message macros.

What was I thinking?

5 years agodoc/concepts.tex: Fix garbled fragment ordering rules.
Mark Wooding [Tue, 15 May 2018 09:49:05 +0000 (10:49 +0100)]
doc/concepts.tex: Fix garbled fragment ordering rules.

5 years agodoc/runtime.tex: Fix name of `SOD_XCHAIN' macro.
Mark Wooding [Tue, 15 May 2018 09:48:23 +0000 (10:48 +0100)]
doc/runtime.tex: Fix name of `SOD_XCHAIN' macro.

The index entry was right, but the synopsis showed the wrong name.

5 years agodoc/structures.tex, lib/sod-structs.3: Fix in-chain ichain exemplar.
Mark Wooding [Tue, 15 May 2018 09:46:00 +0000 (10:46 +0100)]
doc/structures.tex, lib/sod-structs.3: Fix in-chain ichain exemplar.

The general ichain structure is for some superclass on the same chain,
but not necessarily the chain head.  The later prose already has this
right, but the synopsis at the beginning of the section didn't.

5 years agosrc/optparse.lisp: Indent a line correctly.
Mark Wooding [Tue, 15 May 2018 09:45:35 +0000 (10:45 +0100)]
src/optparse.lisp: Indent a line correctly.

5 years agotest/test.sod: Abbreviate the T1 class nicknames.
Mark Wooding [Wed, 2 Aug 2017 19:53:31 +0000 (20:53 +0100)]
test/test.sod: Abbreviate the T1 class nicknames.

They don't actually need to have `t1' in them.

5 years agosrc/method-impl.lisp: Mark `sod__obj' as ignorable in effective methods.
Mark Wooding [Wed, 2 Aug 2017 11:25:34 +0000 (12:25 +0100)]
src/method-impl.lisp: Mark `sod__obj' as ignorable in effective methods.

Very trivial effective methods don't need this, and the warnings are
annoying.

5 years agosrc/method-aggregate.lisp: Allow useful behaviour if no primary methods.
Mark Wooding [Wed, 2 Aug 2017 10:00:39 +0000 (11:00 +0100)]
src/method-aggregate.lisp: Allow useful behaviour if no primary methods.

Many aggregating combinations have obvious things to do even if they
have no primary methods; e.g., `progn' should do nothing, and
combinations based on operators with identity should return that
identity.  This actually covers all of them except `min' and `max'.

5 years agodoc/intro.tex: Begin a (rather extensive) comparison with C++.
Mark Wooding [Wed, 2 Aug 2017 09:59:28 +0000 (10:59 +0100)]
doc/intro.tex: Begin a (rather extensive) comparison with C++.

I think this doesn't fit well here, but these things need saying
somewhere.