[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit 1a5c4454a7 111/244: support verilog
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit 1a5c4454a7 111/244: support verilog |
Date: |
Thu, 6 Jan 2022 02:58:54 -0500 (EST) |
branch: elpa/evil-matchit
commit 1a5c4454a74d59122b5eeffa33725aceecaa05d7
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
support verilog
---
README.org | 3 +-
evil-matchit-pkg.el | 2 +-
evil-matchit-verilog.el | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
evil-matchit.el | 9 ++++-
pkg.sh | 2 +-
5 files changed, 109 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 01d759f79b..0ac27a2e58 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (v2.1.7)
+* evil-matchit (v2.1.8)
[[http://melpa.org/#/evil-matchit][file:http://melpa.org/packages/evil-matchit-badge.svg]]
[[http://stable.melpa.org/#/evil-matchit][file:http://stable.melpa.org/packages/evil-matchit-badge.svg]]
@@ -26,6 +26,7 @@ Many modern languages are supported:
- SQL
- Laravel Blade Templating
- Vim script
+- Verilog
- Emacs email (mesage-mode)
This package uses Evil as its vi layer!
diff --git a/evil-matchit-pkg.el b/evil-matchit-pkg.el
index af1d5155f1..3b1b30756a 100644
--- a/evil-matchit-pkg.el
+++ b/evil-matchit-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-matchit" "2.1.7"
+(define-package "evil-matchit" "2.1.8"
"Vim matchit ported into Emacs (requires EVIL)")
diff --git a/evil-matchit-verilog.el b/evil-matchit-verilog.el
new file mode 100644
index 0000000000..b03a0b3c54
--- /dev/null
+++ b/evil-matchit-verilog.el
@@ -0,0 +1,98 @@
+;;; evil-matchit-verilog.el ---verilog plugin of evil-matchit
+
+;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+
+;; Author: Chen Bin <chenbin.sh@gmail.com>
+
+;; This file is not part of GNU Emacs.
+
+;;; License:
+
+;; This file is part of evil-matchit
+;;
+;; evil-matchit is free software: you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as published
+;; by the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; evil-matchit is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Code:
+
+;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
+;; but SDK don make you write less code, isn't it?
+;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
+(require 'evil-matchit-sdk)
+
+;; {{ Sample verilog code:
+;; module dff_lab;
+;; reg data,rst;
+;; // Connecting ports by name.(map)
+;; dff d1 (.qb(outb), .q(out),
+;; .clk(clk),.d(data),.rst(rst));
+;; // overriding module parameters
+;; defparam
+;; dff_lab.dff.n1.delay1 = 5 ,
+;; dff_lab.dff.n2.delay2 = 6 ;
+;; // full-path referencing is used
+;; // over-riding by using #(8,9) delay1=8..
+;; dff d2 #(8,9) (outc, outd, clk, outb, rst);
+;; // clock generator
+;; always clk = #10 ~clk ;
+;; // stimulus ... contd
+;; initial begin: stimuli // named block stimulus
+;; clk = 1; data = 1; rst = 0;
+;; #20 rst = 1;
+;; #20 data = 0;
+;; #600 $finish;
+;; end
+;; initial // hierarchy: downward path referencing
+;; begin
+;; #100 force dff.n2.rst = 0 ;
+;; #200 release dff.n2.rst;
+;; end
+;; endmodule
+;; }}
+
+;; should try next howto, the purpose is avoid missing any howto
+(defvar evilmi-verilog-extract-keyword-howtos
+ '(("^[
\t]*\\(while\\|module\\|primitive\\|case\\|function\\|specify\\|table\\)" 1)
+ ("^[
\t]*\\(endmodule\\|endprimitive\\|endcase\\|endfunction\\|endspecify\\|endtable\\)"
1)
+ ("^[ \t]*\\(if\\) .*[^; ][ \t]*$" 1) ; if ...; is one complete statement
+ ("\\(begin\\)[ \t]*\\(//.*\\)?[ \t]*$$" 1)
+ ("\\(begin\\):" 1)
+ ("^[ \t]*\\(else *\\(if\\)?\\).*" 1)
+ ("^[ \t]*end \\(else *\\(if\\)?\\).*" 1)
+ ("^[ \t]*\\(end\\|begin\\)[ \t]*\\(//.*\\)?[ \t]*$" 1)
+ ))
+
+(defvar evilmi-verilog-match-tags
+ '(("module" () "endmodule" "MONOGAMY")
+ ("primitive" () "endprimitive" "MONOGAMY")
+ ("case" () "endcase" "MONOGAMY")
+ ("function" () "endfunction" "MONOGAMY")
+ ("table" () "endtable" "MONOGAMY")
+ ("specify" () "endspecify" "MONOGAMY")
+ ("if" ("else" "else if") "end")
+ (("while" "begin") () "end")
+ ))
+
+
+;;;###autoload
+(defun evilmi-verilog-get-tag ()
+ (let* ((rlt (evilmi-sdk-get-tag evilmi-verilog-match-tags
evilmi-verilog-extract-keyword-howtos)))
+ rlt))
+
+;;;###autoload
+(defun evilmi-verilog-jump (rlt NUM)
+ (evilmi-sdk-jump rlt NUM evilmi-verilog-match-tags
evilmi-verilog-extract-keyword-howtos))
+
+(provide 'evil-matchit-verilog)
+;;; evil-matchit-verilog.el ends here
\ No newline at end of file
diff --git a/evil-matchit.el b/evil-matchit.el
index 0e80a4d3b1..2e42480edf 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
;; Author: Chen Bin <chenbin.sh@gmail.com>
;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 2.1.7
+;; Version: 2.1.8
;; Keywords: matchit vim evil
;; Package-Requires: ((evil "1.0.7"))
;;
@@ -341,6 +341,11 @@ If font-face-under-cursor is NOT nil, the quoted string is
being processed"
(autoload 'evilmi-sh-jump "evil-matchit-sh" nil)
(plist-put evilmi-plugins 'sh-mode '((evilmi-sh-get-tag evilmi-sh-jump)))
+ ;; verilog-mode
+ (autoload 'evilmi-verilog-get-tag "evil-matchit-verilog" nil)
+ (autoload 'evilmi-verilog-jump "evil-matchit-verilog" nil)
+ (plist-put evilmi-plugins 'verilog-mode '((evilmi-verilog-get-tag
evilmi-verilog-jump)))
+
;; Lua or any fine script
(autoload 'evilmi-script-get-tag "evil-matchit-script" nil)
(autoload 'evilmi-script-jump "evil-matchit-script" nil)
@@ -449,7 +454,7 @@ If font-face-under-cursor is NOT nil, the quoted string is
being processed"
(evilmi--operate-on-item NUM))))
;;;###autoload
-(defun evilmi-version() (interactive) (message "2.1.7"))
+(defun evilmi-version() (interactive) (message "2.1.8"))
;;;###autoload
(define-minor-mode evil-matchit-mode
diff --git a/pkg.sh b/pkg.sh
index 69e3291d81..b2a4bc257e 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-pkg=evil-matchit-2.1.7
+pkg=evil-matchit-2.1.8
mkdir $pkg
cp README.org $pkg
cp *.el $pkg
- [nongnu] elpa/evil-matchit 4efd9e0fac 064/244: use % in evil-visual-mode, (continued)
- [nongnu] elpa/evil-matchit 4efd9e0fac 064/244: use % in evil-visual-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 965efc080a 065/244: updated pkg.sh, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit acb89199d0 074/244: Fix matching chaining off end blocks, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 296c31f93d 073/244: Fix matching multiple arguments and varibles with underscores in do/end blocks., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 9a1b6ac1f9 076/244: can jump between brackets in visual-state #42, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 11352e24ff 083/244: support more pattern in lua-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e831d42aa5 085/244: relax regex for python matching, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 3c9d97f3d3 090/244: Merge pull request #60 from robbyoconnor/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 14e23187df 093/244: Put the melpa badges on the same line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 8b80b3df94 098/244: correct inner text-object in python-mode v2.1.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 1a5c4454a7 111/244: support verilog,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit ceb13ad1b3 131/244: use more generic when processing C, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit df642d953d 139/244: add a few APIs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 5ff747a1ef 125/244: When jumping find the first matching keyword in the current line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 18cf34bc62 150/244: Update evil-matchit-verilog.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit f87f03bbf4 169/244: add generic rule to jump between brackets, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 00ab601346 161/244: support "define_method(method) do |*args|", ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 77c4a0a1d9 175/244: Ocaml: double semicolon matches let., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2ea15db747 185/244: improve ruby matching algorithm (fixed item 1 of #114), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e44de538b9 196/244: clean code & doc, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 574d3c4e45 209/244: emacs 24.4 does not have font-lock-ensure, ELPA Syncer, 2022/01/06