Function: verilog-read-sub-decls-gate
verilog-read-sub-decls-gate is a byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-read-sub-decls-gate SUBMODDECLS PAR-VALUES COMMENT SUBMOD END-INST-POINT)
Documentation
For verilog-read-sub-decls, read lines of UDP gate decl until none match.
Inserts the list of signals found.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
;;(verilog-read-sub-decls-line (verilog-decls-new nil nil nil nil nil nil nil nil nil) nil "Cmt")
(defun verilog-read-sub-decls-gate (submoddecls par-values comment submod end-inst-point)
"For `verilog-read-sub-decls', read lines of UDP gate decl until none match.
Inserts the list of signals found."
(save-excursion
(let ((iolist (cdr (assoc submod verilog-gate-ios))))
(while (< (point) end-inst-point)
;; Get primitive's signal name, as will never have port, and no trailing )
(cond ((looking-at "//")
(search-forward "\n"))
((looking-at "/\\*")
(or (search-forward "*/")
(error "%s: Unmatched /* */, at char %d" (verilog-point-text) (point))))
((looking-at "(\\*")
;; To advance past either "(*)" or "(* ... *)" don't forward past first *
(forward-char 1)
(or (search-forward "*)")
(error "%s: Unmatched (* *), at char %d" (verilog-point-text) (point))))
;; On pins, parse and advance to next pin
;; Looking at pin, but *not* an // Output comment, or ) to end the inst
((looking-at "\\s-*[a-zA-Z0-9`_$({}\\][^,]*")
(goto-char (match-end 0))
(setq verilog-read-sub-decls-gate-ios (or (car iolist) "input")
iolist (cdr iolist))
(verilog-read-sub-decls-expr
submoddecls par-values comment "primitive_port"
(match-string-no-properties 0)))
(t
(forward-char 1)
(skip-syntax-forward " ")))))))