2011-08-01 19:49:39 +02:00
|
|
|
# JOE syntax highlight file for JAVA
|
|
|
|
|
|
|
|
# Needs: \uXXXX for unicode in strings
|
|
|
|
# improve escape parsing
|
|
|
|
|
|
|
|
=Idle
|
|
|
|
=Comment green
|
2011-08-02 18:53:07 +02:00
|
|
|
=CommentLabel bold green
|
2011-08-01 19:49:39 +02:00
|
|
|
=Constant cyan
|
|
|
|
=Escape bold cyan
|
|
|
|
=Type bold
|
|
|
|
=Keyword bold
|
|
|
|
=Operator bold
|
|
|
|
=Bad bold red
|
|
|
|
=Brace magenta
|
2011-08-06 00:38:52 +02:00
|
|
|
=Control
|
2011-08-01 19:49:39 +02:00
|
|
|
|
2011-08-01 20:48:33 +02:00
|
|
|
=Methods
|
|
|
|
|
2011-08-01 19:49:39 +02:00
|
|
|
:begin Idle
|
|
|
|
* begin noeat call=.java()
|
|
|
|
|
|
|
|
#
|
|
|
|
# Java as a subroute- for use as java script in html
|
|
|
|
#
|
|
|
|
|
|
|
|
.subr java
|
|
|
|
|
|
|
|
:idle Idle
|
|
|
|
* idle
|
|
|
|
"\n" idle
|
|
|
|
"/" slash
|
|
|
|
"0" first_digit recolor=-1
|
2011-08-01 20:48:33 +02:00
|
|
|
"1-9" decimal recolor=-1
|
2011-08-01 19:49:39 +02:00
|
|
|
"." maybe_float
|
|
|
|
"\"" string recolor=-1
|
|
|
|
"'" char recolor=-1
|
2011-08-01 20:48:33 +02:00
|
|
|
"a-zA-Z_" ident mark buffer
|
2011-08-01 19:49:39 +02:00
|
|
|
"{}" brace recolor=-1
|
|
|
|
.ifdef script
|
2011-08-01 20:48:33 +02:00
|
|
|
",:;=()>[]*&|!~+\-%^" control recolor=-1
|
2011-08-01 19:49:39 +02:00
|
|
|
"<" maybe_done
|
|
|
|
.else
|
2011-08-01 20:48:33 +02:00
|
|
|
",:;=()><[]*&|!~+\-%^" control recolor=-1
|
2011-08-01 19:49:39 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
:maybe_done Control
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
|
|
|
"/" idle noeat return recolor=-2
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
:brace Brace
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
:control Control
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
:slash Idle
|
|
|
|
* idle noeat
|
|
|
|
"*" comment recolor=-2
|
|
|
|
"/" line_comment recolor=-2
|
|
|
|
|
|
|
|
:comment Comment
|
|
|
|
* comment
|
2011-08-02 18:53:07 +02:00
|
|
|
# might be TODO label
|
|
|
|
"BFHNTX" comment noeat call=.comment_todo()
|
2011-08-01 19:49:39 +02:00
|
|
|
"*" maybe_end_comment
|
|
|
|
|
|
|
|
:maybe_end_comment Comment
|
2011-08-02 18:53:07 +02:00
|
|
|
* comment noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"/" idle
|
|
|
|
"*" maybe_end_comment
|
|
|
|
|
|
|
|
:line_comment Comment
|
|
|
|
* line_comment
|
2011-08-02 18:53:07 +02:00
|
|
|
# might be TODO label
|
|
|
|
"BFHNTX" line_comment noeat call=.comment_todo()
|
2011-08-01 19:49:39 +02:00
|
|
|
"\n" idle
|
|
|
|
|
|
|
|
:first_digit Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"xX" hex
|
|
|
|
"." float
|
|
|
|
"eE" epart
|
|
|
|
"0-7" octal
|
|
|
|
"89" bad_number recolor=-1
|
|
|
|
|
|
|
|
:bad_number Bad
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9" bad_number
|
|
|
|
|
|
|
|
:octal Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-7" octal
|
|
|
|
"89" bad_number recolor=-1
|
|
|
|
|
|
|
|
:hex Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9A-Fa-f" hex
|
|
|
|
|
|
|
|
:decimal Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9" decimal
|
|
|
|
"eE" epart
|
|
|
|
"." float
|
|
|
|
|
|
|
|
:maybe_float Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle recolor=-2 noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9" float recolor=-2
|
|
|
|
|
|
|
|
:float Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"eE" epart
|
|
|
|
"0-9" float
|
|
|
|
|
|
|
|
:epart Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9+\-" enum
|
|
|
|
|
|
|
|
:enum Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
"0-9" enum
|
|
|
|
|
|
|
|
:string Constant
|
|
|
|
* string
|
|
|
|
"\"" idle
|
|
|
|
"\\" string_escape recolor=-1
|
|
|
|
"%" string_control recolor=-1
|
|
|
|
|
|
|
|
:string_escape Escape
|
|
|
|
* string
|
|
|
|
"x" string_hex1
|
|
|
|
"0-7" string_octal2
|
|
|
|
"\n" string recolor=-2
|
|
|
|
|
|
|
|
:string_hex1 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-9a-fA-F" string_hex2
|
|
|
|
|
|
|
|
:string_hex2 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-9a-fA-F" string
|
|
|
|
|
|
|
|
:string_octal2 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-7" string_octal3
|
|
|
|
|
|
|
|
:string_octal3 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-7" string
|
|
|
|
|
|
|
|
:string_control Escape
|
|
|
|
* string_control
|
|
|
|
"\n" reset
|
|
|
|
"diouxXeEfFgGaAcspn%SC" string
|
|
|
|
|
|
|
|
:char Constant
|
|
|
|
* char
|
|
|
|
"\n" reset
|
|
|
|
"'" idle
|
|
|
|
"\\" char_escape recolor=-1
|
|
|
|
|
|
|
|
:char_escape Escape
|
|
|
|
* char
|
|
|
|
"x" char_hex1
|
|
|
|
"0-7" char_octal2
|
|
|
|
"\n" char recolor=-2
|
|
|
|
|
|
|
|
:char_hex1 Escape
|
|
|
|
* char noeat
|
|
|
|
"0-9a-fA-F" char_hex2
|
|
|
|
|
|
|
|
:char_hex2 Escape
|
|
|
|
* char noeat
|
|
|
|
"0-9a-fA-F" char
|
|
|
|
|
|
|
|
:char_octal2 Escape
|
|
|
|
* char noeat
|
|
|
|
"0-7" char_octal3
|
|
|
|
|
|
|
|
:char_octal3 Escape
|
|
|
|
* char noeat
|
|
|
|
"0-7" char
|
|
|
|
|
|
|
|
:ident Idle
|
2011-08-01 20:48:33 +02:00
|
|
|
* ident_end noeat markend strings
|
2011-08-01 19:49:39 +02:00
|
|
|
"abstract" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"assert" kw
|
2011-08-01 19:49:39 +02:00
|
|
|
"boolean" type
|
|
|
|
"break" kw
|
|
|
|
"byte" type
|
|
|
|
"case" kw
|
|
|
|
"catch" kw
|
|
|
|
"char" type
|
|
|
|
"class" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"const" bad_kw
|
2011-08-01 19:49:39 +02:00
|
|
|
"continue" kw
|
|
|
|
"default" kw
|
|
|
|
"do" kw
|
|
|
|
"double" type
|
|
|
|
"else" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"enum" kw
|
2011-08-01 19:49:39 +02:00
|
|
|
"extends" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"false" lit
|
2011-08-01 19:49:39 +02:00
|
|
|
"final" kw
|
|
|
|
"finally" kw
|
|
|
|
"float" type
|
|
|
|
"for" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"goto" bad_kw
|
2011-08-01 19:49:39 +02:00
|
|
|
"if" kw
|
|
|
|
"implements" kw
|
|
|
|
"import" kw
|
|
|
|
"instanceof" operator
|
|
|
|
"int" type
|
|
|
|
"interface" kw
|
|
|
|
"long" type
|
|
|
|
"native" kw
|
|
|
|
"new" operator
|
|
|
|
"null" lit
|
|
|
|
"package" kw
|
|
|
|
"private" kw
|
|
|
|
"protected" kw
|
|
|
|
"public" kw
|
|
|
|
"return" kw
|
|
|
|
"short" type
|
|
|
|
"static" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"strictfp" kw
|
2011-08-01 19:49:39 +02:00
|
|
|
"super" kw
|
|
|
|
"switch" kw
|
|
|
|
"synchronized" kw
|
|
|
|
"this" kw
|
|
|
|
"throw" kw
|
|
|
|
"throws" kw
|
|
|
|
"transient" kw
|
2011-08-05 23:32:46 +02:00
|
|
|
"true" lit
|
2011-08-01 19:49:39 +02:00
|
|
|
"try" kw
|
|
|
|
"void" kw
|
|
|
|
"volatile" kw
|
|
|
|
"while" kw
|
|
|
|
done
|
|
|
|
"a-zA-Z0-9_" ident
|
|
|
|
|
|
|
|
:type Type
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
:kw Keyword
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
2011-08-05 23:32:46 +02:00
|
|
|
:bad_kw Bad
|
|
|
|
* idle noeat
|
|
|
|
|
2011-08-01 19:49:39 +02:00
|
|
|
:lit Constant
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
:operator Operator
|
2011-08-01 20:48:33 +02:00
|
|
|
* idle noeat
|
|
|
|
|
|
|
|
:ident_end Idle
|
|
|
|
* idle noeat
|
|
|
|
" " ident_end
|
2011-08-06 00:38:52 +02:00
|
|
|
"(" method_end noeat recolormark
|
2011-08-01 20:48:33 +02:00
|
|
|
|
|
|
|
:method_end Methods
|
|
|
|
* idle noeat
|
2011-08-01 19:49:39 +02:00
|
|
|
|
|
|
|
.end
|
2011-08-02 18:53:07 +02:00
|
|
|
|
|
|
|
.subr comment_todo
|
|
|
|
# initial state
|
|
|
|
:comment_todo_init Comment
|
|
|
|
* comment_todo_guess buffer
|
|
|
|
|
|
|
|
# highlight common TODO labels
|
|
|
|
:comment_todo_guess Comment
|
|
|
|
* comment_todo_unknown noeat strings
|
|
|
|
"BUG" comment_todo
|
|
|
|
"FIXME" comment_todo
|
|
|
|
"HACK" comment_todo
|
|
|
|
"NOTE" comment_todo
|
|
|
|
"TODO" comment_todo
|
|
|
|
"XXX" comment_todo
|
|
|
|
done
|
|
|
|
"A-Z" comment_todo_guess
|
|
|
|
|
|
|
|
:comment_todo_unknown Comment
|
|
|
|
* NULL noeat return
|
|
|
|
|
|
|
|
:comment_todo CommentLabel
|
|
|
|
* NULL noeat return
|
|
|
|
.end
|