summaryrefslogtreecommitdiff
path: root/lisp/progmodes/verilog-mode.el
diff options
context:
space:
mode:
authorWilson Snyder <wsnyder@wsnyder.org>2019-03-05 09:46:36 -0500
committerWilson Snyder <wsnyder@wsnyder.org>2019-03-05 09:47:00 -0500
commitc5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38 (patch)
tree57e687f78fb14768b441ebb75a9618e69510d80b /lisp/progmodes/verilog-mode.el
parent9b93e3b0759d562989283eaecf32e075f984c18c (diff)
downloademacs-c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38.tar.gz
emacs-c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38.tar.bz2
emacs-c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38.zip
Fix regular-expression glitches and typos. Update verilog-mode from upstream.
* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix AUTO vectors with double brackets, msg2839. (verilog-read-auto-template-middle): Fix AUTO_TEMPLATE with regexp capture group reference, but1379. Reported by David Rogoff.
Diffstat (limited to 'lisp/progmodes/verilog-mode.el')
-rw-r--r--lisp/progmodes/verilog-mode.el40
1 files changed, 21 insertions, 19 deletions
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index e1003378b2e..10601dfc6a2 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -121,7 +121,7 @@
;;
;; 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.")
@@ -2786,7 +2786,7 @@ find the errors."
(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"))))
@@ -6558,9 +6558,9 @@ Return >0 for nested struct."
(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)
@@ -8515,21 +8515,23 @@ Return an array of [outputs inouts inputs wire reg assign const]."
(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))
@@ -8950,10 +8952,10 @@ Inserts the list of signals found."
(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
@@ -9354,10 +9356,10 @@ Returns REGEXP and list of ( (signal_name connection_name)... )."
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