3 ;;; System definition for SOD
5 ;;; (c) 2009 Straylight/Edgeware
8 ;;;----- Licensing notice ---------------------------------------------------
10 ;;; This file is part of the Simple Object Definition system.
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 (cl:defpackage #:sod-package
27 (:use #:common-lisp #:asdf))
29 (cl:in-package #:sod-package)
31 ;;;--------------------------------------------------------------------------
36 ;; Boring copyright stuff.
38 :author "Mark Wooding"
39 :license "GNU General Public License, version 2 or later"
42 :description "A Sensible Object Definition for C."
45 "This system implements a fairly simple, yet powerful object system for
46 plain old C. Its main features are as follows.
48 * Multiple inheritance, done properly (unlike C++, say), with a
49 superclass linearlization algorithm, and exactly one copy of any
52 * Method combinations, and multiple flavours of methods, to make mixin
55 * The default method combination doesn't depend on the programmer
56 statically predicting which superclass's method to delegate to.
57 Multiple inheritance makes this approach (taken by C++) fail: the
58 right next method might be an unknown sibling, and two siblings might
59 be in either order depending on descendents.
61 * Minimal runtime support requirements, so that it's suitable for use
62 wherever C is -- e.g., interfacing to other languages."
64 ;; And now for how to build it.
66 ;; The big tables in parser.lisp need to be earlier. CLEAR-THE-DECKS ought
67 ;; to do more stuff, including calling BOOTSTRAP-CLASSES. Generally, the
68 ;; code isn't very well organized at the moment.
71 (:file "utilities" :depends-on ("package"))
72 (:file "tables" :depends-on ("package"))
73 (:file "c-types" :depends-on ("utilities"))
74 (:file "codegen" :depends-on ("c-types"))
75 (:file "posn-stream" :depends-on ("utilities"))
76 (:file "errors" :depends-on ("posn-stream"))
77 (:file "lex" :depends-on ("posn-stream" "errors"))
78 (:file "pset" :depends-on ("lex"))
79 (:file "parse-c-types" :depends-on ("lex" "c-types" "tables"))
80 (:file "class-defs" :depends-on ("parse-c-types"))
81 (:file "cpl" :depends-on ("class-defs"))
82 (:file "class-finalize" :depends-on ("class-defs" "cpl"))
83 (:file "class-builder" :depends-on ("class-finalize" "pset"))
84 (:file "class-layout" :depends-on ("class-defs"))
85 (:file "module" :depends-on ("parse-c-types" "tables"))
86 (:file "output" :depends-on ("module"))
87 (:file "class-output" :depends-on ("class-layout" "output"))))
89 ;;;----- That's all, folks --------------------------------------------------