trying to start with simple things: forge interpreter and testing facility
This commit is contained in:
parent
9960303469
commit
d2f708999f
4 changed files with 33 additions and 8 deletions
|
@ -3,14 +3,22 @@
|
||||||
;;;; A Forth-like interpreter implemented in Common Lisp.
|
;;;; A Forth-like interpreter implemented in Common Lisp.
|
||||||
|
|
||||||
(defpackage :scopes/forge
|
(defpackage :scopes/forge
|
||||||
(:nicknames :scf)
|
|
||||||
(:use :common-lisp)
|
(:use :common-lisp)
|
||||||
(:export #:hello))
|
(:export #:hello #:new-forge-env #:exec #:add))
|
||||||
|
|
||||||
(in-package :scopes/forge)
|
(in-package :scopes/forge)
|
||||||
|
|
||||||
|
(defun new-forge-env ()
|
||||||
|
nil)
|
||||||
|
|
||||||
|
(defun exec (fe &rest code)
|
||||||
|
nil)
|
||||||
|
|
||||||
|
(defun add (fe)
|
||||||
|
0)
|
||||||
|
|
||||||
(defun hello ()
|
(defun hello ()
|
||||||
(format t "Hello Common Lisp - 2024-04-18"))
|
(format t "Hello Common Lisp - 2024-04-19"))
|
||||||
|
|
||||||
(defclass track () (
|
(defclass track () (
|
||||||
(taskid :initarg :taskid)
|
(taskid :initarg :taskid)
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
(in-package #:asdf-user)
|
(in-package #:asdf-user)
|
||||||
|
|
||||||
(defsystem :scopes
|
(defsystem :scopes
|
||||||
:author ""
|
:author "cyberconcepts.org Team <team@cyberconcepts.org>"
|
||||||
:maintainer ""
|
|
||||||
:license "MIT"
|
:license "MIT"
|
||||||
:version "0.0.1"
|
:version "0.0.1"
|
||||||
:homepage "https://www.cyberconcepts.org"
|
:homepage "https://www.cyberconcepts.org"
|
||||||
:description ""
|
:description ""
|
||||||
:depends-on (:str)
|
:depends-on (:str)
|
||||||
:components ((:file "forge/forge")
|
:components ((:file "forge/forge")
|
||||||
(:file "test/test-forge"))
|
(:file "testing")
|
||||||
|
(:file "test/test-forge" :depends-on ("testing" "forge/forge")))
|
||||||
|
|
||||||
:long-description "scopes: generic data processingg facilities")
|
:long-description "scopes: generic data processingg facilities")
|
||||||
;;#.(uiop:read-file-string
|
;;#.(uiop:read-file-string
|
||||||
|
|
|
@ -3,10 +3,15 @@
|
||||||
;;;; testing facility for scopes/forge
|
;;;; testing facility for scopes/forge
|
||||||
|
|
||||||
(defpackage :scopes/test-forge
|
(defpackage :scopes/test-forge
|
||||||
(:use :common-lisp :scopes/forge)
|
(:use :common-lisp)
|
||||||
|
(:local-nicknames (:scf :scopes/forge) (:sct :scopes/testing))
|
||||||
(:export #:run))
|
(:export #:run))
|
||||||
|
|
||||||
(in-package :scopes/test-forge)
|
(in-package :scopes/test-forge)
|
||||||
|
|
||||||
(defun run ()
|
(defun run ()
|
||||||
(scf:hello))
|
(scf:hello)
|
||||||
|
(let ((fe (scf:new-forge-env))
|
||||||
|
(tst (sct:test-suite)))
|
||||||
|
(scf:exec '(fe 4 2 scf:add))
|
||||||
|
))
|
||||||
|
|
12
testing.lisp
Normal file
12
testing.lisp
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
;;; cl-scopes/testing
|
||||||
|
|
||||||
|
;;;; simple testing library
|
||||||
|
|
||||||
|
(defpackage :scopes/testing
|
||||||
|
(:use :common-lisp)
|
||||||
|
(:export #:test-suite))
|
||||||
|
|
||||||
|
(in-package :scopes/testing)
|
||||||
|
|
||||||
|
(defun test-suite ()
|
||||||
|
nil)
|
Loading…
Add table
Reference in a new issue