- Timestamp:
- 05/31/2007 03:40:43 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
-
example.lisp (added)
-
lex.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lex.lisp
r4 r8 1 1 (defpackage #:dso-lex 2 (:documentation "Allows the definition of lexers. See DEFLEXER.") 2 3 (:use #:cl #:cl-ppcre) 3 4 (:export #:deflexer)) … … 17 18 18 19 (defmacro deflexer (name &body body) 20 "Defines lexers, called as a function of the given NAME. The body 21 consists of token-class definitions, each being a list of a regular 22 expression, the name of the class, and an optional filter. 23 24 Currently, matching is done using *only* priority (first match wins), 25 and does not look for the longest match." 19 26 (let ((regex (combine (mapcar #'first body))) 20 27 (classes (map 'vector #'second body))
Note: See TracChangeset
for help on using the changeset viewer.
