 
 While calculating the decoration level for actions, `major-mode' is
 bound to `antlr-language'.  For example, with value
-  \((java-mode \. 2) (c++-mode \. 0))
+  \((java-mode \. 2) (c++-mode \.  0))
 Java actions are fontified with level 2 and C++ actions are not
 fontified at all."
   :group 'antlr

	      (setq arg nil)))
	  (when arg			; always found a ";"
	    (forward-char)
	    (antlr-skip-exception-part skip-comment)))
      (if (<= (point) pos)		; moved backward?
	  (goto-char pos)		; rewind
	(decf arg))			; already moved one defun forward
      (unless (zerop arg)
	(while (>= (decf arg) 0)
	  (antlr-search-forward ";"))
	(antlr-skip-exception-part skip-comment)))))

(defun antlr-outside-rule-p ()
  "Non-nil if point is outside a grammar rule.
Move to the beginning of the current rule if point is inside a rule."
  ;; WARNING: Should only be used with `antlr-action-syntax-table'!
  (let ((pos (point)))
    (antlr-next-rule -1 nil)
    (let ((between (or (bobp) (< (point) pos))))
      (antlr-c-forward-sws)
      (and between (> (point) pos) (goto-char pos)))))


Called in PHASE `before-input', see `antlr-options-alists'."
  (and (eq phase 'before-input)
       (not (eq antlr-language 'antlr-cpp))
       (not (y-or-n-p (format "Insert C++ %s option? " option)))
       (error "Didn't insert Cpp %s option with language %s"
	      option antlr-language-mode-name)))


;;;===========================================================================
;;;  Compute dependencies
;;;===========================================================================
;; This whole section is probably quite ANTLR-v2 dependent.  Changing this has
;; no high priority at the moment...

(defun antlr-file-dependencies ()
  "Return dependencies for grammar in current buffer.
The result looks like \(FILE \(CLASSES \.  SUPERS) VOCABS \.  LANGUAGE)
  where CLASSES = ((CLASS . CLASS-EVOCAB) ...),
        SUPERS  = ((SUPER . USE-EVOCAB-P) ...), and
        VOCABS  = ((EVOCAB ...) . (IVOCAB ...))
