The cl-heredoc Reference Manual

This is the cl-heredoc Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:01:22 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-heredoc

Common Lisp reader heredoc dispatcher

Author

Alexander Kahl <>

License

GPLv3+

Version

0.1.0

Source

cl-heredoc.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-heredoc/src

Source

cl-heredoc.asd.

Parent Component

cl-heredoc (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cl-heredoc/cl-heredoc.asd

Source

cl-heredoc.asd.

Parent Component

cl-heredoc (system).

ASDF Systems

cl-heredoc.


4.1.2 cl-heredoc/src/package.lisp

Source

cl-heredoc.asd.

Parent Component

src (module).

Packages

cl-heredoc.


4.1.3 cl-heredoc/src/ring-buffer.lisp

Dependency

package.lisp (file).

Source

cl-heredoc.asd.

Parent Component

src (module).

Internals

4.1.4 cl-heredoc/src/heredoc.lisp

Dependency

ring-buffer.lisp (file).

Source

cl-heredoc.asd.

Parent Component

src (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 cl-heredoc

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: read-heredoc (stream char arg)

read-heredoc stream char arg => string

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:
CL-USER> (set-dispatch-macro-character ## #> #’cl-heredoc:read-heredoc) CL-USER> #>eof>Write whatever (you) "want"!eof => Write whatever (you) "want"!

Package

cl-heredoc.

Source

heredoc.lisp.

Function: read-until-match (stream terminal)

read-until-match stream terminal => string

Read characters from STREAM until a sequence equal to string TERMINAL is read. Return all characters read as string omitting TERMINAL itself. Signal error upon EOF.

Package

cl-heredoc.

Source

heredoc.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: copy-ring-buffer (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: make-ring-buffer (&key vector start used new end)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: new-ring-buffer (length)

new-ring-buffer length => ring-buffer

Create a new RING-BUFFER containing a simple character vector of fixed size LENGTH.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: rbref (buffer index)

rbref buffer index => character or #Nul

Return character stored at INDEX in ring BUFFER.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: (setf rbref) (buffer index)

setf (rbref buffer index) value => value

SETF for RBREF. If INDEX > LENGTH of BUFFER, start over at the beginning.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: ring-buffer-clear (buffer)

ring-buffer-clear buffer => -1

Reset all indices of BUFFER to their initial state.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Reader: ring-buffer-end (instance)
Writer: (setf ring-buffer-end) (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Target Slot

end.

Function: ring-buffer-flush (buffer)

ring-buffer-flush buffer => string

Flush all unused characters in BUFFER.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: ring-buffer-insert (buffer value)

ring-buffer-insert buffer value => value

Increment END of BUFFER inserting VALUE at the new index.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Reader: ring-buffer-new (instance)
Writer: (setf ring-buffer-new) (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Target Slot

new.

Function: ring-buffer-next (buffer)

ring-buffer-next buffer => character or nil

Return next match character incrementing USED in BUFFER or simply NIL if none are left.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: ring-buffer-p (object)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: ring-buffer-pop (buffer)

ring-buffer-pop buffer => character

Increment START of BUFFER returning VALUE at the new index. Additionally, reset the BUFFER match indices.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Function: ring-buffer-reset (buffer)

ring-buffer-reset buffer => end-index

Reset match beginning/end indices USED and NEW in BUFFER to START and END.

Package

cl-heredoc.

Source

ring-buffer.lisp.

Reader: ring-buffer-start (instance)
Writer: (setf ring-buffer-start) (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Target Slot

start.

Reader: ring-buffer-used (instance)
Writer: (setf ring-buffer-used) (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Target Slot

used.

Reader: ring-buffer-vector (instance)
Writer: (setf ring-buffer-vector) (instance)
Package

cl-heredoc.

Source

ring-buffer.lisp.

Target Slot

vector.


6.2.2 Structures

Structure: ring-buffer

Structure defining ring buffers utilizing a simple VECTOR of fixed size and four indices:
START: Index of first live value
END: Index of last live value
USED: Beginning of current match
NEW: End of current match

Package

cl-heredoc.

Source

ring-buffer.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: vector
Package

common-lisp.

Readers

ring-buffer-vector.

Writers

(setf ring-buffer-vector).

Slot: start
Initform

-1

Readers

ring-buffer-start.

Writers

(setf ring-buffer-start).

Slot: used
Initform

-1

Readers

ring-buffer-used.

Writers

(setf ring-buffer-used).

Slot: new
Initform

-1

Readers

ring-buffer-new.

Writers

(setf ring-buffer-new).

Slot: end
Initform

-1

Readers

ring-buffer-end.

Writers

(setf ring-buffer-end).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   F   M   N   R  
Index Entry  Section

(
(setf rbref): Private ordinary functions
(setf ring-buffer-end): Private ordinary functions
(setf ring-buffer-new): Private ordinary functions
(setf ring-buffer-start): Private ordinary functions
(setf ring-buffer-used): Private ordinary functions
(setf ring-buffer-vector): Private ordinary functions

C
copy-ring-buffer: Private ordinary functions

F
Function, (setf rbref): Private ordinary functions
Function, (setf ring-buffer-end): Private ordinary functions
Function, (setf ring-buffer-new): Private ordinary functions
Function, (setf ring-buffer-start): Private ordinary functions
Function, (setf ring-buffer-used): Private ordinary functions
Function, (setf ring-buffer-vector): Private ordinary functions
Function, copy-ring-buffer: Private ordinary functions
Function, make-ring-buffer: Private ordinary functions
Function, new-ring-buffer: Private ordinary functions
Function, rbref: Private ordinary functions
Function, read-heredoc: Public ordinary functions
Function, read-until-match: Public ordinary functions
Function, ring-buffer-clear: Private ordinary functions
Function, ring-buffer-end: Private ordinary functions
Function, ring-buffer-flush: Private ordinary functions
Function, ring-buffer-insert: Private ordinary functions
Function, ring-buffer-new: Private ordinary functions
Function, ring-buffer-next: Private ordinary functions
Function, ring-buffer-p: Private ordinary functions
Function, ring-buffer-pop: Private ordinary functions
Function, ring-buffer-reset: Private ordinary functions
Function, ring-buffer-start: Private ordinary functions
Function, ring-buffer-used: Private ordinary functions
Function, ring-buffer-vector: Private ordinary functions

M
make-ring-buffer: Private ordinary functions

N
new-ring-buffer: Private ordinary functions

R
rbref: Private ordinary functions
read-heredoc: Public ordinary functions
read-until-match: Public ordinary functions
ring-buffer-clear: Private ordinary functions
ring-buffer-end: Private ordinary functions
ring-buffer-flush: Private ordinary functions
ring-buffer-insert: Private ordinary functions
ring-buffer-new: Private ordinary functions
ring-buffer-next: Private ordinary functions
ring-buffer-p: Private ordinary functions
ring-buffer-pop: Private ordinary functions
ring-buffer-reset: Private ordinary functions
ring-buffer-start: Private ordinary functions
ring-buffer-used: Private ordinary functions
ring-buffer-vector: Private ordinary functions