                           (3 'factor-font-lock-word)
                           (4 'factor-font-lock-invalid-syntax nil t))
     (,factor-declaration-words-regex . 'factor-font-lock-comment)
-    (,factor-word-definition-regex 2 'factor-font-lock-word)
+    (,factor-word-definition-regex (1 'factor-font-lock-parsing-word)
+                                   (2 'factor-font-lock-word))
     (,factor-alias-regex (1 'factor-font-lock-parsing-word)
                          (2 'factor-font-lock-word)
                          (3 'factor-font-lock-word))
+    (,factor-qualified-with-regex (1 'factor-font-lock-parsing-word)
+                                  (2 'factor-font-lock-vocabulary-name)
+                                  (3 'factor-font-lock-word))
     (,factor-int-constant-def-regex 2 'factor-font-lock-constant)
     (,factor-integer-regex . 'factor-font-lock-number)
     (,factor-float-regex . 'factor-font-lock-number)

  "\\_<\"[^>]\\([^\"\n]\\|\\\\\"\\)*\n")

(defconst factor-word-definition-regex
  (format "\\_<\\(%s\\)?[:#] +\\(%s\\)"
          (regexp-opt
           '(":" "GENERIC" "DEFER" "HOOK" "MACRO" "MATH" "POSTPONE"
             "PRIMITIVE" "SYNTAX" "TYPED" "TYPED:"))
          "\\(\\sw\\|\\s_\\|\\s(\\|\\s)\\)+"))

;; [parsing-word] [vocab-word]
(defconst factor-vocab-ref-regex
  (syntax-and-1-symbol
   '("IN" "USE" "EXCLUDE" "QUALIFIED" "QUALIFIED-WITH")))

(defconst factor-using-lines-regex
  (concat (syntax-begin '("USING")) ws+ symbols-to-semicolon))


(defconst factor-alias-regex
  (syntax-and-2-symbols '("ALIAS")))

(defconst factor-qualified-with-regex
  (syntax-and-2-symbols '("QUALIFIED-WITH")))

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