Lexes the bytes of
(tokenize-pfcs pfcs-string) → pfcs-lexemes
The returned trees are for rulenames
Function:
(defun tokenize-pfcs (pfcs-string) (declare (xargs :guard (stringp pfcs-string))) (let ((__function__ 'tokenize-pfcs)) (declare (ignorable __function__)) (b* ((lexeme-trees-result (lexemize-pfcs-from-string pfcs-string)) ((when (reserrp lexeme-trees-result)) (reserrf "problem lexing pfcs-string")) (subtoken-trees (filter-and-reduce-lexeme-tree-to-subtoken-trees lexeme-trees-result)) ((when (reserrp subtoken-trees)) (reserrf "problem with structure of lexeme tree"))) subtoken-trees)))
Theorem:
(defthm tree-list-resultp-of-tokenize-pfcs (b* ((pfcs-lexemes (tokenize-pfcs pfcs-string))) (abnf::tree-list-resultp pfcs-lexemes)) :rule-classes :rewrite)