| 1 |
WS : [ \t]+ -> skip ; |
| 2 |
|
| 3 |
OPEN : '<' -> pushMode(INSIDE) ; |
| 4 |
XMLDeclOpen : '<?xml' S -> pushMode(INSIDE) ; |
| 5 |
SPECIAL_OPEN: '<?' Name -> more, pushMode(PROC_INSTR) ; |
| 6 |
|
| 7 |
mode INSIDE; |
| 8 |
CLOSE : '>' -> popMode ; |
| 9 |
SPECIAL_CLOSE: '?>' -> popMode ; |
| 10 |
SLASH_CLOSE : '/>' -> popMode ; |
| 11 |
|
| 12 |
LQUOTE : '"' -> more, mode(STR) ; |
| 13 |
WS : [ \t]+ -> skip ; |
| 14 |
mode STR; |
| 15 |
STRING : '"' -> mode(DEFAULT_MODE) ; |
| 16 |
TEXT : . -> more ; |
| 17 |
|
| 18 |
DOUBLE : '"' .*? '"' -> type(STRING) ; |
| 19 |
SINGLE : '\'' .*? '\'' -> type(STRING) ; |
| 20 |
WS : [ \t]+ -> skip ; |
| 21 |
|
| 22 |
WS : [ \t]+ -> channel(HIDDEN) ; |
| 23 |
|
| 24 |
---------------------------------------------------- |
| 25 |
|
| 26 |
[ |
| 27 |
["definition", "WS"], |
| 28 |
["punctuation", ":"], |
| 29 |
["character-class", [ |
| 30 |
["punctuation", "["], |
| 31 |
["escape", "\\t"], |
| 32 |
["punctuation", "]"] |
| 33 |
]], |
| 34 |
["operator", "+"], |
| 35 |
["operator", "->"], |
| 36 |
["command", [ |
| 37 |
["function", "skip"] |
| 38 |
]], |
| 39 |
["punctuation", ";"], |
| 40 |
["definition", "OPEN"], |
| 41 |
["punctuation", ":"], |
| 42 |
["string", "'<'"], |
| 43 |
["operator", "->"], |
| 44 |
["command", [ |
| 45 |
["function", "pushMode"], |
| 46 |
["punctuation", "("], |
| 47 |
"INSIDE", |
| 48 |
["punctuation", ")"] |
| 49 |
]], |
| 50 |
["punctuation", ";"], |
| 51 |
["definition", "XMLDeclOpen"], |
| 52 |
["punctuation", ":"], |
| 53 |
["string", "'<?xml'"], |
| 54 |
["constant", "S"], |
| 55 |
["operator", "->"], |
| 56 |
["command", [ |
| 57 |
["function", "pushMode"], |
| 58 |
["punctuation", "("], |
| 59 |
"INSIDE", |
| 60 |
["punctuation", ")"] |
| 61 |
]], |
| 62 |
["punctuation", ";"], |
| 63 |
["definition", "SPECIAL_OPEN"], |
| 64 |
["punctuation", ":"], |
| 65 |
["string", "'<?'"], |
| 66 |
" Name ", |
| 67 |
["operator", "->"], |
| 68 |
["command", [ |
| 69 |
["function", "more"], |
| 70 |
["punctuation", ","], |
| 71 |
["function", "pushMode"], |
| 72 |
["punctuation", "("], |
| 73 |
"PROC_INSTR", |
| 74 |
["punctuation", ")"] |
| 75 |
]], |
| 76 |
["punctuation", ";"], |
| 77 |
["keyword", "mode"], |
| 78 |
["constant", "INSIDE"], |
| 79 |
["punctuation", ";"], |
| 80 |
["definition", "CLOSE"], |
| 81 |
["punctuation", ":"], |
| 82 |
["string", "'>'"], |
| 83 |
["operator", "->"], |
| 84 |
["command", [ |
| 85 |
["function", "popMode"] |
| 86 |
]], |
| 87 |
["punctuation", ";"], |
| 88 |
["definition", "SPECIAL_CLOSE"], |
| 89 |
["punctuation", ":"], |
| 90 |
["string", "'?>'"], |
| 91 |
["operator", "->"], |
| 92 |
["command", [ |
| 93 |
["function", "popMode"] |
| 94 |
]], |
| 95 |
["punctuation", ";"], |
| 96 |
["definition", "SLASH_CLOSE"], |
| 97 |
["punctuation", ":"], |
| 98 |
["string", "'/>'"], |
| 99 |
["operator", "->"], |
| 100 |
["command", [ |
| 101 |
["function", "popMode"] |
| 102 |
]], |
| 103 |
["punctuation", ";"], |
| 104 |
["definition", "LQUOTE"], |
| 105 |
["punctuation", ":"], |
| 106 |
["string", "'\"'"], |
| 107 |
["operator", "->"], |
| 108 |
["command", [ |
| 109 |
["function", "more"], |
| 110 |
["punctuation", ","], |
| 111 |
["function", "mode"], |
| 112 |
["punctuation", "("], |
| 113 |
"STR", |
| 114 |
["punctuation", ")"] |
| 115 |
]], |
| 116 |
["punctuation", ";"], |
| 117 |
["definition", "WS"], |
| 118 |
["punctuation", ":"], |
| 119 |
["character-class", [ |
| 120 |
["punctuation", "["], |
| 121 |
["escape", "\\t"], |
| 122 |
["punctuation", "]"] |
| 123 |
]], |
| 124 |
["operator", "+"], |
| 125 |
["operator", "->"], |
| 126 |
["command", [ |
| 127 |
["function", "skip"] |
| 128 |
]], |
| 129 |
["punctuation", ";"], |
| 130 |
["keyword", "mode"], |
| 131 |
["constant", "STR"], |
| 132 |
["punctuation", ";"], |
| 133 |
["definition", "STRING"], |
| 134 |
["punctuation", ":"], |
| 135 |
["string", "'\"'"], |
| 136 |
["operator", "->"], |
| 137 |
["command", [ |
| 138 |
["function", "mode"], |
| 139 |
["punctuation", "("], |
| 140 |
"DEFAULT_MODE", |
| 141 |
["punctuation", ")"] |
| 142 |
]], |
| 143 |
["punctuation", ";"], |
| 144 |
["definition", "TEXT"], |
| 145 |
["punctuation", ":"], |
| 146 |
" . ", |
| 147 |
["operator", "->"], |
| 148 |
["command", [ |
| 149 |
["function", "more"] |
| 150 |
]], |
| 151 |
["punctuation", ";"], |
| 152 |
["definition", "DOUBLE"], |
| 153 |
["punctuation", ":"], |
| 154 |
["string", "'\"'"], |
| 155 |
" .", |
| 156 |
["operator", "*?"], |
| 157 |
["string", "'\"'"], |
| 158 |
["operator", "->"], |
| 159 |
["command", [ |
| 160 |
["function", "type"], |
| 161 |
["punctuation", "("], |
| 162 |
"STRING", |
| 163 |
["punctuation", ")"] |
| 164 |
]], |
| 165 |
["punctuation", ";"], |
| 166 |
["definition", "SINGLE"], |
| 167 |
["punctuation", ":"], |
| 168 |
["string", "'\\''"], |
| 169 |
" .", |
| 170 |
["operator", "*?"], |
| 171 |
["string", "'\\''"], |
| 172 |
["operator", "->"], |
| 173 |
["command", [ |
| 174 |
["function", "type"], |
| 175 |
["punctuation", "("], |
| 176 |
"STRING", |
| 177 |
["punctuation", ")"] |
| 178 |
]], |
| 179 |
["punctuation", ";"], |
| 180 |
["definition", "WS"], |
| 181 |
["punctuation", ":"], |
| 182 |
["character-class", [ |
| 183 |
["punctuation", "["], |
| 184 |
["escape", "\\t"], |
| 185 |
["punctuation", "]"] |
| 186 |
]], |
| 187 |
["operator", "+"], |
| 188 |
["operator", "->"], |
| 189 |
["command", [ |
| 190 |
["function", "skip"] |
| 191 |
]], |
| 192 |
["punctuation", ";"], |
| 193 |
["definition", "WS"], |
| 194 |
["punctuation", ":"], |
| 195 |
["character-class", [ |
| 196 |
["punctuation", "["], |
| 197 |
["escape", "\\t"], |
| 198 |
["punctuation", "]"] |
| 199 |
]], |
| 200 |
["operator", "+"], |
| 201 |
["operator", "->"], |
| 202 |
["command", [ |
| 203 |
["function", "channel"], |
| 204 |
["punctuation", "("], |
| 205 |
"HIDDEN", |
| 206 |
["punctuation", ")"] |
| 207 |
]], |
| 208 |
["punctuation", ";"] |
| 209 |
] |
| 210 |
|
| 211 |
---------------------------------------------------- |
| 212 |
|
| 213 |
Checks for commands. |