Get the kind (tag) of a token structure.
(token-kind x) → kind
Function:
(defun token-kind$inline (x) (declare (xargs :guard (tokenp x))) (let ((__function__ 'token-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :keyword)) :keyword) ((eq (car x) :ident) :ident) ((eq (car x) :const) :const) ((eq (car x) :string) :string) (t :punctuator)) :exec (car x))))
Theorem:
(defthm token-kind-possibilities (or (equal (token-kind x) :keyword) (equal (token-kind x) :ident) (equal (token-kind x) :const) (equal (token-kind x) :string) (equal (token-kind x) :punctuator)) :rule-classes ((:forward-chaining :trigger-terms ((token-kind x)))))