This is the cl-markless Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:12:07 2024 GMT+0.
cl-markless/cl-markless.asd
cl-markless/package.lisp
cl-markless/toolkit.lisp
cl-markless/conditions.lisp
cl-markless/component.lisp
cl-markless/color-table.lisp
cl-markless/size-table.lisp
cl-markless/printer.lisp
cl-markless/parser.lisp
cl-markless/directive.lisp
cl-markless/misc.lisp
cl-markless/documentation.lisp
The main system appears first, followed by any subsystem dependency.
cl-markless
A parser implementation for Markless
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
zlib
1.2.0
documentation-utils
(system).
trivial-indent
(system).
package.lisp
(file).
toolkit.lisp
(file).
conditions.lisp
(file).
component.lisp
(file).
color-table.lisp
(file).
size-table.lisp
(file).
printer.lisp
(file).
parser.lisp
(file).
directive.lisp
(file).
misc.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-markless/cl-markless.asd
cl-markless/package.lisp
cl-markless/toolkit.lisp
cl-markless/conditions.lisp
cl-markless/component.lisp
cl-markless/color-table.lisp
cl-markless/size-table.lisp
cl-markless/printer.lisp
cl-markless/parser.lisp
cl-markless/directive.lisp
cl-markless/misc.lisp
cl-markless/documentation.lisp
cl-markless/toolkit.lisp
package.lisp
(file).
cl-markless
(system).
condense-children
(function).
condense-component-tree
(function).
ends-with
(function).
match!
(macro).
parse-float
(function).
read-delimited
(function).
split-string
(function).
starts-with
(function).
to-readtable-case
(function).
class-prototype
(function).
decompose-rgb
(function).
delegate-paragraph
(function).
find-subclass
(function).
last-aref
(function).
next-option
(function).
parse-unit
(function).
remf*
(function).
split-options
(function).
subclasses
(function).
vector-push-front
(function).
cl-markless/conditions.lisp
toolkit.lisp
(file).
cl-markless
(system).
bad-option
(condition).
bad-unit
(condition).
bad-value
(condition).
bad-variable
(condition).
cursor
(reader method).
deactivation-disallowed
(condition).
directive-instance
(reader method).
embed-type
(reader method).
embed-type
(reader method).
implementation-condition
(condition).
instruction
(reader method).
instruction
(reader method).
instruction-evaluation-undefined
(condition).
line
(reader method).
markless-condition
(condition).
message
(reader method).
message
(reader method).
option
(reader method).
option-disallowed
(condition).
parser-condition
(condition).
parser-error
(condition).
parser-warning
(condition).
stack-exhausted
(condition).
unknown-embed-type
(condition).
unknown-instruction
(condition).
user-error
(condition).
user-warning
(condition).
value
(reader method).
variable-name
(reader method).
variable-name
(reader method).
*current-line-number*
(special variable).
cl-markless/component.lisp
conditions.lisp
(file).
cl-markless
(system).
align
(class).
alignment
(reader method).
(setf alignment)
(writer method).
audio
(class).
author
(reader method).
(setf author)
(writer method).
autoplay-option
(class).
block-component
(class).
blockquote
(class).
blockquote-header
(class).
blue
(reader method).
(setf blue)
(writer method).
bold
(class).
bold-option
(class).
caption-option
(class).
children
(reader method).
(setf children)
(writer method).
code
(class).
code-block
(class).
color-option
(class).
comment
(class).
component
(class).
compound
(class).
compound-option
(class).
copyright
(reader method).
(setf copyright)
(writer method).
depth
(reader method).
depth
(reader method).
(setf depth)
(writer method).
(setf depth)
(writer method).
direction
(reader method).
(setf direction)
(writer method).
directives
(reader method).
(setf directives)
(writer method).
directives-instruction
(class).
disable
(class).
em-dash
(class).
embed
(class).
embed-link-option
(class).
embed-option
(class).
en-dash
(class).
enable
(class).
encoding
(reader method).
(setf encoding)
(writer method).
encoding-option
(class).
end
(reader method).
(setf end)
(writer method).
end-option
(class).
error
(class).
file
(reader method).
(setf file)
(writer method).
float-option
(class).
font-family
(reader method).
(setf font-family)
(writer method).
font-option
(class).
footnote
(class).
footnote-reference
(class).
green
(reader method).
(setf green)
(writer method).
header
(class).
height-option
(class).
horizontal-rule
(class).
image
(class).
include
(class).
indentation
(reader method).
(setf indentation)
(writer method).
info
(class).
inline-component
(class).
inset
(reader method).
(setf inset)
(writer method).
instruction
(class).
internal-link-option
(class).
italic
(class).
italic-option
(class).
label
(method).
(setf label)
(method).
(setf label)
(method).
label
(class).
label-option
(class).
labels
(reader method).
(setf labels)
(writer method).
language
(reader method).
language
(reader method).
language
(reader method).
(setf language)
(writer method).
(setf language)
(writer method).
(setf language)
(writer method).
language-option
(class).
link-option
(class).
list
(class).
list-item
(class).
loop-option
(class).
message
(reader method).
(setf message)
(writer method).
message-instruction
(class).
newline
(class).
number
(reader method).
(setf number)
(writer method).
offset-p
(reader method).
(setf offset-p)
(writer method).
options
(reader method).
options
(reader method).
options
(reader method).
options
(reader method).
(setf options)
(writer method).
(setf options)
(writer method).
(setf options)
(writer method).
(setf options)
(writer method).
options-option
(class).
ordered-list
(class).
ordered-list-item
(class).
paragraph
(class).
parent-component
(class).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
raw
(class).
red
(reader method).
(setf red)
(writer method).
root-component
(class).
set
(class).
size
(reader method).
(setf size)
(writer method).
size-option
(class).
sized
(class).
source
(reader method).
(setf source)
(writer method).
source
(class).
spoiler-option
(class).
start
(reader method).
(setf start)
(writer method).
start-option
(class).
strikethrough
(class).
strikethrough-option
(class).
subtext
(class).
supertext
(class).
target
(reader method).
(setf target)
(writer method).
targeted
(class).
text
(reader method).
text
(method).
text
(reader method).
(setf text)
(writer method).
(setf text)
(writer method).
text-component
(class).
underline
(class).
underline-option
(class).
unit
(reader method).
(setf unit)
(writer method).
unit-component
(class).
unordered-list
(class).
unordered-list-item
(class).
url
(class).
value
(reader method).
(setf value)
(writer method).
variable
(reader method).
(setf variable)
(writer method).
video
(class).
warning
(class).
width-option
(class).
define-printer
(macro).
cl-markless/color-table.lisp
component.lisp
(file).
cl-markless
(system).
*color-table*
(special variable).
make-color-table
(function).
cl-markless/size-table.lisp
color-table.lisp
(file).
cl-markless
(system).
*size-table*
(special variable).
make-size-table
(function).
cl-markless/printer.lisp
size-table.lisp
(file).
cl-markless
(system).
bbcode
(class).
debug
(class).
define-output
(macro).
highlighted
(class).
list-output-formats
(function).
markless
(class).
output
(function).
output-component
(generic function).
output-format
(class).
%op
(macro).
*level*
(special variable).
*prefixes*
(special variable).
output-operator
(method).
output-operator
(method).
supported-tags
(reader method).
(setf supported-tags)
(writer method).
cl-markless/parser.lisp
printer.lisp
(file).
cl-markless
(system).
*default-compound-options*
(special variable).
*default-directives*
(special variable).
*default-embed-options*
(special variable).
*default-embed-types*
(special variable).
*default-instruction-types*
(special variable).
block-dispatch-table
(reader method).
(setf block-dispatch-table)
(writer method).
commit
(function).
compile-dispatch-table
(function).
compound-options
(reader method).
(setf compound-options)
(writer method).
directive
(method).
directive
(method).
directives
(reader method).
(setf directives)
(writer method).
directives-of
(method).
disable
(method).
dispatch
(function).
embed-options
(reader method).
(setf embed-options)
(writer method).
embed-types
(reader method).
(setf embed-types)
(writer method).
enable
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
evaluate-instruction
(method).
initialize-instance
(method).
inline-dispatch-table
(reader method).
(setf inline-dispatch-table)
(writer method).
input
(reader method).
(setf input)
(writer method).
instruction-types
(reader method).
(setf instruction-types)
(writer method).
line-break-mode
(reader method).
(setf line-break-mode)
(writer method).
parse
(method).
parse
(method).
parse
(method).
parse
(method).
parser
(class).
read-block
(function).
read-full-line
(function).
read-inline
(function).
read-url
(function).
root
(function).
stack
(reader method).
(setf stack)
(writer method).
stack-bottom
(function).
stack-entry
(structure).
stack-entry-component
(reader).
(setf stack-entry-component)
(writer).
stack-entry-directive
(reader).
(setf stack-entry-directive)
(writer).
stack-pop
(function).
stack-push
(function).
stack-top
(function).
stack-unwind
(function).
copy-stack-entry
(function).
make-stack-entry
(function).
pop-newline
(function).
process-stack
(function).
stack-entry-p
(function).
cl-markless/directive.lisp
parser.lisp
(file).
cl-markless
(system).
begin
(generic function).
block-directive
(class).
blockquote
(class).
blockquote-header
(class).
bold
(class).
center
(class).
code
(class).
code-block
(class).
comment
(class).
compound
(class).
consume-end
(generic function).
consume-prefix
(generic function).
dash
(class).
directive
(class).
embed
(class).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
embed-option-allowed-p
(method).
enabled-p
(reader method).
(setf enabled-p)
(method).
(setf enabled-p)
(method).
(setf enabled-p)
(writer method).
end
(generic function).
ensure-compound-option
(function).
ensure-directive
(function).
ensure-embed-option
(function).
ensure-embed-type
(function).
ensure-instruction-type
(function).
find-embed-option-type
(method).
find-embed-type
(method).
find-instruction-type
(method).
footnote
(class).
footnote-reference
(class).
header
(class).
horizontal-rule
(class).
inline-directive
(class).
instruction
(class).
invoke
(generic function).
italic
(class).
justify
(class).
left-align
(class).
newline
(class).
ordered-list
(class).
paragraph
(class).
parse-compound-option
(function).
parse-compound-option-type
(method).
parse-compound-option-type
(method).
parse-compound-option-type
(method).
parse-compound-option-type
(method).
parse-compound-option-type
(method).
parse-embed-option
(function).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-embed-option-type
(method).
parse-instruction
(method).
parse-instruction
(method).
parse-instruction
(method).
parse-instruction
(method).
parse-instruction
(method).
parse-instruction
(method).
prefix
(generic function).
print-object
(method).
right-align
(class).
root-directive
(class).
singular-line-directive
(class).
strikethrough
(class).
subtext
(class).
supertext
(class).
surrounding-inline-directive
(class).
underline
(class).
unordered-list
(class).
url
(class).
find-compound-option-type
(method).
noop
(class).
cl-markless/misc.lisp
directive.lisp
(file).
cl-markless
(system).
count-words
(method).
count-words
(method).
count-words
(method).
count-words-by
(generic function).
cl-markless/documentation.lisp
misc.lisp
(file).
cl-markless
(system).
Packages are listed by definition order.
cl-markless-components
org.shirakumo.markless.components
common-lisp
.
align
(class).
alignment
(generic reader).
(setf alignment)
(generic writer).
audio
(class).
author
(generic reader).
(setf author)
(generic writer).
autoplay-option
(class).
block-component
(class).
blockquote
(class).
blockquote-header
(class).
blue
(generic reader).
(setf blue)
(generic writer).
bold
(class).
bold-option
(class).
caption-option
(class).
children
(generic reader).
(setf children)
(generic writer).
code
(class).
code-block
(class).
color-option
(class).
comment
(class).
component
(class).
compound
(class).
compound-option
(class).
copyright
(generic reader).
(setf copyright)
(generic writer).
depth
(generic reader).
(setf depth)
(generic writer).
direction
(generic reader).
(setf direction)
(generic writer).
directives
(generic reader).
(setf directives)
(generic writer).
directives-instruction
(class).
disable
(class).
em-dash
(class).
embed
(class).
embed-link-option
(class).
embed-option
(class).
en-dash
(class).
enable
(class).
encoding
(generic reader).
(setf encoding)
(generic writer).
encoding-option
(class).
end
(generic reader).
(setf end)
(generic writer).
end-option
(class).
error
(class).
file
(generic reader).
(setf file)
(generic writer).
float-option
(class).
font-family
(generic reader).
(setf font-family)
(generic writer).
font-option
(class).
footnote
(class).
footnote-reference
(class).
green
(generic reader).
(setf green)
(generic writer).
header
(class).
height-option
(class).
horizontal-rule
(class).
image
(class).
include
(class).
indentation
(generic reader).
(setf indentation)
(generic writer).
info
(class).
inline-component
(class).
inset
(generic reader).
(setf inset)
(generic writer).
instruction
(class).
internal-link-option
(class).
italic
(class).
italic-option
(class).
label
(generic function).
(setf label)
(generic function).
label
(class).
label-option
(class).
labels
(generic reader).
(setf labels)
(generic writer).
language
(generic reader).
(setf language)
(generic writer).
language-option
(class).
link-option
(class).
list
(class).
list-item
(class).
loop-option
(class).
message
(generic reader).
(setf message)
(generic writer).
message-instruction
(class).
newline
(class).
number
(generic reader).
(setf number)
(generic writer).
offset-p
(generic reader).
(setf offset-p)
(generic writer).
options
(generic reader).
(setf options)
(generic writer).
options-option
(class).
ordered-list
(class).
ordered-list-item
(class).
paragraph
(class).
parent-component
(class).
raw
(class).
red
(generic reader).
(setf red)
(generic writer).
root-component
(class).
set
(class).
size
(generic reader).
(setf size)
(generic writer).
size-option
(class).
sized
(class).
source
(generic reader).
(setf source)
(generic writer).
source
(class).
spoiler-option
(class).
start
(generic reader).
(setf start)
(generic writer).
start-option
(class).
strikethrough
(class).
strikethrough-option
(class).
subtext
(class).
supertext
(class).
target
(generic reader).
(setf target)
(generic writer).
targeted
(class).
text
(generic function).
(setf text)
(generic writer).
text-component
(class).
underline
(class).
underline-option
(class).
unit
(generic reader).
(setf unit)
(generic writer).
unit-component
(class).
unordered-list
(class).
unordered-list-item
(class).
url
(class).
value
(generic reader).
(setf value)
(generic writer).
variable
(generic reader).
(setf variable)
(generic writer).
video
(class).
warning
(class).
width-option
(class).
define-printer
(macro).
cl-markless
org.shirakumo.markless
common-lisp
.
*color-table*
(special variable).
*default-compound-options*
(special variable).
*default-directives*
(special variable).
*default-embed-options*
(special variable).
*default-embed-types*
(special variable).
*default-instruction-types*
(special variable).
*size-table*
(special variable).
bad-option
(condition).
bad-unit
(condition).
bad-value
(condition).
bad-variable
(condition).
bbcode
(class).
begin
(generic function).
block-directive
(class).
block-dispatch-table
(generic reader).
(setf block-dispatch-table)
(generic writer).
blockquote
(class).
blockquote-header
(class).
bold
(class).
center
(class).
code
(class).
code-block
(class).
comment
(class).
commit
(function).
compile-dispatch-table
(function).
compound
(class).
compound-options
(generic reader).
(setf compound-options)
(generic writer).
condense-children
(function).
condense-component-tree
(function).
consume-end
(generic function).
consume-prefix
(generic function).
count-words
(generic function).
count-words-by
(generic function).
cursor
(generic reader).
dash
(class).
deactivation-disallowed
(condition).
debug
(class).
define-output
(macro).
directive
(generic function).
directive
(class).
directive-instance
(generic reader).
directives
(generic reader).
(setf directives)
(generic writer).
directives-of
(generic function).
disable
(generic function).
dispatch
(function).
embed
(class).
embed-option-allowed-p
(generic function).
embed-options
(generic reader).
(setf embed-options)
(generic writer).
embed-type
(generic reader).
embed-types
(generic reader).
(setf embed-types)
(generic writer).
enable
(generic function).
enabled-p
(generic reader).
(setf enabled-p)
(generic function).
end
(generic function).
ends-with
(function).
ensure-compound-option
(function).
ensure-directive
(function).
ensure-embed-option
(function).
ensure-embed-type
(function).
ensure-instruction-type
(function).
evaluate-instruction
(generic function).
find-embed-option-type
(generic function).
find-embed-type
(generic function).
find-instruction-type
(generic function).
footnote
(class).
footnote-reference
(class).
header
(class).
highlighted
(class).
horizontal-rule
(class).
implementation-condition
(condition).
inline-directive
(class).
inline-dispatch-table
(generic reader).
(setf inline-dispatch-table)
(generic writer).
input
(generic reader).
(setf input)
(generic writer).
instruction
(generic reader).
instruction
(class).
instruction-evaluation-undefined
(condition).
instruction-types
(generic reader).
(setf instruction-types)
(generic writer).
invoke
(generic function).
italic
(class).
justify
(class).
left-align
(class).
line
(generic reader).
line-break-mode
(generic reader).
(setf line-break-mode)
(generic writer).
list-output-formats
(function).
markless
(class).
markless-condition
(condition).
match!
(macro).
message
(generic reader).
newline
(class).
option
(generic reader).
option-disallowed
(condition).
ordered-list
(class).
output
(function).
output-component
(generic function).
output-format
(class).
paragraph
(class).
parse
(generic function).
parse-compound-option
(function).
parse-compound-option-type
(generic function).
parse-embed-option
(function).
parse-embed-option-type
(generic function).
parse-float
(function).
parse-instruction
(generic function).
parser
(class).
parser-condition
(condition).
parser-error
(condition).
parser-warning
(condition).
prefix
(generic function).
read-block
(function).
read-delimited
(function).
read-full-line
(function).
read-inline
(function).
read-url
(function).
right-align
(class).
root
(function).
root-directive
(class).
singular-line-directive
(class).
split-string
(function).
stack
(generic reader).
(setf stack)
(generic writer).
stack-bottom
(function).
stack-entry
(structure).
stack-entry-component
(reader).
(setf stack-entry-component)
(writer).
stack-entry-directive
(reader).
(setf stack-entry-directive)
(writer).
stack-exhausted
(condition).
stack-pop
(function).
stack-push
(function).
stack-top
(function).
stack-unwind
(function).
starts-with
(function).
strikethrough
(class).
subtext
(class).
supertext
(class).
surrounding-inline-directive
(class).
to-readtable-case
(function).
underline
(class).
unknown-embed-type
(condition).
unknown-instruction
(condition).
unordered-list
(class).
url
(class).
user-error
(condition).
user-warning
(condition).
value
(generic reader).
variable-name
(generic reader).
%op
(macro).
*current-line-number*
(special variable).
*level*
(special variable).
*prefixes*
(special variable).
class-prototype
(function).
copy-stack-entry
(function).
decompose-rgb
(function).
delegate-paragraph
(function).
find-compound-option-type
(generic function).
find-subclass
(function).
last-aref
(function).
make-color-table
(function).
make-size-table
(function).
make-stack-entry
(function).
next-option
(function).
noop
(class).
output-operator
(generic function).
parse-unit
(function).
pop-newline
(function).
process-stack
(function).
remf*
(function).
split-options
(function).
stack-entry-p
(function).
subclasses
(function).
supported-tags
(generic reader).
(setf supported-tags)
(generic writer).
vector-push-front
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Hash table associating colour names to color-options.
Each entry should be a case-insensitive string as the key and a
CL-MARKLESS-COMPONENTS:COLOR-OPTION as the value. The default table
should include all of the colour names and values defined for
HTML/CSS.
See CL-MARKLESS-COMPONENTS:COLOR-OPTION
This variable contains the list of by-default available compound options.
This list should only ever contain names of compound-options or their
classes.
See PARSER
This variable contains the list of by-default available directives.
This list should only ever contain names of directives, not directive
instances.
See PARSER
This variable contains the list of by-default available embed options.
This list should only ever contain names of embed-options or their
classes.
See PARSER
This variable contains the list of by-default available embed types.
This list should only ever contain names of embed types or their
classes.
See PARSER
This variable contains the list of by-default available instruction types.
This list should only ever contain names of instruction types or their
classes.
See PARSER
Hash table associating size names to size-options.
Each entry should be a case-insensitive string as the key and a
CL-MARKLESS-COMPONENTS:SIZE-OPTION as the value. The default table
should include all of the size names and values defined by the
Markless standard.
See CL-MARKLESS-COMPONENTS:SIZE-OPTION
Defines a new output format.
This is a shorthand macro that defines methods for
OUTPUT-COMPONENT specialised on streams. Each entry in the body must
follow this structure:
CLASS QUALIFIERS . BODY
Which will be translated to the appropriate method. Within the body the following two convenience functions are automatically bound:
- (OUTPUT c)
Calls OUTPUT-COMPONENT on c with the appropriate extra arguments.
- (OUTPUT-CHILDREN)
Calls OUTPUT-COMPONENT on each of the children of the current
component.
See OUTPUT-COMPONENT
Attempts to match the prefix.
Returns the new cursor on success, and NIL on failure.
Commits the given directive and component.
This pushes the two onto the stack and appends the component to the
child array of the component that was previously at the top of the
stack.
See DIRECTIVE
See CL-MARKLESS-COMPONENTS:COMPONENT
See PARSER
Compiles the given list of directives into a dispatch table.
This table forms a tree of tables with either NIL or a directive as
the leaves. A directive is only ever a leaf if its full prefix has
been matched by traversing the tree of tables. The tree is built using
the PREFIX from the directives.
See DIRECTIVE
See PREFIX
See DISPATCH
Returns a new, condensed child array.
This condenses the child array as follows:
- Consecutive strings are concatenated together
- INSTRUCTION and COMMENT components are filtered out
- PARENT-COMPONENTs that are not subclasses thereof have their
contents spliced into the new child array.
This does /not/ recursively condense.
Condenses the given component destructively and recursively.
See CONDENSE-CHILDREN
Dispatches to a directive using the given dispatch table.
Returns the matched directive if a full prefix match has been found
and the directive is enabled.
See ENABLED-P
Returns true if the given string ends with the given ending.
Resolves the directive-ish to a directive if possible.
The argument can be a DIRECTIVE instance or a symbol naming the class
of one. In the latter case, a new instance of the named class is
returned if the class is a subclass of DIRECTIVE. Otherwise, an error
is signalled.
See DIRECTIVE
Returns a list of all known output formats.
The list is composed of class names for OUTPUT-FORMAT classes.
See OUTPUT-FORMAT
Outputs the given component to the appropriate stream in the requested format.
If the target is T, it is substituted for *STANDARD-OUTPUT*. If the
target is NIL, it is substituted for a STRING-OUTPUT-STREAM whose
contents are returned in the end. If the target is a PATHNAME, the
denoted file is opened and the target is substituted for a stream to
that file. Otherwise, the target is passed on to OUTPUT-COMPONENT
directly and the return value is format dependent.
If the component is not an instance of COMPONENT, it is replaced by
the return value of calling PARSE on the passed component argument.
Extra keyword arguments are passed as initargs to the FORMAT. If the
FORMAT is an instance of OUTPUT-FORMAT, REINITIALIZE-INSTANCE is
called. If the FORMAT is a SYMBOL, MAKE-INSTANCE is called. Otherwise
an error is signalled. Note that the keyword arguments :FORMAT and
:TARGET are excluded from the initarg list.
By default the MARKLESS and DEBUG outputs are provided.
See PARSE
See MARKLESS
See DEBUG
See OUTPUT-COMPONENT
Parses the given option string into an option if possible.
The following tests are performed:
- If the option is found in *COLOR-TABLE*, its entry is returned.
- If the option is found in *SIZE-TABLE*, its entry is returned.
- If the option starts with a # an INTERNAL-LINK-OPTION is returned.
- If the option matches the URL directive, a LINK-OPTION is returned.
- Otherwise the function proceeds as follows:
Call FIND-COMPOUND-OPTION-TYPE. If a class is returned,
PARSE-COMPOUND-OPTION-TYPE is called with a class prototype.
Otherwise an error of type BAD-OPTION is signalled.
See *COLOR-TABLE*
See *SIZE-TABLE*
See PARSE-COMPOUND-OPTION-TYPE
See CL-MARKLESS-COMPONENTS:COMPOUND-OPTION
Parses the given option string into an option if possible.
Uses FIND-EMBED-OPTION-TYPE to find a suitable class for the given
option. If found, PARSE-EMBED-OPTION-TYPE is called with a class
prototype of the name. Otherwise an error of type BAD-OPTION is
signalled.
See FIND-EMBED-OPTION
See PARSE-EMBED-OPTION-TYPE
See CL-MARKLESS-COMPONENTS:EMBED-OPTION
Parses the given string as a floating point number.
Attempts to match a block directive.
If the cursor is not already at the end of the line, this will
dispatch a block directive and call BEGIN on it. It will return the
resulting cursor.
See PARSER
See BEGIN
See DISPATCH
See BLOCK-DISPATCH-TABLE
Reads the next character delimited token.
Returns the read token and the new cursor position as multiple values.
This does properly handle backslash escapes.
Reads a full line of text from the stream, respecting Markless’ line escape syntax.
This means the following
foo\
bar\
baz
will be read as
foobarbaz
Attempts to match inline content.
This constructs a string of content from the line and appends it to
the current component at the top of the stack until an inline
directive is matched or until the end-char is reached. If an inline
directive is matched, BEGIN is called on it and the result thereof is
returned. If the end-char is matched, CONSUME-END is called on the
directive at the top of the stack. If this returns non-NIL, that value
is returned from READ-INLINE after popping the stack.
See PARSER
See BEGIN
See CONSUME-END
See STACK-POP
See STACK-TOP
See DISPATCH
See INLINE-DISPATCH-TABLE
Attempts to match a URL.
If the match succeeds, a new cursor for the end of the URL is returned and NIL otherwise.
Returns the ROOT-COMPONENT of the current parse operation.
See ROOT
See PARSER
Splits the string by the given split character.
Returns a list of split parts with empty parts removed.
This does NOT handle backslash escapes.
Returns the stack entry at the bottom of the stack.
This must always be an entry with a ROOT-DIRECTIVE and ROOT-COMPONENT
as its contents.
See STACK-ENTRY
Accesses the stack entry’s component.
It is NOT safe to read this value for stack entries that are outside
the current fill-pointer of the stack.
See STACK-ENTRY
Accesses the stack entry’s directive.
It is NOT safe to read this value for stack entries that are outside
the current fill-pointer of the stack.
See STACK-ENTRY
Pops the top directive and component off the stack.
Returns the popped STACK-ENTRY.
See STACK-ENTRY
Pushes the given directive and component onto the stack.
Returns the top STACK-ENTRY.
See STACK-ENTRY
Returns the stack entry at the top of the stack.
See STACK-ENTRY
Unwinds the stack to the given index.
Makes sure to call END on all the directives that are popped off the
stack.
See END
See STACK-POP
See PARSER
Returns true if the given string starts with the given beginning.
Turns the given string into the case as appropriate for the requested readtable case.
This acts as if the string was parsed into a symbol token by READ but
without actually interning or invoking any of the heavy READ
machinery. This is useful in order to translate names for symbols into
the appropriate case for lookups.
Accesses the author metadata of the document.
See ROOT-COMPONENT
root-component
)) ¶automatically generated reader method
root-component
)) ¶automatically generated writer method
Function called to match the beginning of a directive.
Every directive must provide a method for this function.
This function is called if the PREFIX of the directive has been
matched. This function should then consume the remainder of the prefix
(if any) and return the new position of the cursor. The method is
responsible for putting the directive and its component onto the stack
if an actual match is found. This can be done via COMMIT.
On an invalid match, the directive should delegate parsing to another
directive, or in the very least advance the cursor somehow as
otherwise the parser will enter an infinite loop of invoking BEGIN on
the same directive after matching its prefix.
See COMMIT
See DIRECTIVE
See READ-BLOCK
See READ-INLINE
footnote-reference
) parser line cursor) ¶strikethrough
) parser line cursor) ¶right-align
) parser line cursor) ¶left-align
) parser line cursor) ¶instruction
) parser line cursor) ¶code-block
) parser line cursor) ¶horizontal-rule
) parser line cursor) ¶ordered-list
) parser line cursor) ¶unordered-list
) parser line cursor) ¶blockquote
) parser line cursor) ¶blockquote-header
) parser line cursor) ¶surrounding-inline-directive
) parser line cursor) ¶Accesses the dispatch table for block directives.
It is NOT safe to modify or set this table after the parser has been
constructed.
See PARSER
See DISPATCH
Accesses the blue component of the color-option.
The value must be an integer in [0,255].
See COLOR-OPTION
color-option
)) ¶automatically generated reader method
blue
.
color-option
)) ¶automatically generated writer method
blue
.
Accessor for the vector of child objects.
The vector must be adjustable and have a fill-pointer.
See PARENT-COMPONENT
parent-component
)) ¶automatically generated reader method
parent-component
)) ¶automatically generated writer method
Function called to consume the end of an inline directive.
Every inline-directive must provide a method for this function.
This function is called by READ-INLINE if the supplied end-char has been encountered. CONSUME-END should then return the updated cursor position on a successful end match, or NIL on an unsuccessful one.
If it returns successfully, the directive and its component will
automatically be popped off the stack.
See READ-INLINE
See INLINE-DIRECTIVE
strikethrough
) component parser line cursor) ¶blockquote-header
) component parser line cursor) ¶Function called to consume the prefix of a directive on the next
line.
Every block-directive must provide a method for this function.
This function is called on subsequent lines after the directive has
been dispatched and BEGIN has been called. The directive should match
the correct prefix for subsequent lines and return the updated
cursor on a successful match, or NIL if the match has failed.
See PROCESS-STACK
See BLOCK-DIRECTIVE
right-align
) component parser line cursor) ¶left-align
) component parser line cursor) ¶code-block
) component parser line cursor) ¶ordered-list
) component parser line cursor) ¶unordered-list
) component parser line cursor) ¶blockquote
) component parser line cursor) ¶inline-directive
) component parser line cursor) ¶singular-line-directive
) component parser line cursor) ¶Accesses the copyright metadata of the document.
See ROOT-COMPONENT
root-component
)) ¶automatically generated reader method
root-component
)) ¶automatically generated writer method
+
.
:most-specific-first
(eql :character)
) (string string
)) ¶(eql :whitespace)
) (string string
)) ¶instruction
)) ¶text-component
)) ¶parent-component
)) ¶Returns the cursor position after which the condition occurred.
The cursor indexes into the line character by character starting from 0.
See PARSER-CONDITION
parser-condition
)) ¶Accesses the section depth of the header.
This must be a positive integer.
See HEADER
code-block
)) ¶automatically generated reader method
code-block
)) ¶automatically generated writer method
float-option
)) ¶automatically generated reader method
float-option
)) ¶automatically generated writer method
Returns the directive in the parser with the given name, if any.
The name can be either a symbol or a string.
See PARSER
See DIRECTIVE
Returns the instance of the directive related to the condition.
See DEACTIVATION-DISALLOWED
deactivation-disallowed
)) ¶Accesses the list of directives that this instruction manipulates.
Each entry in the list should be a string representing the name of a
directive.
See DIRECTIVES-INSTRUCTION
directives-instruction
)) ¶automatically generated reader method
directives-instruction
)) ¶automatically generated writer method
Accesses the list of directive instances the parser supports.
It is NOT safe to modify or set this list after the parser has been
constructed.
See PARSER
See DIRECTIVE
Returns all directives of a given type in the parser.
See PARSER
See DIRECTIVE
Disables all directives in the parser that pass the test function.
See PARSER
See DIRECTIVE
See ENABLED-P
Returns T if the combination of option and embed type are allowed.
The user should add appropriate methods to this function when new
embed types or options are added. Such methods should simply return T,
as the default method will always return NIL.
See CL-MARKLESS-COMPONENTS:EMBED-OPTION
See CL-MARKLESS-COMPONENTS:EMBED
embed-link-option
) (embed image
)) ¶encoding-option
) (embed source
)) ¶end-option
) (embed source
)) ¶start-option
) (embed source
)) ¶language-option
) (embed source
)) ¶options-option
) (embed source
)) ¶loop-option
) (embed audio
)) ¶loop-option
) (embed video
)) ¶autoplay-option
) (embed audio
)) ¶autoplay-option
) (embed video
)) ¶caption-option
) (embed embed
)) ¶label-option
) (embed embed
)) ¶float-option
) (embed embed
)) ¶height-option
) (embed embed
)) ¶width-option
) (embed embed
)) ¶embed-option
) (embed embed
)) ¶Accesses the list of embed options the parser supports.
See PARSER
See EMBED-OPTION
Returns the embed-type that caused the error.
See OPTION-DISALLOWED
option-disallowed
)) ¶unknown-embed-type
)) ¶Accesses the list of compound options the parser supports.
See PARSER
See COMPOUND-OPTION
Enables all directives in the parser that pass the test function.
See PARSER
See DIRECTIVE
See ENABLED-P
Accesses whether the directive is currently enabled or not.
Some directives may not be disabled, in which case an error of type
DEACTIVATION-DISALLOWED is signalled if an attempt is made to disable
it.
See DIRECTIVE
See DEACTIVATION-DISALLOWED
encoding-option
)) ¶automatically generated reader method
encoding-option
)) ¶automatically generated writer method
end-option
)) ¶automatically generated reader method
end
.
end-option
)) ¶automatically generated writer method
end
.
Function called when a directive is popped off the stack due to an unsuccessful match.
A method can be added to this to allow the directive to perform some
undoing. This is typically necessary for inline directives as they
might have consumed a prefix that is now invalid due to the incomplete
match.
See PROCESS-STACK
See DIRECTIVE
strikethrough
) component parser) ¶inline-directive
) component parser) ¶block-directive
) component parser) ¶root-directive
) component parser) ¶Evaluates the given instruction, carrying out the changes in parser state.
See INSTRUCTION
See CL-MARKLESS-COMPONENTS:INSTRUCTION
See PARSER
Accesses the file pathname of the file to be included.
See INCLUDE
Finds a class that can parse the option of the given type name.
For a default parser this will compare the given option name
against the class names of the classes mentioned in the parser’s
EMBED-OPTIONS list. If the given name with "-option" added to
its end matches any of the class names case-insensitively, that
class is returned.
See PARSE-EMBED-OPTION
Finds a class that can parse the embed type of the given name.
For a default parser this will compare the given option name against the class names of the classes mentioned in the parser’s EMBED-OPTIONS list. The names are compared case-insensitively.
See EMBED
Accesses the font family name of the font option.
See FONT-OPTION
font-option
)) ¶automatically generated reader method
font-option
)) ¶automatically generated writer method
Accesses the green component of the color-option.
The value must be an integer in [0,255].
See COLOR-OPTION
color-option
)) ¶automatically generated reader method
color-option
)) ¶automatically generated writer method
Accesses the indentation of the paragraph.
This is retained purely for parsing purposes and has no bearing on the
visual representation in the resulting document.
See PARAGRAPH
Accesses the dispatch table for inline directives.
It is NOT safe to modify or set this table after the parser has been
constructed.
See PARSER
See DISPATCH
Accesses the current input stream from which lines are parsed.
See PARSER
code-block
)) ¶automatically generated reader method
code-block
)) ¶automatically generated writer method
Returns the problematic instruction.
See INSTRUCTION-EVALUATION-UNDEFINED See UNKNOWN-INSTRUCTION
unknown-instruction
)) ¶instruction-evaluation-undefined
)) ¶Accesses the list of instruction types the parser supports.
See PARSER
See INSTRUCTION
Function called to invoke parsing of a directive after a successful match.
Every directive must provide a method for this function.
Invoke is called to cause the directive to process its content. It
should return the new cursor position. Invoke will be repeatedly
called on the current directive until the end of the line is reached.
See PROCESS-STACK
See DIRECTIVE
strikethrough
) component parser line cursor) ¶instruction
) component parser line cursor) ¶code-block
) component parser line cursor) ¶horizontal-rule
) component parser line cursor) ¶inline-directive
) component parser line cursor) ¶singular-line-directive
) component parser line cursor) ¶block-directive
) component parser line cursor) ¶root-directive
) component parser line cursor) ¶Accesses a specific label in the label table of the document.
See LABELS
See ROOT-COMPONENT
string
) (root root-component
)) ¶string
) (root root-component
)) ¶string
) (root root-component
)) ¶Accesses the label table of the document.
This should return a hash table with EQUALP test. Each key should be
the name of a label, and each value a component with which this label
was associated. This can be used to resolve cross-references, but only
once the document has been fully parsed.
See LABEL
See ROOT-COMPONENT
root-component
)) ¶automatically generated reader method
root-component
)) ¶automatically generated writer method
Accesses the language.
This can be NIL or a string identifying the language.
See ROOT-COMPONENT
See CODE-BLOCK
language-option
)) ¶automatically generated reader method
code-block
)) ¶automatically generated reader method
root-component
)) ¶automatically generated reader method
language-option
)) ¶automatically generated writer method
code-block
)) ¶automatically generated writer method
root-component
)) ¶automatically generated writer method
Returns the line number on which the condition occurred.
The lines are counted from 0.
See PARSER-CONDITION
parser-condition
)) ¶line
.
Accesses the line break mode currently active in the parser.
The value must be either :SHOW or :HIDE.
See PARSER
Accesses the message string of the instruction.
Typically this message should be displayed to the user somehow.
See MESSAGE-INSTRUCTION
message-instruction
)) ¶automatically generated reader method
message-instruction
)) ¶automatically generated writer method
Returns the message the user passed in the warn instruction.
See USER-WARNING
See USER-ERROR
user-error
)) ¶user-warning
)) ¶Accesses the number of the list item as an INTEGER.
See ORDERED-LIST-ITEM
ordered-list-item
)) ¶automatically generated reader method
ordered-list-item
)) ¶automatically generated writer method
end-option
)) ¶automatically generated reader method
end-option
)) ¶automatically generated writer method
Returns the option string that could not be parsed.
See BAD-OPTION
bad-option
)) ¶Accesses the list of options associated with the component.
For a CODE-BLOCK this means a list of opaque options to direct the
representation of the code. For an EMBED this is a list of
EMBED-OPTION instances that dictate visualisation and interaction
options. For a COMPOUND it is a list of COMPOUND-OPTION instances that
convey the various style changes.
See CODE-BLOCK
See EMBED
See COMPOUND
compound
)) ¶automatically generated reader method
options-option
)) ¶automatically generated reader method
code-block
)) ¶automatically generated reader method
compound
)) ¶automatically generated writer method
options-option
)) ¶automatically generated writer method
embed
)) ¶automatically generated writer method
code-block
)) ¶automatically generated writer method
This function is responsible for formatting the given component to the target in the requested format.
The user should add methods to this function as appropriate, but must
always EQL-specialise on the format argument with a unique symbol to
distinguish their format from others.
Note that the target must not necessarily be a stream unless the
method specialises it to be one.
See OUTPUT
string
) (s stream
) (_ highlighted
)) ¶root-component
) (s stream
) (_ highlighted
)) ¶component
) (s stream
) (_ highlighted
)) ¶footnote-reference
) (s stream
) (_ markless
)) ¶link-option
) (s stream
) (_ markless
)) ¶internal-link-option
) (s stream
) (_ markless
)) ¶size-option
) (s stream
) (_ markless
)) ¶color-option
) (s stream
) (_ markless
)) ¶font-option
) (s stream
) (_ markless
)) ¶compound-option
) (s stream
) (_ markless
)) ¶strikethrough
) (s stream
) (_ markless
)) ¶caption-option
) (s stream
) (_ markless
)) ¶spoiler-option
) (s stream
) (_ markless
)) ¶strikethrough-option
) (s stream
) (_ markless
)) ¶underline-option
) (s stream
) (_ markless
)) ¶italic-option
) (s stream
) (_ markless
)) ¶bold-option
) (s stream
) (_ markless
)) ¶label-option
) (s stream
) (_ markless
)) ¶float-option
) (s stream
) (_ markless
)) ¶height-option
) (s stream
) (_ markless
)) ¶width-option
) (s stream
) (_ markless
)) ¶embed-option
) (s stream
) (_ markless
)) ¶directives-instruction
) (s stream
) (_ markless
)) ¶message-instruction
) (s stream
) (_ markless
)) ¶instruction
) (s stream
) (_ markless
)) ¶instruction
) (s stream
) (_ markless
)) ¶code-block
) (s stream
) (_ markless
)) ¶horizontal-rule
) (s stream
) (_ markless
)) ¶unordered-list-item
) (s stream
) (_ markless
)) ¶ordered-list-item
) (s stream
) (_ markless
)) ¶blockquote
) (s stream
) (_ markless
)) ¶blockquote-header
) (s stream
) (_ markless
)) ¶parent-component
) (s stream
) (_ markless
)) ¶unit-component
) (s stream
) (_ markless
)) ¶footnote-reference
) (s stream
) (_ bbcode
)) ¶strikethrough
) (s stream
) (_ bbcode
)) ¶instruction
) (s stream
) (_ bbcode
)) ¶code-block
) (s stream
) (_ bbcode
)) ¶horizontal-rule
) (s stream
) (_ bbcode
)) ¶unordered-list
) (s stream
) (_ bbcode
)) ¶ordered-list
) (s stream
) (_ bbcode
)) ¶blockquote
) (s stream
) (_ bbcode
)) ¶blockquote-header
) (s stream
) (_ bbcode
)) ¶parent-component
) (s stream
) (_ bbcode
)) ¶unit-component
) (s stream
) (_ debug
)) ¶footnote-reference
) (s stream
) (_ debug
)) ¶directives-instruction
) (s stream
) (_ debug
)) ¶message-instruction
) (s stream
) (_ debug
)) ¶code-block
) (s stream
) (_ debug
)) ¶ordered-list-item
) (s stream
) (_ debug
)) ¶parent-component
) (s stream
) (_ debug
)) ¶parent-component
) (s stream
) (_ debug
)) ¶string
) (stream stream
) format) ¶unit-component
) target format) ¶pathname
) format) ¶symbol
)) ¶Parses the given input as a Markless document.
If the parser argument is T, a fresh PARSER instance is constructed to
perform the parsing.
The THING may be a PATHNAME, STRING, or a STREAM.
Returns a ROOT-COMPONENT on a successful parse.
Note that the parser is not incremental and will consume the stream
until EOF is encountered.
See CL-MARKLESS-COMPONENTS:ROOT-COMPONENT
See PARSER
Parses a compound option to the proper option instance.
This may signal errors if the parsing is unsuccessful.
Each method should be specialised on the class of the compound option
to parse and should return a fresh instance of that class on a
successful parse. The argument is only a prototype of that class and
should not be used for anything except for the type information and
dispatch.
By default this function simply returns a fresh instance of the class
with no initargs passed.
See COMPOUND
link-option
) option) ¶size-option
) option) ¶color-option
) option) ¶font-option
) option) ¶compound-option
) option) ¶Parses an embed option to the proper option instance.
This may signal errors if the parsing is unsuccessful.
Each method should be specialised on the class of the embed option to
parse and should return a fresh instance of that class on a successful
parse. The argument is only a prototype of that class and should not
be used for anything except for the type information and dispatch.
By default this function simply returns a fresh instance of the class
with no initargs passed.
See EMBED
embed-link-option
) option) ¶encoding-option
) option) ¶end-option
) option) ¶start-option
) option) ¶language-option
) option) ¶options-option
) option) ¶height-option
) option) ¶width-option
) option) ¶caption-option
) option) ¶label-option
) option) ¶float-option
) option) ¶embed-option
) option) ¶Parses an instruction line to the proper instruction instance.
This may signal errors if the parsing is unsuccessful.
Each method should be specialised on the class of the instruction to
parse and should return a fresh instance of that class on a successful
parse. The argument is only a prototype of that class and should not
be used for anything except for the type information and dispatch.
See INSTRUCTION
directives-instruction
) line cursor) ¶message-instruction
) line cursor) ¶Returns the unique prefix of the directive used to identify its start.
Every directive must provide a method for this function.
The prefix is a vector of strings, where each string denotes a set of possible characters that can appear at that position in the prefix.
For instance, the following prefix
#("ab" "c")
Matches the following strings
ac
bc
bca
but not the following
ab
cc
abc
See COMPILE-DISPATCH-TABLE
See DIRECTIVE
footnote-reference
)) ¶strikethrough
)) ¶right-align
)) ¶left-align
)) ¶instruction
)) ¶code-block
)) ¶horizontal-rule
)) ¶ordered-list
)) ¶unordered-list
)) ¶blockquote
)) ¶blockquote-header
)) ¶Accesses the red component of the color-option.
The value must be an integer in [0,255].
See COLOR-OPTION
color-option
)) ¶automatically generated reader method
red
.
color-option
)) ¶automatically generated writer method
red
.
Accesses the size as a REAL.
This number only makes sense in conjunction with the UNIT.
See SIZED
Accesses the blockquote-header source associated with the blockquote.
See BLOCKQUOTE-HEADER
See BLOCKQUOTE
blockquote
)) ¶automatically generated reader method
blockquote
)) ¶automatically generated writer method
Accesses the stack of components and directives of the parser.
It is NOT safe to modify or set this stack after the parser has been
constructed. This stack must be a vector with element-type STACK-ENTRY
and a fill-pointer.
See PARSER
See STACK-ENTRY
See STACK-PUSH
See STACK-POP
See STACK-TOP
See STACK-BOTTOM
start-option
)) ¶automatically generated reader method
start-option
)) ¶automatically generated writer method
Accesses the target of the given object.
The target is a path to an internal or external resource.
See EMBED
See FOOTNOTE
See URL
See LINK-OPTION
See FOOTNOTE-REFERENCE
Accessor for the text string the component visualises.
See TEXT-COMPONENT
parent-component
)) ¶text-component
)) ¶automatically generated reader method
text
.
Accesses the unit of the size as a keyword.
The Markless standard defines the following units:
- :EM Applicable for font sizes expressed in relative width.
- :PT Applicable for font sizes expressed in absolute points.
- :PX Applicable for dimensions expressed in absolute pixels.
- :% Applicable for dimensions expressed in relative percentage to
its container.
See SIZED
Accesses the value of the set instruction.
This should be a string representing the new value.
See SET
Returns the variable value related to the condition.
See BAD-VALUE
Accesses the variable of the set instruction.
This should be a string naming the variable in question.
See SET
Returns the name of the variable related to the condition.
See BAD-VARIABLE
See BAD-VALUE
bad-variable
)) ¶parser
) &key directives compound-options embed-types embed-options instruction-types disabled-directives stack-size-limit) ¶link-option
) s) ¶root-component
) s) ¶code-block
) s) ¶directives-instruction
) s) ¶color-option
) s) ¶ordered-list-item
) s) ¶font-option
) s) ¶message-instruction
) s) ¶footnote-reference
) s) ¶size-option
) s) ¶Warning signalled if an option is malformed or unknown.
See OPTION
See PARSER-ERROR
Warning signalled if the size contains an unknown unit.
See BAD-OPTION
Error signalled if a set instruction contains an malformed or invalid value for a variable.
See VARIABLE-NAME
See VALUE
See PARSER-ERROR
common-lisp
.
:variable
This slot is read-only.
Error signalled if a set instruction refers to an unknown variable.
See VARIABLE-NAME
See PARSER-ERROR
common-lisp
.
:variable
This slot is read-only.
Error signalled if an attempt is made to deactivate a directive that cannot be deactivated.
See DIRECTIVE-INSTANCE
See MARKLESS-CONDITION
error
.
markless-condition
.
:directive
This slot is read-only.
Superclass for all conditions that indicate an error in the parser implementation.
See MARKLESS-CONDITION
Error signalled when an instruction is not fully implemented.
See INSTRUCTION
See IMPLEMENTATION-CONDITION
error
.
implementation-condition
.
:instruction
This slot is read-only.
Superclass for all conditions related to markless.
See CL:CONDITION
condition
.
Warning signalled if an option is attempted to be used for an embed that does not allow it.
See EMBED-TYPE
See BAD-OPTION
:embed-type
This slot is read-only.
Superclass for all conditions that relate to the parsing process.
See LINE
See CURSOR
See MARKLESS-CONDITION
Initarg | Value |
---|---|
:cursor | 0 |
:line | *current-line-number* |
Superclass for all conditions that relate to fatal parser errors.
See PARSER-CONDITION
error
.
parser-condition
.
Superclass for all conditions that relate to recoverable parser errors.
See PARSER-CONDITION
parser-condition
.
warning
.
Error signalled when the directive stack is under- or overflowed.
See IMPLEMENTATION-CONDITION
error
.
implementation-condition
.
Warning signalled if an embed type is encountered that is unknown.
See EMBED-TYPE
See PARSER-WARNING
:embed-type
This slot is read-only.
Error signalled if an instruction is encountered that is unknown.
See INSTRUCTION
See PARSER-ERROR
:instruction
This slot is read-only.
Error signalled when an error instruction is encountered.
See MESSAGE
See PARSER-WARNING
Warning signalled when a warn instruction is encountered.
See MESSAGE
See PARSER-WARNING
Representation of an entry on the parse stack.
See STACK-ENTRY-COMPONENT
See STACK-ENTRY-DIRECTIVE
See STACK
(error "alignment required")
:alignment
Representation of the AUDIO embed type.
See EMBED
Represents an autoplay option.
Causes the embed to automatically start playback.
See EMBED-OPTION
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
(setf supported-tags)
.
supported-tags
.
(quote (:quote :list :h :hr :code :img :video :b :i :u :s :fixed :sub :super :url :size :color :spoiler))
:supported-tags
A component that encompasses a block of text.
See COMPONENT
Superclass for all block directives.
Provides default methods for END and INVOKE.
See END
See INVOKE
See DIRECTIVE
Represents a blockquote.
If the blockquote’s SOURCE is available, it should be displayed
alongside the blockquote in the resulting document.
See SOURCE
See PARENT-COMPONENT
See BLOCK-COMPONENT
:source
The directive for a blockquote.
See CL-MARKLESS-COMPONENTS:BLOCKQUOTE See BLOCK-DIRECTIVE
Represents the header of a blockquote.
The header should typically not be directly translated into a
resulting component, but instead be represented alongside the
blockquote with which it is associated.
See SOURCE
See PARENT-COMPONENT
See BLOCK-COMPONENT
The directive for the header of a blockquote.
See CL-MARKLESS-COMPONENTS:BLOCKQUOTE-HEADER See SINGULAR-LINE-DIRECTIVE
Representation of bold text.
See PARENT-COMPONENT
The directive for a bold markup.
See CL-MARKLESS-COMPONENTS:BOLD See SURROUNDING-INLINE-DIRECTIVE
Representation of the bold compound option.
See COMPOUND-OPTION
Representation of literal text.
See PARENT-COMPONENT
The directive for a code markup.
See CL-MARKLESS-COMPONENTS:CODE See INLINE-DIRECTIVE
Representation of a block of literal text.
See LANGUAGE
See OPTIONS
See TEXT-COMPONENT
See BLOCK-COMPONENT
The directive for a code block.
See CL-MARKLESS-COMPONENTS:CODE-BLOCK See BLOCK-DIRECTIVE
Representation of the color compound option.
See RED
See GREEN
See BLUE
See COMPOUND-OPTION
(error "green required")
:green
Represents a comment.
See TEXT-COMPONENT See BLOCK-COMPONENT
The directive for a comment.
See CL-MARKLESS-COMPONENTS:COMMENT See SINGULAR-LINE-DIRECTIVE
Base class for all components that make up the AST of a parse result.
Representation of text with a combination of stylistic transforms applied.
See PARENT-COMPONENT
See OPTIONS
:options
The directive for a compound markup.
The parsing of the compound options is handled by
PARSE-COMPOUND-OPTION.
See CL-MARKLESS-COMPONENTS:COMPOUND
See INLINE-DIRECTIVE
begin
.
consume-end
.
end
.
invoke
.
prefix
.
Superclass for all compound options.
Every concrete subclass must have the suffix -OPTION.
The directive for a dash.
See CL-MARKLESS-COMPONENTS:DASH See INLINE-DIRECTIVE
Output format for debugging and AST visualisation.
This prints all AST contents in an easy to read form, useful for debugging.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
Superclass for all directives.
All matching for syntax in Markless is performed by what are called
directives. They control the parsing and compiling behaviour.
A directive will only match if it is currently enabled.
See ENABLED-P
t
:enabled-p
Superclass for all instructions that carry a list of directives.
See DIRECTIVES
See INSTRUCTION
(error "directives required.")
:directives
Represents a DISABLE instruction.
See DIRECTIVES-INSTRUCTION
Representation of an em-dash.
See UNIT-COMPONENT
Represents an embed block.
An embed embeds an outside resource into the document. Resolution of the target is left up to the translator to the resulting document.
See TARGET
See OPTIONS
See UNIT-COMPONENT
See BLOCK-COMPONENT
:options
The directive for an embed.
The parsing of the embed options is handled by PARSE-EMBED-OPTION.
Whether an option is permitted for a given embed type is determined
by EMBED-OPTION-ALLOWED-P. If NIL is returned for any one option,
an error of type OPTION-DISALLOWED is signalled.
See PARSE-EMBED-OPTION
See EMBED-OPTION-ALLOWED-P
See OPTION-DISALLOWED
See CL-MARKLESS-COMPONENTS:EMBED
See SINGULAR-LINE-DIRECTIVE
Superclass for all options for an embed component.
Every concrete subclass must have the suffix -OPTION.
Representation of an en-dash.
See UNIT-COMPONENT
Represents an ENABLE instruction.
See DIRECTIVES-INSTRUCTION
(error "encoding required")
:encoding
Represents an ERROR instruction.
See MESSAGE-INSTRUCTION
Represents a float option.
Causes the embed to float within the other blocks.
See DIRECTION
See EMBED-OPTION
(error "direction required")
:direction
Representation of the font compound option.
See FONT-FAMILY
See COMPOUND-OPTION
(error "font-family required")
:font-family
Representation of a footnote definition.
Footnotes should typically appear at the end of a page or the full
document regardless of their position in the structure.
See TARGET
See PARENT-COMPONENT
See BLOCK-COMPONENT
The directive for a footnote.
See CL-MARKLESS-COMPONENTS:FOOTNOTE See SINGULAR-LINE-DIRECTIVE
Representation of a reference to a footnote.
See TARGET
See UNIT-COMPONENT
The directive for a footnote reference.
See CL-MARKLESS-COMPONENTS:FOOTNOTE-REFERENCE See INLINE-DIRECTIVE
Representation of a section heading.
Each header must have a section depth number.
See DEPTH
See PARENT-COMPONENT
See BLOCK-COMPONENT
0
:depth
The directive for a section header.
See CL-MARKLESS-COMPONENTS:HEADER See SINGULAR-LINE-DIRECTIVE
Represents a height option.
Causes the embed to restrict its height to the given size.
See EMBED-OPTION
See SIZED
Representation of a horizontal rule.
See UNIT-COMPONENT
see BLOCK-COMPONENT
The directive for a horizontal rule.
See CL-MARKLESS-COMPONENTS:HORIZONTAL-RULE See SINGULAR-LINE-DIRECTIVE
Representation of the IMAGE embed type.
See EMBED
Represents an INCLUDE instruction
See FILE
See INSTRUCTION
Represents an INFO instruction.
See MESSAGE-INSTRUCTION
A component that encompasses an inline section of text.
See COMPONENT
Superclass for all inline directives.
Provides default methods for CONSUME-PREFIX, END, and INVOKE.
See CONSUME-PREFIX
See END
See INVOKE
See DIRECTIVE
Superclass for all instructions.
See BLOCK-COMPONENT
The directive for an instruction.
The parsing of the actual type of directive is handled by
PARSE-INSTRUCTION. The instruction is parsed fully on BEGIN and then
evaluated on INVOKE.
See PARSE-INSTRUCTION
See EVALUATE-INSTRUCTION
See CL-MARKLESS-COMPONENTS:INSTRUCTION
See SINGULAR-LINE-DIRECTIVE
Representation of an internal link option.
See LINK-OPTION
Representation of italic text.
See PARENT-COMPONENT
The directive for an italic markup.
See CL-MARKLESS-COMPONENTS:ITALIC See SURROUNDING-INLINE-DIRECTIVE
Representation of the italic compound option.
See COMPOUND-OPTION
Represents a LABEL instruction
See TARGET
See INSTRUCTION
:language
Representation of the link option.
See TARGET
See COMPOUND-OPTION
Superclass for all list type components.
See PARENT-COMPONENT
Superclass for all list item type components.
See PARENT-COMPONENT
Represents a loop option.
Causes the embed to loop its content.
See EMBED-OPTION
Output format that prints to valid Markless again.
This should allow you to construct arbitrary component ASTs and
generate valid Markless documents.
See OUTPUT
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-component
.
output-operator
.
Superclass for all instructions that carry a message.
See MESSAGE
See INSTRUCTION
(error "message required")
:message
Representation of a line break.
See UNIT-COMPONENT
The directive for an explicit newline.
See CL-MARKLESS-COMPONENTS:NEWLINE See INLINE-DIRECTIVE
:options
Representation of an ordered list.
The child array should only contain ORDERED-LIST-ITEMs.
See LIST
See BLOCK-COMPONENT
See ORDERED-LIST-ITEM
The directive for an ordered list and its items.
See CL-MARKLESS-COMPONENTS:ORDERED-LIST
See CL-MARKLESS-COMPONENTS:ORDERED-LIST-ITEM
See BLOCK-DIRECTIVE
Representation of an item in an ordered list.
Each item has an associated order number.
See NUMBER
See LIST-ITEM
See BLOCK-COMPONENT
0
:number
Superclass for all output formats.
If you define a new format, you should define a new subclass to this and specialise on your new class in your OUTPUT-COMPONENT methods.
See OUTPUT-COMPONENT
Represents a textual paragraph.
See INDENTATION
See PARENT-COMPONENT
See BLOCK-COMPONENT
0
:indentation
The directive for a paragraph.
This is a very important directive as it acts as the fallback in
pretty much every situation and has the most complex parser logic
associated with it.
See CL-MARKLESS-COMPONENTS:PARAGRAPH
See BLOCK-DIRECTIVE
A component that contains text and subcomponents.
See CHILDREN
See COMPONENT
(make-array 0 :adjustable t :fill-pointer t)
:children
Representation of the parsing state necessary to parse a Markless
document.
A parser instance is required in order to parse a document. While it
is permitted to re-use a parser instance for subsequent parsing, it is
/NOT/ allowed to use the same parser concurrently. Concurrent parsing
or access of the parser will lead to undefined consequences.
When constructing the parser you may pass a list of directives the
parser should support via the :DIRECTIVES argument. You can also
by-default disable some of those directives by putting their names
into the :DISABLED-DIRECTIVES argument. Note that disabling a
directive is not the same as leaving it out of the :DIRECTIVES list
completely. If it is only disabled it can be enabled via the ENABLE
instruction during parsing. The :STACK-SIZE-LIMIT argument sets the
maximal nesting permitted when parsing. If directives are nested more
deeply than this, parsing of the document will fail. The default is
set to 64.
You may also pass a list of accepted compound options, embed types, embed options, and instruction types using the respective initargs.
Note that even though subsequent re-use of the parser is permitted,
changes carried out by an INSTRUCTION during a parse will not be reset
on a subsequent parse, so instructions can poison subsequent
parses. If the INSTRUCTION directive is excluded, subsequent parses
should be clean however.
See LINE-BREAK-MODE
See DIRECTIVES
See EMBED-TYPES
See EMBED-OPTIONS
See COMPOUND-OPTIONS
See INSTRUCTION-TYPES
See DIRECTIVE
See ENABLE
See DISABLE
See EVALUATE-INSTRUCTION
See BLOCK-DISPATCH-TABLE
See INLINE-DISPATCH-TABLE
See INPUT
See STACK
See PARSE
See COMMIT
See ROOT
(setf block-dispatch-table)
.
block-dispatch-table
.
(setf compound-options)
.
compound-options
.
directive
.
(setf directives)
.
directives
.
directives-of
.
disable
.
(setf embed-options)
.
embed-options
.
(setf embed-types)
.
embed-types
.
enable
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
evaluate-instruction
.
find-compound-option-type
.
find-embed-option-type
.
find-embed-type
.
find-instruction-type
.
initialize-instance
.
(setf inline-dispatch-table)
.
inline-dispatch-table
.
(setf input)
.
input
.
(setf instruction-types)
.
instruction-types
.
(setf line-break-mode)
.
line-break-mode
.
parse
.
(setf stack)
.
stack
.
:show
:line-break-mode
The base component that makes up a parsed document’s AST.
This component also stores cross references and document metadata.
See PARENT-COMPONENT
See LABELS
See AUTHOR
See LANGUAGE
See COPYRIGHT
Represents the root parser entry.
The root directive is always at the bottom of the stack. It is
responsible for matching and invoking the block directives at the top
level of the document.
The root directive cannot be disabled.
See DIRECTIVE
Representation of a SET instruction.
This instruction changes a state variable.
See VARIABLE
See VALUE
See INSTRUCTION
Superclass for all single-line block directives.
Provides default methods for CONSUME-PREFIX and INVOKE.
See END
See INVOKE
See BLOCK-DIRECTIVE
Representation of the size compound option.
See COMPOUND-OPTION
See SIZED
Superclass for classes that represent a size in a particular unit.
See UNIT
See SIZE
Representation of the spoiler compound option.
See COMPOUND-OPTION
(error "start required")
:start
Representation of struck-through text.
See PARENT-COMPONENT
The directive for a strikethrough markup.
See CL-MARKLESS-COMPONENTS:STRIKETHROUGH See INLINE-DIRECTIVE
begin
.
consume-end
.
end
.
invoke
.
prefix
.
Representation of the strikethrough compound option.
See COMPOUND-OPTION
Representation of text sunk below normal text.
See PARENT-COMPONENT
The directive for a subtext markup.
See CL-MARKLESS-COMPONENTS:SUBTEXT See INLINE-DIRECTIVE
begin
.
consume-end
.
end
.
invoke
.
prefix
.
Representation of text raised above normal text.
See PARENT-COMPONENT
The directive for a supertext markup.
See CL-MARKLESS-COMPONENTS:SUPERTEXT See INLINE-DIRECTIVE
begin
.
consume-end
.
end
.
invoke
.
prefix
.
Superclass for select surrounding inline directives.
Provides a method for BEGIN that automatically pops the stack and
advances the cursor if the current directive at the top of the stack
is the same as this directive. This is useful for surrounding inline
directives whose postfix is the same as their prefix.
See BEGIN
See INLINE-DIRECTIVE
(error "target required")
:target
A component with a text field
See TEXT
See COMPONENT
Representation of underlined text.
See PARENT-COMPONENT
The directive for an underline markup.
See CL-MARKLESS-COMPONENTS:UNDERLINE See SURROUNDING-INLINE-DIRECTIVE
Representation of the underline compound option.
See COMPOUND-OPTION
A component without children that represents a visual part of the document.
See COMPONENT
Representation of an unordered list.
The child array should only contain UNORDERED-LIST-ITEMs.
The directive for an unordered list and its items.
See CL-MARKLESS-COMPONENTS:UNORDERED-LIST
See CL-MARKLESS-COMPONENTS:UNORDERED-LIST-ITEM
See BLOCK-DIRECTIVE
Representation of an item in an unordered list.
See LIST-ITEM
See BLOCK-COMPONENT
Representation of a literal URL.
See UNIT-COMPONENT
See TARGET
The directive for an inline URL.
The handling of the URL directive is a bit special due to the lack of
a dedicated prefix that can be uniquely matched to initiate the scan
of an URL. Thus, special handling code in READ-INLINE is present to
make this case at least somewhat efficient.
This directive will, unlike all others, return the same cursor on
BEGIN if the complete URL does not match.
See CL-MARKLESS-COMPONENTS:URL
See INLINE-DIRECTIVE
Representation of the VIDEO embed type.
See EMBED
Represents a WARNING instruction.
See MESSAGE-INSTRUCTION
Represents a width option.
Causes the embed to restrict its width to the given size.
See EMBED-OPTION
See SIZED
Decomposes the 24-bit hexadecimal number into three 8-bit numbers.
Returns the RGB channels as a list.
Parses the given string as a number with a unit at the end.
The following unit types are supported:
- em
- pt
- px
- %
Any other unit, or a missing unit, will signal a warning of type
BAD-UNIT and returns NIL as the unit.
Returns the size and its unit as multiple values.
Splits the given options string into a list of options.
Options are separated via commas. Returns a list of the matched
options and the new cursor position as multiple values.
This does properly handle backslash escaping.
Finds a class that can parse the option of the given type name.
For a default parser this will compare the given option name
against the class names of the classes mentioned in the parser’s
COMPOUND-OPTIONS list. If the given name with "-option" added to
its end matches any of the class names case-insensitively, that
class is returned.
See PARSE-COMPOND-OPTION
highlighted
)) ¶Jump to: | %
(
A B C D E F G I L M N O P R S T U V |
---|
Jump to: | %
(
A B C D E F G I L M N O P R S T U V |
---|
Jump to: | *
A B C D E F G I L M N O R S T U V |
---|
Jump to: | *
A B C D E F G I L M N O R S T U V |
---|
Jump to: | A B C D E F H I J L M N O P R S T U V W |
---|
Jump to: | A B C D E F H I J L M N O P R S T U V W |
---|