src/: Split the frontend out into its own separate system.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 17 Aug 2015 16:41:58 +0000 (17:41 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 17 Aug 2015 16:47:50 +0000 (17:47 +0100)
It has additional dependencies, which is rather less than ideal.

src/frontend.lisp
src/package.lisp
src/sod-frontend.asd [new file with mode: 0644]
src/sod.asd

index 8138a5a..e7b515a 100644 (file)
 ;;; along with SOD; if not, write to the Free Software Foundation,
 ;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-(cl:in-package #:sod)
+(cl:defpackage #:sod-frontend
+  (:use #:common-lisp #:optparse #:sod #:sod-parser)
+  (:shadowing-import-from #:optparse "INT"))
+
+(cl:in-package #:sod-frontend)
 
 ;;;--------------------------------------------------------------------------
 ;;; The main program.
index 75dc7fd..60da8ea 100644 (file)
@@ -26,7 +26,6 @@
 (cl:defpackage #:sod
   (:use #:common-lisp
        #:sod-utilities
-       #:optparse
        #:sod-parser))
 
 ;;;----- That's all, folks --------------------------------------------------
diff --git a/src/sod-frontend.asd b/src/sod-frontend.asd
new file mode 100644 (file)
index 0000000..348c4be
--- /dev/null
@@ -0,0 +1,58 @@
+;;; -*-lisp-*-
+;;;
+;;; System definition for the Sensible Object Design front end
+;;;
+;;; (c) 2015 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-frontend
+
+  ;; 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, command-line frontend."
+
+  :long-description
+  "The Sensible Object Design (SOD) is a fairly simple, yet powerful object
+   system for plain old C.
+
+   This system provides a command-line interface to the SOD translator.  It's
+   a separate system because it has additional dependencies and
+   Lisp-system-specific code."
+
+  :depends-on ("sod")
+
+  :components
+  ((:file "optparse")
+   (:file "frontend" :depends-on ("optparse"))))
+
+;;;----- That's all, folks --------------------------------------------------
index d1791a3..c819725 100644 (file)
@@ -63,7 +63,6 @@
 
   :components
   ((:file "utilities")
-   (:file "optparse" :depends-on ("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
@@ -98,7 +97,7 @@
      (:file "scanner-context-impl" :depends-on
            ("parser-proto" "scanner-proto"))))
 
-   (:file "package" :depends-on ("utilities" "optparse" "parser"))
+   (:file "package" :depends-on ("utilities" "parser"))
 
    ;; Lexical analysis.
    (:file "lexer-proto" :depends-on ("package" "parser"))
    ;; Class output.
    (:file "class-output" :depends-on
          ("classes" "class-layout-proto" "class-layout-impl"
-          "method-proto" "method-impl" "output-proto"))
-
-   ;; User interface.
-   (:file "frontend" :depends-on
-         ("optparse" "module-proto" "module-parse"))))
+          "method-proto" "method-impl" "output-proto"))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Testing.