Changeset 8 for trunk


Ignore:
Timestamp:
05/31/2007 03:40:43 AM (19 years ago)
Author:
dsowen
Message:

Added example and documentation.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lex.lisp

    r4 r8  
    11(defpackage #:dso-lex
     2    (:documentation "Allows the definition of lexers.  See DEFLEXER.")
    23  (:use #:cl #:cl-ppcre)
    34  (:export #:deflexer))
     
    1718
    1819(defmacro deflexer (name &body body)
     20  "Defines lexers, called as a function of the given NAME.  The body
     21consists of token-class definitions, each being a list of a regular
     22expression, the name of the class, and an optional filter.
     23
     24Currently, matching is done using *only* priority (first match wins),
     25and does not look for the longest match."
    1926  (let ((regex (combine (mapcar #'first body)))
    2027        (classes (map 'vector #'second body))
Note: See TracChangeset for help on using the changeset viewer.