--- /dev/null
+;;; -*-lisp-*-
+;;;
+;;; System definition for the Simple Object Design translator
+;;;
+;;; (c) 2009 Straylight/Edgeware
+;;;
+
+;;;----- Licensing notice ---------------------------------------------------
+;;;
+;;; This file is part of the Sensble Object Design, an object system for C.
+;;;
+;;; SOD is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; SOD is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with SOD; if not, write to the Free Software Foundation,
+;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+(cl:defpackage #:sod-sysdef
+ (:use #:common-lisp #:asdf))
+
+(cl:in-package #:sod-sysdef)
+
+;;;--------------------------------------------------------------------------
+;;; Definition.
+
+(defsystem sod
+
+ ;; Boring copyright stuff.
+ :version "1.0.0"
+ :author "Mark Wooding"
+ :license "GNU General Public License, version 2 or later"
+
+ ;; Documentation.
+ :description "A Sensible Object Design for C."
+
+ :long-description
+ "This system implements a fairly simple, yet powerful object system for
+ plain old C. Its main features are as follows.
+
+ * Multiple inheritance, done properly (unlike C++, say), with a
+ superclass linearlization algorithm, and exactly one copy of any
+ superclass's slots.
+
+ * Method combinations, and multiple flavours of methods, to make mixin
+ classes more useful.
+
+ * The default method combination doesn't depend on the programmer
+ statically predicting which superclass's method to delegate to.
+ Multiple inheritance makes this approach (taken by C++) fail: the
+ right next method might be an unknown sibling, and two siblings might
+ be in either order depending on descendents.
+
+ * Minimal runtime support requirements, so that it's suitable for use
+ wherever C is -- e.g., interfacing to other languages."
+
+ :components
+ ((:file "utilities")
+
+ ;; Parser equipment. This is way more elaborate than it needs to be, but
+ ;; it was interesting, and it may well get split off into a separate
+ ;; library.
+ (:module "parser" :depends-on ("utilities") :components
+ ((:file "package")
+
+ ;; File location protocol (including error reporting).
+ (:file "proto-floc" :depends-on ("package"))
+ (:file "impl-floc" :depends-on ("proto-floc"))
+
+ ;; Position-aware streams.
+ (:file "proto-streams" :depends-on ("package"))
+ (:file "impl-streams" :depends-on ("proto-streams" "proto-floc"))
+
+ ;; Scanner protocol, and various scanner implementations.
+ (:file "proto-scanner" :depends-on ("package"))
+ (:file "impl-scanner" :depends-on ("proto-scanner"))
+ (:file "impl-scanner-charbuf" :depends-on
+ ("proto-scanner" "proto-floc" "proto-streams"))
+ (:file "impl-scanner-token" :depends-on ("proto-scanner"))
+
+ ;; Parser notation macro support.
+ (:file "proto-parser" :depends-on ("package"))
+ (:file "impl-parser" :depends-on ("proto-parser"))
+
+ ;; Expression parser support.
+ (:file "proto-parser-expr" :depends-on ("proto-parser"))
+ (:file "impl-parser-expr" :depends-on ("proto-parser-expr"))
+
+ ;; Stitching parsers to scanners.
+ (:file "impl-scanner-context" :depends-on
+ ("proto-parser" "proto-scanner"))))
+
+ (:file "package" :depends-on ("parser"))
+
+ ;; C type representation protocol.
+ (:file "proto-c-types" :depends-on ("package"))
+ (:file "impl-c-types" :depends-on ("proto-c-types"))
+
+ ;; Property set protocol.
+ (:file "proto-pset" :depends-on ("package"))
+ (:file "impl-pset" :depends-on ("proto-pset"))
+
+ ;; Lexical analysis.
+ ;;(:file "proto-lexer" :depends-on ("parser"))
+ ;;(:file "impl-lexer" :depends-on ("proto-lexer"))
+
+ ;; Code generation protocol.
+ (:file "proto-codegen" :depends-on ("package"))
+ (:file "impl-codegen" :depends-on ("proto-codegen"))
+
+ ;; Modules.
+ (:file "proto-module" :depends-on ("package"))
+ (:file "impl-module" :depends-on
+ ("proto-module" "proto-pset" "impl-c-types-class" "builtin"))
+ (:file "builtin" :depends-on ("proto-module" "proto-pset" "classes"
+ "impl-c-types" "impl-c-types-class"))
+
+ ;; Output.
+ (:file "proto-output" :depends-on ("package"))
+ (:file "impl-output" :depends-on ("proto-output"))
+
+ ;; Class representation.
+ (:file "classes" :depends-on ("package" "proto-c-types"))
+ (:file "impl-c-types-class" :depends-on ("classes" "proto-module"))
+ (:file "class-utilities" :depends-on
+ ("classes" "impl-codegen" "impl-pset"
+ "impl-c-types" "impl-c-types-class"))
+
+ ;; Class construction.
+ (:file "proto-class-make" :depends-on ("class-utilities"))
+ (:file "impl-class-make" :depends-on ("proto-class-make"))
+
+ ;; Class layout.
+ (:file "proto-class-layout" :depends-on ("class-utilities"))
+ (:file "impl-class-layout" :depends-on
+ ("proto-class-layout" "proto-method"))
+
+ ;; Class finalization.
+ (:file "proto-class-finalize" :depends-on ("class-utilities"))
+ (:file "impl-class-finalize" :depends-on ("proto-class-finalize"))
+
+ ;; Method generation.
+ (:file "proto-method" :depends-on ("class-utilities"))
+ (:file "impl-method" :depends-on ("proto-method"))
+
+ ;; Class output.
+ (:file "output-class" :depends-on ("proto-output" "classes"))))
+
+;;;--------------------------------------------------------------------------
+;;; Testing.
+
+(defmethod perform ((op test-op) (component (eql (find-system "sod"))))
+ (operate 'test-op "sod-test" :force t))
+
+;;;----- That's all, folks --------------------------------------------------