diff options
| author | Wilson Snyder | 2019-03-05 09:46:36 -0500 |
|---|---|---|
| committer | Wilson Snyder | 2019-03-05 09:47:00 -0500 |
| commit | c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38 (patch) | |
| tree | 57e687f78fb14768b441ebb75a9618e69510d80b | |
| parent | 9b93e3b0759d562989283eaecf32e075f984c18c (diff) | |
| download | emacs-c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38.tar.gz 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.
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 40 |
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 @@ | |||
| 121 | ;; | 121 | ;; |
| 122 | 122 | ||
| 123 | ;; This variable will always hold the version number of the mode | 123 | ;; This variable will always hold the version number of the mode |
| 124 | (defconst verilog-mode-version "2018-11-26-bb3814b-vpo-GNU" | 124 | (defconst verilog-mode-version "2019-03-05-e72ce53-vpo-GNU" |
| 125 | "Version of this Verilog mode.") | 125 | "Version of this Verilog mode.") |
| 126 | (defconst verilog-mode-release-emacs t | 126 | (defconst verilog-mode-release-emacs t |
| 127 | "If non-nil, this version of Verilog mode was released with Emacs itself.") | 127 | "If non-nil, this version of Verilog mode was released with Emacs itself.") |
| @@ -2786,7 +2786,7 @@ find the errors." | |||
| 2786 | (defconst verilog-behavioral-block-beg-re | 2786 | (defconst verilog-behavioral-block-beg-re |
| 2787 | (eval-when-compile (verilog-regexp-words '("initial" "final" "always" "always_comb" "always_latch" "always_ff" | 2787 | (eval-when-compile (verilog-regexp-words '("initial" "final" "always" "always_comb" "always_latch" "always_ff" |
| 2788 | "function" "task")))) | 2788 | "function" "task")))) |
| 2789 | (defconst verilog-coverpoint-re "\\w+\\s-*:\\s-*\\(coverpoint\\|cross\\constraint\\)" ) | 2789 | (defconst verilog-coverpoint-re "\\w+\\s*:\\s*\\(coverpoint\\|cross\\|constraint\\)") |
| 2790 | (defconst verilog-in-constraint-re ; keywords legal in constraint blocks starting a statement/block | 2790 | (defconst verilog-in-constraint-re ; keywords legal in constraint blocks starting a statement/block |
| 2791 | (eval-when-compile (verilog-regexp-words '("if" "else" "solve" "foreach")))) | 2791 | (eval-when-compile (verilog-regexp-words '("if" "else" "solve" "foreach")))) |
| 2792 | 2792 | ||
| @@ -6558,9 +6558,9 @@ Return >0 for nested struct." | |||
| 6558 | (t nil)))) | 6558 | (t nil)))) |
| 6559 | (skip-chars-forward " \t\n\f") | 6559 | (skip-chars-forward " \t\n\f") |
| 6560 | (while | 6560 | (while |
| 6561 | (cond | 6561 | (cond |
| 6562 | ((looking-at "/\\*") | 6562 | ((looking-at "/\\*") |
| 6563 | (progn | 6563 | (progn |
| 6564 | (setq h (point)) | 6564 | (setq h (point)) |
| 6565 | (goto-char (match-end 0)) | 6565 | (goto-char (match-end 0)) |
| 6566 | (if (search-forward "*/" nil t) | 6566 | (if (search-forward "*/" nil t) |
| @@ -8515,21 +8515,23 @@ Return an array of [outputs inouts inputs wire reg assign const]." | |||
| 8515 | (forward-char 1) | 8515 | (forward-char 1) |
| 8516 | (when (< paren sig-paren) | 8516 | (when (< paren sig-paren) |
| 8517 | (setq expect-signal nil rvalue nil))) ; ) that ends variables inside v2k arg list | 8517 | (setq expect-signal nil rvalue nil))) ; ) that ends variables inside v2k arg list |
| 8518 | ((looking-at "\\s-*\\(\\[[^]]+\\]\\)") | 8518 | ((looking-at "\\[") |
| 8519 | (goto-char (match-end 0)) | 8519 | (setq keywd (buffer-substring-no-properties |
| 8520 | (point) | ||
| 8521 | (progn (forward-sexp 1) (point)))) | ||
| 8520 | (cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3) | 8522 | (cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3) |
| 8521 | (setcar (cdr (cdr (cdr newsig))) | 8523 | (setcar (cdr (cdr (cdr newsig))) |
| 8522 | (if (verilog-sig-memory newsig) | 8524 | (if (verilog-sig-memory newsig) |
| 8523 | (concat (verilog-sig-memory newsig) | 8525 | (concat (verilog-sig-memory newsig) |
| 8524 | (match-string-no-properties 1)) | 8526 | keywd) |
| 8525 | (match-string-no-properties 1)))) | 8527 | keywd))) |
| 8526 | (vec ; Multidimensional | 8528 | (vec ; Multidimensional |
| 8527 | (setq multidim (cons vec multidim)) | 8529 | (setq multidim (cons vec multidim)) |
| 8528 | (setq vec (verilog-string-replace-matches | 8530 | (setq vec (verilog-string-replace-matches |
| 8529 | "\\s-+" "" nil nil (match-string-no-properties 1)))) | 8531 | "\\s-+" "" nil nil keywd))) |
| 8530 | (t ; Bit width | 8532 | (t ; Bit width |
| 8531 | (setq vec (verilog-string-replace-matches | 8533 | (setq vec (verilog-string-replace-matches |
| 8532 | "\\s-+" "" nil nil (match-string-no-properties 1)))))) | 8534 | "\\s-+" "" nil nil keywd))))) |
| 8533 | ;; Normal or escaped identifier -- note we remember the \ if escaped | 8535 | ;; Normal or escaped identifier -- note we remember the \ if escaped |
| 8534 | ((looking-at "\\s-*\\([a-zA-Z0-9`_$]+\\|\\\\[^ \t\n\f]+\\)") | 8536 | ((looking-at "\\s-*\\([a-zA-Z0-9`_$]+\\|\\\\[^ \t\n\f]+\\)") |
| 8535 | (goto-char (match-end 0)) | 8537 | (goto-char (match-end 0)) |
| @@ -8950,10 +8952,10 @@ Inserts the list of signals found." | |||
| 8950 | (forward-char 1) | 8952 | (forward-char 1) |
| 8951 | (or (search-forward "*)") | 8953 | (or (search-forward "*)") |
| 8952 | (error "%s: Unmatched (* *), at char %d" (verilog-point-text) (point)))) | 8954 | (error "%s: Unmatched (* *), at char %d" (verilog-point-text) (point)))) |
| 8953 | ;; On pins, parse and advance to next pin | 8955 | ;; On pins, parse and advance to next pin |
| 8954 | ;; Looking at pin, but *not* an // Output comment, or ) to end the inst | 8956 | ;; Looking at pin, but *not* an // Output comment, or ) to end the inst |
| 8955 | ((looking-at "\\s-*[a-zA-Z0-9`_$({}\\][^,]*") | 8957 | ((looking-at "\\s-*[a-zA-Z0-9`_$({}\\][^,]*") |
| 8956 | (goto-char (match-end 0)) | 8958 | (goto-char (match-end 0)) |
| 8957 | (setq verilog-read-sub-decls-gate-ios (or (car iolist) "input") | 8959 | (setq verilog-read-sub-decls-gate-ios (or (car iolist) "input") |
| 8958 | iolist (cdr iolist)) | 8960 | iolist (cdr iolist)) |
| 8959 | (verilog-read-sub-decls-expr | 8961 | (verilog-read-sub-decls-expr |
| @@ -9354,10 +9356,10 @@ Returns REGEXP and list of ( (signal_name connection_name)... )." | |||
| 9354 | templateno lineno) | 9356 | templateno lineno) |
| 9355 | tpl-sig-list)) | 9357 | tpl-sig-list)) |
| 9356 | (goto-char (match-end 0))) | 9358 | (goto-char (match-end 0))) |
| 9357 | ;; Regexp form?? | 9359 | ;; Regexp form?? |
| 9358 | ((looking-at | 9360 | ((looking-at |
| 9359 | ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last | 9361 | ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last |
| 9360 | "\\s-*\\.\\(\\([-a-zA-Z0-9`_$+@^.*?]\\|[][]\\|\\\\[()|]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)") | 9362 | "\\s-*\\.\\(\\([-a-zA-Z0-9`_$+@^.*?|]\\|[][]\\|\\\\[()|0-9]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)") |
| 9361 | (setq rep (match-string-no-properties 3)) | 9363 | (setq rep (match-string-no-properties 3)) |
| 9362 | (goto-char (match-end 0)) | 9364 | (goto-char (match-end 0)) |
| 9363 | (setq tpl-wild-list | 9365 | (setq tpl-wild-list |