From: Utz-Uwe Haus Date: Thu, 2 Oct 2008 21:32:08 +0000 (+0200) Subject: Fix handling of Newline and Tab in strings in the bootstrap parser. X-Git-Url: https://repo.or.cz/w/cl-opossum.git/commitdiff_plain/3386ce70ea006396e73ad42e2a857d53736498b1 Fix handling of Newline and Tab in strings in the bootstrap parser. Signed-off-by: Utz-Uwe Haus --- diff --git a/pegparser-boot.lisp b/pegparser-boot.lisp index 8f6b602..5bfa3a2 100644 --- a/pegparser-boot.lisp +++ b/pegparser-boot.lisp @@ -189,7 +189,6 @@ (defun |metapeg_action341| (data) (let* ((action-sans-{ (second data)) (action-code (coerce - ;; FIXME: fix escapes (opossum::fix-escape-sequences (mapcar #'second action-sans-{)) 'string)) @@ -199,13 +198,13 @@ `(,action-name ,action-code)) `(list ':action nil ',action-name))) -(defun |metapeg_action340| (data) `(opossum::match-string ,(opossum::char-list-to-string (mapcar #'second (second data)))) ) +(defun |metapeg_action340| (data) `(opossum::match-string ,(coerce (opossum::fix-escape-sequences (mapcar #'second (second data))) 'string))) (defun |metapeg_action339| (data) ;; FIXME: this is character-class matching and needs to use cl-ppcre `(opossum::match-char-class ,(coerce (mapcar #'second (second data)) 'string))) -(defun |metapeg_action338| (data) (opossum::char-list-to-string (first data)) ) +(defun |metapeg_action338| (data) (coerce (first data) 'string) ) (defun |metapeg_action337| (data) (third data) ) (defun |metapeg_action336| (data) (declare (ignore data)) `(opossum::match-any-char) ) (defun |metapeg_action335| (data) (first data) )