aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2004-02-28 22:22:38 +0000
committerVinicius Jose Latorre2004-02-28 22:22:38 +0000
commit4e7d32748f8c7f82d55b697edee781e8a8169f36 (patch)
treee6907dc78b2cf2932575f88b04f5e62cd86ad891
parentcd0f9f85ad8651941fdc8f0626fac252b7b66905 (diff)
downloademacs-4e7d32748f8c7f82d55b697edee781e8a8169f36.tar.gz
emacs-4e7d32748f8c7f82d55b697edee781e8a8169f36.zip
Doc fix.
-rw-r--r--lisp/progmodes/ebnf-bnf.el38
-rw-r--r--lisp/progmodes/ebnf2ps.el4
2 files changed, 33 insertions, 9 deletions
diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el
index 41bd0cd0d49..4f0ef6099c8 100644
--- a/lisp/progmodes/ebnf-bnf.el
+++ b/lisp/progmodes/ebnf-bnf.el
@@ -5,7 +5,7 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/02/22 14:25:06 vinicius> 8;; Time-stamp: <2004/02/28 18:25:52 vinicius>
9;; Keywords: wp, ebnf, PostScript 9;; Keywords: wp, ebnf, PostScript
10;; Version: 1.8 10;; Version: 1.8
11 11
@@ -54,7 +54,10 @@
54;; C D sequence (C occurs before D) 54;; C D sequence (C occurs before D)
55;; C | D alternative (C or D occurs) 55;; C | D alternative (C or D occurs)
56;; A - B exception (A excluding B, B without any non-terminal) 56;; A - B exception (A excluding B, B without any non-terminal)
57;; n * A repetition (A repeats n (integer) times) 57;; n * A repetition (A repeats at least n (integer) times)
58;; n * n A repetition (A repeats exactly n (integer) times)
59;; n * m A repetition (A repeats at least n (integer) and at most
60;; m (integer) times)
58;; (C) group (expression C is grouped together) 61;; (C) group (expression C is grouped together)
59;; [C] optional (C may or not occurs) 62;; [C] optional (C may or not occurs)
60;; C+ one or more occurrences of C 63;; C+ one or more occurrences of C
@@ -78,7 +81,7 @@
78;; 81;;
79;; exception = repeat [ "-" repeat]. ;; exception 82;; exception = repeat [ "-" repeat]. ;; exception
80;; 83;;
81;; repeat = [ integer "*" ] term. ;; repetition 84;; repeat = [ integer "*" [ integer ]] term. ;; repetition
82;; 85;;
83;; term = factor 86;; term = factor
84;; | [factor] "+" ;; one-or-more 87;; | [factor] "+" ;; one-or-more
@@ -96,14 +99,30 @@
96;; . 99;; .
97;; 100;;
98;; non_terminal = "[!#%&'*-,0-:<>@-Z\\\\^-z~\\240-\\377]+". 101;; non_terminal = "[!#%&'*-,0-:<>@-Z\\\\^-z~\\240-\\377]+".
102;; ;; that is, a valid non_terminal accepts decimal digits, letters (upper
103;; ;; and lower), 8-bit accentuated characters,
104;; ;; "!", "#", "%", "&", "'", "*", "+", ",", ":",
105;; ;; "<", ">", "@", "\", "^", "_", "`" and "~".
99;; 106;;
100;; terminal = "\\([^\"\\]\\|\\\\[ -~\\240-\\377]\\)+". 107;; terminal = "\\([^\"\\]\\|\\\\[ -~\\240-\\377]\\)+".
108;; ;; that is, a valid terminal accepts any printable character (including
109;; ;; 8-bit accentuated characters) except `"', as `"' is used to delimit a
110;; ;; terminal. Also, accepts escaped characters, that is, a character
111;; ;; pair starting with `\' followed by a printable character, for
112;; ;; example: \", \\.
101;; 113;;
102;; special = "[^?\\n\\000-\\010\\016-\\037\\177-\\237]*". 114;; special = "[^?\\000-\\010\\012-\\037\\177-\\237]*".
115;; ;; that is, a valid special accepts any printable character (including
116;; ;; 8-bit accentuated characters) and tabs except `?', as `?' is used to
117;; ;; delimit a special.
103;; 118;;
104;; integer = "[0-9]+". 119;; integer = "[0-9]+".
120;; ;; that is, an integer is a sequence of one or more decimal digits.
105;; 121;;
106;; comment = ";" "[^\\n\\000-\\010\\016-\\037\\177-\\237]*" "\\n". 122;; comment = ";" "[^\\n\\000-\\010\\016-\\037\\177-\\237]*" "\\n".
123;; ;; that is, a comment starts with the character `;' and terminates at end
124;; ;; of line. Also, it only accepts printable characters (including 8-bit
125;; ;; accentuated characters) and tabs.
107;; 126;;
108;; 127;;
109;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 128;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -234,15 +253,20 @@
234 )))) 253 ))))
235 254
236 255
237;;; repeat = [ integer "*" ] term. 256;;; repeat = [ integer "*" [ integer ]] term.
238 257
239(defun ebnf-repeat (token) 258(defun ebnf-repeat (token)
240 (if (not (eq token 'integer)) 259 (if (not (eq token 'integer))
241 (ebnf-term token) 260 (ebnf-term token)
242 (let ((times ebnf-bnf-lex)) 261 (let ((times ebnf-bnf-lex)
262 upper)
243 (or (eq (ebnf-bnf-lex) 'repeat) 263 (or (eq (ebnf-bnf-lex) 'repeat)
244 (error "Missing `*'")) 264 (error "Missing `*'"))
245 (ebnf-token-repeat times (ebnf-term (ebnf-bnf-lex)))))) 265 (setq token (ebnf-bnf-lex))
266 (when (eq token 'integer)
267 (setq upper ebnf-bnf-lex
268 token (ebnf-bnf-lex)))
269 (ebnf-token-repeat times (ebnf-term token) upper))))
246 270
247 271
248;;; term = factor 272;;; term = factor
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index 56c80a4c464..8d246057ffd 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -5,7 +5,7 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/02/28 19:06:58 vinicius> 8;; Time-stamp: <2004/02/28 19:18:57 vinicius>
9;; Keywords: wp, ebnf, PostScript 9;; Keywords: wp, ebnf, PostScript
10;; Version: 4.0 10;; Version: 4.0
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
@@ -2091,7 +2091,7 @@ See also `ebnf-syntax-buffer'."
2091 "Does a syntactic analysis of the FILE. 2091 "Does a syntactic analysis of the FILE.
2092 2092
2093If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't 2093If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't
2094killed after SYNTAX generation. 2094killed after syntax checking.
2095 2095
2096See also `ebnf-syntax-buffer'." 2096See also `ebnf-syntax-buffer'."
2097 (interactive "fEBNF file to check syntax: ") 2097 (interactive "fEBNF file to check syntax: ")