Parses zero or more occurrences of '"," path' and returns a list of path AST nodes.
(parse-*-comma-path tokens) → (mv result-asts tokens-after-paths)
Function:
(defun parse-*-comma-path (tokens) (declare (xargs :guard (abnf::tree-listp tokens))) (let ((__function__ 'parse-*-comma-path)) (declare (ignorable __function__)) (b* ((tokens (abnf::tree-list-fix tokens)) ((when (endp tokens)) (mv nil tokens)) (tokens-after-comma-or-err (parse-symbol "," tokens)) ((when (reserrp tokens-after-comma-or-err)) (mv nil tokens)) ((mv first-path tokens-after-first-path) (parse-path tokens-after-comma-or-err)) ((unless (pathp first-path)) (mv nil tokens)) ((mv rest-paths tokens-after-rest-paths) (parse-*-comma-path (abnf::tree-list-fix tokens-after-first-path)))) (mv (cons first-path rest-paths) (abnf::tree-list-fix tokens-after-rest-paths)))))
Theorem:
(defthm path-listp-of-parse-*-comma-path.result-asts (b* (((mv ?result-asts ?tokens-after-paths) (parse-*-comma-path tokens))) (path-listp result-asts)) :rule-classes :rewrite)
Theorem:
(defthm tree-listp-of-parse-*-comma-path.tokens-after-paths (b* (((mv ?result-asts ?tokens-after-paths) (parse-*-comma-path tokens))) (abnf::tree-listp tokens-after-paths)) :rule-classes :rewrite)
Theorem:
(defthm len-of-parse-*-comma-path-<= (b* (((mv ?result-asts ?tokens-after-paths) (parse-*-comma-path tokens))) (<= (len tokens-after-paths) (len tokens))) :rule-classes :linear)