The cl-bnf Reference Manual
This is the cl-bnf Reference Manual,
generated automatically by Declt version 4.0 beta 2 "William Riker"
on Sun Dec 15 04:42:40 2024 GMT+0.
1 Systems
The main system appears first, followed by any subsystem dependency.
1.1 cl-bnf
A simple BNF parser.
- Author
Bruno Dias <dias.h.bruno@gmail.com>
- License
MIT
- Dependencies
utf8-input-stream
(system).
flexi-streams
(system).
- Source
cl-bnf.asd
.
- Child Component
src
(module).
2 Modules
Modules are listed depth-first from the system components tree.
3 Files
Files are sorted by type and then listed depth-first from the systems
components trees.
3.1 Lisp
3.1.2 cl-bnf/src/bnf.lisp
- Source
cl-bnf.asd
.
- Parent Component
src
(module).
- Packages
cl-bnf
.
- Public Interface
-
- Internals
-
4 Packages
Packages are listed by definition order.
4.1 cl-bnf
- Source
bnf.lisp
.
- 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: define-grammar (spec &rest rules) ¶
-
Generates the parser with SPEC and all the RULES.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Macro: define-rule (label rule &key call tag apply) ¶
-
Generate a function LABEL to parse RULE. Later,
you can apply a TRANSFORMATION which can be a function
or a keytword.
- Package
cl-bnf
.
- Source
bnf.lisp
.
5.1.2 Ordinary functions
- Function: parse (rules stream) ¶
-
Parse according to the RULES on SOURCE.
- Package
cl-bnf
.
- Source
bnf.lisp
.
5.2 Internals
5.2.1 Macros
- Macro: one (stream pred) ¶
-
Get a single char from the STREAM and test against PRED.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Macro: single-char (stream char) ¶
-
Get a single char from the STREAM and test against CHAR.
- Package
cl-bnf
.
- Source
bnf.lisp
.
5.2.2 Ordinary functions
- Function: and-match (stream expression) ¶
-
And pattern to be run on STREAM with EXPRESSION.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: eval-pattern-or-function (item source) ¶
-
Evaluate a patter or function for ITEM an use SOURCE.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: expand-and-rule (items) ¶
-
Take many or RULES and normalize the tree.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: expand-item (item) ¶
-
If ITEM is simple type, transforms it into the correct structure.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: ispair (x) ¶
-
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: many-matches (stream expression) ¶
-
Many pattern to be run on STREAM with EXPRESSION.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: map-rules (fn rules) ¶
-
Apply FN on each expression in RULES.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: maybe-match (stream expression) ¶
-
Maybe pattern to be run on STREAM with EXPRESSION.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: or-match (stream expression) ¶
-
Or pattern to be run on STREAM with EXPRESSION.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: split-seq-on (item seq) ¶
-
Split on ITEM on SEQ.
- Package
cl-bnf
.
- Source
bnf.lisp
.
- Function: string-match (stream str) ¶
-
String pattern to be run on STREAM with STRING.
- Package
cl-bnf
.
- Source
bnf.lisp
.
Appendix A Indexes
A.2 Functions
| |
|
A | | |
| and-match : | | Private ordinary functions |
|
D | | |
| define-grammar : | | Public macros |
| define-rule : | | Public macros |
|
E | | |
| eval-pattern-or-function : | | Private ordinary functions |
| expand-and-rule : | | Private ordinary functions |
| expand-item : | | Private ordinary functions |
|
F | | |
| Function, and-match : | | Private ordinary functions |
| Function, eval-pattern-or-function : | | Private ordinary functions |
| Function, expand-and-rule : | | Private ordinary functions |
| Function, expand-item : | | Private ordinary functions |
| Function, ispair : | | Private ordinary functions |
| Function, many-matches : | | Private ordinary functions |
| Function, map-rules : | | Private ordinary functions |
| Function, maybe-match : | | Private ordinary functions |
| Function, or-match : | | Private ordinary functions |
| Function, parse : | | Public ordinary functions |
| Function, split-seq-on : | | Private ordinary functions |
| Function, string-match : | | Private ordinary functions |
|
I | | |
| ispair : | | Private ordinary functions |
|
M | | |
| Macro, define-grammar : | | Public macros |
| Macro, define-rule : | | Public macros |
| Macro, one : | | Private macros |
| Macro, single-char : | | Private macros |
| many-matches : | | Private ordinary functions |
| map-rules : | | Private ordinary functions |
| maybe-match : | | Private ordinary functions |
|
O | | |
| one : | | Private macros |
| or-match : | | Private ordinary functions |
|
P | | |
| parse : | | Public ordinary functions |
|
S | | |
| single-char : | | Private macros |
| split-seq-on : | | Private ordinary functions |
| string-match : | | Private ordinary functions |
|