[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/wisi 0635f1a 14/35: * packages/wisi: Use lexical bindin
From: |
Stefan Monnier |
Subject: |
[elpa] externals/wisi 0635f1a 14/35: * packages/wisi: Use lexical binding. Fix dos EOL. Fix EOB markers |
Date: |
Sat, 28 Nov 2020 14:47:52 -0500 (EST) |
branch: externals/wisi
commit 0635f1a8776d7deaf306ccf871b6e01d8d2e51d3
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* packages/wisi: Use lexical binding. Fix dos EOL. Fix EOB markers
* packages/wisi/wisi-compat-24.2.el: Use lexical-binding. Fix EOB
convention.
* packages/wisi/wisi-compile.el: Use lexical-binding. Fix EOB convention.
(wisi-compile-grammar): Declare dyn-bound variables.
* packages/wisi/wisi.el: Use lexical-binding. Fix EOB convention.
(wisi-number-p): Remove unused var `end'.
---
NEWS | 0
README | 0
wisi-compat-24.2.el | 7 +++----
wisi-compile.el | 21 +++++++++++++++------
wisi-parse.el | 4 ++--
wisi.el | 31 +++++++++++++++----------------
6 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/NEWS b/NEWS
old mode 100755
new mode 100644
diff --git a/README b/README
old mode 100755
new mode 100644
diff --git a/wisi-compat-24.2.el b/wisi-compat-24.2.el
old mode 100755
new mode 100644
index e4300d7..03bae80
--- a/wisi-compat-24.2.el
+++ b/wisi-compat-24.2.el
@@ -1,6 +1,6 @@
-;;; wisi-compat-24.2.el --- Implement current Emacs features not present in
Emacs 24.2
+;;; wisi-compat-24.2.el --- Implement current Emacs features not present in
Emacs 24.2 -*- lexical-binding:t -*-
-;; Copyright (C) 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -31,5 +31,4 @@ buffer-local wherever it is set."
)
(provide 'wisi-compat-24.2)
-
-;; end of file
+;;; wisi-compat-24.2.el ends here
diff --git a/wisi-compile.el b/wisi-compile.el
old mode 100755
new mode 100644
index 2b8807a..463fb01
--- a/wisi-compile.el
+++ b/wisi-compile.el
@@ -1,4 +1,4 @@
-;;; Grammar compiler for the wisent LALR parser, integrating Wisi OpenToken
output.
+;;; Grammar compiler for the wisent LALR parser, integrating Wisi OpenToken
output. -*- lexical-binding:t -*-
;;
;; Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc.
;;
@@ -135,6 +135,13 @@ side-effects only."
(list (car (aref actn 2)) action-symbol n)))
(defun wisi-compile-grammar (grammar)
+ ;; FIXME: This docstring is full of ambiguities making it unclear whether
+ ;; we're talking for example about data that includes the symbol `nonterm' as
+ ;; opposed to data that includes some non terminal object we denote
+ ;; with the meta-variable "nonterm".
+ ;; The convention in Elisp's docstrings is to use all-caps for metavariables
+ ;; (and `...' quoting as opposed to the '... quoting used below in a few
+ ;; spots).
"Compile the LALR(1) GRAMMAR; return the automaton for wisi-parse.
GRAMMAR is a list TERMINALS NONTERMS ACTIONS GOTOS, where:
@@ -169,10 +176,10 @@ state.
The automaton is an array with 3 elements:
parser-actions is a copy of the input ACTIONS, with reduction
-actions replaced by a list (nonterm action-symbol token-count),
-where `nonterm' is a symbol from NONTERMS, and is the
-non-terminal to reduce to, token-count is the number of tokens in
-the reduction, action-symbol is nil if there is no user action,
+actions replaced by a list (NONTERM ACTION-SYMBOL TOKEN-COUNT),
+where NONTERM is a symbol from NONTERMS, and is the
+non-terminal to reduce to, TOKEN-COUNT is the number of tokens in
+the reduction, ACTION-SYMBOL is nil if there is no user action,
or a symbol from semantic-actions (below).
gotos is a copy of GOTOS.
@@ -180,6 +187,8 @@ gotos is a copy of GOTOS.
semantic-actions is an obarray containing functions that
implement the user action for each nonterminal; the function
names have the format nonterm:index."
+ (defvar nrules) (defvar ptable) (defvar rcode) (defvar rlhs) (defvar tags)
+ (defvar token-list) (defvar var-list)
(let (nrules ptable rcode rlhs tags token-list var-list)
(wisent-parse-grammar;; set global vars used by wisent-semantic-action
(cons
@@ -214,4 +223,4 @@ names have the format nonterm:index."
(provide 'wisi-compile)
-;;;; end of file
+;;; wisi-compile.el ends here
diff --git a/wisi-parse.el b/wisi-parse.el
old mode 100755
new mode 100644
index 852ecdc..4fa300e
--- a/wisi-parse.el
+++ b/wisi-parse.el
@@ -1,6 +1,6 @@
-;;; wisi-parse.el --- Wisi parser
+;;; wisi-parse.el --- Wisi parser -*- lexical-binding:t -*-
-;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/wisi.el b/wisi.el
old mode 100755
new mode 100644
index 5a7c17d..a748f62
--- a/wisi.el
+++ b/wisi.el
@@ -1,4 +1,4 @@
-;;; wisi.el --- Utilities for implementing an indentation/navigation engine
using a generalized LALR parser
+;;; wisi.el --- Utilities for implementing an indentation/navigation engine
using a generalized LALR parser -*- lexical-binding:t -*-
;;
;; Copyright (C) 2012 - 2015 Free Software Foundation, Inc.
;;
@@ -204,25 +204,24 @@
(defun wisi-number-p (token-text)
"Return t if TOKEN-TEXT plus text after point matches the
-syntax for a real literal; otherwise nil. point is after
+syntax for a real literal; otherwise nil. Point is after
TOKEN-TEXT; move point to just past token."
- ;; typical literals:
+ ;; Typical literals:
;; 1234
;; 1234.5678
;; _not_ including non-decimal base, or underscores (see ada-wisi-number-p)
;;
- (let ((end (point)))
- ;; starts with a simple integer
- (when (string-match "^[0-9]+$" token-text)
- (when (looking-at "\\.[0-9]+")
- ;; real number
- (goto-char (setq end (match-end 0)))
- (when (looking-at "[Ee][+-][0-9]+")
- ;; exponent
- (goto-char (setq end (match-end 0)))))
-
- t
- )))
+ ;; Starts with a simple integer
+ (when (string-match "^[0-9]+$" token-text)
+ (when (looking-at "\\.[0-9]+")
+ ;; real number
+ (goto-char (match-end 0))
+ (when (looking-at "[Ee][+-][0-9]+")
+ ;; exponent
+ (goto-char (match-end 0))))
+
+ t
+ ))
(defun wisi-forward-token ()
"Move point forward across one token, skipping leading whitespace and
comments.
@@ -720,7 +719,7 @@ If accessing cache at a marker for a token as set by
`wisi-cache-tokens', POS mu
(message "%s done" msg)))
)))
-(defun wisi-fontify-region (begin end)
+(defun wisi-fontify-region (_begin end)
"For `jit-lock-functions'."
(when (< (point-max) wisi-size-threshold)
(wisi-validate-cache end)))
- [elpa] branch externals/wisi created (now dd09dcf), Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 931fc16 16/35: * packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 2f33bf8 21/35: Release Ada mode 5.3.1, wisi 1.1.6, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi e91f482 03/35: * wisi: Fix up dependency and sectioning style., Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 60b8ef1 15/35: Update ada-mode, wisi, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi d10db37 22/35: Release ada-mode version 6.0. Release wisi version 2.0, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi a4e4907 01/35: Add ada-mode, wisi packages, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 922e27f 04/35: * wisi: Fix warnings and a few 80-columns overruns, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 0635f1a 14/35: * packages/wisi: Use lexical binding. Fix dos EOL. Fix EOB markers,
Stefan Monnier <=
- [elpa] externals/wisi 7cb03cb 10/35: * packages/ada-mode/* : version 5.1.5, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi cb45dd5 07/35: * packages/ada-mode: version 5.1.1: fix wisi packaging bug, add -a in gnat-find, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 8bdcee1 11/35: publish ada-mode 5.1.6, wisi 1.0.6, new package ada-ref-man, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 364da46 20/35: Update ada-mode to version 5.2.2, wisi to version 1.1.5, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 89eee25 23/35: Release ada-mode 6.0.1, wisi 2.0.1; fix copyright, packaging bugs, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi d0eac6a 34/35: Forgot some new files in wisi, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi a6b3115 24/35: * ada-mode, wisi: Fix file access rights, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi bd1884c 02/35: Fix up copyright notices., Stefan Monnier, 2020/11/28
- [elpa] externals/wisi c282a4b 13/35: update ada-mode, wisi, Stefan Monnier, 2020/11/28
- [elpa] externals/wisi 27db81d 17/35: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/28