Changeset 14


Ignore:
Timestamp:
11/05/2007 03:12:10 PM (19 years ago)
Author:
dsowen
Message:

Fixed to work with new lexers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/example.lisp

    r10 r14  
    3939
    4040(defun scan-all (input)
    41   (labels ((scan (input tokens)
    42              (if (> (length input) 0)
    43                  (multiple-value-bind (class literal remainder)
    44                      (scan-csv input)
     41  (labels ((scan (start tokens)
     42             (if (> (length input) start)
     43                 (multiple-value-bind (class image remainder)
     44                     (scan-csv input start)
    4545                   (when class
    46                      (scan remainder (cons (cons class literal) tokens))))
    47                  (reverse tokens))))
    48     (scan input '())))
     46                     (scan remainder (cons (cons class image) tokens))))
     47                 (nreverse tokens))))
     48    (scan 0 '())))
    4949
    5050(scan-all "no quotes,'a ''quote''',\"another \"\"quote\"\"\"")
Note: See TracChangeset for help on using the changeset viewer.