cl-heredoc
所属分类:collect
开发工具:Common Lisp
文件大小:0KB
下载次数:0
上传日期:2022-04-11 07:59:43
上 传 者:
sh-1993
说明: 通用Lisp读取器heredoc调度器,
(Common Lisp reader heredoc dispatcher,)
文件列表:
AUTHORS (33, 2022-04-11)
COPYING (35147, 2022-04-11)
CREDITS (3390, 2022-04-11)
ChangeLog (0, 2022-04-11)
INSTALL (587, 2022-04-11)
NEWS (0, 2022-04-11)
cl-heredoc-test.asd (1328, 2022-04-11)
cl-heredoc.asd (1356, 2022-04-11)
src/ (0, 2022-04-11)
src/heredoc.lisp (2493, 2022-04-11)
src/package.lisp (905, 2022-04-11)
src/ring-buffer.lisp (3566, 2022-04-11)
test/ (0, 2022-04-11)
test/package.lisp (966, 2022-04-11)
test/ring-buffer.lisp (2219, 2022-04-11)
# 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 in both 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 [the online version][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.
```lisp
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
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 .
近期下载者:
相关文件:
收藏者: