Variable: idlwave-statement-match

idlwave-statement-match is a variable defined in idlwave.el.gz.

Value

((endelse "end\\(\\|if\\)\\s +else" "end\\(\\|if\\)\\s +else")
 (end "\\<end\\(\\|case\\|switch\\|else\\|for\\|if\\|rep\\|while\\)\\>" nil)
 (if "if\\>" "then")
 (for "for\\>" "do")
 (begin "begin\\>" nil)
 (pdef "pro\\>\\|function\\>" nil)
 (while "while\\>" "do")
 (repeat "repeat\\>" "repeat")
 (goto "goto\\>" nil)
 (case "case\\>" nil)
 (switch "switch\\>" nil)
 (call "\\([a-zA-Z_][a-zA-Z0-9$_]*\\|![a-zA-Z_][a-zA-Z0-9$_]*\\) *= *\\([a-zA-Z_][a-zA-Z0-9$_]*\\s *->\\(\\s *[a-zA-Z_][a-zA-Z0-9$_]*::\\)?\\s *\\)?[a-zA-Z_][a-zA-Z0-9$_]*\\s *(" nil)
 (call "\\([a-zA-Z_][a-zA-Z0-9$_]*\\s *->\\(\\s *[a-zA-Z_][a-zA-Z0-9$_]*::\\)?\\s *\\)?[a-zA-Z_][a-zA-Z0-9$_]*\\( *\\($\\|\\$\\)\\|\\s *,\\)" nil)
 (assign "\\([a-zA-Z_][a-zA-Z0-9$_]*\\|![a-zA-Z_][a-zA-Z0-9$_]*\\) *=" nil))

Documentation

Associated list of statement matching regular expressions.

Each regular expression matches the start of an IDL statement. The first element of each association is a symbol giving the statement type. The associated value is a list. The first element of this list is a regular expression matching the start of an IDL statement for identifying the statement type. The second element of this list is a regular expression for finding a substatement for the type. The substatement starts after the end of the found match modulo whitespace. If it is nil then the statement has no substatement. The list order matters since matching an assignment statement exactly is not possible without parsing. Thus assignment statement become just the leftover unidentified statements containing an equal sign.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlwave.el.gz
(defconst idlwave-statement-match
  (list
   ;; "endif else" is the only possible "end" that can be
   ;; followed by a statement on the same line.
   '(endelse . ("end\\(\\|if\\)\\s +else" "end\\(\\|if\\)\\s +else"))
   ;; all other "end"s can not be followed by a statement.
   (cons 'end (list idlwave-end-block-reg nil))
   '(if . ("if\\>" "then"))
   '(for . ("for\\>" "do"))
   '(begin . ("begin\\>" nil))
   '(pdef . ("pro\\>\\|function\\>" nil))
   '(while . ("while\\>" "do"))
   '(repeat . ("repeat\\>" "repeat"))
   '(goto . ("goto\\>" nil))
   '(case . ("case\\>" nil))
   '(switch . ("switch\\>" nil))
   (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *"
			     "\\(" idlwave-method-call "\\s *\\)?"
			     idlwave-identifier
			     "\\s *(")
		     nil))
   (cons 'call (list (concat
		      "\\(" idlwave-method-call "\\s *\\)?"
		      idlwave-identifier
		      "\\( *\\($\\|\\$\\)\\|\\s *,\\)")
		     nil))
   (cons 'assign (list (concat
			"\\(" idlwave-variable "\\) *=")
		       nil)))

  "Associated list of statement matching regular expressions.
Each regular expression matches the start of an IDL statement.
The first element of each association is a symbol giving the statement
type.  The associated value is a list.  The first element of this list
is a regular expression matching the start of an IDL statement for
identifying the statement type.  The second element of this list is a
regular expression for finding a substatement for the type.  The
substatement starts after the end of the found match modulo
whitespace.  If it is nil then the statement has no substatement.  The
list order matters since matching an assignment statement exactly is
not possible without parsing.  Thus assignment statement become just
the leftover unidentified statements containing an equal sign.")