[cl-ppcre-devel] define-parse-tree-synonym
Igor Plekhov
penguin at ocean.vvo.ru
Tue Oct 11 04:02:23 UTC 2005
On Mon, 10 Oct, 2005 at 16:16:45 +0200, Edi Weitz wrote:
>
> > (define-parse-tree-synonym a-z
> > (:char-class (:range #\a #\z) (:range #\a #\z)))
> >
> > (define-parse-tree-synonym a-z*
> > (:greedy-repetition 0 nil a-z))
> >
> > (defun ascii-char-tester (string)
> > (scan '(:sequence :start-anchor a-z* :end-anchor)
> > string))
>
> I just checked and I see the same error message. However, your
> example works fine with LispWorks, AllegroCL, SBCL, and CLISP. I
> suspect this might be a bug in CMUCL - note the EVAL-WHEN that's part
> of the definition of DEFINE-PARSE-TREE-SYNONYM. It looks to me as if
> the code isn't executed at load time although it should.
I have searched Google... It is certainly a bug in CMUCL :-(
As a workaround it can be written as:
(defparameter a-z '(:char-class (:range #\a #\z) (:range #\a #\z)))
(defparameter a-z* `(:greedy-repetition 0 nil ,a-z))
(defun ascii-char-tester (string)
(scan `(:sequence :start-anchor ,a-z* :end-anchor)
string))
--
Registered Linux User #124759
More information about the Cl-ppcre-devel
mailing list