Function: antlr-skip-exception-part
antlr-skip-exception-part is a byte-compiled function defined in
antlr-mode.el.gz.
Signature
(antlr-skip-exception-part SKIP-COMMENT)
Documentation
Skip exception part of current rule, i.e., everything after ;.
This also includes the options and tokens part of a grammar class header. If SKIP-COMMENT is non-nil, also skip the comment after that part.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/antlr-mode.el.gz
;;;===========================================================================
;;; Parse grammar files (internal functions)
;;;===========================================================================
(defun antlr-skip-exception-part (skip-comment)
"Skip exception part of current rule, i.e., everything after `;'.
This also includes the options and tokens part of a grammar class
header. If SKIP-COMMENT is non-nil, also skip the comment after that
part."
(let ((pos (point))
(class nil))
(antlr-c-forward-sws)
(while (looking-at "options\\>\\|tokens\\>")
(setq class t)
(setq pos (antlr-skip-sexps 2)))
(if class
;; Problem: an action only belongs to a class def, not a normal rule.
;; But checking the current rule type is too expensive => only expect
;; an action if we have found an option or tokens part.
(if (looking-at "{") (setq pos (antlr-skip-sexps 1)))
(while (looking-at "exception\\>")
(setq pos (antlr-skip-sexps 1))
(when (looking-at "\\[")
(setq pos (antlr-skip-sexps 1)))
(while (looking-at "catch\\>")
(setq pos (antlr-skip-sexps 3)))))
(or skip-comment (goto-char pos))))