(cst2ast-uhhhh escape-contents) → escape
Function:
(defun cst2ast-uhhhh (escape-contents) (declare (xargs :guard (abnf::tree-listp escape-contents))) (let ((__function__ 'cst2ast-uhhhh)) (declare (ignorable __function__)) (b* (((unless (and (abnf::tree-listp escape-contents) (equal (len escape-contents) 4))) (reserrf "unexpected input to cst2ast-uhhhh")) (fringe (abnf::tree-list->string escape-contents)) ((unless (and (acl2::unsigned-byte-listp 8 fringe) (equal (len fringe) 4))) (reserrf "unexpected input to cst2ast-uhhhh 2")) (hex-digit-chars (acl2::nats=>chars fringe)) ((unless (and (str::hex-digit-char-list*p hex-digit-chars) (str::hex-digit-char-p (first hex-digit-chars)) (str::hex-digit-char-p (second hex-digit-chars)) (str::hex-digit-char-p (third hex-digit-chars)) (str::hex-digit-char-p (fourth hex-digit-chars)))) (reserrf "unexpected input to cst2ast-uhhhh 3"))) (make-escape-u :get (make-hex-quad :1st (make-hex-digit :get (first hex-digit-chars)) :2nd (make-hex-digit :get (second hex-digit-chars)) :3rd (make-hex-digit :get (third hex-digit-chars)) :4th (make-hex-digit :get (fourth hex-digit-chars)))))))
Theorem:
(defthm escape-resultp-of-cst2ast-uhhhh (b* ((escape (cst2ast-uhhhh escape-contents))) (escape-resultp escape)) :rule-classes :rewrite)