Recognizer for string-literal-char structures.
(string-literal-char-p x) → *
Function:
(defun string-literal-char-p (x) (declare (xargs :guard t)) (let ((__function__ 'string-literal-char-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :char)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (unicode-stringlit-char-p get)))) (t (and (eq (car x) :escape) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (escape-sequence-p get))))))))
Theorem:
(defthm consp-when-string-literal-char-p (implies (string-literal-char-p x) (consp x)) :rule-classes :compound-recognizer)