FUEL: Recognised parenthesised forms (e.g., stack effects) as syntactic constructs.

db4
Jose A. Ortega Ruiz 2009-02-14 13:44:12 +01:00
parent 29d1dfe7b5
commit 0f6598d95c
3 changed files with 4 additions and 6 deletions

View File

@ -65,7 +65,6 @@
;;; Editing commands: ;;; Editing commands:
(defvar fuel-edit--word-history nil) (defvar fuel-edit--word-history nil)
(defvar fuel-edit--previous-location nil)
(defun fuel-edit-vocabulary (&optional refresh vocab) (defun fuel-edit-vocabulary (&optional refresh vocab)
"Visits vocabulary file in Emacs. "Visits vocabulary file in Emacs.
@ -129,7 +128,7 @@ was last invoked."
(interactive) (interactive)
(condition-case nil (condition-case nil
(pop-tag-mark) (pop-tag-mark)
(error "No previous location for find word or vocab invokation"))) (error "No previous location for find word or vocab invocation")))
(defvar fuel-edit--buffer-history nil) (defvar fuel-edit--buffer-history nil)

View File

@ -88,7 +88,6 @@
(t 'default)))) (t 'default))))
((or (char-equal c ?U) (char-equal c ?C)) ((or (char-equal c ?U) (char-equal c ?C))
'factor-font-lock-parsing-word) 'factor-font-lock-parsing-word)
((char-equal c ?\() 'factor-font-lock-stack-effect)
((char-equal c ?\") 'factor-font-lock-string) ((char-equal c ?\") 'factor-font-lock-string)
(t 'factor-font-lock-comment))))) (t 'factor-font-lock-comment)))))

View File

@ -136,7 +136,7 @@
(fuel-syntax--second-word-regex '("&:" "SYMBOL:" "VAR:"))) (fuel-syntax--second-word-regex '("&:" "SYMBOL:" "VAR:")))
(defconst fuel-syntax--stack-effect-regex (defconst fuel-syntax--stack-effect-regex
"\\( ( .* )\\)\\|\\( (( .* ))\\)") "\\( ( [^\n]* )\\)\\|\\( (( [^\n]* ))\\)")
(defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);") (defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);")
@ -239,6 +239,8 @@
(modify-syntax-entry ?\r " " table) (modify-syntax-entry ?\r " " table)
(modify-syntax-entry ?\ " " table) (modify-syntax-entry ?\ " " table)
(modify-syntax-entry ?\n " " table) (modify-syntax-entry ?\n " " table)
(modify-syntax-entry ?\( "()" table)
(modify-syntax-entry ?\) ")(" table)
table)) table))
(defconst fuel-syntax--syntactic-keywords (defconst fuel-syntax--syntactic-keywords
@ -247,8 +249,6 @@
;; Comments: ;; Comments:
("\\_<\\(#?!\\) .*\\(\n\\|$\\)" (1 "<") (2 ">")) ("\\_<\\(#?!\\) .*\\(\n\\|$\\)" (1 "<") (2 ">"))
("\\_<\\(#?!\\)\\(\n\\|$\\)" (1 "<") (2 ">")) ("\\_<\\(#?!\\)\\(\n\\|$\\)" (1 "<") (2 ">"))
(" \\((\\)( \\([^\n]*\\) )\\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
(" \\((\\) \\([^\n]*\\) \\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
;; Strings ;; Strings
("\\( \\|^\\)\\(DLL\\|P\\|SBUF\\)\\(\"\\)\\([^\n\r\f\\\"]\\|\\\\.\\)*?\\(\"\\)" ("\\( \\|^\\)\\(DLL\\|P\\|SBUF\\)\\(\"\\)\\([^\n\r\f\\\"]\\|\\\\.\\)*?\\(\"\\)"
(3 "\"") (5 "\"")) (3 "\"") (5 "\""))