|
17 | 17 |
|
18 | 18 | (in-package :software-configuration)
|
19 | 19 |
|
20 |
| -;; CONFIG := (ENTRIES)* |
21 |
| -;; ENTRIES := COMMENT* |
22 |
| -;; (USE-FILE |
23 |
| -;; | IGNORE-USER-RE-ASSIGN |
24 |
| -;; | IGNORE-USER-BOOST-RE-ASSIGN |
25 |
| -;; | COLOR-RE-ASSIGN |
26 |
| -;; | SERVER-ASSIGN |
27 |
| -;; | USERNAME-ASSIGN |
28 |
| -;; | OPEN-LINK-HELPER |
29 |
| -;; | POST-ALLOWED-LANGUAGE |
30 |
| -;; | GENERIC-ASSIGN) |
31 |
| -;; COMMENT* |
32 |
| -;; SERVER-ASSIGN := SERVER-KEY BLANKS ASSIGN BLANKS GENERIC-VALUE BLANKS |
33 |
| -;; USERNAME-ASSIGN := USERNAME-KEY BLANKS WITH BLANKS GENERIC-VALUE BLANKS |
34 |
| -;; OPEN-LINK-HELPER := OPEN-LINK-HELPER-KEY BLANKS ASSIGN BLANKS |
35 |
| -;; REGEXP PROGRAM-NAME BLANKS USE-CACHE? NOWAIT? |
36 |
| -;; GENERIC-ASSIGN := (and key blanks assign blanks |
37 |
| -;; (or quoted-string |
38 |
| -;; hexcolor |
39 |
| -;; colorname |
40 |
| -;; generic-value) ; the order in this list *is* important |
41 |
| -;; blanks) |
42 |
| -;; IGNORE-USER-RE-ASSIGN := IGNORE-USER-RE-KEY ASSIGN REGEXP |
| 20 | +;; CONFIG := (ENTRIES)* |
| 21 | +;; ENTRIES := COMMENT* |
| 22 | +;; (USE-FILE |
| 23 | +;; | IGNORE-USER-RE-ASSIGN |
| 24 | +;; | IGNORE-USER-BOOST-RE-ASSIGN |
| 25 | +;; | IGNORE-TAG-RE-ASSIGN |
| 26 | +;; | COLOR-RE-ASSIGN |
| 27 | +;; | SERVER-ASSIGN |
| 28 | +;; | USERNAME-ASSIGN |
| 29 | +;; | OPEN-LINK-HELPER |
| 30 | +;; | POST-ALLOWED-LANGUAGE |
| 31 | +;; | GENERIC-ASSIGN) |
| 32 | +;; COMMENT* |
| 33 | +;; SERVER-ASSIGN := SERVER-KEY BLANKS ASSIGN BLANKS GENERIC-VALUE BLANKS |
| 34 | +;; USERNAME-ASSIGN := USERNAME-KEY BLANKS WITH BLANKS GENERIC-VALUE BLANKS |
| 35 | +;; OPEN-LINK-HELPER := OPEN-LINK-HELPER-KEY BLANKS ASSIGN BLANKS |
| 36 | +;; REGEXP PROGRAM-NAME BLANKS USE-CACHE? NOWAIT? |
| 37 | +;; GENERIC-ASSIGN := (and key blanks assign blanks |
| 38 | +;; (or quoted-string |
| 39 | +;; hexcolor |
| 40 | +;; colorname |
| 41 | +;; generic-value) ; the order in this list *is* important |
| 42 | +;; blanks) |
| 43 | +;; IGNORE-USER-RE-ASSIGN := IGNORE-USER-RE-KEY ASSIGN REGEXP |
43 | 44 | ;; IGNORE-USER-BOOST-RE-ASSIGN := IGNORE-USER-RE-KEY ASSIGN REGEXP
|
44 |
| -;; COLOR-RE-ASSIGN := COLOR-RE-KEY ASSIGN REGEXP FG-COLOR (? ATTRIBUTE-VALUE) |
45 |
| -;; USE-FILE := (AND USE BLANKS FILEPATH BLANKS) |
46 |
| -;; POST-ALLOWED-LANGUAGE := "post-allowed-language" BLANKS ASSIGN REGEXP |
47 |
| -;; KEY := FIELD (FIELD-SEPARATOR KEY)* |
48 |
| -;; BLANKS := (BLANK)* |
49 |
| -;; FILEPATH := QUOTED-STRING |
50 |
| -;; PROGRAM-NAME := QUOTED-STRING |
51 |
| -;; USE-CACHE := USE BLANKS CACHE |
52 |
| -;; NOWAIT := NO BLANKS WAIT BLANKS (BUFFER-LABEL BLANKS DIGIT+)? |
53 |
| -;; NO := "no" |
54 |
| -;; WAIT := "wait" |
55 |
| -;; CACHE := "cache" |
56 |
| -;; USE := "use" |
57 |
| -;; SERVER-KEY := "server" |
58 |
| -;; USERNAME-KEY := "username" |
59 |
| -;; COLOR-RE-KEY := "color-regexp" |
60 |
| -;; IGNORE-USER-RE-KEY := "ignore-user-regexp" |
61 |
| -;; OPEN := "open" |
62 |
| -;; OPEN-LINK-HELPER-KEY := OPEN |
63 |
| -;; WITH-KEY := "with" |
64 |
| -;; BUFFER-LABEL := "buffer" |
65 |
| -;; REGEXP := QUOTED-STRING |
66 |
| -;; QUOTED-STRING := #\" (not #\") #\" |
67 |
| -;; FIELD := ( (or ESCAPED-CHARACTER |
68 |
| -;; (not #\# ASSIGN BLANK FIELD-SEPARATOR) )* |
69 |
| -;; COMMENT := BLANKS #\# (not #\Newline)* BLANKS |
70 |
| -;; FIELD-SEPARATOR := #\. |
71 |
| -;; GENERIC-VALUE := KEY |
72 |
| -;; ASSIGN := #\= |
73 |
| -;; BLANK := (or #\space #\Newline #\Tab) |
74 |
| -;; BG-COLOR := COLOR |
75 |
| -;; FG-COLOR := COLOR |
76 |
| -;; COLOR := HEX-COLOR | COLOR-NAME |
77 |
| -;; HEX-COLOR := HEXCOLOR-PREFIX |
78 |
| -;; HEXDIGIT HEXDIGIT -> red |
79 |
| -;; HEXDIGIT HEXDIGIT -> green |
80 |
| -;; HEXDIGIT HEXDIGIT -> blue |
81 |
| -;; ESCAPED-CHARACTER := #\\ any-character |
82 |
| -;; HEXCOLOR-PREFIX := #\# |
83 |
| -;; HEX-DIGIT := (and (character-ranges #\0 #\9) |
84 |
| -;; (character-ranges #\a #\f) |
85 |
| -;; (character-ranges #\A #\f) |
86 |
| -;; DIGIT := (character-ranges #\0 #\9) |
87 |
| -;; ATTRIBUTE-VALUE := "bold" |
88 |
| -;; | "italic" |
89 |
| -;; | "underline" |
90 |
| -;; | "blink" |
91 |
| -;; COLOR-NAME := "black" |
92 |
| -;; | "red" |
93 |
| -;; | "green" |
94 |
| -;; | "yellow" |
95 |
| -;; | "blue" |
96 |
| -;; | "magenta" |
97 |
| -;; | "cyan" |
98 |
| -;; | "white" |
| 45 | +;; IGNORE-TAG-RE-ASSIGN := IGNORE-USER-RE-KEY ASSIGN REGEXP |
| 46 | +;; COLOR-RE-ASSIGN := COLOR-RE-KEY ASSIGN REGEXP FG-COLOR (? ATTRIBUTE-VALUE) |
| 47 | +;; USE-FILE := (AND USE BLANKS FILEPATH BLANKS) |
| 48 | +;; POST-ALLOWED-LANGUAGE := "post-allowed-language" BLANKS ASSIGN REGEXP |
| 49 | +;; KEY := FIELD (FIELD-SEPARATOR KEY)* |
| 50 | +;; BLANKS := (BLANK)* |
| 51 | +;; FILEPATH := QUOTED-STRING |
| 52 | +;; PROGRAM-NAME := QUOTED-STRING |
| 53 | +;; USE-CACHE := USE BLANKS CACHE |
| 54 | +;; NOWAIT := NO BLANKS WAIT BLANKS (BUFFER-LABEL BLANKS DIGIT+)? |
| 55 | +;; NO := "no" |
| 56 | +;; WAIT := "wait" |
| 57 | +;; CACHE := "cache" |
| 58 | +;; USE := "use" |
| 59 | +;; SERVER-KEY := "server" |
| 60 | +;; USERNAME-KEY := "username" |
| 61 | +;; COLOR-RE-KEY := "color-regexp" |
| 62 | +;; IGNORE-USER-RE-KEY := "ignore-user-regexp" |
| 63 | +;; OPEN := "open" |
| 64 | +;; OPEN-LINK-HELPER-KEY := OPEN |
| 65 | +;; WITH-KEY := "with" |
| 66 | +;; BUFFER-LABEL := "buffer" |
| 67 | +;; REGEXP := QUOTED-STRING |
| 68 | +;; QUOTED-STRING := #\" (not #\") #\" |
| 69 | +;; FIELD := ( (or ESCAPED-CHARACTER |
| 70 | +;; (not #\# ASSIGN BLANK FIELD-SEPARATOR) )* |
| 71 | +;; COMMENT := BLANKS #\# (not #\Newline)* BLANKS |
| 72 | +;; FIELD-SEPARATOR := #\. |
| 73 | +;; GENERIC-VALUE := KEY |
| 74 | +;; ASSIGN := #\= |
| 75 | +;; BLANK := (or #\space #\Newline #\Tab) |
| 76 | +;; BG-COLOR := COLOR |
| 77 | +;; FG-COLOR := COLOR |
| 78 | +;; COLOR := HEX-COLOR | COLOR-NAME |
| 79 | +;; HEX-COLOR := HEXCOLOR-PREFIX |
| 80 | +;; HEXDIGIT HEXDIGIT -> red |
| 81 | +;; HEXDIGIT HEXDIGIT -> green |
| 82 | +;; HEXDIGIT HEXDIGIT -> blue |
| 83 | +;; ESCAPED-CHARACTER := #\\ any-character |
| 84 | +;; HEXCOLOR-PREFIX := #\# |
| 85 | +;; HEX-DIGIT := (and (character-ranges #\0 #\9) |
| 86 | +;; (character-ranges #\a #\f) |
| 87 | +;; (character-ranges #\A #\f) |
| 88 | +;; DIGIT := (character-ranges #\0 #\9) |
| 89 | +;; ATTRIBUTE-VALUE := "bold" |
| 90 | +;; | "italic" |
| 91 | +;; | "underline" |
| 92 | +;; | "blink" |
| 93 | +;; COLOR-NAME := "black" |
| 94 | +;; | "red" |
| 95 | +;; | "green" |
| 96 | +;; | "yellow" |
| 97 | +;; | "blue" |
| 98 | +;; | "magenta" |
| 99 | +;; | "cyan" |
| 100 | +;; | "white" |
99 | 101 |
|
100 | 102 | (define-constant +conf-filename+ "main.conf" :test #'string=)
|
101 | 103 |
|
|
272 | 274 | (defrule ignore-user-boost-re-key "ignore-user-boost-regexp"
|
273 | 275 | (:constant :ignore-user-boost-re))
|
274 | 276 |
|
| 277 | +(defrule ignore-tag-re-assign "ignore-tag-regexp" |
| 278 | + (:constant :ignore-tag-re)) |
| 279 | + |
275 | 280 | (defrule ignore-user-re-assign
|
276 | 281 | (and ignore-user-re-key blanks
|
277 | 282 | assign blanks regexp blanks)
|
|
439 | 444 | color-re-assign
|
440 | 445 | ignore-user-re-assign
|
441 | 446 | ignore-user-boost-re-assign
|
| 447 | + ignore-tag-re-assign |
442 | 448 | server-assign
|
443 | 449 | username-assign
|
444 | 450 | open-link-helper
|
|
622 | 628 | color-re
|
623 | 629 | ignore-user-re
|
624 | 630 | ignore-user-boost-re
|
| 631 | + ignore-tag-re |
625 | 632 | post-allowed-language
|
626 | 633 | purge-history-days-offset
|
627 | 634 | purge-cache-days-offset
|
|
644 | 651 | ((or (eq +key-color-re+ key)
|
645 | 652 | (eq +key-ignore-user-re+ key)
|
646 | 653 | (eq +key-ignore-user-boost-re+ key)
|
| 654 | + (eq +key-ignore-tag-re+ key) |
647 | 655 | (eq +key-open-link-helper+ key)
|
648 | 656 | (eq +key-post-allowed-language+ key))
|
649 | 657 | (setf (access:accesses *software-configuration* key)
|
|
967 | 975 | (access:accesses *software-configuration*
|
968 | 976 | +key-ignore-user-boost-re+))
|
969 | 977 |
|
| 978 | +(defun ignore-tag-regexps () |
| 979 | + (access:accesses *software-configuration* |
| 980 | + +key-ignore-tag-re+)) |
| 981 | + |
970 | 982 | (defmacro gen-win-key-access (fn-suffix key)
|
971 | 983 | `(defun ,(misc:format-fn-symbol t "win-~a" fn-suffix) (win-key)
|
972 | 984 | (access:accesses *software-configuration*
|
|
0 commit comments