Parse
(vl-parse-sequence-port-item &key (tokstream 'tokstream)
(config 'config))
→
(mv errmsg? value new-tokstream)sequence_port_item ::= { attribute_instance }
[ 'local' [ sequence_lvar_port_direction ] ]
sequence_formal_type
formal_port_identifier {variable_dimension}
[ '=' sequence_actual_arg ]
sequence_lvar_port_direction ::= 'input' | 'inout' | 'output'
formal_port_identifier ::= identifier
Function:
(defun vl-parse-sequence-port-item-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-sequence-port-item)) (declare (ignorable __function__)) (seq tokstream (atts := (vl-parse-0+-attribute-instances)) (when (vl-is-token? :vl-kwd-local) (local := (vl-match)) (dir := (vl-parse-optional-port-direction))) ((type . name) := (vl-parse-property-formal-type-and-id)) (dims := (vl-parse-0+-variable-dimensions)) (when (vl-is-token? :vl-equalsign) (:= (vl-match)) (arg := (vl-parse-property-actual-arg (vl-idtoken->name name)))) (return (make-vl-propport :name (vl-idtoken->name name) :localp (if local t nil) :dir (or dir :vl-input) :type (vl-datatype-update-udims dims type) :arg (or arg (make-vl-propactual-blank :name (vl-idtoken->name name))) :atts atts :loc (vl-token->loc name))))))
Theorem:
(defthm vl-parse-sequence-port-item-fails-gracefully (implies (mv-nth 0 (vl-parse-sequence-port-item)) (not (mv-nth 1 (vl-parse-sequence-port-item)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-sequence-port-item (iff (vl-warning-p (mv-nth 0 (vl-parse-sequence-port-item))) (mv-nth 0 (vl-parse-sequence-port-item))))
Theorem:
(defthm vl-parse-sequence-port-item-result (implies (and t) (equal (vl-propport-p (mv-nth 1 (vl-parse-sequence-port-item))) (not (mv-nth 0 (vl-parse-sequence-port-item))))))
Theorem:
(defthm vl-parse-sequence-port-item-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-sequence-port-item))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-sequence-port-item))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-sequence-port-item))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))