Function: ebnf-ebx-initialize
ebnf-ebx-initialize is an autoloaded and byte-compiled function
defined in ebnf-ebx.el.gz.
Signature
(ebnf-ebx-initialize)
Documentation
Initialize EBNFX token table.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ebnf-ebx.el.gz
(defun ebnf-ebx-initialize ()
"Initialize EBNFX token table."
;; control character & control 8-bit character are set to `error'
(let ((char ?\101))
;; printable character: A-Z
(while (< char ?\133)
(aset ebnf-ebx-token-table char 'non-terminal)
(setq char (1+ char)))
;; printable character: a-z
(setq char ?\141)
(while (< char ?\173)
(aset ebnf-ebx-token-table char 'non-terminal)
(setq char (1+ char)))
;; European 8-bit accentuated characters:
(setq char ?\240)
(while (< char ?\400)
(aset ebnf-ebx-token-table char 'non-terminal)
(setq char (1+ char)))
;; Override end of line characters:
(aset ebnf-ebx-token-table ?\n 'end-of-rule) ; [NL] linefeed
(aset ebnf-ebx-token-table ?\r 'end-of-rule) ; [CR] carriage return
;; Override space characters:
(aset ebnf-ebx-token-table ?\013 'space) ; [VT] vertical tab
(aset ebnf-ebx-token-table ?\t 'space) ; [HT] horizontal tab
(aset ebnf-ebx-token-table ?\ 'space) ; [SP] space
;; Override form feed character:
(aset ebnf-ebx-token-table ?\f 'form-feed) ; [FF] form feed
;; Override other lexical characters:
(aset ebnf-ebx-token-table ?# 'hash)
(aset ebnf-ebx-token-table ?\" 'double-quote)
(aset ebnf-ebx-token-table ?\' 'single-quote)
(aset ebnf-ebx-token-table ?\( 'begin-group)
(aset ebnf-ebx-token-table ?\) 'end-group)
(aset ebnf-ebx-token-table ?- 'exception)
(aset ebnf-ebx-token-table ?: 'colon)
(aset ebnf-ebx-token-table ?\[ 'begin-square)
(aset ebnf-ebx-token-table ?| 'alternative)
(aset ebnf-ebx-token-table ?* 'zero-or-more)
(aset ebnf-ebx-token-table ?+ 'one-or-more)
(aset ebnf-ebx-token-table ?\? 'optional)
;; Override comment character:
(aset ebnf-ebx-token-table ?/ 'comment)))