Function: rng-c-parse-annotation-body
rng-c-parse-annotation-body is a byte-compiled function defined in
rng-cmpct.el.gz.
Signature
(rng-c-parse-annotation-body &optional ALLOW-TEXT)
Documentation
Current token is [. Parse up to matching ].
Current token after parse is token following ].
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/rng-cmpct.el.gz
;; XXX need stricter checking of attribute names
;; XXX don't allow attributes after text
(defun rng-c-parse-annotation-body (&optional allow-text)
"Current token is [. Parse up to matching ].
Current token after parse is token following ]."
(or (string-equal rng-c-current-token "[")
(rng-c-error "Expected ["))
(rng-c-advance)
(while (not (string-equal rng-c-current-token "]"))
(cond ((rng-c-current-token-literal-p)
(or allow-text
(rng-c-error "Out of place text within annotation"))
(rng-c-parse-literal))
(t
(if (rng-c-current-token-prefixed-name-p)
(rng-c-advance)
(rng-c-parse-identifier-or-keyword))
(cond ((string-equal rng-c-current-token "[")
(rng-c-parse-annotation-body t))
((string-equal rng-c-current-token "=")
(rng-c-advance)
(rng-c-parse-literal))
(t (rng-c-error "Expected = or ["))))))
(rng-c-advance))