File: asterisk.jsf

package info (click to toggle)
ne 3.3.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,192 kB
  • sloc: ansic: 28,739; perl: 571; makefile: 265; sh: 9
file content (179 lines) | stat: -rw-r--r-- 2,991 bytes parent folder | download | duplicates (2)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# JOE syntax highlight file for Asterisk (INI alike) files
# Original Credit (2015): Christian Nicolai, https://github.com/cmur2/joe-syntax
# AstLinux Project (2019): Support block-comments, nested ${}'s (up to 4), #include's (#inc)
# Usage:
# -- extensions snippet --
# asterisk    4    ^(;|\[\w+\])
# .conf
# --

=Idle
=Comment	green
=Constant	cyan
=Escape		magenta
=Include	bold blue
=Bad		bold red

=Key
=Separator	bold
=SeparatorArrow	bold
=Section	bold magenta

:line_start Idle
	*		key		noeat
	"\n"		line_start
	" \t\r"		line_start # leading spaces
	";"		semi_comment	recolor=-1
	"#"		maybe_include	recolor=-1
	"["		section		recolor=-1
	"="		missing_key	recolor=-1

:dash_start_comment Comment
	*		line_comment
	"-"		dash_exception_comment
	"\n"		line_start

:dash_exception_comment Comment
	*		block_comment
	"-"		line_comment  # Except ;--- is not a block comment

:block_comment Comment
	*		block_comment
	"-"		dash_end_comment

:dash_end_comment Comment
	*		block_comment
	"-"		maybe_end_comment

:maybe_end_comment Comment
	*		block_comment
	";"		line_start
	"-"		maybe_end_comment

:semi_comment Comment
	*		line_comment
	"-"		dash_start_comment
	"\n"		line_start

:maybe_include Comment
	*		line_comment
	"Ii"		maybe_include1
	"\n"		line_start

:maybe_include1 Comment
	*		line_comment
	"Nn"		maybe_include2
	"\n"		line_start

:maybe_include2 Comment
	*		line_comment
	"Cc"		include			recolor=-4
	"\n"		line_start

:include Include
	*		include
	";#"		line_comment		recolor=-1
	"\n"		line_start

:line_comment Comment
	*		line_comment
	"\n"		line_start

:section Section
	*		section
	"]"		section_post
	"\n"		section_unexp_end	recolor=-2

:section_post Idle
	*		section_post
	"\n"		line_start
	";#"		line_comment		recolor=-1

:section_unexp_end Bad
	*		line_start	noeat

:missing_key Bad
	*		value_pre	noeat

:key Key
	*		key
	" \t\r"		key_post	noeat
	"="		sep		recolor=-1
	"\n"		key_error	recolor=-2

:key_post Idle
	*		value_pre	noeat
	" \t\r"		key_post
	"="		sep		recolor=-1

:key_error Bad
	*		key		noeat

:sep Separator
	*		value_pre	noeat
	">"		sep_arrow	recolor=-2

:sep_arrow SeparatorArrow
	*		value_pre	noeat

:value_pre Idle
	*		value		noeat
	" \t\r"		value_pre

:value Constant
	*		value
	"\\"		value_esc
	"\n"		line_start
	" \t\r"		maybe_comment	recolor=-1
	"$"		maybe_subst

:value_esc Escape
	*		value
	"\n"		value_error	recolor=-2

:value_error Bad
	*		value		noeat

:maybe_comment Idle
	*		value		noeat
	";#"		line_comment	recolor=-1

:maybe_subst Constant
	*		value		noeat
	"{"		subst		recolor=-2

:subst Escape
	*		subst
	"}"		value
	"\n"		line_start
	"$"		maybe_subst_1

:maybe_subst_1 Escape
	*		subst		noeat
	"{"		subst_1

:subst_1 Escape
	*		subst_1
	"}"		subst
	"\n"		line_start
	"$"		maybe_subst_2

:maybe_subst_2 Escape
	*		subst_1		noeat
	"{"		subst_2

:subst_2 Escape
	*		subst_2
	"}"		subst_1
	"\n"		line_start
	"$"		maybe_subst_3

:maybe_subst_3 Escape
	*		subst_2		noeat
	"{"		subst_3

:subst_3 Escape
	*		subst_3
	"}"		subst_2
	"\n"		line_start