From 40b35c64e15098305e2f7cfa0b999cbbf26d62eb Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 24 Sep 2001 17:41:41 +0000 Subject: [PATCH] Fix character range regexp. Doc fix. (ebnf-bnf-non-terminal-chars): New internal const. (ebnf-bnf-lex): Fix code. --- lisp/progmodes/ebnf-bnf.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el index acac3a591b4..3ff506521e3 100644 --- a/lisp/progmodes/ebnf-bnf.el +++ b/lisp/progmodes/ebnf-bnf.el @@ -5,8 +5,8 @@ ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2001/09/18 21:03:57 vinicius> -;; Version: 1.6 +;; Time-stamp: <2001/09/24 10:17:26 vinicius> +;; Version: 1.7 ;; This file is part of GNU Emacs. @@ -408,6 +408,11 @@ (aset ebnf-bnf-token-table ebnf-lex-eop-char 'period))) +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-bnf-non-terminal-chars + (ebnf-range-regexp "!#%&'*-,0-:<>@-Z\\\\^-z~" ?\240 ?\377)) + + (defun ebnf-bnf-lex () "Lexical analyser for EBNF. @@ -467,10 +472,7 @@ See documentation for variable `ebnf-bnf-lex'." 'terminal) ;; non-terminal or terminal ((eq token 'non-terminal) - ;; replace the range "\240-\377" (see `ebnf-range-regexp'). - (setq ebnf-bnf-lex (ebnf-buffer-substring - (ebnf-range-regexp "!#%&'*-,0-:<>@-Z\\\\^-z~" - ?\240 ?\377))) + (setq ebnf-bnf-lex (ebnf-buffer-substring ebnf-bnf-non-terminal-chars)) (let ((case-fold-search ebnf-case-fold-search) match) (if (and ebnf-terminal-regexp -- 2.39.2