• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/progmodes/

Lines Matching defs:ebx

1 ;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX)
201 (defvar ebnf-ebx-lex nil
202 "Value returned by `ebnf-ebx-lex' function.")
212 (defun ebnf-ebx-parser (start)
219 (setq token (ebnf-ebx-lex))
223 (setq token (ebnf-ebx-lex)))
228 (setq token (ebnf-ebx-rule token)
240 (defun ebnf-ebx-rule (token)
241 (let ((name ebnf-ebx-lex)
247 (setq token (ebnf-ebx-lex))
250 (setq elements (ebnf-ebx-expression))
255 (cons (ebnf-ebx-lex)
262 (defun ebnf-ebx-expression ()
265 (ebnf-ebx-concatenation (ebnf-ebx-lex))))
274 (defun ebnf-ebx-concatenation (token)
275 (let ((term (ebnf-ebx-exception token))
281 (while (setq term (ebnf-ebx-exception token)
292 (defun ebnf-ebx-exception (token)
293 (let ((term (ebnf-ebx-term token)))
295 (let ((except (ebnf-ebx-term (ebnf-ebx-lex))))
305 (defun ebnf-ebx-term (token)
306 (let ((factor (ebnf-ebx-factor token)))
308 (setq token (ebnf-ebx-lex))
311 token (ebnf-ebx-lex)))
314 token (ebnf-ebx-lex)))
317 token (ebnf-ebx-lex)))))
340 (defun ebnf-ebx-factor (token)
344 (ebnf-make-terminal ebnf-ebx-lex))
347 (ebnf-make-non-terminal ebnf-ebx-lex))
350 (let ((body (ebnf-ebx-expression)))
365 (defconst ebnf-ebx-token-table (make-vector 256 'error)
369 (defun ebnf-ebx-initialize ()
375 (aset ebnf-ebx-token-table char 'non-terminal)
380 (aset ebnf-ebx-token-table char 'non-terminal)
385 (aset ebnf-ebx-token-table char 'non-terminal)
388 (aset ebnf-ebx-token-table ?\n 'end-of-rule) ; [NL] linefeed
389 (aset ebnf-ebx-token-table ?\r 'end-of-rule) ; [CR] carriage return
391 (aset ebnf-ebx-token-table ?\013 'space) ; [VT] vertical tab
392 (aset ebnf-ebx-token-table ?\t 'space) ; [HT] horizontal tab
393 (aset ebnf-ebx-token-table ?\ 'space) ; [SP] space
395 (aset ebnf-ebx-token-table ?\f 'form-feed) ; [FF] form feed
397 (aset ebnf-ebx-token-table ?# 'hash)
398 (aset ebnf-ebx-token-table ?\" 'double-quote)
399 (aset ebnf-ebx-token-table ?\' 'single-quote)
400 (aset ebnf-ebx-token-table ?\( 'begin-group)
401 (aset ebnf-ebx-token-table ?\) 'end-group)
402 (aset ebnf-ebx-token-table ?- 'exception)
403 (aset ebnf-ebx-token-table ?: 'colon)
404 (aset ebnf-ebx-token-table ?\[ 'begin-square)
405 (aset ebnf-ebx-token-table ?| 'alternative)
406 (aset ebnf-ebx-token-table ?* 'zero-or-more)
407 (aset ebnf-ebx-token-table ?+ 'one-or-more)
408 (aset ebnf-ebx-token-table ?\? 'optional)
410 (aset ebnf-ebx-token-table ?/ 'comment)))
414 (defconst ebnf-ebx-non-terminal-chars
416 (defconst ebnf-ebx-non-terminal-letter-chars
420 (defun ebnf-ebx-lex ()
425 See documentation for variable `ebnf-ebx-lex'."
434 (setq token (aref ebnf-ebx-token-table (following-char)))
440 (ebnf-ebx-skip-comment))
445 (ebnf-ebx-skip-end-of-rule))
449 (ebnf-ebx-skip-constraint))
464 (setq ebnf-ebx-lex (ebnf-ebx-character))
468 (setq ebnf-ebx-lex (ebnf-ebx-string ?\"))
472 (setq ebnf-ebx-lex (ebnf-ebx-string ?\'))
476 (setq ebnf-ebx-lex (ebnf-ebx-range))
480 (setq ebnf-ebx-lex
481 (ebnf-buffer-substring ebnf-ebx-non-terminal-chars))
497 (defconst ebnf-ebx-constraint-chars
501 (defun ebnf-ebx-skip-constraint ()
502 (or (> (skip-chars-forward ebnf-ebx-constraint-chars ebnf-limit) 0)
511 (defun ebnf-ebx-skip-end-of-rule ()
521 (ebnf-ebx-skip-comment))))
526 (defconst ebnf-ebx-comment-chars
528 (defconst ebnf-ebx-filename-chars
532 (defun ebnf-ebx-skip-comment ()
540 (ebnf-eps-add-context (ebnf-ebx-eps-filename)))
543 (ebnf-eps-remove-context (ebnf-ebx-eps-filename)))
549 (skip-chars-forward ebnf-ebx-comment-chars ebnf-limit)
562 (defun ebnf-ebx-eps-filename ()
568 (ebnf-buffer-substring ebnf-ebx-filename-chars)))
584 (defconst ebnf-ebx-double-string-chars
586 (defconst ebnf-ebx-single-string-chars
590 (defun ebnf-ebx-string (delim)
597 ebnf-ebx-double-string-chars
598 ebnf-ebx-single-string-chars)
607 (defun ebnf-ebx-character ()
612 (ebnf-ebx-hex-character)
616 (defun ebnf-ebx-range ()
627 (ebnf-ebx-any-character)
630 (ebnf-ebx-any-character))
639 (defun ebnf-ebx-any-character ()
642 (ebnf-ebx-hex-character t))
653 (defun ebnf-ebx-hex-character (&optional no-error)
668 (provide 'ebnf-ebx)
671 ;;; ebnf-ebx.el ends here