Lexes the UTF-8
(lexemize-pfcs-from-string pfcs-string) → pfcs-lexemes
A lexeme is a token or whitespace.
Since ACL2 strings are sequences of characters with codes from 0 to 255,
If the input cannot be fully lexed, a reserrp is returned.
Function:
(defun lexemize-pfcs-from-string (pfcs-string) (declare (xargs :guard (stringp pfcs-string))) (let ((__function__ 'lexemize-pfcs-from-string)) (declare (ignorable __function__)) (b* (((unless (stringp pfcs-string)) (reserrf (cons :not-a-string pfcs-string))) (octets (string=>nats pfcs-string))) (lexemize-pfcs-from-bytes octets))))
Theorem:
(defthm tree-list-resultp-of-lexemize-pfcs-from-string (b* ((pfcs-lexemes (lexemize-pfcs-from-string pfcs-string))) (abnf::tree-list-resultp pfcs-lexemes)) :rule-classes :rewrite)