[cl-ppcre-devel] define-parse-tree-synonym

Edi Weitz edi at agharta.de
Tue Oct 11 06:55:52 UTC 2005


On Tue, 11 Oct 2005 15:02:23 +1100, Igor Plekhov <penguin at ocean.vvo.ru> wrote:

> I have searched Google...  It is certainly a bug in CMUCL :-(

Too bad.  Do you have a URL?  Will they fix it?

> 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))

But that way you'll lose the constantness of the regular expression so
CL-PPCRE won't be able to use the compiler macros to pre-compile the
regular expression.  (Just in case you're concerned about
performance.)

Cheers,
Edi.



More information about the Cl-ppcre-devel mailing list