summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ebnf-iso.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-09-24 17:42:00 +0000
committerGerd Moellmann <gerd@gnu.org>2001-09-24 17:42:00 +0000
commit8a1e4eebeb0528ee7dcc9c95a9a685901db50bf5 (patch)
treef1ce9b6759ee0ff74661abf01eee516cce1ad9dc /lisp/progmodes/ebnf-iso.el
parent40b35c64e15098305e2f7cfa0b999cbbf26d62eb (diff)
downloademacs-8a1e4eebeb0528ee7dcc9c95a9a685901db50bf5.tar.gz
Fix character range regexp. Doc fix.
(ebnf-iso-non-terminal-chars): New internal const. (ebnf-iso-lex): Fix code.
Diffstat (limited to 'lisp/progmodes/ebnf-iso.el')
-rw-r--r--lisp/progmodes/ebnf-iso.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el
index 1ec1293a14b..ede354c4f32 100644
--- a/lisp/progmodes/ebnf-iso.el
+++ b/lisp/progmodes/ebnf-iso.el
@@ -5,8 +5,8 @@
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Keywords: wp, ebnf, PostScript
-;; Time-stamp: <2001/08/15 17:12:51 vinicius>
-;; Version: 1.5
+;; Time-stamp: <2001/09/24 10:17:20 vinicius>
+;; Version: 1.6
;; This file is part of GNU Emacs.
@@ -387,6 +387,11 @@
(aset ebnf-iso-token-table ?. 'character)))
+;; replace the range "\240-\377" (see `ebnf-range-regexp').
+(defconst ebnf-iso-non-terminal-chars
+ (ebnf-range-regexp " 0-9A-Za-z" ?\240 ?\377))
+
+
(defun ebnf-iso-lex ()
"Lexical analyser for ISO EBNF.
@@ -447,9 +452,10 @@ See documentation for variable `ebnf-iso-lex'."
'terminal)
;; non-terminal
((eq token 'non-terminal)
- (setq ebnf-iso-lex (ebnf-iso-normalize
- (ebnf-trim-right
- (ebnf-buffer-substring " 0-9A-Za-z\240-\377"))))
+ (setq ebnf-iso-lex
+ (ebnf-iso-normalize
+ (ebnf-trim-right
+ (ebnf-buffer-substring ebnf-iso-non-terminal-chars))))
(and ebnf-no-meta-identifier
(error "Exception sequence should not contain a meta identifier"))
'non-terminal)