Variable: f90-start-block-re

f90-start-block-re is a variable defined in f90.el.gz.

Value

"^[     0-9]*\\(\\(\\(\\(?:\\sw\\|\\s_\\)+[     ]*:[    ]*\\)?\\(do\\|select[   ]*\\(case\\|type\\)\\|if[       ]*(\\(.*\\|.*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\_>\\)\\)\\)\\_<then\\|\\(where\\|forall\\)[         ]*(.*)[         ]*\\(!\\|$\\)\\)\\)\\|\\(?:type\\|class\\)[     ,]\\([^id(!\n\"&    ]\\|i[^s!\n\"&      ]\\|d[^e!\n\"&      ]\\|de[^f!\n\"&     ]\\|def[^a!\n\"&    ]\\|\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|program\\|\\(?:abstract[       ]*\\)?interface\\|\\(?:sub\\)?module\\|function\\|subroutine\\|enum[^e]\\|associate\\|block\\|critical\\)[      ]*"

Documentation

Regexp matching the start of an F90 "block", from the line start.

A simple regexp cannot do this in fully correct fashion, so this tries to strike a compromise between complexity and flexibility. Used in the F90 entry in hs-block-start-regexp.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
;; Ignore the fact that FUNCTION, SUBROUTINE, WHERE, FORALL have a
;; following "(".  DO, CASE, IF can have labels.
(defconst f90-start-block-re
  (concat
   "^[ \t0-9]*"                         ; statement number
   "\\(\\("
   "\\(\\(?:\\sw\\|\\s_\\)+[ \t]*:[ \t]*\\)?"          ; structure label
   "\\(do\\|select[ \t]*\\(case\\|type\\)\\|"
   ;; See comments in fortran-start-block-re for the problems of IF.
   "if[ \t]*(\\(.*\\|"
   ".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\_>\\)\\)\\)\\_<then\\|"
   ;; Distinguish WHERE block from isolated WHERE.
   "\\(where\\|forall\\)[ \t]*(.*)[ \t]*\\(!\\|$\\)\\)\\)"
   "\\|"
   ;; Avoid F2003 "type is" in "select type",
   ;; and also variables of derived type "type (foo)".
   ;; "type, foo" must be a block (?).
   ;; And a partial effort to avoid "class default".
   "\\(?:type\\|class\\)[ \t,]\\("
   "[^id(!\n\"& \t]\\|"                ; not-id(
   "i[^s!\n\"& \t]\\|"                 ; i not-s
   "d[^e!\n\"& \t]\\|"                 ; d not-e
   "de[^f!\n\"& \t]\\|"                ; de not-f
   "def[^a!\n\"& \t]\\|"               ; def not-a
   "\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|"
   ;; "abstract interface" is F2003; "submodule" is F2008.
   "program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|"
   ;; "enum", but not "enumerator".
   "function\\|subroutine\\|enum[^e]\\|associate\\|block\\|critical"
   "\\)"
   "[ \t]*")
  "Regexp matching the start of an F90 \"block\", from the line start.
A simple regexp cannot do this in fully correct fashion, so this
tries to strike a compromise between complexity and flexibility.
Used in the F90 entry in `hs-block-start-regexp'.")