Check whether an input is allowed for the current schema.
This macro produces a term,
to be bound to
Macro:
(defmacro schemalg-check-allowed-input (input? &rest schemas-allowed) (declare (xargs :guard (and (symbolp input?) (keyword-listp schemas-allowed)))) (cons 'if (cons (cons 'and (cons input? (cons (cons 'not (cons (cons 'member-eq (cons 'schema (cons (cons 'list schemas-allowed) 'nil))) 'nil)) 'nil))) (cons (cons 'er-soft+ (cons 'ctx (cons 't (cons 'nil (cons '"The ~x0 input can be present only if ~ the :SCHEMA input is ~v1, but that input is ~x2 instead." (cons (b* ((input?-string (symbol-name input?)) (input-string (subseq input?-string 0 (1- (length input?-string))))) (intern input-string "KEYWORD")) (cons (cons 'list schemas-allowed) '(schema)))))))) '((value nil))))))