aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-09-24 17:42:00 +0000
committerGerd Moellmann2001-09-24 17:42:00 +0000
commit8a1e4eebeb0528ee7dcc9c95a9a685901db50bf5 (patch)
treef1ce9b6759ee0ff74661abf01eee516cce1ad9dc
parent40b35c64e15098305e2f7cfa0b999cbbf26d62eb (diff)
downloademacs-8a1e4eebeb0528ee7dcc9c95a9a685901db50bf5.tar.gz
emacs-8a1e4eebeb0528ee7dcc9c95a9a685901db50bf5.zip
Fix character range regexp. Doc fix.
(ebnf-iso-non-terminal-chars): New internal const. (ebnf-iso-lex): Fix code.
-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 @@
5;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> 5;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
6;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 6;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
7;; Keywords: wp, ebnf, PostScript 7;; Keywords: wp, ebnf, PostScript
8;; Time-stamp: <2001/08/15 17:12:51 vinicius> 8;; Time-stamp: <2001/09/24 10:17:20 vinicius>
9;; Version: 1.5 9;; Version: 1.6
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -387,6 +387,11 @@
387 (aset ebnf-iso-token-table ?. 'character))) 387 (aset ebnf-iso-token-table ?. 'character)))
388 388
389 389
390;; replace the range "\240-\377" (see `ebnf-range-regexp').
391(defconst ebnf-iso-non-terminal-chars
392 (ebnf-range-regexp " 0-9A-Za-z" ?\240 ?\377))
393
394
390(defun ebnf-iso-lex () 395(defun ebnf-iso-lex ()
391 "Lexical analyser for ISO EBNF. 396 "Lexical analyser for ISO EBNF.
392 397
@@ -447,9 +452,10 @@ See documentation for variable `ebnf-iso-lex'."
447 'terminal) 452 'terminal)
448 ;; non-terminal 453 ;; non-terminal
449 ((eq token 'non-terminal) 454 ((eq token 'non-terminal)
450 (setq ebnf-iso-lex (ebnf-iso-normalize 455 (setq ebnf-iso-lex
451 (ebnf-trim-right 456 (ebnf-iso-normalize
452 (ebnf-buffer-substring " 0-9A-Za-z\240-\377")))) 457 (ebnf-trim-right
458 (ebnf-buffer-substring ebnf-iso-non-terminal-chars))))
453 (and ebnf-no-meta-identifier 459 (and ebnf-no-meta-identifier
454 (error "Exception sequence should not contain a meta identifier")) 460 (error "Exception sequence should not contain a meta identifier"))
455 'non-terminal) 461 'non-terminal)