The grammar of C, in ACL2.
We use our verified grammar parser and our abstractor
to turn the grammar in the
We use ACL2::add-const-to-untranslate-preprocess to keep this constant unexpanded in output.
We show that the grammar is well-formed, closed, and ASCII.
Function:
(defun untranslate-preprocess-*grammar* (acl2::term acl2::wrld) (if (equal acl2::term (list 'quote *grammar*)) '*grammar* (abnf::untranslate-preprocess-*grammar* acl2::term acl2::wrld)))
Theorem:
(defthm rulelist-wfp-of-*grammar* (abnf::rulelist-wfp *grammar*))
Theorem:
(defthm rulelist-closedp-of-*grammar* (abnf::rulelist-closedp *grammar*))
Theorem:
(defthm ascii-only-*grammar* (abnf::rulelist-in-termset-p *grammar* (acl2::integers-from-to 0 127)))