The scribble Reference Manual

This is the scribble Reference Manual, version 1.0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:50:48 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 scribble

Syntax extensions akin to Racket’s Scribble and Bigloo’s Skribe

Author

Francois-Rene Rideau

License

MIT

Long Description

Scribble offers two syntax extensions allowing you to very nicely
mix text markup data and Lisp code. One syntax is a port to CL of Racket’s Scribble syntax, and the other is a port to CL of Bigloo’s Skribe syntax.

Version

1.0.2

Dependencies
  • meta (system).
  • ptc (system).
  • fare-utils (system)., at least version "1.0.0.5"
  • fare-memoization (system).
  • fare-quasiquote-readtable (system)., at least version "0.9.6"
Source

scribble.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 scribble/scribble.asd

Source

scribble.asd.

Parent Component

scribble (system).

ASDF Systems

scribble.


3.1.2 scribble/package.lisp

Source

scribble.asd.

Parent Component

scribble (system).

Packages

scribble.


3.1.3 scribble/utilities.lisp

Dependency

package.lisp (file).

Source

scribble.asd.

Parent Component

scribble (system).

Internals

3.1.4 scribble/stream-line-column.lisp

Dependency

package.lisp (file).

Source

scribble.asd.

Parent Component

scribble (system).

Public Interface
Internals

3.1.5 scribble/racket.lisp

Dependency

utilities.lisp (file).

Source

scribble.asd.

Parent Component

scribble (system).

Public Interface
Internals

3.1.6 scribble/skribe.lisp

Dependency

utilities.lisp (file).

Source

scribble.asd.

Parent Component

scribble (system).

Public Interface
Internals

3.1.7 scribble/readtables.lisp

Dependencies
Source

scribble.asd.

Parent Component

scribble (system).


4 Packages

Packages are listed by definition order.


4.1 scribble

Source

package.lisp.

Use List
  • common-lisp.
  • editor-hints.named-readtables.
  • fare-quasiquote.
  • fare-utils.
  • meta.
  • proper-tail-calls.
  • uiop/driver.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *scribble-cons*

Scribble customization parameter: you can change it so as to define what scribble returns from the head and body of text in bracket-colon syntax

Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-default-head*

Scribble customization parameter: assuming default scribble-list behavior, modify the head of the form returned to combine at runtime the multiple components of the bracketed text being parsed

Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-list*

Scribble customization parameter: you can change it so as to define what scribble returns from the list of components in parsed bracketed text

Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-package*

if not NIL, the package in which Scribble will read the head of text in bracket-colon syntax

Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-preprocess*

set this variable to NIL to disable Scribble wrapping of strings
into preprocessing forms, to T to enable run-time preprocessing, or to a symbol or function to enable compile-time preprocessing

Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-preprocessor*

run-time preprocessor of strings by Scribble. Used when *SCRIBBLE-PREPROCESS* is T.

Package

scribble.

Source

skribe.lisp.


5.1.2 Macros

Macro: with-preprocessor (pp &body body)

Form to define local Scribble preprocessor

Package

scribble.

Source

skribe.lisp.


5.1.3 Ordinary functions

Function: char-crlf-p (char)

Is this character CR (ASCII 13) or LF (ASCII 10)?

Package

scribble.

Source

stream-line-column.lisp.

Function: combine-column-modifiers (unaligned1 aligned1 unaligned2 aligned2)

Given the UNALIGNED1 and ALIGNED1 column modifiers of a first string,
and the UNALIGNED2 and ALIGNED2 column modifiers of a second string, return as two values the UNALIGNED and ALIGNED column modifiers of their concatenation.

Package

scribble.

Source

stream-line-column.lisp.

Function: configure-scribble (&key preprocess preprocessor list default-head package cons)
Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-araneida ()

This will make Scribble work with the patched version of araneida’s original html.lisp function that I used in CTO and that handles ’list correctly. Hopefully my patch will be integrated into the main upstream darcs repository.

Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-htmlgen ()

This is meant to make Scribble work with AllegroServe’s HTMLGEN from Franz, Inc. – a least if I read the spec correctly.

Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-lml2 ()

This makes Scribble work with LML2 by kmr, which is based on Franz’s HTMLGEN.

Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-tml ()

tml, previously known as htout, is tfeb’s package. This is a wild guess from reading the docs. Please modify to actually suit the package.

Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-who ()

WHO is an optimized html generation package by Edi Weitz. Its keyword semantics is very Scribe-like.
I wrote this reading the docs, but didn’t test it.

Package

scribble.

Source

skribe.lisp.

Function: configure-scribble-for-yaclml ()

yaclml is yet another common lisp markup language. The author wrote this support, but didn’t test it.

Package

scribble.

Source

skribe.lisp.

Function: default-scribble-cons (head body)
Package

scribble.

Source

skribe.lisp.

Function: default-scribble-list (&rest list)

Default behavior for returning components of bracketed text

Package

scribble.

Source

skribe.lisp.

Function: disable-scribble-at-syntax ()
Package

scribble.

Source

racket.lisp.

Function: disable-scribble-syntax ()
Package

scribble.

Source

skribe.lisp.

Function: disable-sub-scribble-syntax ()
Package

scribble.

Source

skribe.lisp.

Function: enable-scribble-at-syntax (&key table scribe)
Package

scribble.

Source

racket.lisp.

Function: enable-scribble-syntax (&optional readtable)
Package

scribble.

Source

skribe.lisp.

Function: enable-sub-scribble-syntax (&optional readtable)
Package

scribble.

Source

skribe.lisp.

Function: pp (x)

Default preprocessing of Scribble strings: compile-time identity.
Globally, locally or lexically alter the binding of symbol-function scribble:pp in your macros so as to customize the behavior of preprocessing

Package

scribble.

Source

skribe.lisp.

Function: read-stream-to-pos (stream endpos)

Read the contents of a file stream from current position to endpos excluded

Package

scribble.

Source

stream-line-column.lisp.

Function: reenable-scribble-at-syntax (&key scribe)
Package

scribble.

Source

racket.lisp.

Function: reenable-scribble-syntax ()
Package

scribble.

Source

skribe.lisp.

Function: reenable-sub-scribble-syntax ()
Package

scribble.

Source

skribe.lisp.

Function: stream-line-column-harder (stream)

Extract the column we are at from the stream.
Ask the implementation gently, but if it won’t tell, reconstitute the data by reading previous characters until we reach a beginning of line or of the who file.

Package

scribble.

Source

stream-line-column.lisp.

Function: string-column-modifier (string)

Return two values describing the effect of the STRING on column position:
1- UNALIGNED-ADJUSTMENT, which is NIL if there is a newline,
but if there isn’t, is an integer number of characters preceding any TAB.
2- ALIGNED-ADJUSTMENT, which is the number of columns following a newline,
or the number of columns following the first tab if there is one but no newline, or NIL if there were neither newline nor tab

Package

scribble.

Source

stream-line-column.lisp.

Function: to-next-tab (column &optional columns-per-tab)

Given a COLUMN and the COLUMNS-PER-TAB (defaulting to $COLUMNS-PER-TAB, return the column of the next tab, as reached a #tab character

Package

scribble.

Source

stream-line-column.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: $columns-per-tab

Number of columns in a text tab

Package

scribble.

Source

stream-line-column.lisp.

Special Variable: *lf*
Package

scribble.

Source

utilities.lisp.

Special Variable: *saved-readtables*
Package

scribble.

Source

skribe.lisp.

Special Variable: *scribble-at-readtable*
Package

scribble.

Source

racket.lisp.

Special Variable: *scribble-readtable*
Package

scribble.

Source

skribe.lisp.

Special Variable: *sub-scribble-readtable*
Package

scribble.

Source

skribe.lisp.


5.2.2 Macros

Macro: within-package (package &body body)

do stuff while binding *package* to package if not NIL at runtime

Package

scribble.

Source

skribe.lisp.

Macro: within-scribble-package (&body body)
Package

scribble.

Source

skribe.lisp.


5.2.3 Ordinary functions

Function: adjust-stream-forward-to-char (stream)

Synchronize a file STREAM to the next valid character position.
UTF-8 encoding may make the current file-position invalid, but by repeatedly trying to read a char at successive positions, we will consume all the ’wrong’ bytes until we eventually reach a point where a character can be read or we reach EOF.

Package

scribble.

Source

stream-line-column.lisp.

Function: ascii-punctuation-char-p (x)
Package

scribble.

Source

utilities.lisp.

Function: ceiling-align (integer divisor)

Round the INTEGER up to a multiple of the DIVISOR

Package

scribble.

Source

stream-line-column.lisp.

Function: do-enable-scribble-at-syntax (&key table scribe skribe)
Package

scribble.

Source

racket.lisp.

Function: do-enable-scribble-syntax (&optional readtable)
Package

scribble.

Source

skribe.lisp.

Function: do-scribble-list (&rest list)

Combine components of bracketed text at runtime with *scribble-default-head*

Package

scribble.

Source

skribe.lisp.

Function: expect-char (input &optional expectation)
Package

scribble.

Source

utilities.lisp.

Function: expect-string (i s)
Package

scribble.

Source

utilities.lisp.

Function: expected-char-p (c expectation)
Package

scribble.

Source

utilities.lisp.

Function: forbidden-pipe-macro (stream char)
Package

scribble.

Source

racket.lisp.

Function: mirror-char (x)
Package

scribble.

Source

utilities.lisp.

Function: mirror-string (x)
Package

scribble.

Source

utilities.lisp.

Function: parse-at-string (x)
Package

scribble.

Source

racket.lisp.

Function: parse-at-syntax (input)
Package

scribble.

Source

racket.lisp.

Function: parse-bracket (stream)
Package

scribble.

Source

skribe.lisp.

Function: pop-readtable ()
Package

scribble.

Source

skribe.lisp.

Function: push-readtable (&optional readtable)
Package

scribble.

Source

skribe.lisp.

Function: read-at-syntax (stream &optional char)
Package

scribble.

Source

racket.lisp.

Function: read-paren-list (stream opening)
Package

scribble.

Source

utilities.lisp.

Function: read-skribe-bracket (stream char)
Package

scribble.

Source

skribe.lisp.

Function: read-to-char (c &optional i)
Package

scribble.

Source

utilities.lisp.

Function: scribble-cons (head body)
Package

scribble.

Source

skribe.lisp.

Function: scribble-cons-with-list-head (head body)
Package

scribble.

Source

skribe.lisp.

Function: scribble-list (&rest list)
Package

scribble.

Source

skribe.lisp.

Function: scribble-preprocess (s)
Package

scribble.

Source

skribe.lisp.

Function: simple-parse-error (format &rest arguments)
Package

scribble.

Source

utilities.lisp.

Function: skip-whitespace-return-column (i &optional col)
Package

scribble.

Source

utilities.lisp.

Function: trim-ending-spaces (s)
Package

scribble.

Source

utilities.lisp.

Function: unbalanced-paren (stream char)
Package

scribble.

Source

utilities.lisp.

Function: unread-string (input string)
Package

scribble.

Source

utilities.lisp.


5.2.4 Generic functions

Generic Function: flush-buffer (input)
Package

scribble.

Source

utilities.lisp.

Methods
Method: flush-buffer ((input buffered-input))
Generic Reader: input-buffer (object)
Package

scribble.

Methods
Reader Method: input-buffer ((buffered-input buffered-input))

automatically generated reader method

Source

utilities.lisp.

Target Slot

buffer.

Generic Reader: input-stream (object)
Package

scribble.

Methods
Reader Method: input-stream ((buffered-input buffered-input))

automatically generated reader method

Source

utilities.lisp.

Target Slot

stream.

Generic Function: peek-char* (input)
Package

scribble.

Source

utilities.lisp.

Methods
Method: peek-char* ((input buffered-input))
Method: peek-char* ((input stream))
Generic Function: read-char* (input)
Package

scribble.

Source

utilities.lisp.

Methods
Method: read-char* ((input buffered-input))
Method: read-char* ((input stream))
Generic Function: unread-char* (input char)
Package

scribble.

Source

utilities.lisp.

Methods
Method: unread-char* ((input buffered-input) char)
Method: unread-char* ((input stream) char)

5.2.5 Conditions

Condition: simple-parse-error
Package

scribble.

Source

utilities.lisp.

Direct superclasses
  • parse-error.
  • simple-error.

5.2.6 Classes

Class: buffered-input
Package

scribble.

Source

utilities.lisp.

Direct methods
Direct slots
Slot: stream
Package

common-lisp.

Type

stream

Initargs

:stream

Readers

input-stream.

Writers

This slot is read-only.

Slot: buffer
Initform

(make-array (quote (16)) :element-type (quote character) :adjustable t :fill-pointer 0)

Readers

input-buffer.

Writers

This slot is read-only.


5.2.7 Types

Type: spacing-character ()

spacing character

Package

scribble.

Source

skribe.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   D   E   F   G   I   M   P   R   S   T   U   W  
Index Entry  Section

A
adjust-stream-forward-to-char: Private ordinary functions
ascii-punctuation-char-p: Private ordinary functions

C
ceiling-align: Private ordinary functions
char-crlf-p: Public ordinary functions
combine-column-modifiers: Public ordinary functions
configure-scribble: Public ordinary functions
configure-scribble-for-araneida: Public ordinary functions
configure-scribble-for-htmlgen: Public ordinary functions
configure-scribble-for-lml2: Public ordinary functions
configure-scribble-for-tml: Public ordinary functions
configure-scribble-for-who: Public ordinary functions
configure-scribble-for-yaclml: Public ordinary functions

D
default-scribble-cons: Public ordinary functions
default-scribble-list: Public ordinary functions
disable-scribble-at-syntax: Public ordinary functions
disable-scribble-syntax: Public ordinary functions
disable-sub-scribble-syntax: Public ordinary functions
do-enable-scribble-at-syntax: Private ordinary functions
do-enable-scribble-syntax: Private ordinary functions
do-scribble-list: Private ordinary functions

E
enable-scribble-at-syntax: Public ordinary functions
enable-scribble-syntax: Public ordinary functions
enable-sub-scribble-syntax: Public ordinary functions
expect-char: Private ordinary functions
expect-string: Private ordinary functions
expected-char-p: Private ordinary functions

F
flush-buffer: Private generic functions
flush-buffer: Private generic functions
forbidden-pipe-macro: Private ordinary functions
Function, adjust-stream-forward-to-char: Private ordinary functions
Function, ascii-punctuation-char-p: Private ordinary functions
Function, ceiling-align: Private ordinary functions
Function, char-crlf-p: Public ordinary functions
Function, combine-column-modifiers: Public ordinary functions
Function, configure-scribble: Public ordinary functions
Function, configure-scribble-for-araneida: Public ordinary functions
Function, configure-scribble-for-htmlgen: Public ordinary functions
Function, configure-scribble-for-lml2: Public ordinary functions
Function, configure-scribble-for-tml: Public ordinary functions
Function, configure-scribble-for-who: Public ordinary functions
Function, configure-scribble-for-yaclml: Public ordinary functions
Function, default-scribble-cons: Public ordinary functions
Function, default-scribble-list: Public ordinary functions
Function, disable-scribble-at-syntax: Public ordinary functions
Function, disable-scribble-syntax: Public ordinary functions
Function, disable-sub-scribble-syntax: Public ordinary functions
Function, do-enable-scribble-at-syntax: Private ordinary functions
Function, do-enable-scribble-syntax: Private ordinary functions
Function, do-scribble-list: Private ordinary functions
Function, enable-scribble-at-syntax: Public ordinary functions
Function, enable-scribble-syntax: Public ordinary functions
Function, enable-sub-scribble-syntax: Public ordinary functions
Function, expect-char: Private ordinary functions
Function, expect-string: Private ordinary functions
Function, expected-char-p: Private ordinary functions
Function, forbidden-pipe-macro: Private ordinary functions
Function, mirror-char: Private ordinary functions
Function, mirror-string: Private ordinary functions
Function, parse-at-string: Private ordinary functions
Function, parse-at-syntax: Private ordinary functions
Function, parse-bracket: Private ordinary functions
Function, pop-readtable: Private ordinary functions
Function, pp: Public ordinary functions
Function, push-readtable: Private ordinary functions
Function, read-at-syntax: Private ordinary functions
Function, read-paren-list: Private ordinary functions
Function, read-skribe-bracket: Private ordinary functions
Function, read-stream-to-pos: Public ordinary functions
Function, read-to-char: Private ordinary functions
Function, reenable-scribble-at-syntax: Public ordinary functions
Function, reenable-scribble-syntax: Public ordinary functions
Function, reenable-sub-scribble-syntax: Public ordinary functions
Function, scribble-cons: Private ordinary functions
Function, scribble-cons-with-list-head: Private ordinary functions
Function, scribble-list: Private ordinary functions
Function, scribble-preprocess: Private ordinary functions
Function, simple-parse-error: Private ordinary functions
Function, skip-whitespace-return-column: Private ordinary functions
Function, stream-line-column-harder: Public ordinary functions
Function, string-column-modifier: Public ordinary functions
Function, to-next-tab: Public ordinary functions
Function, trim-ending-spaces: Private ordinary functions
Function, unbalanced-paren: Private ordinary functions
Function, unread-string: Private ordinary functions

G
Generic Function, flush-buffer: Private generic functions
Generic Function, input-buffer: Private generic functions
Generic Function, input-stream: Private generic functions
Generic Function, peek-char*: Private generic functions
Generic Function, read-char*: Private generic functions
Generic Function, unread-char*: Private generic functions

I
input-buffer: Private generic functions
input-buffer: Private generic functions
input-stream: Private generic functions
input-stream: Private generic functions

M
Macro, with-preprocessor: Public macros
Macro, within-package: Private macros
Macro, within-scribble-package: Private macros
Method, flush-buffer: Private generic functions
Method, input-buffer: Private generic functions
Method, input-stream: Private generic functions
Method, peek-char*: Private generic functions
Method, peek-char*: Private generic functions
Method, read-char*: Private generic functions
Method, read-char*: Private generic functions
Method, unread-char*: Private generic functions
Method, unread-char*: Private generic functions
mirror-char: Private ordinary functions
mirror-string: Private ordinary functions

P
parse-at-string: Private ordinary functions
parse-at-syntax: Private ordinary functions
parse-bracket: Private ordinary functions
peek-char*: Private generic functions
peek-char*: Private generic functions
peek-char*: Private generic functions
pop-readtable: Private ordinary functions
pp: Public ordinary functions
push-readtable: Private ordinary functions

R
read-at-syntax: Private ordinary functions
read-char*: Private generic functions
read-char*: Private generic functions
read-char*: Private generic functions
read-paren-list: Private ordinary functions
read-skribe-bracket: Private ordinary functions
read-stream-to-pos: Public ordinary functions
read-to-char: Private ordinary functions
reenable-scribble-at-syntax: Public ordinary functions
reenable-scribble-syntax: Public ordinary functions
reenable-sub-scribble-syntax: Public ordinary functions

S
scribble-cons: Private ordinary functions
scribble-cons-with-list-head: Private ordinary functions
scribble-list: Private ordinary functions
scribble-preprocess: Private ordinary functions
simple-parse-error: Private ordinary functions
skip-whitespace-return-column: Private ordinary functions
stream-line-column-harder: Public ordinary functions
string-column-modifier: Public ordinary functions

T
to-next-tab: Public ordinary functions
trim-ending-spaces: Private ordinary functions

U
unbalanced-paren: Private ordinary functions
unread-char*: Private generic functions
unread-char*: Private generic functions
unread-char*: Private generic functions
unread-string: Private ordinary functions

W
with-preprocessor: Public macros
within-package: Private macros
within-scribble-package: Private macros


A.3 Variables

Jump to:   $   *  
B   S  
Index Entry  Section

$
$columns-per-tab: Private special variables

*
*lf*: Private special variables
*saved-readtables*: Private special variables
*scribble-at-readtable*: Private special variables
*scribble-cons*: Public special variables
*scribble-default-head*: Public special variables
*scribble-list*: Public special variables
*scribble-package*: Public special variables
*scribble-preprocess*: Public special variables
*scribble-preprocessor*: Public special variables
*scribble-readtable*: Private special variables
*sub-scribble-readtable*: Private special variables

B
buffer: Private classes

S
Slot, buffer: Private classes
Slot, stream: Private classes
Special Variable, $columns-per-tab: Private special variables
Special Variable, *lf*: Private special variables
Special Variable, *saved-readtables*: Private special variables
Special Variable, *scribble-at-readtable*: Private special variables
Special Variable, *scribble-cons*: Public special variables
Special Variable, *scribble-default-head*: Public special variables
Special Variable, *scribble-list*: Public special variables
Special Variable, *scribble-package*: Public special variables
Special Variable, *scribble-preprocess*: Public special variables
Special Variable, *scribble-preprocessor*: Public special variables
Special Variable, *scribble-readtable*: Private special variables
Special Variable, *sub-scribble-readtable*: Private special variables
stream: Private classes