emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c5c2acd: Fix regular-expression glitches and typos.


From: Wilson Snyder
Subject: [Emacs-diffs] master c5c2acd: Fix regular-expression glitches and typos. Update verilog-mode from upstream.
Date: Tue, 5 Mar 2019 09:47:09 -0500 (EST)

branch: master
commit c5c2acd1c605243da7f8b9c4cd41ebdb0e9a7a38
Author: Wilson Snyder <address@hidden>
Commit: Wilson Snyder <address@hidden>

    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.
---
 lisp/progmodes/verilog-mode.el | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index e100337..10601df 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-*\\.\\(\\(address@hidden|[][]\\|\\\\[()|]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
+              ;; Regexp form??
+              ((looking-at
+                ;; Regexp bug in XEmacs disallows ][ inside [], and wants + 
last
+                
"\\s-*\\.\\(\\(address@hidden|]\\|[][]\\|\\\\[()|0-9]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
               (setq rep (match-string-no-properties 3))
               (goto-char (match-end 0))
               (setq tpl-wild-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]