Diff of /syntax/ada.jsf.in [000000] .. [409b67]  Maximize  Restore

  Switch to unified view

a b/syntax/ada.jsf.in
1
# JOE syntax highlight file for ADA
2
3
# Define colors
4
5
=Idle
6
=Comment green
7
=Constant cyan
8
=Escape bold cyan
9
=Keyword bold
10
=Operator bold
11
12
:idle Idle
13
  *       idle
14
  "-"     maybe_comment
15
  "'"     char        recolor=-1
16
  "\""        string      recolor=-1
17
  "0-9"       first_digit recolor=-1
18
  "."     maybe_float
19
  "\""        string      recolor=-1
20
  "Bb"        maybe_binary    buffer
21
  "Oo"        maybe_octal buffer
22
  "Xx"        maybe_hex   buffer
23
  "ac-np-wyzAC-NP-WYZ"    ident   buffer
24
25
:maybe_comment Idle
26
  *       idle        noeat
27
  "-"     comment     recolor=-2
28
29
:comment Comment
30
  *       comment
31
  "\n"        idle
32
33
34
# Character constant
35
36
:char Idle
37
  *       char1
38
39
:char1 Idle
40
  *       idle
41
  "'"     char2       recolor=-3
42
43
:char2 Constant
44
  *       idle        noeat
45
46
# Strings
47
48
:maybe_binary Idle
49
  *       ident       noeat
50
  "\""        string      recolor=-2
51
52
:maybe_octal Idle
53
  *       ident       noeat
54
  "\""        string      recolor=-2
55
56
:maybe_hex Idle
57
  *       ident       noeat
58
  "\""        string      recolor=-2
59
60
:string   Constant
61
  *       string
62
  "\n"        idle
63
  "\""        idle
64
  "\\"        string_escape   recolor=-1
65
66
:string_escape Escape
67
  *       string
68
  "\n"        string      recolor=-2
69
70
# Integer constants
71
72
:first_digit Constant
73
  *       idle        noeat
74
  "."     float
75
  "_"     first_digit
76
  "0-9"       first_digit
77
78
# Floating point
79
80
:maybe_float Constant
81
  *       idle    recolor=-2  noeat
82
  "0-9"       float       recolor=-2
83
84
:float Constant
85
  *       idle    noeat
86
  "eE"        epart
87
  "0-9"       float
88
89
:epart    Constant
90
  *       idle    noeat
91
  "0-9+\-"    enum
92
93
:enum Constant
94
  *       idle    noeat
95
  "0-9"       enum
96
97
# Identifiers
98
99
:ident    Idle
100
  *       quote       noeat istrings
101
  "abort"     kw
102
  "abs"       operator
103
  "abstract"  kw
104
  "accept"    kw
105
  "aliased"   kw
106
  "all"       kw
107
  "and"       operator
108
  "array"     kw
109
  "at"        kw
110
  "begin"     kw
111
  "body"      kw
112
  "case"      kw
113
  "constant"  kw
114
  "declare"   kw
115
  "delay"     kw
116
  "delta"     kw
117
  "digits"    kw
118
  "do"        kw
119
  "else"      kw
120
  "elsif"     kw
121
  "end"       kw
122
  "entry"     kw
123
  "exception" kw
124
  "exit"      kw
125
  "for"       kw
126
  "function"  kw
127
  "generic"   kw
128
  "goto"      kw
129
  "if"        kw
130
  "in"        kw
131
  "interface" kw
132
  "is"        kw
133
  "limited"   kw
134
  "loop"      kw
135
  "mod"       kw
136
  "new"       kw
137
  "not"       operator
138
  "null"      kw
139
  "of"        kw
140
  "or"        operator
141
  "others"    kw
142
  "out"       kw
143
  "overriding"    kw
144
  "package"   kw
145
  "pragma"    kw
146
  "private"   kw
147
  "procedure" kw
148
  "protected" kw
149
  "raise"     kw
150
  "range"     kw
151
  "record"    kw
152
  "rem"       operator
153
  "renames"   kw
154
  "requeue"   kw
155
  "return"    kw
156
  "reverse"   kw
157
  "select"    kw
158
  "separate"  kw
159
  "subtype"   kw
160
  "synchronized"  kw
161
  "tagged"    kw
162
  "task"      kw
163
  "terminate" kw
164
  "then"      kw
165
  "type"      kw
166
  "until"     kw
167
  "use"       kw
168
  "when"      kw
169
  "while"     kw
170
  "with"      kw
171
  "xor"       operator
172
done
173
  "a-zA-Z0-9_"    ident
174
175
:operator Operator
176
  *   idle    noeat
177
178
:kw Keyword
179
  *   idle    noeat
180
181
# identifiers separated with quote '
182
183
:quote    Idle
184
  *   idle    noeat
185
  "'" quote_word
186
187
:quote_word   Idle
188
  *   idle    noeat
189
  "a-zA-Z"    ident   buffer