The smug Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The smug Reference Manual

This is the smug Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:45:43 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

SMUG : Super Monadic Über Go-into

  ~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.
 
* Features

  - parsers are first class values written in basic lisp
  - non-deterministic infinite look-ahead  
  - easy to learn, easy to use
  - extensible input protocol : parse strings, streams, lists etc
  - in-depth tutorial : no previous experience required.

* Download and Install

#+BEGIN_SRC sh
cd ~/quicklisp/local-projects
git clone https://github.com/drewc/smug.git
#+END_SRC

#+BEGIN_SRC lisp
(ql:quickload :smug)
#+END_SRC

* Documentation

See [[file:doc/smug.org][doc/smug.org]]

* Support 

https://github.com/drewc/smug/issues or mailto:me@drewc.ca 

* Licence

The MIT License (MIT)

Copyright (c) 2010-2015 Drew Crampsie

see [[file:LICENSE][LICENSE]]



Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 smug

Author

Drew Crampsie

License

MIT

Description

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

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

Dependency

smug/smug (system)

Source

smug.asd (file)


Previous: , Up: Systems   [Contents][Index]

2.2 smug/smug

Component

lisp.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 smug.asd

Location

smug.asd

Systems

smug (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 smug/smug/lisp.lisp

Parent

smug/smug (system)

Location

smug.lisp

Packages

smug/smug

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 smug/smug

Source

lisp.lisp (file)

Nickname

smug

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: .let* BINDINGS &body BODY
Package

smug/smug

Source

lisp.lisp (file)

Macro: .prog1 PARSER &rest PARSERS
Package

smug/smug

Source

lisp.lisp (file)

Macro: .prog2 PARSER1 PARSER2 &rest PARSERS
Package

smug/smug

Source

lisp.lisp (file)

Macro: .progn &rest PARSERS
Package

smug/smug

Source

lisp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: .and P1 &rest PS
Package

smug/smug

Source

lisp.lisp (file)

Function: .bind PARSER FUNCTION
Package

smug/smug

Source

lisp.lisp (file)

Function: .char-equal CHAR
Package

smug/smug

Source

lisp.lisp (file)

Function: .char= X
Package

smug/smug

Source

lisp.lisp (file)

Function: .concatenate OUTPUT-TYPE-SPEC &rest PARSERS
Package

smug/smug

Source

lisp.lisp (file)

Function: .fail ()
Package

smug/smug

Source

lisp.lisp (file)

Function: .first PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .identity VALUE
Package

smug/smug

Source

lisp.lisp (file)

Function: .is PREDICATE &rest ARGS
Package

smug/smug

Source

lisp.lisp (file)

Function: .is-not PREDICATE &rest ARGS
Package

smug/smug

Source

lisp.lisp (file)

Function: .item ()
Package

smug/smug

Source

lisp.lisp (file)

Function: .map RESULT-TYPE PARSER &key AT-LEAST

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

Package

smug/smug

Source

lisp.lisp (file)

Function: .not PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .optional PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .or PARSER &rest PARSERS
Package

smug/smug

Source

lisp.lisp (file)

Function: .plus FIRST-PARSER SECOND-PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .read-line &optional EOF-ERROR-P EOF-VALUE
Package

smug/smug

Source

lisp.lisp (file)

Function: .string-equal STRING
Package

smug/smug

Source

lisp.lisp (file)

Function: .string= STRING
Package

smug/smug

Source

lisp.lisp (file)

Function: parse PARSER INPUT
Package

smug/smug

Source

lisp.lisp (file)

Function: replace-invalid OLD NEW
Package

smug/smug

Source

lisp.lisp (file)

Function: run PARSER INPUT
Package

smug/smug

Source

lisp.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: input-empty-p INPUT
Package

smug/smug

Source

lisp.lisp (file)

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

smug/smug

Source

lisp.lisp (file)

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

smug/smug

Source

lisp.lisp (file)

Methods
Method: input-rest (INPUT string)

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: .digit-char-p ()
Package

smug/smug

Source

lisp.lisp (file)

Function: .lower-case-p ()
Package

smug/smug

Source

lisp.lisp (file)

Function: .make-list SIZE &key INITIAL-ELEMENT
Package

smug/smug

Source

lisp.lisp (file)

Function: .mapc PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .mapcar PARSER
Package

smug/smug

Source

lisp.lisp (file)

Function: .satisfies PREDICATE &rest ARGS
Package

smug/smug

Source

lisp.lisp (file)

Function: .upper-case-p ()
Package

smug/smug

Source

lisp.lisp (file)

Function: replace-subseq NEEDLE HAYSTACK REPLACEMENT
Package

smug/smug

Source

lisp.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, smug.asd: The smug<dot>asd file
File, Lisp, smug/smug/lisp.lisp: The smug/smug/lisp<dot>lisp file

L
Lisp File, smug.asd: The smug<dot>asd file
Lisp File, smug/smug/lisp.lisp: The smug/smug/lisp<dot>lisp file

S
smug.asd: The smug<dot>asd file
smug/smug/lisp.lisp: The smug/smug/lisp<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

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

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

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

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

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

P
parse: Exported functions

R
replace-invalid: Exported functions
replace-subseq: Internal functions
run: Exported functions

Jump to:   .  
F   G   I   M   P   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, smug/smug: The smug/smug package

S
smug: The smug system
smug/smug: The smug/smug system
smug/smug: The smug/smug package
System, smug: The smug system
System, smug/smug: The smug/smug system

Jump to:   P   S