[cl-ppcre-devel] Warning from CMUCL 19a about CL-PPCRE 0.9.0 usage
Edi Weitz
edi at agharta.de
Sun Nov 21 15:10:47 UTC 2004
On Fri, 19 Nov 2004 14:05:11 -0600, Kick Damien-DKICK1 <DKICK1 at motorola.com> wrote:
> I'm seeing some warnings from CMUCL that I don't understand. Here
> is the warning the simplest code I've written at the moment that
> produces the warning:
>
> (defun flurp (line)
> (let (delta)
> (register-groups-bind (delta-str)
> ('(:sequence (:register (:greedy-repetition 1 nil :digit-class)))
> line)
> (setq delta (parse-integer delta-str)))))
>
> and the warning:
>
> ; In: DEFUN FLURP
>
> ; (REGISTER-GROUPS-BIND (DELTA-STR) ('# LINE) (SETQ DELTA #))
> ; --> LET MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL FUNCTION WHEN COND IF PROGN
> ; --> LET* LET
> ; ==>
> ; (IF #:START-INDEX5
> ; (FUNCALL #:SUBSTR-FN6 #:TARGET-STRING0 #:START-INDEX5 #)
> ; NIL)
> ; Warning: This is not a (VALUES &OPTIONAL BASE-STRING &REST T):
> ; NIL
> ; ; [Last message occurs 2 times]
CMUCL is clever, it knows that the first argument to PARSE-INTEGER
must be a string but in your function FLURP it is possible that
DELTA-STR is NIL (if there's no match). Thus the warning.
The form you're seeing in the warning is part of the macro expansion
of REGISTER-GROUPS-BINDS, it's the part where DELTA-STR is finally
computed.
Does that help?
Cheers,
Edi.
More information about the Cl-ppcre-devel
mailing list