Permalink
Browse files

finished first step of forking from evol

  • Loading branch information...
1 parent f0883e0 commit df609612389852ce0cf067a396db1f7b5e236364 @e-user committed Jul 16, 2010
Showing with 868 additions and 13 deletions.
  1. +1 −0 AUTHORS
  2. +674 −0 COPYING
  3. +6 −0 ChangeLog
  4. 0 NEWS
  5. +58 −0 README
  6. +33 −0 cl-heredoc-test.asd
  7. +36 −0 cl-heredoc.asd
  8. +8 −8 src/heredoc.lisp
  9. +21 −0 src/package.lisp
  10. +5 −5 src/ring-buffer.lisp
  11. +26 −0 test/package.lisp
View
@@ -0,0 +1 @@
+Alexander Kahl <e-user@fsfe.org>
View
674 COPYING
Oops, something went wrong.
View
@@ -0,0 +1,6 @@
+2009-10-28 Alexander Kahl <e-user@fsfe.org>
+
+ * Version (nil)
+
+ * Release Notes
+ This is just a stub.
View
0 NEWS
No changes.
View
58 README
@@ -0,0 +1,58 @@
+cl-heredoc - Common Lisp reader heredoc dispatcher
+==================================================
+cl-heredoc is an implementation of "here documents" [1] that allow the user to
+embed literal strings into code or data without any need for quoting, something
+that is missing both in ANSI CL and popular implementations.
+
+cl-heredoc is completely written in Common Lisp and licensed under the
+GPLv3+[2]. Please see the file COPYING in the top-level directory of the
+distribution tarball or see the link at [2] if you didn't receive a copy along
+with this file.
+
+
+Usage
+=====
+cl-heredoc primarily exports a single function, READ-HEREDOC, that is meant to
+be used with the CL reader by attaching it to a dispatch character, e.g.
+
+CL-USER> (set-dispatch-macro-character #\# #\> #'cl-heredoc:read-heredoc)
+CL-USER> #>eof>Write whatever (you) "want",
+ no matter how many lines or what characters until
+the magic end sequence has been reached!eof
+
+Will read everything starting after "#>eof>" until the given sequence, here
+"eof", is found and return the result as a string. The enclosed text is not
+subject to any kind of evaluation and needs no quoting.
+If used in a non-interactive fashion, i.e. outside the REPL, an error will be
+signaled if EOF is reached.
+
+The underlying function READ-UNTIL-MATCH may also be used directly: It takes two
+arguments, a stream and a termination string and will read from the stream until
+the terminating sequence is found. Everything read so far excluding the
+terminator is returned as a string.
+
+
+Links and References
+====================
+Homepage: http://www.cliki.net/cl-heredoc
+Hacking: http://github.com/e-user/cl-heredoc
+
+[1] http://en.wikipedia.org/wiki/Here_document
+[2] http://www.gnu.org/licenses/gpl-3.0-standalone.html
+
+
+--------------------------------------------------------------------------------
+Copyright (C) 2009, 2010 Alexander Kahl <e-user@fsfe.org>
+This file is part of cl-heredoc.
+cl-heredoc 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 3 of the License, or
+(at your option) any later version.
+
+cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
View
@@ -0,0 +1,33 @@
+;;;; cl-heredoc - cl-heredoc-test.asd
+;;;; Copyright (C) 2009, 2010 Alexander Kahl <e-user@fsfe.org>
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :cl-user)
+
+(defpackage :cl-heredoc-test-system
+ (:use :cl :asdf))
+
+(in-package :cl-heredoc-test-system)
+
+(asdf:defsystem :cl-heredoc-test
+ :description "cl-heredoc test package."
+ :version "0.0.1"
+ :author "Alexander Kahl <e-user@fsfe.org>"
+ :license "GPLv3+"
+ :depends-on (:cl-heredoc :stefil)
+ :components
+ ((:module "test"
+ :components
+ ((:file "package")))))
View
@@ -0,0 +1,36 @@
+;;;; cl-heredoc - cl-heredoc.asd
+;;;; Copyright (C) 2009, 2010 Alexander Kahl <e-user@fsfe.org>
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :cl-user)
+
+(defpackage :cl-heredoc-system
+ (:use :cl :asdf))
+
+(in-package :cl-heredoc-system)
+
+(asdf:defsystem :cl-heredoc
+ :description "Common Lisp reader heredoc dispatcher"
+ :version "0.1.0"
+ :author "Alexander Kahl <e-user@fsfe.org>"
+ :license "GPLv3+"
+ :depends-on ()
+ :components
+ ((:module "src"
+ :serial t
+ :components
+ ((:file "package")
+ (:file "ring-buffer")
+ (:file "heredoc")))))
View
@@ -1,20 +1,20 @@
-;;;; evol - heredoc.lisp
+;;;; cl-heredoc - heredoc.lisp
;;;; Copyright (C) 2010 Alexander Kahl <e-user@fsfe.org>
-;;;; This file is part of evol.
-;;;; evol is free software; you can redistribute it and/or modify
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
;;;; (at your option) any later version.
;;;;
-;;;; evol is distributed in the hope that it will be useful,
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
-(in-package :evol)
+(in-package :cl-heredoc)
(defun read-until-match (stream terminal)
"read-until-match stream terminal => string
@@ -52,8 +52,8 @@ EOF."
Return string from STREAM up to the point where the string read first until CHAR
is encountered. All evaluation is completely turned off so no quoting is
required at all.
-Example: #>eof>Write whatever (you) \"want\"!eof => Write whatever (you) \"want\"!"
+Example:
+CL-USER> (set-dispatch-macro-character #\# #\> #'cl-heredoc:read-heredoc)
+CL-USER> #>eof>Write whatever (you) \"want\"!eof => Write whatever (you) \"want\"!"
(declare (ignore arg))
(read-until-match stream (read-until-match stream (string char))))
-
-(set-dispatch-macro-character #\# #\> #'read-heredoc)
View
@@ -0,0 +1,21 @@
+;;;; cl-heredoc - package.lisp
+;;;; Copyright (C) 2009, 2010 Alexander Kahl <e-user@fsfe.org>
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :cl-heredoc-system)
+
+(defpackage :cl-heredoc
+ (:use :cl)
+ (:export :read-heredoc :read-until-match))
View
@@ -1,20 +1,20 @@
-;;;; evol - ring-buffer.lisp
+;;;; cl-heredoc - ring-buffer.lisp
;;;; Copyright (C) 2010 Alexander Kahl <e-user@fsfe.org>
-;;;; This file is part of evol.
-;;;; evol is free software; you can redistribute it and/or modify
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
;;;; (at your option) any later version.
;;;;
-;;;; evol is distributed in the hope that it will be useful,
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
-(in-package :evol)
+(in-package :cl-heredoc)
;;; Operations on ring buffers, as described by Paul Graham in ANSI Common Lisp.
(defstruct ring-buffer
View
@@ -0,0 +1,26 @@
+;;;; cl-heredoc - package.lisp
+;;;; Copyright (C) 2009 2010 Alexander Kahl <e-user@fsfe.org>
+;;;; This file is part of cl-heredoc.
+;;;; cl-heredoc 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 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; cl-heredoc 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+(in-package :cl-heredoc-test-system)
+
+(defpackage :cl-heredoc-test
+ (:use :cl :cl-heredoc :stefil)
+ (:export :all))
+
+(in-package :cl-heredoc-test)
+
+(in-root-suite)
+(defsuite all)

0 comments on commit df60961

Please sign in to comment.