The smug Reference Manual

This is the smug Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:44:05 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 smug

SMUG: Simple Monadic Uber Go-into, Parsing made easy.

Author

Drew Crampsie

License

MIT

Long Description

Smug is a library for parsing text, based on _monadic parser combinators_.

Using a simple technique from the functional programming camp, smug makes it simple to create quick extensible recursive descent parsers without funky syntax or impenetrable macrology.

Defsystem Dependency

asdf-package-system (system).

Dependency

smug/smug (system).

Source

smug.asd.


2.2 smug/smug

Author

Drew Crampsie

License

MIT

Source

smug.asd.


3 Files

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


3.1 Lisp


3.1.1 smug/smug.asd

Source

smug.asd.

Parent Component

smug (system).

ASDF Systems

3.1.2 smug/smug/file-type.lisp

Source

smug.asd.

Parent Component

smug/smug (system).

Packages

smug/smug.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 smug/smug

Source

file-type.lisp.

Nickname

smug

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Macros

Macro: .let* (bindings &body body)
Package

smug/smug.

Source

file-type.lisp.

Macro: .prog1 (parser &rest parsers)
Package

smug/smug.

Source

file-type.lisp.

Macro: .prog2 (parser1 parser2 &rest parsers)
Package

smug/smug.

Source

file-type.lisp.

Macro: .progn (&rest parsers)
Package

smug/smug.

Source

file-type.lisp.


5.1.2 Ordinary functions

Function: .and (p1 &rest ps)
Package

smug/smug.

Source

file-type.lisp.

Function: .bind (parser function)
Package

smug/smug.

Source

file-type.lisp.

Function: .char-equal (char)
Package

smug/smug.

Source

file-type.lisp.

Function: .char= (x)
Package

smug/smug.

Source

file-type.lisp.

Function: .concatenate (output-type-spec &rest parsers)
Package

smug/smug.

Source

file-type.lisp.

Function: .fail ()
Package

smug/smug.

Source

file-type.lisp.

Function: .first (parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .identity (value)
Package

smug/smug.

Source

file-type.lisp.

Function: .is (predicate &rest args)
Package

smug/smug.

Source

file-type.lisp.

Function: .is-not (predicate &rest args)
Package

smug/smug.

Source

file-type.lisp.

Function: .item ()
Package

smug/smug.

Source

file-type.lisp.

Function: .map (result-type parser &key at-least)

=> a ~result-type~ of /parser/ results.

Package

smug/smug.

Source

file-type.lisp.

Function: .not (parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .optional (parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .or (parser &rest parsers)
Package

smug/smug.

Source

file-type.lisp.

Function: .plus (first-parser second-parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .read-line (&optional eof-error-p eof-value)
Package

smug/smug.

Source

file-type.lisp.

Function: .string-equal (string)
Package

smug/smug.

Source

file-type.lisp.

Function: .string= (string)
Package

smug/smug.

Source

file-type.lisp.

Function: parse (parser input)
Package

smug/smug.

Source

file-type.lisp.

Function: replace-invalid (old new)
Package

smug/smug.

Source

file-type.lisp.

Function: run (parser input)
Package

smug/smug.

Source

file-type.lisp.


5.1.3 Generic functions

Generic Function: input-empty-p (input)
Package

smug/smug.

Source

file-type.lisp.

Methods
Method: input-empty-p ((input string))
Generic Function: input-first (input)
Package

smug/smug.

Source

file-type.lisp.

Methods
Method: input-first ((input string))
Generic Function: input-rest (input)
Package

smug/smug.

Source

file-type.lisp.

Methods
Method: input-rest ((input string))

5.2 Internals


5.2.1 Ordinary functions

Function: .digit-char-p ()
Package

smug/smug.

Source

file-type.lisp.

Function: .lower-case-p ()
Package

smug/smug.

Source

file-type.lisp.

Function: .make-list (size &key initial-element)
Package

smug/smug.

Source

file-type.lisp.

Function: .mapc (parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .mapcar (parser)
Package

smug/smug.

Source

file-type.lisp.

Function: .one-of (parser list)
Package

smug/smug.

Source

file-type.lisp.

Function: .satisfies (predicate &rest args)
Package

smug/smug.

Source

file-type.lisp.

Function: .upper-case-p ()
Package

smug/smug.

Source

file-type.lisp.

Function: replace-subseq (needle haystack replacement)
Package

smug/smug.

Source

file-type.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   .  
F   G   I   M   P   R  
Index Entry  Section

.
.and: Public ordinary functions
.bind: Public ordinary functions
.char-equal: Public ordinary functions
.char=: Public ordinary functions
.concatenate: Public ordinary functions
.digit-char-p: Private ordinary functions
.fail: Public ordinary functions
.first: Public ordinary functions
.identity: Public ordinary functions
.is: Public ordinary functions
.is-not: Public ordinary functions
.item: Public ordinary functions
.let*: Public macros
.lower-case-p: Private ordinary functions
.make-list: Private ordinary functions
.map: Public ordinary functions
.mapc: Private ordinary functions
.mapcar: Private ordinary functions
.not: Public ordinary functions
.one-of: Private ordinary functions
.optional: Public ordinary functions
.or: Public ordinary functions
.plus: Public ordinary functions
.prog1: Public macros
.prog2: Public macros
.progn: Public macros
.read-line: Public ordinary functions
.satisfies: Private ordinary functions
.string-equal: Public ordinary functions
.string=: Public ordinary functions
.upper-case-p: Private ordinary functions

F
Function, .and: Public ordinary functions
Function, .bind: Public ordinary functions
Function, .char-equal: Public ordinary functions
Function, .char=: Public ordinary functions
Function, .concatenate: Public ordinary functions
Function, .digit-char-p: Private ordinary functions
Function, .fail: Public ordinary functions
Function, .first: Public ordinary functions
Function, .identity: Public ordinary functions
Function, .is: Public ordinary functions
Function, .is-not: Public ordinary functions
Function, .item: Public ordinary functions
Function, .lower-case-p: Private ordinary functions
Function, .make-list: Private ordinary functions
Function, .map: Public ordinary functions
Function, .mapc: Private ordinary functions
Function, .mapcar: Private ordinary functions
Function, .not: Public ordinary functions
Function, .one-of: Private ordinary functions
Function, .optional: Public ordinary functions
Function, .or: Public ordinary functions
Function, .plus: Public ordinary functions
Function, .read-line: Public ordinary functions
Function, .satisfies: Private ordinary functions
Function, .string-equal: Public ordinary functions
Function, .string=: Public ordinary functions
Function, .upper-case-p: Private ordinary functions
Function, parse: Public ordinary functions
Function, replace-invalid: Public ordinary functions
Function, replace-subseq: Private ordinary functions
Function, run: Public ordinary functions

G
Generic Function, input-empty-p: Public generic functions
Generic Function, input-first: Public generic functions
Generic Function, input-rest: Public generic functions

I
input-empty-p: Public generic functions
input-empty-p: Public generic functions
input-first: Public generic functions
input-first: Public generic functions
input-rest: Public generic functions
input-rest: Public generic functions

M
Macro, .let*: Public macros
Macro, .prog1: Public macros
Macro, .prog2: Public macros
Macro, .progn: Public macros
Method, input-empty-p: Public generic functions
Method, input-first: Public generic functions
Method, input-rest: Public generic functions

P
parse: Public ordinary functions

R
replace-invalid: Public ordinary functions
replace-subseq: Private ordinary functions
run: Public ordinary functions


A.3 Variables