Index: trunk/csv.lisp
===================================================================
--- trunk/csv.lisp	(revision 5)
+++ trunk/csv.lisp	(revision 1)
@@ -1,25 +1,6 @@
 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
-
-#|
-Copyright (C) 2007, 2008  David Owen <dsowen@fugue88.ws>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Lesser Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Lesser Public License for more details.
-
-You should have received a copy of the GNU Lesser Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-|#
 
 (defpackage #:dso-csv
   (:use #:cl #:dso-lex #:dso-parse)
-  ;; TODO
-  (:import-from #:dso-parse #:substring)
   (:export #:lex-all-csv
 	   #:file
@@ -29,7 +10,10 @@
 (in-package #:dso-csv)
 
+;;;; TODO
+(import 'dso-parse::substring)
 
 
-(flet ((trim (s) (dso-parse::substring s :start 1 :length (- (length s) 2))))
+
+(flet ((trim (s) (substring s :start 1 :length (- (length s) 2))))
   (defun un-squote (s)
     (cl-ppcre:regex-replace-all "''" (trim s) "'"))
@@ -37,5 +21,5 @@
     (cl-ppcre:regex-replace-all "\"\"" (trim s) "\"")))
 
-(deflexer lex-csv (:priority-only t)
+(deflexer lex-csv
   ("," comma)
   ("\\r\\n?|\\n" newline)
@@ -46,5 +30,4 @@
 
 (defun lex-all-csv (input)
-  (declare (optimize (speed 2) (debug 1)))
   (labels ((lex-all (start tokens)
 	     (multiple-value-bind (class image next-offset)
@@ -77,6 +60,6 @@
   (file (+ row))
   (row (t-value (* row-rest) (= t-newline))
-       :filter (lambda (row) (cons (caar row) (mapcar #'second (second row)))))
-  (row-rest ((= t-comma) t-value) :filter 'car))
+       (lambda (row) (cons (caar row) (mapcar #'second (second row)))))
+  (row-rest ((= t-comma) t-value) car))
 
 
