Commit c5c2acd1 authored by Wilson Snyder's avatar Wilson Snyder

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.
parent 9b93e3b0
Pipeline #922 passed with stage
in 51 minutes and 14 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment