;;
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "2018-11-26-bb3814b-vpo-GNU"
+(defconst verilog-mode-version "2019-03-05-e72ce53-vpo-GNU"
"Version of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
(defconst verilog-behavioral-block-beg-re
(eval-when-compile (verilog-regexp-words '("initial" "final" "always" "always_comb" "always_latch" "always_ff"
"function" "task"))))
-(defconst verilog-coverpoint-re "\\w+\\s-*:\\s-*\\(coverpoint\\|cross\\constraint\\)" )
+(defconst verilog-coverpoint-re "\\w+\\s*:\\s*\\(coverpoint\\|cross\\|constraint\\)")
(defconst verilog-in-constraint-re ; keywords legal in constraint blocks starting a statement/block
(eval-when-compile (verilog-regexp-words '("if" "else" "solve" "foreach"))))
(t nil))))
(skip-chars-forward " \t\n\f")
(while
- (cond
- ((looking-at "/\\*")
- (progn
+ (cond
+ ((looking-at "/\\*")
+ (progn
(setq h (point))
(goto-char (match-end 0))
(if (search-forward "*/" nil t)
(forward-char 1)
(when (< paren sig-paren)
(setq expect-signal nil rvalue nil))) ; ) that ends variables inside v2k arg list
- ((looking-at "\\s-*\\(\\[[^]]+\\]\\)")
- (goto-char (match-end 0))
+ ((looking-at "\\[")
+ (setq keywd (buffer-substring-no-properties
+ (point)
+ (progn (forward-sexp 1) (point))))
(cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3)
(setcar (cdr (cdr (cdr newsig)))
(if (verilog-sig-memory newsig)
(concat (verilog-sig-memory newsig)
- (match-string-no-properties 1))
- (match-string-no-properties 1))))
+ keywd)
+ keywd)))
(vec ; Multidimensional
(setq multidim (cons vec multidim))
(setq vec (verilog-string-replace-matches
- "\\s-+" "" nil nil (match-string-no-properties 1))))
+ "\\s-+" "" nil nil keywd)))
(t ; Bit width
(setq vec (verilog-string-replace-matches
- "\\s-+" "" nil nil (match-string-no-properties 1))))))
+ "\\s-+" "" nil nil keywd)))))
;; Normal or escaped identifier -- note we remember the \ if escaped
((looking-at "\\s-*\\([a-zA-Z0-9`_$]+\\|\\\\[^ \t\n\f]+\\)")
(goto-char (match-end 0))
(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))
+ ;; 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
templateno lineno)
tpl-sig-list))
(goto-char (match-end 0)))
- ;; Regexp form??
- ((looking-at
- ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last
- "\\s-*\\.\\(\\([-a-zA-Z0-9`_$+@^.*?]\\|[][]\\|\\\\[()|]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
+ ;; Regexp form??
+ ((looking-at
+ ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last
+ "\\s-*\\.\\(\\([-a-zA-Z0-9`_$+@^.*?|]\\|[][]\\|\\\\[()|0-9]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
(setq rep (match-string-no-properties 3))
(goto-char (match-end 0))
(setq tpl-wild-list