 (defsubst factor--regex-second-word (prefixes)
   (format "^%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t)))
 
+(defconst factor--regex-method-definition
+  "^M: +\\([^ ]+\\) +\\([^ ]+\\)")
+
 (defconst factor--regex-word-definition
-  (factor--regex-second-word '(":" "::" "M:" "GENERIC:")))
+  (factor--regex-second-word '(":" "::" "GENERIC:")))
 
 (defconst factor--regex-type-definition
-  (factor--regex-second-word '("TUPLE:")))
+  (factor--regex-second-word '("TUPLE:" "SINGLETON:")))
 
 (defconst factor--regex-parent-type "^TUPLE: +[^ ]+ +< +\\([^ ]+\\)")
 

(defconst factor--regex-setter "\\W>>[^ ]+\\b")

(defconst factor--regex-symbol-definition
  (factor--regex-second-word '("SYMBOL:")))

(defconst factor--regex-stack-effect " ( .* )")


;;; Factor mode syntax:

(defconst factor--regex-definition-starters
  (regexp-opt '("VARS" "TUPLE" "MACRO" "MACRO:" "M" ":" "")))

(defconst factor--regex-definition-start
  (format "^\\(%s:\\) " factor--regex-definition-starters))
