Lexes the Unicode code points
(lexemize-leo leo-codepoints) → leo-lexemes
A lexeme is a token, comment, or whitespace.
If the input cannot be fully lexed, a reserrp is returned.
Function:
(defun lexemize-leo (leo-codepoints) (declare (xargs :guard (nat-listp leo-codepoints))) (let ((__function__ 'lexemize-leo)) (declare (ignorable __function__)) (b* (((mv trees rest-input) (lex-*-lexeme leo-codepoints)) ((when (reserrp trees)) (reserrf (cons :unexpected-reserrp trees))) ((unless (null rest-input)) (reserrf (cons :cannot-fully-lex (cons trees rest-input))))) trees)))
Theorem:
(defthm tree-list-resultp-of-lexemize-leo (b* ((leo-lexemes (lexemize-leo leo-codepoints))) (abnf::tree-list-resultp leo-lexemes)) :rule-classes :rewrite)