Skip to content
Permalink
Browse files

Fixed dependencies that prevented instans from compiling

  • Loading branch information...
Esko Nuutila Esko Nuutila
Esko Nuutila authored and Esko Nuutila committed May 5, 2015
1 parent 4b6261a commit c1c8ed74935500df3990a7e1fe8b27d1b9f70909
Showing with 39 additions and 27 deletions.
  1. +2 −2 scripts/run-sparql-syntax-tests-csv.sh
  2. +3 −2 src/instans.asd
  3. +3 −1 src/rete/store.lisp
  4. +2 −0 src/util/macros.lisp
  5. +0 −22 src/util/misc.lisp
  6. +29 −0 src/util/misc0.lisp
@@ -7,10 +7,10 @@ ${ECHO} "===================="
${ECHO}
cd `dirname $0`/.. > /dev/null
ROOT=`pwd`
BIN=${ROOT}/bin
TESTS=${ROOT}/tests
RULES=${TESTS}/input/syntax-test.rq
cd ${TESTS} > /dev/null
INSTANS=../../instans/bin/instans
RESULTSDIR=syntax-test-results
TEST_OUTPUT=${RESULTSDIR}/results
REPORT_HTML=${RESULTSDIR}/index.html
@@ -51,7 +51,7 @@ if test $# -eq 0 ; then
TC=$(($TC+$LC))
printf " %3d tests\n" $LC
cat ${TMPOUT2} >> ${TEST_OUTPUT} 2>&1
rm -f ${TMPOUT1} ${TMPOUT2}
# rm -f ${TMPOUT1} ${TMPOUT2}
done
${ECHO}
${ECHO} "$CNT test sets, $TC tests"
@@ -39,7 +39,8 @@
:depends-on (#:cl-ppcre #:cl-ppcre-unicode)
:components ((:module "util"
:components ((:file "version")
(:file "macros")
(:file "misc0")
(:file "macros" :depends-on ("misc0"))
(:file "misc" :depends-on ("macros"))
(:file "trie" :depends-on ("macros"))
(:file "csv" :depends-on ("macros"))
@@ -51,7 +52,7 @@
:components ((:file "parse-values")
(:file "datetime")
(:file "sparql-macros")
(:file "sparql-classes")
(:file "sparql-classes" :depends-on ("sparql-macros"))
(:file "iri" :depends-on ("sparql-classes" "sparql-macros"))
(:file "sparql-types" :depends-on ("sparql-macros" "datetime" "parse-values" "sparql-classes" "iri"))
(:file "sparql-helper-functions" :depends-on ("sparql-types" "sparql-macros"))
@@ -20,7 +20,9 @@
(:method ((this memory) token)
(let* ((key (second (car token)))
(stored-token (gethash key (memory-store this)))
(stored-token-inner (when-checkit (inner-token this stored-token))))
(stored-token-inner (when-checkit (inner-token this stored-token)))
)
(declare (ignorable stored-token-inner))
(checkit (numberp key) "key ~S not a number" key)
(checkit (or (null stored-token) (token-equal token stored-token-inner)) "token~%~A and inner-token~%~A not equal~%~A" token stored-token-inner stored-token)
stored-token)))
@@ -66,6 +66,8 @@
(warn ,fmt ,@args)
(error* ,fmt ,@args)))

;;(defvar *checkit* nil)
;;(setf *checkit* nil)
(defvar *checkit* t)
(setf *checkit* t)

@@ -7,21 +7,6 @@

(define-output-function inform)

(defun error* (fmt &rest args)
(error (apply #'format nil fmt args)))

(defun quotify-list (l)
(mapcar #'(lambda (x) (if (symbolp x) (list 'quote x) x)) l))

(defun intern-instans (name)
(intern name :instans))

(defun intern-keyword (name)
(intern name :keyword))

(defun fmt-intern (fmt &rest args)
(intern (apply #'format nil fmt args) :instans))

;;; This retains the order and possible duplicates of the arguments.
(defun list-union (list1 list2 &key (test #'eql))
(cond ((null list1) list2)
@@ -53,13 +38,6 @@
hash-table)
result))

;;; Used by define-class
(defun predicate-name (name)
(cond ((find #\- (coerce (string name) 'list))
(fmt-intern "~:@(~A-p~)" name))
(t
(fmt-intern "~:@(~Ap~)" name))))

(defun camel-case (string)
(coerce (loop with humpp = nil
for ch in (coerce string 'list)
@@ -0,0 +1,29 @@
;;; -*- Mode: Lisp; Syntax: COMMON-LISP; Base: 10; Package: INSTANS -*-
;;;
;;; Author: Esko Nuutila (esko.nuutila@aalto.fi)
;;;

(in-package #:instans)

(defun error* (fmt &rest args)
(error (apply #'format nil fmt args)))

(defun quotify-list (l)
(mapcar #'(lambda (x) (if (symbolp x) (list 'quote x) x)) l))

(defun intern-instans (name)
(intern name :instans))

(defun intern-keyword (name)
(intern name :keyword))

(defun fmt-intern (fmt &rest args)
(intern (apply #'format nil fmt args) :instans))

;;; Used by define-class
(defun predicate-name (name)
(cond ((find #\- (coerce (string name) 'list))
(fmt-intern "~:@(~A-p~)" name))
(t
(fmt-intern "~:@(~Ap~)" name))))

0 comments on commit c1c8ed7

Please sign in to comment.
You can’t perform that action at this time.