The meta-sexp Reference Manual

This is the meta-sexp Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:02:16 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 meta-sexp

Source

meta-sexp.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 meta-sexp/meta-sexp.asd

Source

meta-sexp.asd.

Parent Component

meta-sexp (system).

ASDF Systems

meta-sexp.

Packages

meta-sexp-asd.

Public Interface

+meta-sexp-version+ (constant).


3.1.2 meta-sexp/packages.lisp

Source

meta-sexp.asd.

Parent Component

meta-sexp (system).

Packages

meta-sexp.


3.1.3 meta-sexp/util.lisp

Dependency

packages.lisp (file).

Source

meta-sexp.asd.

Parent Component

meta-sexp (system).

Public Interface
Internals

with-unique-names (macro).


3.1.4 meta-sexp/meta-sexp.lisp

Dependency

util.lisp (file).

Source

meta-sexp.asd.

Parent Component

meta-sexp (system).

Public Interface
Internals

3.1.5 meta-sexp/atoms.lisp

Dependency

meta-sexp.lisp (file).

Source

meta-sexp.asd.

Parent Component

meta-sexp (system).

Public Interface

4 Packages

Packages are listed by definition order.


4.1 meta-sexp

LL(1) parser generator in META using s-expressions.

Source

packages.lisp.

Use List

common-lisp.

Public Interface
Internals

4.2 meta-sexp-asd

Source

meta-sexp.asd.

Use List
  • asdf/interface.
  • common-lisp.
Public Interface

+meta-sexp-version+ (constant).


5 Definitions

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


5.1 Public Interface


5.1.1 Constants

Constant: +meta-sexp-version+
Package

meta-sexp-asd.

Source

meta-sexp.asd.


5.1.2 Macros

Macro: defatom (name (c) &body body)
Package

meta-sexp.

Source

meta-sexp.lisp.

Macro: defrenderer (name (&rest args) (&optional attachment) &body body)
Package

meta-sexp.

Source

meta-sexp.lisp.

Macro: defrule (name (&rest args) (&optional attachment) &body body)
Package

meta-sexp.

Source

meta-sexp.lisp.

Macro: list-accum-push (item accum)
Package

meta-sexp.

Source

util.lisp.

Macro: reset-list-accum (accum)
Package

meta-sexp.

Source

util.lisp.


5.1.3 Ordinary functions

Function: alnum? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: alpha? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: ascii? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: bit? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: char-accum-push (char accum)
Package

meta-sexp.

Source

util.lisp.

Function: digit? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: empty-char-accum-p (accum)
Package

meta-sexp.

Source

util.lisp.

Function: empty-list-accum-p (accum)
Package

meta-sexp.

Source

util.lisp.

Function: extended? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: graphic? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: lower? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: make-char-accum (&key size)
Package

meta-sexp.

Source

util.lisp.

Function: make-list-accum ()
Package

meta-sexp.

Source

util.lisp.

Function: newline? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: reset-char-accum (accum)
Package

meta-sexp.

Source

util.lisp.

Function: space? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: tab? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: upper? (c)
Package

meta-sexp.

Source

atoms.lisp.

Function: white-space? (c)
Package

meta-sexp.

Source

atoms.lisp.


5.1.4 Generic functions

Generic Function: create-parser-context (input &rest args &key buffer-size start end attachment)
Package

meta-sexp.

Source

meta-sexp.lisp.

Methods
Method: create-parser-context ((input stream) &key buffer-size start end attachment)
Method: create-parser-context ((input string) &key start end attachment)
Generic Function: transform-grammar (ret ctx in-meta directive &optional args)

META grammar transformation methods.

Package

meta-sexp.

Source

meta-sexp.lisp.

Methods
Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :debug)) &optional args)

(:DEBUG)
(:DEBUG VAR)

Print current character and its position in the input data. If VAR is specified, print the value of the VAR.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :read-atom)) &optional args)

(:READ-ATOM)

Reads current atom at the cursor position and returns read atom.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :eof)) &optional args)

(:EOF)

Returns T when reached to the end of supplied input data.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :char-reset)) &optional args)

(:CHAR-RESET CHAR-ACCUM)

Resets supplied CHAR-ACCUM.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :char-push)) &optional args)

(:CHAR-PUSH CHAR-VAR CHAR-ACCUM)
(:CHAR-PUSH CHAR-ACCUM)

Pushes supplied CHAR-VAR into specified CHAR-ACCUM. If called with a single argument, current character gets read and pushed into supplied accumulator. (See MAKE-CHAR-ACCUM and EMPTY-CHAR-ACCUM-P.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :list-reset)) &optional args)

(:LIST-RESET LIST-ACCUM)

Resets supplied LIST-ACCUM.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :list-push)) &optional args)

(:LIST-PUSH ITEM-VAR LIST-ACCUM)

Pushes ITEM-VAR into the specified LIST-ACCUM. (See MAKE-LIST-ACCUM and EMPTY-LIST-ACCUM-P.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :assign)) &optional args)

(:ASSIGN VAR FORM)
(:ASSIGN (VAR1 VAR2 ...) FORM)

Assigns returned value of FORM to VAR, and returns assigned value. (Latter form works similar to MULTIPLE-VALUE-SETQ.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :rule)) &optional args)

(:RULE RULE ARG ARG ...)
(:RULE (OR RULE RULE ...) ARG ARG ...)

Tests input in the current cursor position using specified type/form. If any, supplied arguments will get passed to rule.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :type)) &optional args)

(:TYPE TYPE-CHECKER)
(:TYPE (OR TYPE-CHECKER TYPE-CHECKER ...))

Checks type of the atom at the current position through supplied function(s).

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :+)) &optional args)

(:+ FORM FORM ...)

Sequentially evaluates supplied FORMs within an AND scope, and repeats this process till FORMs return NIL. Scope returns T if FORMs returned T once or more, otherwise returns NIL. (Similar to ‘{1,}’ in regular expressions.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :*)) &optional args)

(:* FORM FORM ...)

Sequentially evaluates supplied FORMs within an AND scope until it returns NIL. Regardless of the return value of ANDed FORMs, block returns T. (Similar to ‘*’ in regular expressions.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :?)) &optional args)

(:? FORM FORM ...)

Sequentially evaluates supplied FORMs within an AND scope and regardless of the return value of ANDed FORMs, block returns T. (Similar to ‘?’ in regular expressions.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :render)) &optional args)

(:RENDER RENDERER ARG ARG ...)

Calls specified renderer (which is defined with DEFRENDERER) with the supplied arguments.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :return)) &optional args)

(:RETURN VALUE VALUE ...)

Returns from the rule with supplied VALUEs.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :not)) &optional args)

(:NOT FORM)

Identical to (NOT FORM). (FORM is encapsulated within a :CHECKPOINT before getting evaluated.)

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :or)) &optional args)

(:OR FORM FORM ...)

Sequentially evalutes FORMs identical to OR.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :and)) &optional args)

(:AND FORM FORM ...)

Sequentially evaluates FORMs identical to AND.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :checkpoint)) &optional args)

(:CHECKPOINT FORM FORM ...)

Sequentially evaluates supplied forms and if any of them fails, moves cursor back to its start position :CHECKPOINT began.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive (eql :icase)) &optional args)

(:ICASE FORM FORM ...)

Make case-insensitive atom comparison in supplied FORMs.

Method: transform-grammar (ret ctx in-meta directive &optional args)

The most unspecific transformation method.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive string) &optional args)

Transforms a string form.

Method: transform-grammar (ret ctx (in-meta (eql t)) (directive character) &optional args)

Transforms a character form.


5.1.5 Types

Type: alnum? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: alpha? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: ascii? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: bit? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: digit? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: extended? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: graphic? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: lower? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: newline? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: space? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: tab? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: upper? ()
Package

meta-sexp.

Source

atoms.lisp.

Type: white-space? ()
Package

meta-sexp.

Source

atoms.lisp.


5.2 Internals


5.2.1 Macros

Macro: match-rule (ctx rule args)
Package

meta-sexp.

Source

meta-sexp.lisp.

Macro: match-type (ctx type)
Package

meta-sexp.

Source

meta-sexp.lisp.

Macro: with-unique-names ((&rest bindings) &body body)

Syntax: WITH-UNIQUE-NAMES ( { var | (var x) }* ) declaration* form*

Executes a series of forms with each VAR bound to a fresh, uninterned symbol. The uninterned symbol is as if returned by a call to GENSYM with the string denoted by X - or, if X is not supplied, the string denoted by VAR - as argument.

The variable bindings created are lexical unless special declarations are specified. The scopes of the name bindings and declarations do not include the Xs.

The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Package

meta-sexp.

Source

util.lisp.


5.2.2 Ordinary functions

Function: checkpoint (ctx)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: commit (ctx)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: copy-parser-context (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: make-parser-context (&key data size cursor checkpoints icases attachment)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: match-atom (ctx atom)
Package

meta-sexp.

Source

meta-sexp.lisp.

Reader: parser-context-attachment (instance)
Writer: (setf parser-context-attachment) (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

attachment.

Reader: parser-context-checkpoints (instance)
Writer: (setf parser-context-checkpoints) (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

checkpoints.

Reader: parser-context-cursor (instance)
Writer: (setf parser-context-cursor) (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

cursor.

Reader: parser-context-data (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

data.

Reader: parser-context-icases (instance)
Writer: (setf parser-context-icases) (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

icases.

Function: parser-context-p (object)
Package

meta-sexp.

Source

meta-sexp.lisp.

Reader: parser-context-size (instance)
Package

meta-sexp.

Source

meta-sexp.lisp.

Target Slot

size.

Function: peek-atom (ctx)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: read-atom (ctx)
Package

meta-sexp.

Source

meta-sexp.lisp.

Function: rollback (ctx)
Package

meta-sexp.

Source

meta-sexp.lisp.


5.2.3 Structures

Structure: parser-context
Package

meta-sexp.

Source

meta-sexp.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: data
Type

string

Readers

parser-context-data.

Writers

This slot is read-only.

Slot: size
Type

unsigned-byte

Readers

parser-context-size.

Writers

This slot is read-only.

Slot: cursor
Type

unsigned-byte

Initform

0

Readers

parser-context-cursor.

Writers

(setf parser-context-cursor).

Slot: checkpoints
Readers

parser-context-checkpoints.

Writers

(setf parser-context-checkpoints).

Slot: icases
Readers

parser-context-icases.

Writers

(setf parser-context-icases).

Slot: attachment
Readers

parser-context-attachment.

Writers

(setf parser-context-attachment).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   L   M   N   P   R   S   T   U   W  
Index Entry  Section

(
(setf parser-context-attachment): Private ordinary functions
(setf parser-context-checkpoints): Private ordinary functions
(setf parser-context-cursor): Private ordinary functions
(setf parser-context-icases): Private ordinary functions

A
alnum?: Public ordinary functions
alpha?: Public ordinary functions
ascii?: Public ordinary functions

B
bit?: Public ordinary functions

C
char-accum-push: Public ordinary functions
checkpoint: Private ordinary functions
commit: Private ordinary functions
copy-parser-context: Private ordinary functions
create-parser-context: Public generic functions
create-parser-context: Public generic functions
create-parser-context: Public generic functions

D
defatom: Public macros
defrenderer: Public macros
defrule: Public macros
digit?: Public ordinary functions

E
empty-char-accum-p: Public ordinary functions
empty-list-accum-p: Public ordinary functions
extended?: Public ordinary functions

F
Function, (setf parser-context-attachment): Private ordinary functions
Function, (setf parser-context-checkpoints): Private ordinary functions
Function, (setf parser-context-cursor): Private ordinary functions
Function, (setf parser-context-icases): Private ordinary functions
Function, alnum?: Public ordinary functions
Function, alpha?: Public ordinary functions
Function, ascii?: Public ordinary functions
Function, bit?: Public ordinary functions
Function, char-accum-push: Public ordinary functions
Function, checkpoint: Private ordinary functions
Function, commit: Private ordinary functions
Function, copy-parser-context: Private ordinary functions
Function, digit?: Public ordinary functions
Function, empty-char-accum-p: Public ordinary functions
Function, empty-list-accum-p: Public ordinary functions
Function, extended?: Public ordinary functions
Function, graphic?: Public ordinary functions
Function, lower?: Public ordinary functions
Function, make-char-accum: Public ordinary functions
Function, make-list-accum: Public ordinary functions
Function, make-parser-context: Private ordinary functions
Function, match-atom: Private ordinary functions
Function, newline?: Public ordinary functions
Function, parser-context-attachment: Private ordinary functions
Function, parser-context-checkpoints: Private ordinary functions
Function, parser-context-cursor: Private ordinary functions
Function, parser-context-data: Private ordinary functions
Function, parser-context-icases: Private ordinary functions
Function, parser-context-p: Private ordinary functions
Function, parser-context-size: Private ordinary functions
Function, peek-atom: Private ordinary functions
Function, read-atom: Private ordinary functions
Function, reset-char-accum: Public ordinary functions
Function, rollback: Private ordinary functions
Function, space?: Public ordinary functions
Function, tab?: Public ordinary functions
Function, upper?: Public ordinary functions
Function, white-space?: Public ordinary functions

G
Generic Function, create-parser-context: Public generic functions
Generic Function, transform-grammar: Public generic functions
graphic?: Public ordinary functions

L
list-accum-push: Public macros
lower?: Public ordinary functions

M
Macro, defatom: Public macros
Macro, defrenderer: Public macros
Macro, defrule: Public macros
Macro, list-accum-push: Public macros
Macro, match-rule: Private macros
Macro, match-type: Private macros
Macro, reset-list-accum: Public macros
Macro, with-unique-names: Private macros
make-char-accum: Public ordinary functions
make-list-accum: Public ordinary functions
make-parser-context: Private ordinary functions
match-atom: Private ordinary functions
match-rule: Private macros
match-type: Private macros
Method, create-parser-context: Public generic functions
Method, create-parser-context: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions
Method, transform-grammar: Public generic functions

N
newline?: Public ordinary functions

P
parser-context-attachment: Private ordinary functions
parser-context-checkpoints: Private ordinary functions
parser-context-cursor: Private ordinary functions
parser-context-data: Private ordinary functions
parser-context-icases: Private ordinary functions
parser-context-p: Private ordinary functions
parser-context-size: Private ordinary functions
peek-atom: Private ordinary functions

R
read-atom: Private ordinary functions
reset-char-accum: Public ordinary functions
reset-list-accum: Public macros
rollback: Private ordinary functions

S
space?: Public ordinary functions

T
tab?: Public ordinary functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions
transform-grammar: Public generic functions

U
upper?: Public ordinary functions

W
white-space?: Public ordinary functions
with-unique-names: Private macros


A.4 Data types

Jump to:   A   B   D   E   F   G   L   M   N   P   S   T   U   W  
Index Entry  Section

A
alnum?: Public types
alpha?: Public types
ascii?: Public types
atoms.lisp: The meta-sexp/atoms․lisp file

B
bit?: Public types

D
digit?: Public types

E
extended?: Public types

F
File, atoms.lisp: The meta-sexp/atoms․lisp file
File, meta-sexp.asd: The meta-sexp/meta-sexp․asd file
File, meta-sexp.lisp: The meta-sexp/meta-sexp․lisp file
File, packages.lisp: The meta-sexp/packages․lisp file
File, util.lisp: The meta-sexp/util․lisp file

G
graphic?: Public types

L
lower?: Public types

M
meta-sexp: The meta-sexp system
meta-sexp: The meta-sexp package
meta-sexp-asd: The meta-sexp-asd package
meta-sexp.asd: The meta-sexp/meta-sexp․asd file
meta-sexp.lisp: The meta-sexp/meta-sexp․lisp file

N
newline?: Public types

P
Package, meta-sexp: The meta-sexp package
Package, meta-sexp-asd: The meta-sexp-asd package
packages.lisp: The meta-sexp/packages․lisp file
parser-context: Private structures

S
space?: Public types
Structure, parser-context: Private structures
System, meta-sexp: The meta-sexp system

T
tab?: Public types
Type, alnum?: Public types
Type, alpha?: Public types
Type, ascii?: Public types
Type, bit?: Public types
Type, digit?: Public types
Type, extended?: Public types
Type, graphic?: Public types
Type, lower?: Public types
Type, newline?: Public types
Type, space?: Public types
Type, tab?: Public types
Type, upper?: Public types
Type, white-space?: Public types

U
upper?: Public types
util.lisp: The meta-sexp/util․lisp file

W
white-space?: Public types