Changeset 4 for trunk/csv.lisp


Ignore:
Timestamp:
02/09/2008 09:24:02 PM (18 years ago)
Author:
dsowen
Message:
  • Updated for the latest dso-parser.
  • Licensed under LGPL v3.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/csv.lisp

    r2 r4  
    11;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
     2
     3#|
     4Copyright (C) 2007, 2008  David Owen <dsowen@fugue88.ws>
     5
     6This program is free software: you can redistribute it and/or modify
     7it under the terms of the GNU Lesser Public License as published by
     8the Free Software Foundation, either version 3 of the License, or
     9(at your option) any later version.
     10
     11This program is distributed in the hope that it will be useful,
     12but WITHOUT ANY WARRANTY; without even the implied warranty of
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU Lesser Public License for more details.
     15
     16You should have received a copy of the GNU Lesser Public License
     17along with this program.  If not, see <http://www.gnu.org/licenses/>.
     18|#
    219
    320(defpackage #:dso-csv
     
    1431
    1532
    16 (flet ((trim (s) (substring s :start 1 :length (- (length s) 2))))
     33(flet ((trim (s) (dso-parse::substring s :start 1 :length (- (length s) 2))))
    1734  (defun un-squote (s)
    1835    (cl-ppcre:regex-replace-all "''" (trim s) "'"))
     
    5976  (file (+ row))
    6077  (row (t-value (* row-rest) (= t-newline))
    61        (lambda (row) (cons (caar row) (mapcar #'second (second row)))))
    62   (row-rest ((= t-comma) t-value) car))
     78       :filter (lambda (row) (cons (caar row) (mapcar #'second (second row)))))
     79  (row-rest ((= t-comma) t-value) :filter car))
    6380
    6481
Note: See TracChangeset for help on using the changeset viewer.