Changeset 4


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.
Location:
trunk
Files:
2 added
2 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
  • trunk/dso-csv.asd

    r1 r4  
    22
    33#|
    4 Copyright (C) 2007  David Owen <dsowen@fugue88.ws>
     4Copyright (C) 2007, 2008  David Owen <dsowen@fugue88.ws>
    55
    6 This library is free software; you can redistribute it and/or
    7 modify it under the terms of the GNU Lesser General Public
    8 License as published by the Free Software Foundation; either
    9 version 2.1 of the License, or (at your option) any later version.
     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.
    1010
    11 This library is distributed in the hope that it will be useful,
     11This program is distributed in the hope that it will be useful,
    1212but WITHOUT ANY WARRANTY; without even the implied warranty of
    13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14 Lesser General Public License for more details.
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU Lesser Public License for more details.
    1515
    16 You should have received a copy of the GNU Lesser General Public
    17 License along with this library; if not, write to the Free Software
    18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
     16You should have received a copy of the GNU Lesser Public License
     17along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1918|#
    2019
Note: See TracChangeset for help on using the changeset viewer.