ant.jsf.in (5343B)
1 # JOE syntax highlight file for Ant's build scripts 2 # by Christian Nicolai (http://mycrobase.de) 3 4 # http://ant.apache.org/ 5 6 # heavily based on the XML highlighter but with better colors since 7 # ant scripts heavily rely on the tags (blue is a bad color here) 8 # instead of their contents 9 10 # Improved XML highlighter by: Brian Candler <B.Candler@pobox.com> 11 12 =Idle 13 =Bad red bold 14 =Tag bold 15 =Attr 16 =Constant cyan 17 =Escape bold cyan 18 =EntityRef magenta 19 =Decl cyan 20 =CommentStart green 21 =CommentBody green 22 =CommentEnd green 23 =PIStart yellow bold 24 =PIBody yellow 25 =PIEnd yellow bold 26 =CdataStart blue bold 27 =CdataBody bold 28 =CdataEnd blue bold 29 30 =Keytag bold magenta #fg_310 # brown 31 32 33 # http://www.w3.org/TR/2004/REC-xml-20040204/ 34 # 35 # NOTE: For UNICODE compatibility, the ranges 36 # "A-Za-z_:" -- first character of Name 37 # "A-Za-z0-9._:-" -- subsequent characters of Name 38 # ought to be replaced with some appropriate Unicode character classes 39 # 40 # Actually the standard tells you which characters to use, see: 41 # http://www.w3.org/TR/xml11/#NT-NameStartChar 42 43 :content Idle 44 * content 45 "<" tag recolor=-1 46 "&" entityref recolor=-1 47 48 # > is allowed 49 # ">" error noeat recolor=-1 50 51 52 # In several contexts a space is an error, and since a coloured space is 53 # not visible, we colour the next non-space character as well. 54 55 :error Bad 56 * error_visible noeat recolor=-1 57 " \t\r\n" error 58 59 :error_visible Bad 60 * content 61 62 # Matched: & 63 64 :entityref EntityRef 65 * error noeat recolor=-1 66 "-.:\c" entityref 67 "#" entityref 68 ";" content 69 70 # Matched: < 71 72 :tag Tag 73 * error noeat recolor=-1 74 "/" end_tag 75 ":\i" start_or_empty_tag buffer 76 "?" pi_start recolor=-2 77 "!" decl recolor=-2 buffer 78 79 # Matched: </ 80 81 :end_tag Tag 82 * error noeat recolor=-1 83 ":\i" end_tag2 84 85 :end_tag2 Tag 86 * error noeat recolor=-1 87 "-.:\c" end_tag2 88 " \t\r\n" end_tag2_sp recolor=-1 89 ">" content 90 91 :end_tag2_sp Idle 92 * end_tag3 noeat 93 94 :end_tag3 Tag 95 * error noeat recolor=-1 96 " \t\r\n" end_tag3_sp recolor=-1 97 ">" content 98 99 :end_tag3_sp Idle 100 * end_tag_3 noeat 101 102 # Matched: <tag 103 104 # compare tag name of start/empty tags with a list 105 # of Ant specific keywords 106 :start_or_empty_tag Tag 107 * decide_tag_type noeat strings 108 "target" kw 109 done 110 "-.:\c" start_or_empty_tag 111 112 :kw Keytag 113 * decide_tag_type noeat 114 115 :decide_tag_type Tag 116 * error noeat recolor=-1 117 "/" empty_tag 118 " \t\r\n" start_or_empty_tag_sp 119 ">" content 120 121 :start_or_empty_tag_sp Idle 122 * tag_space noeat 123 124 # Matched: <tag/ 125 126 :empty_tag Tag 127 * error noeat recolor=-1 128 ">" content 129 130 # Matched: <tag SPACE 131 132 :tag_space Attr 133 * error noeat recolor=-1 134 " \t\r\n" tag_space_sp recolor=-1 135 ":\i" attr 136 "/" empty_tag recolor=-1 137 ">" close_tag recolor=-1 138 139 :tag_space_sp Idle 140 * tag_space noeat 141 142 # Matched: <tag attr 143 144 :attr Attr 145 * error noeat recolor=-1 146 "-.:\c" attr 147 " \t\r\n" attr_sp recolor=-1 148 "=" string 149 150 :attr_sp Idle 151 * attr_before noeat 152 153 :attr_before Attr 154 * error noeat recolor=-1 155 " \t\r\n" attr_sp recolor=-1 156 "=" string 157 158 # Matched: <tag attr= 159 160 :string Attr 161 * error noeat recolor=-1 162 " \t\r\n" string_sp recolor=-1 163 "\"" string_dq recolor=-1 164 "'" string_sq recolor=-1 165 166 :string_sp Idle 167 * string noeat 168 169 # Matched: <tag attr=" 170 171 :string_dq Constant 172 * string_dq 173 "<" error noeat recolor=-1 174 "&" char_dq recolor=-1 175 "\"" endstring 176 "$" string_dq call=.antvar() 177 178 # ">" error noeat recolor=-1 179 180 181 :string_sq Constant 182 * string_sq 183 "<" error noeat recolor=-1 184 "&" char_sq recolor=-1 185 "'" endstring 186 "$" string_sq call=.maybe_antvar() 187 188 # ">" error noeat recolor=-1 189 190 191 :char_dq EntityRef 192 * error noeat recolor=-1 193 "A-Za-z0-9._:-" char_dq 194 "#" char_dq 195 ";" string_dq 196 197 :char_sq EntityRef 198 * error noeat recolor=-1 199 "A-Za-z0-9._:-" char_sq 200 "#" char_sq 201 ";" string_sq 202 203 .subr maybe_antvar 204 # initial state 205 :maybe_antvar Constant 206 * NULL return 207 "{" antvar recolor=-2 208 209 :antvar Escape 210 * antvar 211 "}" NULL return 212 .end 213 214 # Matched: <tag attr="foo" 215 216 :endstring Attr 217 * error noeat recolor=-1 218 " \t\r\n" tag_space_sp 219 "/" empty_tag recolor=-1 220 ">" close_tag recolor=-1 221 222 # This state is just to recolor the final ">" at the end of <tag attr="val"> 223 224 :close_tag Tag 225 * content noeat 226 227 # Matched: <? 228 229 :pi_start PIStart 230 * pi noeat recolor=-1 231 232 :pi PIBody 233 * pi 234 "?" pi2 235 236 :pi2 PIBody 237 * pi 238 ">" pi_end recolor=-2 239 240 :pi_end PIEnd 241 * content noeat recolor=-1 242 243 # Matched: <! 244 245 :decl Decl 246 * decl strings 247 "!--" comment_start recolor=-5 248 "![CDATA[" cdata_start recolor=-10 249 done 250 "<" decl_nest 251 ">" content 252 253 # We allow one level of <...> nesting within declarations 254 255 :decl_nest Decl 256 * decl_nest 257 ">" decl 258 259 # Matched: <!-- 260 261 :comment_start CommentStart 262 * comment noeat 263 264 :comment CommentBody 265 * comment 266 "-" comment2 267 268 :comment2 CommentBody 269 * comment 270 "-" comment3 271 272 :comment3 CommentBody 273 * comment_error noeat recolor=-3 274 ">" comment_end recolor=-3 275 276 :comment_end CommentEnd 277 * content noeat recolor=-1 278 279 # For compatibility, the string "--" (double-hyphen) MUST NOT occur within 280 # comments. [http://www.w3.org/TR/REC-xml/ section 2.5] 281 282 :comment_error Bad 283 * comment 284 "-" comment_error 285 ">" comment_end recolor=-3 286 287 # Matched: <![CDATA[ 288 289 :cdata_start CdataStart 290 * cdata noeat 291 292 :cdata CdataBody 293 * cdata 294 "]" cdata2 295 296 :cdata2 CdataBody 297 * cdata 298 "]" cdata3 299 300 :cdata3 CdataBody 301 * cdata 302 ">" cdata_end recolor=-3 303 304 :cdata_end CdataEnd 305 * content noeat recolor=-1