The abnf Reference Manual

This is the abnf Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:55:12 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 abnf

ABNF Parser Generator, per RFC2234

Author

Dimitri Fontaine <>

License

WTFPL

Dependencies
  • esrap (system).
  • cl-ppcre (system).
Source

abnf.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 abnf/abnf.asd

Source

abnf.asd.

Parent Component

abnf (system).

ASDF Systems

abnf.


3.1.2 abnf/package.lisp

Source

abnf.asd.

Parent Component

abnf (system).

Packages

abnf.


3.1.3 abnf/abnf.lisp

Dependency

package.lisp (file).

Source

abnf.asd.

Parent Component

abnf (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 abnf

Source

package.lisp.

Use List
  • common-lisp.
  • esrap.
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 Special variables

Special Variable: *abnf-rfc-syslog-draft-15*

See http://tools.ietf.org/html/draft-ietf-syslog-protocol-15#page-10

Package

abnf.

Source

abnf.lisp.

Special Variable: *abnf-rfc5424-syslog-protocol*

See http://tools.ietf.org/html/rfc5424#section-6

Package

abnf.

Source

abnf.lisp.

Special Variable: *abnf-rsyslog*

See http://www.rsyslog.com/doc/syslog_protocol.html

Package

abnf.

Source

abnf.lisp.


5.1.2 Ordinary functions

Function: parse-abnf-grammar (abnf-string top-level-rule &key registering-rules junk-allowed)

Parse STRING as an ABNF grammar as defined in RFC 2234. Returns a cl-ppcre scanner that will only match strings conforming to given grammar.

See http://tools.ietf.org/html/rfc2234 for details about the ABNF specs. Added to that grammar is support for regular expression, that are expected in the ELEMENT production and spelled ~/regex/. The allowed delimiters are: ~// ~[] ~{} ~() ~<> ~"" ~” ~|| and ~##.

Package

abnf.

Source

abnf.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *abnf-default-rules*

An alist of the usual rules needed for ABNF grammars

Package

abnf.

Source

abnf.lisp.

Special Variable: *abnf-rfc2234-abnf-definition*

See http://tools.ietf.org/html/rfc2234#section-4

Package

abnf.

Source

abnf.lisp.


5.2.2 Ordinary functions

Function: char-val-char-p (character)
Package

abnf.

Source

abnf.lisp.

Function: expand-rule (rule-name rule-set &optional registering-rules)

Given a rule, expand it completely removing references to other parsed rules

Package

abnf.

Source

abnf.lisp.

Function: expand-rule-definition (definition rule-set registering-rules already-expanded-rules)

Expand given rule DEFINITION within given RULE-SET

Package

abnf.

Source

abnf.lisp.

Function: hexadecimal-char-p (character)
Package

abnf.

Source

abnf.lisp.

Function: process-quoted-regex (pr)

Helper function to process different kinds of quotes for regexps

Package

abnf.

Source

abnf.lisp.

Function: rule-name-character-p (character)
Package

abnf.

Source

abnf.lisp.

Function: rule-name-symbol (rule-name &key find-symbol)

Turn the string we read in the ABNF into internal symbol.

Package

abnf.

Source

abnf.lisp.

Function: test (&key times)

This serves as a test and an example: if you’re going to use the same scanner more than one, be sure to compute it only once.

Package

abnf.

Source

abnf.lisp.

Function: vcharp (character)
Package

abnf.

Source

abnf.lisp.


Appendix A Indexes


A.1 Concepts