Lexes the UTF-8
(lexemize-leo-from-string leo-string) → leo-lexemes
A lexeme is a token, comment, 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-leo-from-string (leo-string) (declare (xargs :guard (stringp leo-string))) (let ((__function__ 'lexemize-leo-from-string)) (declare (ignorable __function__)) (b* (((unless (stringp leo-string)) (reserrf (cons :not-a-string leo-string))) (octets (string=>nats leo-string))) (lexemize-leo-from-bytes octets))))
Theorem:
(defthm tree-list-resultp-of-lexemize-leo-from-string (b* ((leo-lexemes (lexemize-leo-from-string leo-string))) (abnf::tree-list-resultp leo-lexemes)) :rule-classes :rewrite)