Fix handling of Newline and Tab in strings in the bootstrap parser.
authorUtz-Uwe Haus <lisp@uuhaus.de>
Thu, 2 Oct 2008 21:32:08 +0000 (2 23:32 +0200)
committerUtz-Uwe Haus <lisp@uuhaus.de>
Thu, 2 Oct 2008 21:32:08 +0000 (2 23:32 +0200)
Signed-off-by: Utz-Uwe Haus <lisp@uuhaus.de>
pegparser-boot.lisp

index 8f6b602..5bfa3a2 100644 (file)
 (defun |metapeg_action341| (data)
   (let* ((action-sans-{ (second data))
         (action-code (coerce
-                      ;; FIXME: fix escapes
                       (opossum::fix-escape-sequences
                        (mapcar #'second action-sans-{))
                       'string))
                           `(,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)  )