Add print-object methods for some regex classes.
This commit is contained in:
@ -367,7 +367,7 @@ zero-length assertion."))
|
|||||||
ends with wrapped into a STR object, otherwise NIL.
|
ends with wrapped into a STR object, otherwise NIL.
|
||||||
OLD-CASE-INSENSITIVE-P is the CASE-INSENSITIVE-P slot of the last STR
|
OLD-CASE-INSENSITIVE-P is the CASE-INSENSITIVE-P slot of the last STR
|
||||||
collected or :VOID if no STR has been collected yet. (This is a helper
|
collected or :VOID if no STR has been collected yet. (This is a helper
|
||||||
function called by END-STRIN.)"))
|
function called by END-STRING.)"))
|
||||||
|
|
||||||
(defmethod end-string-aux ((str str)
|
(defmethod end-string-aux ((str str)
|
||||||
&optional (old-case-insensitive-p :void))
|
&optional (old-case-insensitive-p :void))
|
||||||
|
|||||||
@ -108,6 +108,10 @@ must appear after this repetition.")
|
|||||||
register."))
|
register."))
|
||||||
(:documentation "REPETITION objects represent repetitions of regexes."))
|
(:documentation "REPETITION objects represent repetitions of regexes."))
|
||||||
|
|
||||||
|
(defmethod print-object ((repetition repetition) stream)
|
||||||
|
(print-unreadable-object (repetition stream :type t :identity t)
|
||||||
|
(princ (regex repetition) stream)))
|
||||||
|
|
||||||
(defclass register (regex)
|
(defclass register (regex)
|
||||||
((regex :initarg :regex
|
((regex :initarg :regex
|
||||||
:accessor regex
|
:accessor regex
|
||||||
@ -122,6 +126,10 @@ This is the index into *REGS-START* and *REGS-END*.")
|
|||||||
:documentation "Name of this register or NIL."))
|
:documentation "Name of this register or NIL."))
|
||||||
(:documentation "REGISTER objects represent register groups."))
|
(:documentation "REGISTER objects represent register groups."))
|
||||||
|
|
||||||
|
(defmethod print-object ((register register) stream)
|
||||||
|
(print-unreadable-object (register stream :type t :identity t)
|
||||||
|
(princ (regex register) stream)))
|
||||||
|
|
||||||
(defclass standalone (regex)
|
(defclass standalone (regex)
|
||||||
((regex :initarg :regex
|
((regex :initarg :regex
|
||||||
:accessor regex
|
:accessor regex
|
||||||
@ -181,6 +189,10 @@ string because the SCAN function has done this already.")
|
|||||||
STR which starts END-STRING (a slot of MATCHER)."))
|
STR which starts END-STRING (a slot of MATCHER)."))
|
||||||
(:documentation "STR objects represent string."))
|
(:documentation "STR objects represent string."))
|
||||||
|
|
||||||
|
(defmethod print-object ((str str) stream)
|
||||||
|
(print-unreadable-object (str stream :type t :identity t)
|
||||||
|
(princ (str str) stream)))
|
||||||
|
|
||||||
(defclass anchor (regex)
|
(defclass anchor (regex)
|
||||||
((startp :initarg :startp
|
((startp :initarg :startp
|
||||||
:reader startp
|
:reader startp
|
||||||
|
|||||||
Reference in New Issue
Block a user