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

Edi Weitz edi at agharta.de
Mon Oct 10 14:16:45 UTC 2005


On Mon, 10 Oct 2005 20:43:17 +1100, Igor Plekhov <penguin at ocean.vvo.ru> wrote:

> Small file (aa.lisp) with examples from the cl-ppcre documentation:
>
> (defpackage :aa
>   (:use :common-lisp :cl-ppcre))
>
> (in-package :aa)
>
> (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))
>
> If I just load this file than all is ok.
> If I compile it first and then load aa.x86f (I use CMUCL) than it
> stops with error:
> Unknown token A-Z* in parse-tree
>    [Condition of type PPCRE-SYNTAX-ERROR]
>
> Restarts:
>   0: [CONTINUE] Return NIL from load of "aa.x86f".
>   1: [ABORT   ] Return to Top-Level.
>
> Debug  (type H for help)
>
> (CL-PPCRE::CONVERT-AUX #<unavailable-arg>)
>
> Why does it not work?

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.

Maybe you'll want to ask on the CMUCL mailing list.

Cheers,
Edi.



More information about the Cl-ppcre-devel mailing list