Common Lisp Package: CL-HEREDOC

README:

FUNCTION

Public

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"!

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.

Private

NEW-RING-BUFFER (LENGTH)

new-ring-buffer length => ring-buffer Create a new RING-BUFFER containing a simple character vector of fixed size LENGTH.

RBREF (BUFFER INDEX)

rbref buffer index => character or #Nul Return character stored at INDEX in ring BUFFER.

SETFRBREF (VALUE BUFFER INDEX)

setf (rbref buffer index) value => value SETF for RBREF. If INDEX > LENGTH of BUFFER, start over at the beginning.

RING-BUFFER-CLEAR (BUFFER)

ring-buffer-clear buffer => -1 Reset all indices of BUFFER to their initial state.

RING-BUFFER-END (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RING-BUFFER-FLUSH (BUFFER)

ring-buffer-flush buffer => string Flush all unused characters in BUFFER.

RING-BUFFER-INSERT (BUFFER VALUE)

ring-buffer-insert buffer value => value Increment END of BUFFER inserting VALUE at the new index.

RING-BUFFER-NEW (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

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.

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.

RING-BUFFER-RESET (BUFFER)

ring-buffer-reset buffer => end-index Reset match beginning/end indices USED and NEW in BUFFER to START and END.

RING-BUFFER-START (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RING-BUFFER-USED (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

RING-BUFFER-VECTOR (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

Undocumented

COPY-RING-BUFFER (INSTANCE)

MAKE-RING-BUFFER (&KEY ((VECTOR DUM0) NIL) ((START DUM1) -1) ((USED DUM2) -1) ((NEW DUM3) -1) ((END DUM4) -1))

SETFRING-BUFFER-END (NEW-VALUE INSTANCE)

SETFRING-BUFFER-NEW (NEW-VALUE INSTANCE)

RING-BUFFER-P (OBJECT)

SETFRING-BUFFER-START (NEW-VALUE INSTANCE)

SETFRING-BUFFER-USED (NEW-VALUE INSTANCE)

SETFRING-BUFFER-VECTOR (NEW-VALUE INSTANCE)

CLASS

Private

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