  
 ;;; Regexps galore:
+
+;; Utility regexp used by other regexps to match a Factor symbol name
+(setq-local symbol "\\(\\(?:\\sw\\|\\s_\\)+\\)")
 
 ;; Excludes parsing words that are handled by other regexps
 (defconst factor-parsing-words

    "QUALIFIED-WITH:" "QUALIFIED:"
    "read-only" "RENAME:" "REQUIRE:"  "REQUIRES:"
    "SINGLETON:" "SINGLETONS:" "SLOT:" "SPECIALIZED-ARRAY:"
    "SPECIALIZED-ARRAYS:" "STRING:" "STRUCT:" "SYMBOLS:" "SYNTAX:"
    "TYPEDEF:" "TYPED:" "TYPED::"
    "UNIFORM-TUPLE:" "UNION:" "UNION-STRUCT:" "USE:"
    "VARIANT:" "VERTEX-FORMAT:"))

(defconst factor-parsing-words-regex

  "\\_<C: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")

(defconst factor-typedef-regex
  (format "\\_<TYPEDEF: +%s %s\\( .*\\)?$" symbol symbol))

(defconst factor-c-global-regex
  "\\_<C-GLOBAL: +\\(\\w+\\) +\\(\\w+\\)\\( .*\\)?$")

(defconst factor-c-type-regex
  (format "\\_<C-TYPE: +%s\\( .*\\)?$" symbol))

(defconst factor-rename-regex
  "\\_<RENAME: +\\(\\w+\\) +\\(\\w+\\) +=> +\\(\\w+\\)\\( .*\\)?$")
