Match an exact literal string.
(vl-read-literal string echars) → (mv prefix remainder)
Function:
(defun vl-read-literal$inline (string echars) (declare (type string string)) (declare (xargs :guard (vl-echarlist-p echars))) (declare (xargs :guard (not (equal string "")))) (let ((__function__ 'vl-read-literal)) (declare (ignorable __function__)) (if (vl-matches-string-p string echars) (let ((strlen (length (string-fix string)))) (mv (first-n strlen echars) (rest-n strlen echars))) (mv nil echars))))
Theorem:
(defthm vl-echarlist->chars-of-prefix-of-vl-read-literal (b* (((mv prefix ?remainder) (vl-read-literal string echars))) (implies prefix (equal (vl-echarlist->chars prefix) (explode string)))))
Theorem:
(defthm vl-echarlist->string-of-prefix-of-vl-read-literal (b* (((mv prefix ?remainder) (vl-read-literal string echars))) (implies prefix (equal (vl-echarlist->string prefix) (string-fix string)))))