The dso-lex Reference Manual

Table of Contents

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

The dso-lex Reference Manual

This is the dso-lex Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:35:20 2018 GMT+0.


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

1 Systems

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


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

1.1 dso-lex

Dependencies
Source

dso-lex.asd (file)

Component

lex.lisp (file)


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

2 Files

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


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

2.1 Lisp


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

2.1.1 dso-lex.asd

Location

dso-lex.asd

Systems

dso-lex (system)


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

2.1.2 dso-lex/lex.lisp

Parent

dso-lex (system)

Location

lex.lisp

Packages

dso-lex

Exported Definitions
Internal Definitions

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

3 Packages

Packages are listed by definition order.


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

3.1 dso-lex

Allows the definition of lexers. See DEFLEXER.

Source

lex.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

4 Definitions

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


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

4.1 Exported definitions


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

4.1.1 Macros

Macro: deflexer NAME (&key PRIORITY-ONLY) &body DEFS

Defines a lexer, called as a function of the given NAME, and returning the matched token-class, image, and image-length as values. The body consists of token-class definitions, each being a list of a regular expression, the name of the class, and an optional filter.

Unless PRIORITY-ONLY is true, the longest match will win, and rule-priority will only be used to break ties. Otherwise, the first match wins.

Example:

(deflexer lexer ()
("[0-9]+" number parse-integer)
("[a-zA-Z]" letter))

(lexer "2pi" 1)

Package

dso-lex

Source

lex.lisp (file)


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

4.1.2 Functions

Function: lex-all LEXER INPUT
Package

dso-lex

Source

lex.lisp (file)

Function: make-lexer DEFS &key PRIORITY-ONLY

Returns a lexer function. The DEFS consists of token-class definitions, each being a list of a regular expression, the name of the class, and an optional filter. The returned function takes as arguments an input sequence and an optional start position, and returning the matched token-class, image, and image-length as values.

Unless PRIORITY-ONLY is true, the longest match will win, and rule-priority will only be used to break ties. Otherwise, the first match wins.

Example:

(let ((lexer (make-lexer ’(("[0-9]+" number parse-integer) ("[a-zA-Z]" letter)))))
(funcall lexer "2pi" 1))

Package

dso-lex

Source

lex.lisp (file)


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

4.2 Internal definitions


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

4.2.1 Functions

Function: anchor-and-mode REGEX
Package

dso-lex

Source

lex.lisp (file)

Function: break-defs DEFS
Package

dso-lex

Source

lex.lisp (file)

Function: combine REGEX-LIST
Package

dso-lex

Source

lex.lisp (file)

Function: greedy-lexer-form INPUT-VAR START-VAR DEFS
Package

dso-lex

Source

lex.lisp (file)

Function: lexer-form INPUT-VAR START-VAR DEFS
Package

dso-lex

Source

lex.lisp (file)

Function: wrap REGEX
Package

dso-lex

Source

lex.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
dso-lex.asd: The dso-lex<dot>asd file
dso-lex/lex.lisp: The dso-lex/lex<dot>lisp file

F
File, Lisp, dso-lex.asd: The dso-lex<dot>asd file
File, Lisp, dso-lex/lex.lisp: The dso-lex/lex<dot>lisp file

L
Lisp File, dso-lex.asd: The dso-lex<dot>asd file
Lisp File, dso-lex/lex.lisp: The dso-lex/lex<dot>lisp file

Jump to:   D   F   L  

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

A.2 Functions

Jump to:   A   B   C   D   F   G   L   M   W  
Index Entry  Section

A
anchor-and-mode: Internal functions

B
break-defs: Internal functions

C
combine: Internal functions

D
deflexer: Exported macros

F
Function, anchor-and-mode: Internal functions
Function, break-defs: Internal functions
Function, combine: Internal functions
Function, greedy-lexer-form: Internal functions
Function, lex-all: Exported functions
Function, lexer-form: Internal functions
Function, make-lexer: Exported functions
Function, wrap: Internal functions

G
greedy-lexer-form: Internal functions

L
lex-all: Exported functions
lexer-form: Internal functions

M
Macro, deflexer: Exported macros
make-lexer: Exported functions

W
wrap: Internal functions

Jump to:   A   B   C   D   F   G   L   M   W  

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

A.3 Variables


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

A.4 Data types

Jump to:   D   P   S  
Index Entry  Section

D
dso-lex: The dso-lex system
dso-lex: The dso-lex package

P
Package, dso-lex: The dso-lex package

S
System, dso-lex: The dso-lex system

Jump to:   D   P   S