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
|
syntax .java-esc
state char-esc special
char "bfnrt\\'\"" END special
char 0 oct
char u hex4
noeat short
state oct special
char 0-3 oct2
char 4-7 oct1
noeat END
state oct2 special
char 0-7 oct1
noeat END
state oct1 special
char 0-7 END special
noeat END
state hex4 special
char 0-9a-fA-F hex3
noeat END
state hex3 special
char 0-9a-fA-F hex2
noeat END
state hex2 special
char 0-9a-fA-F hex1
noeat END
state hex1 special
char 0-9a-fA-F END special
noeat END
state short special
char "\x80-\xff" not-ascii
# Any ASCII character but \n
char -n "\n" END error
# Don't eat \n
noeat END
# Eats (at least) one multibyte UTF-8 character
state not-ascii error
char "\x80-\xff" this
noeat END
syntax java
state code
char -b a-zA-Z_ ident
char 0 zero
char 1-9 dec
char . dot
char \" string
char \' char
str "//" cpp-comment
str "/*" c-comment
eat this
state cpp-comment comment
char "\n" code
eat this
state c-comment comment
str "*/" code comment
eat this
state ident
char -b a-zA-Z0-9_ this
inlist keyword code
inlist type code
inlist constant code
noeat code
state zero numeric
char xX hex
char 0-7 oct
char . float
noeat num-suffix
state oct numeric
char 0-7 this
noeat num-suffix
state dec numeric
char 0-9 this
char eE exp
char . float
noeat num-suffix
state hex numeric
char 0-9a-fA-F this
noeat num-suffix
state num-suffix
char lLfFdD check-suffix numeric
noeat check-suffix
state float-suffix
char fFdD check-suffix numeric
noeat check-suffix
state check-suffix error
char a-zA-Z0-9_ this
noeat code
state dot numeric
char 0-9 float
recolor code 1
noeat code
state float numeric
char 0-9 this
char eE exp
noeat float-suffix
state exp numeric
char +- exp-digit
char 0-9 exp-digit
noeat float-suffix
state exp-digit numeric
char 0-9 this
noeat float-suffix
state string
char \\ .java-esc:this
char \" code string
eat this
state char
char "\\" .java-esc:char-end
char "\n" code
char \' code error
char "\x80-\xff" not-ascii
eat char-end
# Eats (at least) one multibyte UTF-8 character
state not-ascii char
char "\x80-\xff" this
noeat char-end
state char-end char
char \' code char
eat code error
list keyword \
abstract assert boolean break byte case catch char class const \
continue default do double else enum extends final finally float \
for goto if implements import instanceof int interface long native \
new package private protected public return short static strictfp \
super switch synchronized this throw throws transient try void \
volatile while
list type \
byte short int long float double boolean char
list constant \
false true null
|