diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index 86de8fa686..b976998a0e 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -232,17 +232,16 @@ these lines in your .emacs: "GAME:" "GENERIC#" "GENERIC:" "GIR:" "GLSL-SHADER:" "GLSL-PROGRAM:" "HINTS:" "HOOK:" - "IN:" "initial:" "INSTANCE:" "INTERSECTION:" "IMPLEMENT-STRUCTS:" - "M:" "M::" "MACRO:" "MACRO::" "MAIN:" "MATH:" + "initial:" "INTERSECTION:" "IMPLEMENT-STRUCTS:" + "M:" "M::" "MACRO:" "MACRO::" "MATH:" "MEMO:" "MEMO:" "METHOD:" "MIXIN:" "NAN:" "POSTPONE:" "PRIMITIVE:" "PRIVATE>" "PROTOCOL:" "PROVIDE:" - "QUALIFIED-WITH:" "QUALIFIED:" "read-only" "RENAME:" "REQUIRE:" "REQUIRES:" "SINGLETON:" "SINGLETONS:" "SLOT:" "SPECIALIZED-ARRAY:" "SPECIALIZED-ARRAYS:" "STRING:" "SYNTAX:" - "TYPEDEF:" "TYPED:" "TYPED::" - "UNIFORM-TUPLE:" "USE:" + "TYPED:" "TYPED::" + "UNIFORM-TUPLE:" "VARIANT:" "VERTEX-FORMAT:")) (defconst factor-parsing-words-regex @@ -273,7 +272,7 @@ these lines in your .emacs: (regexp-opt factor-declaration-words 'symbols)) (defsubst factor-second-word-regex (prefixes) - (format "%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t))) + (format "^%s +\\([^ \r\n]+\\)" (regexp-opt prefixes t))) (defconst factor-method-definition-regex "^M::? +\\([^ ]+\\) +\\([^ ]+\\)") @@ -305,27 +304,28 @@ these lines in your .emacs: (defconst factor-word-definition-regex (format "\\_<\\(%s\\)?[:#] +\\(%s\\)" (regexp-opt - '(":" "GENERIC" "DEFER" "HOOK" "MACRO" "MAIN" "MATH" "POSTPONE" - "SYNTAX" "TYPED" "TYPED:" "RENAME")) + '(":" "GENERIC" "DEFER" "HOOK" "MACRO" "MATH" "POSTPONE" + "PRIMITIVE" "SYNTAX" "TYPED" "TYPED:" "RENAME")) "\\(\\sw\\|\\s_\\|\\s(\\|\\s)\\)+")) (defconst factor-alias-definition-regex "^ALIAS: +\\(\\_<.+?\\_>\\) +\\(\\_<.+?\\_>\\)") -;; Vocabulary patterns +;; [parsing-word] [vocab-word] (defconst factor-vocab-ref-regex (factor-second-word-regex '("IN:" "USE:" "EXCLUDE:" "QUALIFIED:" "QUALIFIED-WITH:"))) (defconst factor-using-lines-regex "^\\(USING:\\)[ \n]+\\([^;\t]*\\);") -;; Symbols +;; [parsing-word] [symbol-word] (defconst factor-symbol-definition-regex (factor-second-word-regex '("&:" "CONSTANT:" "DESTRUCTOR:" "FORGET:" "HELP:" "LIBRARY:" - "STRING:" "SYMBOL:" "VAR:"))) + "MAIN:" "STRING:" "SYMBOL:" "VAR:"))) -(defconst factor-symbols-lines-regex "^\\(SYMBOLS\\):[ \n]+\\([^;\t]*\\);") +;; [parsing-word] [symbol-word]* ; +(defconst factor-symbols-lines-regex "^\\(SYMBOLS:\\)[ \n]+\\([^;\t]*\\);") (defconst factor-int-constant-def-regex (factor-second-word-regex '("ALIEN:" "CHAR:" "NAN:"))) @@ -432,7 +432,7 @@ these lines in your .emacs: "\\_<\\(C:\\)[ \n]+\\([^ ]+\\)[ \n]+\\([^ ]+\\)") (defconst factor-typedef-regex - (format "\\_