From 1b150182dc18c8f4cc355fed03bfa928bc5cdf52 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 4 Jul 2018 01:30:31 +0200 Subject: [PATCH] Fix cl-csv delimiter type. Travis spotted a bug with CCL that I failed to see, and that happens with Clozure-CL but not with SBCL apparently: 2018-07-03T21:04:11.053795Z FATAL The value "\\\"", derived from the initarg :DELIMITER, can not be used to set the value of the slot CL-CSV::DELIMITER in #, because it is not of type (VECTOR (OR (MEMBER T NIL) CHARACTER)). To fix, prefer the syntax #(#\\ #\") rather than "\\\"". --- src/parsers/command-csv.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parsers/command-csv.lisp b/src/parsers/command-csv.lisp index af91471..1c2afa4 100644 --- a/src/parsers/command-csv.lisp +++ b/src/parsers/command-csv.lisp @@ -71,8 +71,8 @@ (defrule option-fields-not-enclosed (and kw-fields kw-not kw-enclosed) (:constant (cons :quote nil))) -(defrule quote-quote "double-quote" (:constant "\"\"")) -(defrule backslash-quote "backslash-quote" (:constant "\\\"")) +(defrule quote-quote "double-quote" (:constant #(#\" #\"))) +(defrule backslash-quote "backslash-quote" (:constant #(#\\ #\"))) (defrule escaped-quote-name (or quote-quote backslash-quote)) (defrule escaped-quote-literal (or (and #\" #\") (and #\\ #\")) (:text t)) (defrule escaped-quote (or escaped-quote-literal