Find the first occurrence of any vl-genelement that isn't among the listed types.
(vl-genelement-findbad x allowed) → firstbad
This is useful for reusing the generic element parsing code in contexts where some of the items aren't allowed.
Theorem:
(defthm return-type-of-vl-genelement-findbad.firstbad (b* ((?firstbad (vl-genelement-findbad x allowed))) (iff (vl-genelement-p firstbad) firstbad)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-genblock-findbad.firstbad (b* ((?firstbad (vl-genblock-findbad x allowed))) (iff (vl-genelement-p firstbad) firstbad)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-genelementlist-findbad.firstbad (b* ((?firstbad (vl-genelementlist-findbad x allowed))) (iff (vl-genelement-p firstbad) firstbad)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-gencaselist-findbad.firstbad (b* ((?firstbad (vl-gencaselist-findbad x allowed))) (iff (vl-genelement-p firstbad) firstbad)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-genblocklist-findbad.firstbad (b* ((?firstbad (vl-genblocklist-findbad x allowed))) (iff (vl-genelement-p firstbad) firstbad)) :rule-classes :rewrite)