;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX)
-;; Copyright (C) 2004 Free Sofware Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
-;; Time-stamp: <2004/04/03 16:45:34 vinicius>
;; Keywords: wp, ebnf, PostScript
-;; Version: 1.1
+;; Version: 1.2
;; This file is part of GNU Emacs.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(cons (car except)
(ebnf-make-except (cdr term) (cdr except))))
term)))
-
+
;;; term ::= factor ('*' | '+' | '?')?
(defun ebnf-ebx-lex ()
- "Lexical analyser for EBNFX.
+ "Lexical analyzer for EBNFX.
Return a lexical token.
'end-of-input)
;; error
((eq token 'error)
- (error "Illegal character"))
+ (error "Invalid character"))
;; end of rule
((eq token 'end-of-rule)
'end-of-rule)
(error "Missing end of constraint `]'"))
(forward-char)
t)
-
+
(defun ebnf-ebx-skip-end-of-rule ()
;; close EPS file
((and ebnf-eps-executing (= (following-char) ?\]))
(ebnf-eps-remove-context (ebnf-ebx-eps-filename)))
+ ;; EPS header
+ ((and ebnf-eps-executing (= (following-char) ?H))
+ (ebnf-eps-header-comment (ebnf-ebx-eps-filename)))
+ ;; EPS footer
+ ((and ebnf-eps-executing (= (following-char) ?F))
+ (ebnf-eps-footer-comment (ebnf-ebx-eps-filename)))
;; any other action in comment
(t
(setq ebnf-action (aref ebnf-comment-table (following-char))))