-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspeqtr.el
40 lines (30 loc) · 999 Bytes
/
speqtr.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
;;; speqtr.el --- An emacs major mode for the SpeQTr specification and query language -*- lexical-binding: t; -*-
(define-generic-mode
;; name of mode
'speqtr-mode
;; comments
'(("#" . nil))
;; keyword list
'("->" "<-" "!->" "<-!" "within" "as"
"when" "recovery" "nominal" "case"
"and" "or" "true" "false" "_" "behavior" "behaviour" "end"
"unspecified" "in" "until" "prohibited")
;; font-lock list
'(
;; event@loc
("[[:word:]_]+@[[:word:]_]+" . 'font-lock-function-name-face)
("*@[[:word:]_]+" . 'font-lock-function-name-face)
("[[:word:]_]+@\\*" . 'font-lock-function-name-face)
;; label declaration
("as[[:space:]]+\\(\\w+\\)" 1 'font-lock-constant-face)
;; label dereference
("\\(\\w+\\)\\." 1 'font-lock-constant-face)
;; unification symbols
("\?\\w+" . 'font-lock-variable-name-face)
)
;; auto-mode list
'("\\.speqtr$")
;; function list
nil
;; documentation
"Mode for editing modality spec files")