Map a token that is a function specifier to the corresponding function specifier.
Function:
(defun token-to-function-specifier (token) (declare (xargs :guard (tokenp token))) (declare (xargs :guard (token-function-specifier-p token))) (let ((__function__ 'token-to-function-specifier)) (declare (ignorable __function__)) (cond ((equal token (token-keyword "inline")) (fun-spec-inline)) ((equal token (token-keyword "_Noreturn")) (fun-spec-noreturn)) ((equal token (token-keyword "__inline")) (fun-spec-__inline)) ((equal token (token-keyword "__inline__")) (fun-spec-__inline__)) (t (prog2$ (impossible) (irr-fun-spec))))))
Theorem:
(defthm fun-specp-of-token-to-function-specifier (b* ((funspec (token-to-function-specifier token))) (fun-specp funspec)) :rule-classes :rewrite)