Function: ebnf-yac-rule
ebnf-yac-rule is a byte-compiled function defined in ebnf-yac.el.gz.
Signature
(ebnf-yac-rule TOKEN)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ebnf-yac.el.gz
;;; YACC-Rule = Name ":" Alternative ";".
(defun ebnf-yac-rule (token)
(let ((header ebnf-yac-lex)
(action ebnf-action)
body)
(setq ebnf-action nil)
(or (eq token 'non-terminal)
(error "Invalid rule name"))
(or (eq (ebnf-yac-lex) 'colon)
(error "Invalid rule: missing `:'"))
(setq body (ebnf-yac-alternative))
(or (eq (car body) 'period)
(error "Invalid rule: missing `;'"))
(setq body (cdr body))
(ebnf-eps-add-production header)
(cons (ebnf-yac-lex)
(ebnf-make-production header body action))))