Function: semantic-parse-region-default

semantic-parse-region-default is a byte-compiled function defined in semantic.el.gz.

Signature

(semantic-parse-region-default START END &optional NONTERMINAL DEPTH RETURNONERROR)

Documentation

Parse the area between START and END, and return any tags found.

If END needs to be extended due to a lexical token being too large, it will be silently ignored. Optional arguments: NONTERMINAL is the rule to start parsing at if it is known. DEPTH specifies the lexical depth to scan. RETURNONERROR specifies that parsing should end when encountering unterminated syntax.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic.el.gz
(defun semantic-parse-region-default
  (start end &optional nonterminal depth returnonerror)
  "Parse the area between START and END, and return any tags found.
If END needs to be extended due to a lexical token being too large,
it will be silently ignored.
Optional arguments:
NONTERMINAL is the rule to start parsing at if it is known.
DEPTH specifies the lexical depth to scan.
RETURNONERROR specifies that parsing should end when encountering
unterminated syntax."
  (when (or (null semantic--parse-table) (eq semantic--parse-table t))
    ;; If there is no table, or it was set to t, then we are here by
    ;; some other mistake.  Do not throw an error deep in the parser.
    (error "No support found to parse buffer %S" (buffer-name)))
  (save-restriction
    (widen)
    (when (or (< end start) (> end (point-max)))
      (error "Invalid parse region bounds %S, %S" start end))
    (semantic-repeat-parse-whole-stream
      (or (cdr (assq start semantic-lex-block-streams))
	  (semantic-lex start end depth))
      nonterminal returnonerror)))