[cl-ppcre-devel] Problems with a regexp using CL-PPCRE 0.7.4

Edi Weitz edi at agharta.de
Thu Mar 11 09:39:32 UTC 2004


Hi Damien!

Sorry for the late reply - I was on vacation. I didn't try your whole
example but the regex that you mentioned seems to be OK to me. From
your backtrace it looks like the error occurs when CL-PPCRE is trying
to create the scanner (at the moment when it creates the Boyer-Moore
matcher).

Some ideas:

1. Your methods for the generic function EXPECT don't have congruent
   lambda lists:

     > ;; expected is a parse-tree
     > (defmethod expect ((expected t) (spawn stream)
     >                    &key (echo *standard-output*)
     >                         case-insensitive-mode
     >                         multi-line-mode
     >                         single-line-mode
     >                         extended-mode
     >                         destructive)
     >   (expect (create-scanner expected
     >                           :case-insensitive-mode case-insensitive-mode
     >                           :multi-line-mode multi-line-mode
     >                           :single-line-mode single-line-mode
     >                           :extended-mode extended-mode
     >                           :destructive destructive)
     >           spawn :echo echo))
     >
     > ;; expected is a scanner
     > (defmethod expect ((expected function) (spawn extensions::process)
     >                    &key (echo *standard-output*))
     >   (expect expected (process-pty spawn) :echo echo))

   This can lead to incosistent behaviour of all sorts, so you should
   change that first and see if it makes a difference.

2. If that doesn't help you might want to try the whole thing again
   with CL-PPCRE:*USE-BMH-MATCHERS* set to NIL globally. Do you still
   get an error? Is it different?

3. Your regular expression is constant and therefore may not be
   modified. However, it /will/ be modified if CL-PPCRE:CREATE-SCANNER
   is called with a true keyword argument for DESTRUCTIVE. This could
   happen due to the incongruent lambda lists mentioned above or due
   to a bug in CL-PPCRE. Try to make sure to always call
   CREATE-SCANNER with DESTRUCTIVE set to NIL or to always provide a
   fresh parse tree.

Let me know if this helps or if you need further assistance with this
problem.

Thanks for your report,
Edi.




More information about the Cl-ppcre-devel mailing list