The dartsclemailaddress Reference Manual

Table of Contents

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

The dartsclemailaddress Reference Manual

This is the dartsclemailaddress Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 14:26:07 2018 GMT+0.


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

1 Introduction

Email Address Parsing

This library provides a fully RFC 5322 compliant parser for email addresses. Also provided are a few tiny helper functions, which allow the formatting of email addresses in ways, which ensures, that they are RFC 5322 compliant.

This library has been tested under

Package DARTS.LIB.EMAIL-ADDRESS


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

2 Systems

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


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

2.1 darts.lib.email-address

Maintainer

Dirk Eßer

Author

Dirk Esser

License

MIT

Description

Parsing and formatting email addresses (RFC 5322 compliant)

Long Description
Version

0.1

Source

darts.lib.email-address.asd (file)

Component

src (module)


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

3 Modules

Modules are listed depth-first from the system components tree.


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

3.1 darts.lib.email-address/src

Parent

darts.lib.email-address (system)

Location

src/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 darts.lib.email-address.asd

Location

darts.lib.email-address.asd

Systems

darts.lib.email-address (system)

Packages

darts.asdf


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

4.1.2 darts.lib.email-address/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

darts.lib.email-address


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

4.1.3 darts.lib.email-address/src/parser.lisp

Parent

src (module)

Location

src/parser.lisp

Exported Definitions
Internal Definitions

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

4.1.4 darts.lib.email-address/src/objects.lisp

Parent

src (module)

Location

src/objects.lisp

Exported Definitions
Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 darts.asdf

Source

darts.lib.email-address.asd

Use List

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

5.2 darts.lib.email-address

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Special variables

Special Variable: *allow-obsolete-syntax*
Package

darts.lib.email-address

Source

parser.lisp (file)

Special Variable: *allow-unicode*
Package

darts.lib.email-address

Source

parser.lisp (file)


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

6.1.2 Functions

Function: address VALUE
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-domain INSTANCE
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-hash OBJECT
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-local-part INSTANCE
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-string OBJECT
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address/= A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address< A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address<= A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address= A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address> A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address>= A1 A2
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: addressp OBJECT
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: escape-display-name STRING &key START END

escape-display-name STRING &optional START END => ANSWER

Returns a copy of the portion of STRING between START (incl.) and END (excl.). If necessary, this function adds quotes around the result, and makes sure, that it satisfies the rules of an email display name.

Package

darts.lib.email-address

Source

parser.lisp (file)

Function: escape-local-part STRING &key START END

escape-local-part STRING &optional START END => ANSWER

Returns a copy of the portion of STRING between START (incl.) and END (excl.). If necessary, this function adds quotes around the result, and makes sure, that internal occurrences of #\\ and #\" are properly escaped.

Package

darts.lib.email-address

Source

parser.lisp (file)

Function: mailbox VALUE

Coerces the given ‘value’ into an instance of class ‘mailbox’ or
a suitable subclass.

- if ‘value’ is already a ‘mailbox’, it is directly returned

- if ‘value’ is an ‘address’, a new mailbox instance is created, using that address and a display name value of nil.

- if ‘value’ is a string, it is parsed according to the RFC 5322 ‘mailbox’ production and a mailbox instance is created from the results.

If the value cannot be coerced, signals a condition of type ‘type-error’.

Package

darts.lib.email-address

Source

objects.lisp (file)

Function: make-address LOCAL-PART DOMAIN

Creates a new address from the given component values ‘local-part’ and ‘domain’. Both arguments must be strings. Note, that this function currently does not validate the contents of the given local part and domain values.

Package

darts.lib.email-address

Source

objects.lisp (file)

Function: parse-rfc5322-addr-spec STRING &key START END (ALLOW-UNICODE *ALLOW-UNICODE*) ALLOW-TRAILING-JUNK

parse-rfc5322-addr-spec STRING &key START END => LOCAL-PART DOMAIN POSITION

Parses an email address (rule addr-spec in RFC 5322) from STRING, starting at index START (inclusive, defaults to 0), and stopping at index END (exclusive, defaults to the length of STRING).

Returns four values

1. the local part of the email address
2. the domain part of the email address
3. an error code, or nil, if the parsing was successful
4. the index of the first character not processed

This function stops after finding a complete email address, when it encounters an error, or when reaching the END index. The following error codes are defined:

nil no error, a full email address has been found :bad-local-part no valid local part could be found
:missing-separator the ‘@´ was not found
:bad-domain no valid domain part could be found
:trailing-garbage unprocessed characters remain after the address

Package

darts.lib.email-address

Source

parser.lisp (file)

Function: parse-rfc5322-mailbox STRING &key START END (ALLOW-UNICODE *ALLOW-UNICODE*) (ALLOW-OBSOLETE-SYNTAX *ALLOW-OBSOLETE-SYNTAX*) ALLOW-TRAILING-JUNK

parse-rfc5322-mailbox STRING &optional START END => LOCAL-PART DOMAIN DISPLAY-NAME ERROR POSITION

Package

darts.lib.email-address

Source

parser.lisp (file)

Function: parse-rfc5322-mailbox-list STRING &key START END (ALLOW-UNICODE *ALLOW-UNICODE*) (ALLOW-OBSOLETE-SYNTAX *ALLOW-OBSOLETE-SYNTAX*)
Package

darts.lib.email-address

Source

parser.lisp (file)


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

6.1.3 Generic functions

Generic Function: mailbox-address OBJECT

Answers the ‘address’ instance, which describes the actual
email address associated with mailbox ‘object’. This method is part of the core mailbox protocol, and must be implemented by all objects, which want to participate in that protocol.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailbox-address (BASIC-MAILBOX basic-mailbox)

automatically generated reader method

Method: mailbox-address (OBJECT address)
Generic Function: mailbox-display-name OBJECT

Answers the display name associated with the given mailbox
instance ‘object’. This function is part of the core mailbox protocol and must be implemented by all objects, which want to participate in that protocol.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailbox-display-name (BASIC-MAILBOX basic-mailbox)

automatically generated reader method

Method: mailbox-display-name (OBJECT address)
Generic Function: mailbox-domain OBJECT

Answers the domain string of this mailbox’s address.
The default method simply extracts the ‘address-domain’ from the object returned by ‘mailbox-address’ when applied to the given ‘object’.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailbox-domain (OBJECT address)
Method: mailbox-domain OBJECT
Generic Function: mailbox-local-part OBJECT

Answers the local part string of this mailbox’s address.
The default method simply extracts the ‘address-local-part’ from the object returned by ‘mailbox-address’ when applied to the given ‘object’.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailbox-local-part (OBJECT address)
Method: mailbox-local-part OBJECT
Generic Function: mailbox-string OBJECT

Constructs a string representation of the given mailbox
instance. The result is required to be a well-formed RFC 5322 email address parsable using the ‘mailbox’ production. The default method should be usable by almost all concrete ‘mailbox’ implementations.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailbox-string (OBJECT address)
Method: mailbox-string OBJECT
Generic Function: mailboxp OBJECT

Tests, whether ‘object’ fulfills the ‘mailbox’ protocol.
This condition is always true by definition for subclasses of class ‘mailbox’. It may additionally be true for other objects.

Package

darts.lib.email-address

Source

objects.lisp (file)

Methods
Method: mailboxp (OBJECT address)
Method: mailboxp (OBJECT mailbox)
Method: mailboxp OBJECT

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

6.1.4 Structures

Structure: address ()

Plain email address, composed of the local part (a string) and the domain (another string). Instances of this structure class are immutable after construction. This structure class fully supports the mailbox protocol.

Package

darts.lib.email-address

Source

objects.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: local-part
Type

simple-string

Initform

(error "missing local part")

Readers

address-local-part (function)

Writers

(setf address-local-part) (function)

Slot: domain
Type

simple-string

Initform

(error "missing domain")

Readers

address-domain (function)

Writers

(setf address-domain) (function)

Slot: %string
Type

(or null simple-string)

Readers

address-%string (function)

Writers

(setf address-%string) (function)

Slot: %hash
Type

fixnum

Initform

-1

Readers

address-%hash (function)

Writers

(setf address-%hash) (function)


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

6.1.5 Classes

Class: basic-mailbox ()

A simple concrete implementation of ‘mailbox’, which
stores the address and display name information in dedicated slots.

Package

darts.lib.email-address

Source

objects.lisp (file)

Direct superclasses

mailbox (class)

Direct methods
Direct slots
Slot: mailbox-address
Type

darts.lib.email-address:address

Readers

mailbox-address (generic function)

Slot: mailbox-display-name
Type

(or null string)

Initargs

:display-name

Readers

mailbox-display-name (generic function)

Class: mailbox ()

A mailbox is basically an email address combined with an
optional display name for that address. This class itself is only a protocol class, and exists for the purpose of type discrimination only.

Package

darts.lib.email-address

Source

objects.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

basic-mailbox (class)

Direct methods
  • print-object (method)
  • mailboxp (method)

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

6.2 Internal definitions


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

6.2.1 Macros

Macro: recurr NAME BINDINGS &body BODY
Package

darts.lib.email-address

Source

parser.lisp (file)


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

6.2.2 Functions

Function: %make-addr LOCAL-PART DOMAIN
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-%hash INSTANCE
Function: (setf address-%hash) VALUE INSTANCE
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: address-%string INSTANCE
Function: (setf address-%string) VALUE INSTANCE
Package

darts.lib.email-address

Source

objects.lisp (file)

Function: atext-char-p CHAR
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: ctext-char-p CHAR
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: dtext-char-p CHAR
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: fws-char-p CHAR
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: make-buffer &optional LENGTH
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: next-token STRING START &optional END
Package

darts.lib.email-address

Source

parser.lisp (file)

Function: qtext-char-p CHAR
Package

darts.lib.email-address

Source

parser.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   D   F   L   M  
Index Entry  Section

D
darts.lib.email-address.asd: The darts<dot>lib<dot>email-address<dot>asd file
darts.lib.email-address/src: The darts<dot>lib<dot>email-address/src module
darts.lib.email-address/src/objects.lisp: The darts<dot>lib<dot>email-address/src/objects<dot>lisp file
darts.lib.email-address/src/package.lisp: The darts<dot>lib<dot>email-address/src/package<dot>lisp file
darts.lib.email-address/src/parser.lisp: The darts<dot>lib<dot>email-address/src/parser<dot>lisp file

F
File, Lisp, darts.lib.email-address.asd: The darts<dot>lib<dot>email-address<dot>asd file
File, Lisp, darts.lib.email-address/src/objects.lisp: The darts<dot>lib<dot>email-address/src/objects<dot>lisp file
File, Lisp, darts.lib.email-address/src/package.lisp: The darts<dot>lib<dot>email-address/src/package<dot>lisp file
File, Lisp, darts.lib.email-address/src/parser.lisp: The darts<dot>lib<dot>email-address/src/parser<dot>lisp file

L
Lisp File, darts.lib.email-address.asd: The darts<dot>lib<dot>email-address<dot>asd file
Lisp File, darts.lib.email-address/src/objects.lisp: The darts<dot>lib<dot>email-address/src/objects<dot>lisp file
Lisp File, darts.lib.email-address/src/package.lisp: The darts<dot>lib<dot>email-address/src/package<dot>lisp file
Lisp File, darts.lib.email-address/src/parser.lisp: The darts<dot>lib<dot>email-address/src/parser<dot>lisp file

M
Module, darts.lib.email-address/src: The darts<dot>lib<dot>email-address/src module

Jump to:   D   F   L   M  

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

A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   M   N   P   Q   R  
Index Entry  Section

%
%make-addr: Internal functions

(
(setf address-%hash): Internal functions
(setf address-%string): Internal functions

A
address: Exported functions
address-%hash: Internal functions
address-%string: Internal functions
address-domain: Exported functions
address-hash: Exported functions
address-local-part: Exported functions
address-string: Exported functions
address/=: Exported functions
address<: Exported functions
address<=: Exported functions
address=: Exported functions
address>: Exported functions
address>=: Exported functions
addressp: Exported functions
atext-char-p: Internal functions

C
ctext-char-p: Internal functions

D
dtext-char-p: Internal functions

E
escape-display-name: Exported functions
escape-local-part: Exported functions

F
Function, %make-addr: Internal functions
Function, (setf address-%hash): Internal functions
Function, (setf address-%string): Internal functions
Function, address: Exported functions
Function, address-%hash: Internal functions
Function, address-%string: Internal functions
Function, address-domain: Exported functions
Function, address-hash: Exported functions
Function, address-local-part: Exported functions
Function, address-string: Exported functions
Function, address/=: Exported functions
Function, address<: Exported functions
Function, address<=: Exported functions
Function, address=: Exported functions
Function, address>: Exported functions
Function, address>=: Exported functions
Function, addressp: Exported functions
Function, atext-char-p: Internal functions
Function, ctext-char-p: Internal functions
Function, dtext-char-p: Internal functions
Function, escape-display-name: Exported functions
Function, escape-local-part: Exported functions
Function, fws-char-p: Internal functions
Function, mailbox: Exported functions
Function, make-address: Exported functions
Function, make-buffer: Internal functions
Function, next-token: Internal functions
Function, parse-rfc5322-addr-spec: Exported functions
Function, parse-rfc5322-mailbox: Exported functions
Function, parse-rfc5322-mailbox-list: Exported functions
Function, qtext-char-p: Internal functions
fws-char-p: Internal functions

G
Generic Function, mailbox-address: Exported generic functions
Generic Function, mailbox-display-name: Exported generic functions
Generic Function, mailbox-domain: Exported generic functions
Generic Function, mailbox-local-part: Exported generic functions
Generic Function, mailbox-string: Exported generic functions
Generic Function, mailboxp: Exported generic functions

M
Macro, recurr: Internal macros
mailbox: Exported functions
mailbox-address: Exported generic functions
mailbox-address: Exported generic functions
mailbox-address: Exported generic functions
mailbox-display-name: Exported generic functions
mailbox-display-name: Exported generic functions
mailbox-display-name: Exported generic functions
mailbox-domain: Exported generic functions
mailbox-domain: Exported generic functions
mailbox-domain: Exported generic functions
mailbox-local-part: Exported generic functions
mailbox-local-part: Exported generic functions
mailbox-local-part: Exported generic functions
mailbox-string: Exported generic functions
mailbox-string: Exported generic functions
mailbox-string: Exported generic functions
mailboxp: Exported generic functions
mailboxp: Exported generic functions
mailboxp: Exported generic functions
mailboxp: Exported generic functions
make-address: Exported functions
make-buffer: Internal functions
Method, mailbox-address: Exported generic functions
Method, mailbox-address: Exported generic functions
Method, mailbox-display-name: Exported generic functions
Method, mailbox-display-name: Exported generic functions
Method, mailbox-domain: Exported generic functions
Method, mailbox-domain: Exported generic functions
Method, mailbox-local-part: Exported generic functions
Method, mailbox-local-part: Exported generic functions
Method, mailbox-string: Exported generic functions
Method, mailbox-string: Exported generic functions
Method, mailboxp: Exported generic functions
Method, mailboxp: Exported generic functions
Method, mailboxp: Exported generic functions

N
next-token: Internal functions

P
parse-rfc5322-addr-spec: Exported functions
parse-rfc5322-mailbox: Exported functions
parse-rfc5322-mailbox-list: Exported functions

Q
qtext-char-p: Internal functions

R
recurr: Internal macros

Jump to:   %   (  
A   C   D   E   F   G   M   N   P   Q   R  

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

A.3 Variables

Jump to:   %   *  
D   L   M   S  
Index Entry  Section

%
%hash: Exported structures
%string: Exported structures

*
*allow-obsolete-syntax*: Exported special variables
*allow-unicode*: Exported special variables

D
domain: Exported structures

L
local-part: Exported structures

M
mailbox-address: Exported classes
mailbox-display-name: Exported classes

S
Slot, %hash: Exported structures
Slot, %string: Exported structures
Slot, domain: Exported structures
Slot, local-part: Exported structures
Slot, mailbox-address: Exported classes
Slot, mailbox-display-name: Exported classes
Special Variable, *allow-obsolete-syntax*: Exported special variables
Special Variable, *allow-unicode*: Exported special variables

Jump to:   %   *  
D   L   M   S  

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

A.4 Data types

Jump to:   A   B   C   D   M   P   S  
Index Entry  Section

A
address: Exported structures

B
basic-mailbox: Exported classes

C
Class, basic-mailbox: Exported classes
Class, mailbox: Exported classes

D
darts.asdf: The darts<dot>asdf package
darts.lib.email-address: The darts<dot>lib<dot>email-address system
darts.lib.email-address: The darts<dot>lib<dot>email-address package

M
mailbox: Exported classes

P
Package, darts.asdf: The darts<dot>asdf package
Package, darts.lib.email-address: The darts<dot>lib<dot>email-address package

S
Structure, address: Exported structures
System, darts.lib.email-address: The darts<dot>lib<dot>email-address system

Jump to:   A   B   C   D   M   P   S