1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

upgrade and improve storage efficiency of minilex

Until now minilex has done fine with providing a simple and fast header
decode state machine.  But for HTTP2.0, new headers must be added and it
is already on the limit of table branching in 1 byte (already using +0xf8
of a max limit of 0xff).

This changes the minilex format to improve storage size without loss of
decode efficiency.  It reduces the curent lws header table from 546 -> 403
bytes and upgrades the ability to increase table size by allowing jumps
to increase from the old limit of +255 states to +65535 states, which should
be enough for anything we ever want to do.

The max number of terminals is also increased from 128 to 2048.

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-03-09 11:49:21 +08:00
parent 1ee57f6fe8
commit bbc5c07054
3 changed files with 449 additions and 333 deletions

View file

@ -1,274 +1,287 @@
/* pos 0: state 0 */ 0x67 /* 'g' */, 0x0C /* (to pos 24 state 1) */,
0x70 /* 'p' */, 0x0F /* (to pos 32 state 5) */,
0x68 /* 'h' */, 0x14 /* (to pos 44 state 10) */,
0x63 /* 'c' */, 0x19 /* (to pos 56 state 15) */,
0x73 /* 's' */, 0x26 /* (to pos 84 state 26) */,
0x75 /* 'u' */, 0x4C /* (to pos 162 state 56) */,
0x6F /* 'o' */, 0x53 /* (to pos 178 state 64) */,
0x0D /* '.' */, 0x5F /* (to pos 204 state 77) */,
0x61 /* 'a' */, 0x90 /* (to pos 304 state 127) */,
0x69 /* 'i' */, 0x98 /* (to pos 322 state 134) */,
0x64 /* 'd' */, 0xF4 /* (to pos 508 state 225) */,
0xF2 /* 'r' */, 0xF8 /* (to pos 518 state 230) */,
/* pos 24: state 1 */ 0xE5 /* 'e' */, 0x01 /* (to pos 26 state 2) */,
/* pos 26: state 2 */ 0xF4 /* 't' */, 0x01 /* (to pos 28 state 3) */,
/* pos 28: state 3 */ 0xA0 /* ' ' */, 0x01 /* (to pos 30 state 4) */,
/* pos 30: state 4 */ 0x80, 0x00 /* - terminal marker 0 - */,
/* pos 32: state 5 */ 0x6F /* 'o' */, 0x02 /* (to pos 36 state 6) */,
0xF2 /* 'r' */, 0xB6 /* (to pos 398 state 171) */,
/* pos 36: state 6 */ 0xF3 /* 's' */, 0x01 /* (to pos 38 state 7) */,
/* pos 38: state 7 */ 0xF4 /* 't' */, 0x01 /* (to pos 40 state 8) */,
/* pos 40: state 8 */ 0xA0 /* ' ' */, 0x01 /* (to pos 42 state 9) */,
/* pos 42: state 9 */ 0x81, 0x00 /* - terminal marker 1 - */,
/* pos 44: state 10 */ 0x6F /* 'o' */, 0x02 /* (to pos 48 state 11) */,
0xF4 /* 't' */, 0x79 /* (to pos 288 state 119) */,
/* pos 48: state 11 */ 0xF3 /* 's' */, 0x01 /* (to pos 50 state 12) */,
/* pos 50: state 12 */ 0xF4 /* 't' */, 0x01 /* (to pos 52 state 13) */,
/* pos 52: state 13 */ 0xBA /* ':' */, 0x01 /* (to pos 54 state 14) */,
/* pos 54: state 14 */ 0x82, 0x00 /* - terminal marker 2 - */,
/* pos 56: state 15 */ 0x6F /* 'o' */, 0x02 /* (to pos 60 state 16) */,
0xE1 /* 'a' */, 0xB0 /* (to pos 410 state 177) */,
/* pos 60: state 16 */ 0x6E /* 'n' */, 0x02 /* (to pos 64 state 17) */,
0xEF /* 'o' */, 0xC8 /* (to pos 462 state 203) */,
/* pos 64: state 17 */ 0x6E /* 'n' */, 0x02 /* (to pos 68 state 18) */,
0xF4 /* 't' */, 0xCB /* (to pos 472 state 208) */,
/* pos 68: state 18 */ 0xE5 /* 'e' */, 0x01 /* (to pos 70 state 19) */,
/* pos 70: state 19 */ 0xE3 /* 'c' */, 0x01 /* (to pos 72 state 20) */,
/* pos 72: state 20 */ 0xF4 /* 't' */, 0x01 /* (to pos 74 state 21) */,
/* pos 74: state 21 */ 0xE9 /* 'i' */, 0x01 /* (to pos 76 state 22) */,
/* pos 76: state 22 */ 0xEF /* 'o' */, 0x01 /* (to pos 78 state 23) */,
/* pos 78: state 23 */ 0xEE /* 'n' */, 0x01 /* (to pos 80 state 24) */,
/* pos 80: state 24 */ 0xBA /* ':' */, 0x01 /* (to pos 82 state 25) */,
/* pos 82: state 25 */ 0x83, 0x00 /* - terminal marker 3 - */,
/* pos 84: state 26 */ 0xE5 /* 'e' */, 0x01 /* (to pos 86 state 27) */,
/* pos 86: state 27 */ 0xE3 /* 'c' */, 0x01 /* (to pos 88 state 28) */,
/* pos 88: state 28 */ 0xAD /* '-' */, 0x01 /* (to pos 90 state 29) */,
/* pos 90: state 29 */ 0xF7 /* 'w' */, 0x01 /* (to pos 92 state 30) */,
/* pos 92: state 30 */ 0xE5 /* 'e' */, 0x01 /* (to pos 94 state 31) */,
/* pos 94: state 31 */ 0xE2 /* 'b' */, 0x01 /* (to pos 96 state 32) */,
/* pos 96: state 32 */ 0xF3 /* 's' */, 0x01 /* (to pos 98 state 33) */,
/* pos 98: state 33 */ 0xEF /* 'o' */, 0x01 /* (to pos 100 state 34) */,
/* pos 100: state 34 */ 0xE3 /* 'c' */, 0x01 /* (to pos 102 state 35) */,
/* pos 102: state 35 */ 0xEB /* 'k' */, 0x01 /* (to pos 104 state 36) */,
/* pos 104: state 36 */ 0xE5 /* 'e' */, 0x01 /* (to pos 106 state 37) */,
/* pos 106: state 37 */ 0xF4 /* 't' */, 0x01 /* (to pos 108 state 38) */,
/* pos 108: state 38 */ 0xAD /* '-' */, 0x01 /* (to pos 110 state 39) */,
/* pos 110: state 39 */ 0x6B /* 'k' */, 0x08 /* (to pos 126 state 40) */,
0x70 /* 'p' */, 0x10 /* (to pos 144 state 47) */,
0x64 /* 'd' */, 0x27 /* (to pos 192 state 71) */,
0x76 /* 'v' */, 0x2F /* (to pos 210 state 80) */,
0x6F /* 'o' */, 0x36 /* (to pos 226 state 88) */,
0x65 /* 'e' */, 0x3C /* (to pos 240 state 95) */,
0x61 /* 'a' */, 0x46 /* (to pos 262 state 106) */,
0xEE /* 'n' */, 0x4C /* (to pos 276 state 113) */,
/* pos 126: state 40 */ 0xE5 /* 'e' */, 0x01 /* (to pos 128 state 41) */,
/* pos 128: state 41 */ 0xF9 /* 'y' */, 0x01 /* (to pos 130 state 42) */,
/* pos 130: state 42 */ 0x31 /* '1' */, 0x03 /* (to pos 136 state 43) */,
0x32 /* '2' */, 0x04 /* (to pos 140 state 45) */,
0xBA /* ':' */, 0x25 /* (to pos 208 state 79) */,
/* pos 136: state 43 */ 0xBA /* ':' */, 0x01 /* (to pos 138 state 44) */,
/* pos 138: state 44 */ 0x84, 0x00 /* - terminal marker 4 - */,
/* pos 140: state 45 */ 0xBA /* ':' */, 0x01 /* (to pos 142 state 46) */,
/* pos 142: state 46 */ 0x85, 0x00 /* - terminal marker 5 - */,
/* pos 144: state 47 */ 0xF2 /* 'r' */, 0x01 /* (to pos 146 state 48) */,
/* pos 146: state 48 */ 0xEF /* 'o' */, 0x01 /* (to pos 148 state 49) */,
/* pos 148: state 49 */ 0xF4 /* 't' */, 0x01 /* (to pos 150 state 50) */,
/* pos 150: state 50 */ 0xEF /* 'o' */, 0x01 /* (to pos 152 state 51) */,
/* pos 152: state 51 */ 0xE3 /* 'c' */, 0x01 /* (to pos 154 state 52) */,
/* pos 154: state 52 */ 0xEF /* 'o' */, 0x01 /* (to pos 156 state 53) */,
/* pos 156: state 53 */ 0xEC /* 'l' */, 0x01 /* (to pos 158 state 54) */,
/* pos 158: state 54 */ 0xBA /* ':' */, 0x01 /* (to pos 160 state 55) */,
/* pos 160: state 55 */ 0x86, 0x00 /* - terminal marker 6 - */,
/* pos 162: state 56 */ 0xF0 /* 'p' */, 0x01 /* (to pos 164 state 57) */,
/* pos 164: state 57 */ 0xE7 /* 'g' */, 0x01 /* (to pos 166 state 58) */,
/* pos 166: state 58 */ 0xF2 /* 'r' */, 0x01 /* (to pos 168 state 59) */,
/* pos 168: state 59 */ 0xE1 /* 'a' */, 0x01 /* (to pos 170 state 60) */,
/* pos 170: state 60 */ 0xE4 /* 'd' */, 0x01 /* (to pos 172 state 61) */,
/* pos 172: state 61 */ 0xE5 /* 'e' */, 0x01 /* (to pos 174 state 62) */,
/* pos 174: state 62 */ 0xBA /* ':' */, 0x01 /* (to pos 176 state 63) */,
/* pos 176: state 63 */ 0x87, 0x00 /* - terminal marker 7 - */,
/* pos 178: state 64 */ 0xF2 /* 'r' */, 0x01 /* (to pos 180 state 65) */,
/* pos 180: state 65 */ 0xE9 /* 'i' */, 0x01 /* (to pos 182 state 66) */,
/* pos 182: state 66 */ 0xE7 /* 'g' */, 0x01 /* (to pos 184 state 67) */,
/* pos 184: state 67 */ 0xE9 /* 'i' */, 0x01 /* (to pos 186 state 68) */,
/* pos 186: state 68 */ 0xEE /* 'n' */, 0x01 /* (to pos 188 state 69) */,
/* pos 188: state 69 */ 0xBA /* ':' */, 0x01 /* (to pos 190 state 70) */,
/* pos 190: state 70 */ 0x88, 0x00 /* - terminal marker 8 - */,
/* pos 192: state 71 */ 0xF2 /* 'r' */, 0x01 /* (to pos 194 state 72) */,
/* pos 194: state 72 */ 0xE1 /* 'a' */, 0x01 /* (to pos 196 state 73) */,
/* pos 196: state 73 */ 0xE6 /* 'f' */, 0x01 /* (to pos 198 state 74) */,
/* pos 198: state 74 */ 0xF4 /* 't' */, 0x01 /* (to pos 200 state 75) */,
/* pos 200: state 75 */ 0xBA /* ':' */, 0x01 /* (to pos 202 state 76) */,
/* pos 202: state 76 */ 0x89, 0x00 /* - terminal marker 9 - */,
/* pos 204: state 77 */ 0x8A /* '.' */, 0x01 /* (to pos 206 state 78) */,
/* pos 206: state 78 */ 0x8A, 0x00 /* - terminal marker 10 - */,
/* pos 208: state 79 */ 0x8B, 0x00 /* - terminal marker 11 - */,
/* pos 210: state 80 */ 0xE5 /* 'e' */, 0x01 /* (to pos 212 state 81) */,
/* pos 212: state 81 */ 0xF2 /* 'r' */, 0x01 /* (to pos 214 state 82) */,
/* pos 214: state 82 */ 0xF3 /* 's' */, 0x01 /* (to pos 216 state 83) */,
/* pos 216: state 83 */ 0xE9 /* 'i' */, 0x01 /* (to pos 218 state 84) */,
/* pos 218: state 84 */ 0xEF /* 'o' */, 0x01 /* (to pos 220 state 85) */,
/* pos 220: state 85 */ 0xEE /* 'n' */, 0x01 /* (to pos 222 state 86) */,
/* pos 222: state 86 */ 0xBA /* ':' */, 0x01 /* (to pos 224 state 87) */,
/* pos 224: state 87 */ 0x8C, 0x00 /* - terminal marker 12 - */,
/* pos 226: state 88 */ 0xF2 /* 'r' */, 0x01 /* (to pos 228 state 89) */,
/* pos 228: state 89 */ 0xE9 /* 'i' */, 0x01 /* (to pos 230 state 90) */,
/* pos 230: state 90 */ 0xE7 /* 'g' */, 0x01 /* (to pos 232 state 91) */,
/* pos 232: state 91 */ 0xE9 /* 'i' */, 0x01 /* (to pos 234 state 92) */,
/* pos 234: state 92 */ 0xEE /* 'n' */, 0x01 /* (to pos 236 state 93) */,
/* pos 236: state 93 */ 0xBA /* ':' */, 0x01 /* (to pos 238 state 94) */,
/* pos 238: state 94 */ 0x8D, 0x00 /* - terminal marker 13 - */,
/* pos 240: state 95 */ 0xF8 /* 'x' */, 0x01 /* (to pos 242 state 96) */,
/* pos 242: state 96 */ 0xF4 /* 't' */, 0x01 /* (to pos 244 state 97) */,
/* pos 244: state 97 */ 0xE5 /* 'e' */, 0x01 /* (to pos 246 state 98) */,
/* pos 246: state 98 */ 0xEE /* 'n' */, 0x01 /* (to pos 248 state 99) */,
/* pos 248: state 99 */ 0xF3 /* 's' */, 0x01 /* (to pos 250 state 100) */,
/* pos 250: state 100 */ 0xE9 /* 'i' */, 0x01 /* (to pos 252 state 101) */,
/* pos 252: state 101 */ 0xEF /* 'o' */, 0x01 /* (to pos 254 state 102) */,
/* pos 254: state 102 */ 0xEE /* 'n' */, 0x01 /* (to pos 256 state 103) */,
/* pos 256: state 103 */ 0xF3 /* 's' */, 0x01 /* (to pos 258 state 104) */,
/* pos 258: state 104 */ 0xBA /* ':' */, 0x01 /* (to pos 260 state 105) */,
/* pos 260: state 105 */ 0x8E, 0x00 /* - terminal marker 14 - */,
/* pos 262: state 106 */ 0xE3 /* 'c' */, 0x01 /* (to pos 264 state 107) */,
/* pos 264: state 107 */ 0xE3 /* 'c' */, 0x01 /* (to pos 266 state 108) */,
/* pos 266: state 108 */ 0xE5 /* 'e' */, 0x01 /* (to pos 268 state 109) */,
/* pos 268: state 109 */ 0xF0 /* 'p' */, 0x01 /* (to pos 270 state 110) */,
/* pos 270: state 110 */ 0xF4 /* 't' */, 0x01 /* (to pos 272 state 111) */,
/* pos 272: state 111 */ 0xBA /* ':' */, 0x01 /* (to pos 274 state 112) */,
/* pos 274: state 112 */ 0x8F, 0x00 /* - terminal marker 15 - */,
/* pos 276: state 113 */ 0xEF /* 'o' */, 0x01 /* (to pos 278 state 114) */,
/* pos 278: state 114 */ 0xEE /* 'n' */, 0x01 /* (to pos 280 state 115) */,
/* pos 280: state 115 */ 0xE3 /* 'c' */, 0x01 /* (to pos 282 state 116) */,
/* pos 282: state 116 */ 0xE5 /* 'e' */, 0x01 /* (to pos 284 state 117) */,
/* pos 284: state 117 */ 0xBA /* ':' */, 0x01 /* (to pos 286 state 118) */,
/* pos 286: state 118 */ 0x90, 0x00 /* - terminal marker 16 - */,
/* pos 288: state 119 */ 0xF4 /* 't' */, 0x01 /* (to pos 290 state 120) */,
/* pos 290: state 120 */ 0xF0 /* 'p' */, 0x01 /* (to pos 292 state 121) */,
/* pos 292: state 121 */ 0xAF /* '/' */, 0x01 /* (to pos 294 state 122) */,
/* pos 294: state 122 */ 0xB1 /* '1' */, 0x01 /* (to pos 296 state 123) */,
/* pos 296: state 123 */ 0xAE /* '.' */, 0x01 /* (to pos 298 state 124) */,
/* pos 298: state 124 */ 0xB1 /* '1' */, 0x01 /* (to pos 300 state 125) */,
/* pos 300: state 125 */ 0xA0 /* ' ' */, 0x01 /* (to pos 302 state 126) */,
/* pos 302: state 126 */ 0x91, 0x00 /* - terminal marker 17 - */,
/* pos 304: state 127 */ 0x63 /* 'c' */, 0x02 /* (to pos 308 state 128) */,
0xF5 /* 'u' */, 0x41 /* (to pos 436 state 190) */,
/* pos 308: state 128 */ 0xE3 /* 'c' */, 0x01 /* (to pos 310 state 129) */,
/* pos 310: state 129 */ 0xE5 /* 'e' */, 0x01 /* (to pos 312 state 130) */,
/* pos 312: state 130 */ 0xF0 /* 'p' */, 0x01 /* (to pos 314 state 131) */,
/* pos 314: state 131 */ 0xF4 /* 't' */, 0x01 /* (to pos 316 state 132) */,
/* pos 316: state 132 */ 0x3A /* ':' */, 0x02 /* (to pos 320 state 133) */,
0xAD /* '-' */, 0x14 /* (to pos 358 state 152) */,
/* pos 320: state 133 */ 0x92, 0x00 /* - terminal marker 18 - */,
/* pos 322: state 134 */ 0xE6 /* 'f' */, 0x01 /* (to pos 324 state 135) */,
/* pos 324: state 135 */ 0xAD /* '-' */, 0x01 /* (to pos 326 state 136) */,
/* pos 326: state 136 */ 0xED /* 'm' */, 0x01 /* (to pos 328 state 137) */,
/* pos 328: state 137 */ 0xEF /* 'o' */, 0x01 /* (to pos 330 state 138) */,
/* pos 330: state 138 */ 0xE4 /* 'd' */, 0x01 /* (to pos 332 state 139) */,
/* pos 332: state 139 */ 0xE9 /* 'i' */, 0x01 /* (to pos 334 state 140) */,
/* pos 334: state 140 */ 0xE6 /* 'f' */, 0x01 /* (to pos 336 state 141) */,
/* pos 336: state 141 */ 0xE9 /* 'i' */, 0x01 /* (to pos 338 state 142) */,
/* pos 338: state 142 */ 0xE5 /* 'e' */, 0x01 /* (to pos 340 state 143) */,
/* pos 340: state 143 */ 0xE4 /* 'd' */, 0x01 /* (to pos 342 state 144) */,
/* pos 342: state 144 */ 0xAD /* '-' */, 0x01 /* (to pos 344 state 145) */,
/* pos 344: state 145 */ 0xF3 /* 's' */, 0x01 /* (to pos 346 state 146) */,
/* pos 346: state 146 */ 0xE9 /* 'i' */, 0x01 /* (to pos 348 state 147) */,
/* pos 348: state 147 */ 0xEE /* 'n' */, 0x01 /* (to pos 350 state 148) */,
/* pos 350: state 148 */ 0xE3 /* 'c' */, 0x01 /* (to pos 352 state 149) */,
/* pos 352: state 149 */ 0xE5 /* 'e' */, 0x01 /* (to pos 354 state 150) */,
/* pos 354: state 150 */ 0xBA /* ':' */, 0x01 /* (to pos 356 state 151) */,
/* pos 356: state 151 */ 0x93, 0x00 /* - terminal marker 19 - */,
/* pos 358: state 152 */ 0x65 /* 'e' */, 0x02 /* (to pos 362 state 153) */,
0xEC /* 'l' */, 0x0A /* (to pos 380 state 162) */,
/* pos 362: state 153 */ 0xEE /* 'n' */, 0x01 /* (to pos 364 state 154) */,
/* pos 364: state 154 */ 0xE3 /* 'c' */, 0x01 /* (to pos 366 state 155) */,
/* pos 366: state 155 */ 0xEF /* 'o' */, 0x01 /* (to pos 368 state 156) */,
/* pos 368: state 156 */ 0xE4 /* 'd' */, 0x01 /* (to pos 370 state 157) */,
/* pos 370: state 157 */ 0xE9 /* 'i' */, 0x01 /* (to pos 372 state 158) */,
/* pos 372: state 158 */ 0xEE /* 'n' */, 0x01 /* (to pos 374 state 159) */,
/* pos 374: state 159 */ 0xE7 /* 'g' */, 0x01 /* (to pos 376 state 160) */,
/* pos 376: state 160 */ 0xBA /* ':' */, 0x01 /* (to pos 378 state 161) */,
/* pos 378: state 161 */ 0x94, 0x00 /* - terminal marker 20 - */,
/* pos 380: state 162 */ 0xE1 /* 'a' */, 0x01 /* (to pos 382 state 163) */,
/* pos 382: state 163 */ 0xEE /* 'n' */, 0x01 /* (to pos 384 state 164) */,
/* pos 384: state 164 */ 0xE7 /* 'g' */, 0x01 /* (to pos 386 state 165) */,
/* pos 386: state 165 */ 0xF5 /* 'u' */, 0x01 /* (to pos 388 state 166) */,
/* pos 388: state 166 */ 0xE1 /* 'a' */, 0x01 /* (to pos 390 state 167) */,
/* pos 390: state 167 */ 0xE7 /* 'g' */, 0x01 /* (to pos 392 state 168) */,
/* pos 392: state 168 */ 0xE5 /* 'e' */, 0x01 /* (to pos 394 state 169) */,
/* pos 394: state 169 */ 0xBA /* ':' */, 0x01 /* (to pos 396 state 170) */,
/* pos 396: state 170 */ 0x95, 0x00 /* - terminal marker 21 - */,
/* pos 398: state 171 */ 0xE1 /* 'a' */, 0x01 /* (to pos 400 state 172) */,
/* pos 400: state 172 */ 0xE7 /* 'g' */, 0x01 /* (to pos 402 state 173) */,
/* pos 402: state 173 */ 0xED /* 'm' */, 0x01 /* (to pos 404 state 174) */,
/* pos 404: state 174 */ 0xE1 /* 'a' */, 0x01 /* (to pos 406 state 175) */,
/* pos 406: state 175 */ 0xBA /* ':' */, 0x01 /* (to pos 408 state 176) */,
/* pos 408: state 176 */ 0x96, 0x00 /* - terminal marker 22 - */,
/* pos 410: state 177 */ 0xE3 /* 'c' */, 0x01 /* (to pos 412 state 178) */,
/* pos 412: state 178 */ 0xE8 /* 'h' */, 0x01 /* (to pos 414 state 179) */,
/* pos 414: state 179 */ 0xE5 /* 'e' */, 0x01 /* (to pos 416 state 180) */,
/* pos 416: state 180 */ 0xAD /* '-' */, 0x01 /* (to pos 418 state 181) */,
/* pos 418: state 181 */ 0xE3 /* 'c' */, 0x01 /* (to pos 420 state 182) */,
/* pos 420: state 182 */ 0xEF /* 'o' */, 0x01 /* (to pos 422 state 183) */,
/* pos 422: state 183 */ 0xEE /* 'n' */, 0x01 /* (to pos 424 state 184) */,
/* pos 424: state 184 */ 0xF4 /* 't' */, 0x01 /* (to pos 426 state 185) */,
/* pos 426: state 185 */ 0xF2 /* 'r' */, 0x01 /* (to pos 428 state 186) */,
/* pos 428: state 186 */ 0xEF /* 'o' */, 0x01 /* (to pos 430 state 187) */,
/* pos 430: state 187 */ 0xEC /* 'l' */, 0x01 /* (to pos 432 state 188) */,
/* pos 432: state 188 */ 0xBA /* ':' */, 0x01 /* (to pos 434 state 189) */,
/* pos 434: state 189 */ 0x97, 0x00 /* - terminal marker 23 - */,
/* pos 436: state 190 */ 0xF4 /* 't' */, 0x01 /* (to pos 438 state 191) */,
/* pos 438: state 191 */ 0xE8 /* 'h' */, 0x01 /* (to pos 440 state 192) */,
/* pos 440: state 192 */ 0xEF /* 'o' */, 0x01 /* (to pos 442 state 193) */,
/* pos 442: state 193 */ 0xF2 /* 'r' */, 0x01 /* (to pos 444 state 194) */,
/* pos 444: state 194 */ 0xE9 /* 'i' */, 0x01 /* (to pos 446 state 195) */,
/* pos 446: state 195 */ 0xFA /* 'z' */, 0x01 /* (to pos 448 state 196) */,
/* pos 448: state 196 */ 0xE1 /* 'a' */, 0x01 /* (to pos 450 state 197) */,
/* pos 450: state 197 */ 0xF4 /* 't' */, 0x01 /* (to pos 452 state 198) */,
/* pos 452: state 198 */ 0xE9 /* 'i' */, 0x01 /* (to pos 454 state 199) */,
/* pos 454: state 199 */ 0xEF /* 'o' */, 0x01 /* (to pos 456 state 200) */,
/* pos 456: state 200 */ 0xEE /* 'n' */, 0x01 /* (to pos 458 state 201) */,
/* pos 458: state 201 */ 0xBA /* ':' */, 0x01 /* (to pos 460 state 202) */,
/* pos 460: state 202 */ 0x98, 0x00 /* - terminal marker 24 - */,
/* pos 462: state 203 */ 0xEB /* 'k' */, 0x01 /* (to pos 464 state 204) */,
/* pos 464: state 204 */ 0xE9 /* 'i' */, 0x01 /* (to pos 466 state 205) */,
/* pos 466: state 205 */ 0xE5 /* 'e' */, 0x01 /* (to pos 468 state 206) */,
/* pos 468: state 206 */ 0xBA /* ':' */, 0x01 /* (to pos 470 state 207) */,
/* pos 470: state 207 */ 0x99, 0x00 /* - terminal marker 25 - */,
/* pos 472: state 208 */ 0xE5 /* 'e' */, 0x01 /* (to pos 474 state 209) */,
/* pos 474: state 209 */ 0xEE /* 'n' */, 0x01 /* (to pos 476 state 210) */,
/* pos 476: state 210 */ 0xF4 /* 't' */, 0x01 /* (to pos 478 state 211) */,
/* pos 478: state 211 */ 0xAD /* '-' */, 0x01 /* (to pos 480 state 212) */,
/* pos 480: state 212 */ 0x6C /* 'l' */, 0x02 /* (to pos 484 state 213) */,
0xF4 /* 't' */, 0x08 /* (to pos 498 state 220) */,
/* pos 484: state 213 */ 0xE5 /* 'e' */, 0x01 /* (to pos 486 state 214) */,
/* pos 486: state 214 */ 0xEE /* 'n' */, 0x01 /* (to pos 488 state 215) */,
/* pos 488: state 215 */ 0xE7 /* 'g' */, 0x01 /* (to pos 490 state 216) */,
/* pos 490: state 216 */ 0xF4 /* 't' */, 0x01 /* (to pos 492 state 217) */,
/* pos 492: state 217 */ 0xE8 /* 'h' */, 0x01 /* (to pos 494 state 218) */,
/* pos 494: state 218 */ 0xBA /* ':' */, 0x01 /* (to pos 496 state 219) */,
/* pos 496: state 219 */ 0x9A, 0x00 /* - terminal marker 26 - */,
/* pos 498: state 220 */ 0xF9 /* 'y' */, 0x01 /* (to pos 500 state 221) */,
/* pos 500: state 221 */ 0xF0 /* 'p' */, 0x01 /* (to pos 502 state 222) */,
/* pos 502: state 222 */ 0xE5 /* 'e' */, 0x01 /* (to pos 504 state 223) */,
/* pos 504: state 223 */ 0xBA /* ':' */, 0x01 /* (to pos 506 state 224) */,
/* pos 506: state 224 */ 0x9B, 0x00 /* - terminal marker 27 - */,
/* pos 508: state 225 */ 0xE1 /* 'a' */, 0x01 /* (to pos 510 state 226) */,
/* pos 510: state 226 */ 0xF4 /* 't' */, 0x01 /* (to pos 512 state 227) */,
/* pos 512: state 227 */ 0xE5 /* 'e' */, 0x01 /* (to pos 514 state 228) */,
/* pos 514: state 228 */ 0xBA /* ':' */, 0x01 /* (to pos 516 state 229) */,
/* pos 516: state 229 */ 0x9C, 0x00 /* - terminal marker 28 - */,
/* pos 518: state 230 */ 0x61 /* 'a' */, 0x02 /* (to pos 522 state 231) */,
0xE5 /* 'e' */, 0x06 /* (to pos 532 state 236) */,
/* pos 522: state 231 */ 0xEE /* 'n' */, 0x01 /* (to pos 524 state 232) */,
/* pos 524: state 232 */ 0xE7 /* 'g' */, 0x01 /* (to pos 526 state 233) */,
/* pos 526: state 233 */ 0xE5 /* 'e' */, 0x01 /* (to pos 528 state 234) */,
/* pos 528: state 234 */ 0xBA /* ':' */, 0x01 /* (to pos 530 state 235) */,
/* pos 530: state 235 */ 0x9D, 0x00 /* - terminal marker 29 - */,
/* pos 532: state 236 */ 0xE6 /* 'f' */, 0x01 /* (to pos 534 state 237) */,
/* pos 534: state 237 */ 0xE5 /* 'e' */, 0x01 /* (to pos 536 state 238) */,
/* pos 536: state 238 */ 0xF2 /* 'r' */, 0x01 /* (to pos 538 state 239) */,
/* pos 538: state 239 */ 0xE5 /* 'e' */, 0x01 /* (to pos 540 state 240) */,
/* pos 540: state 240 */ 0xF2 /* 'r' */, 0x01 /* (to pos 542 state 241) */,
/* pos 542: state 241 */ 0xBA /* ':' */, 0x01 /* (to pos 544 state 242) */,
/* pos 544: state 242 */ 0x9E, 0x00 /* - terminal marker 30 - */,
/* total size 546 bytes */
/* pos 0000: 0 */ 0x67 /* 'g' */, 0x25, 0x00 /* (to 0x0025 state 1) */,
0x70 /* 'p' */, 0x27, 0x00 /* (to 0x002A state 5) */,
0x68 /* 'h' */, 0x30, 0x00 /* (to 0x0036 state 10) */,
0x63 /* 'c' */, 0x39, 0x00 /* (to 0x0042 state 15) */,
0x73 /* 's' */, 0x54, 0x00 /* (to 0x0060 state 26) */,
0x75 /* 'u' */, 0x93, 0x00 /* (to 0x00A2 state 56) */,
0x6F /* 'o' */, 0x99, 0x00 /* (to 0x00AB state 64) */,
0x0D /* '.' */, 0xA5, 0x00 /* (to 0x00BA state 77) */,
0x61 /* 'a' */, 0xDC, 0x00 /* (to 0x00F4 state 127) */,
0x69 /* 'i' */, 0xED, 0x00 /* (to 0x0108 state 134) */,
0x64 /* 'd' */, 0x5A, 0x01 /* (to 0x0178 state 225) */,
0x72 /* 'r' */, 0x5D, 0x01 /* (to 0x017E state 230) */,
0x08, /* fail */
/* pos 0025: 1 */ 0xE5 /* 'e' -> */,
/* pos 0026: 2 */ 0xF4 /* 't' -> */,
/* pos 0027: 3 */ 0xA0 /* ' ' -> */,
/* pos 0028: 4 */ 0x00, 0x00 /* - terminal marker 0 - */,
/* pos 002a: 5 */ 0x6F /* 'o' */, 0x07, 0x00 /* (to 0x0031 state 6) */,
0x72 /* 'r' */, 0x09, 0x01 /* (to 0x0136 state 171) */,
0x08, /* fail */
/* pos 0031: 6 */ 0xF3 /* 's' -> */,
/* pos 0032: 7 */ 0xF4 /* 't' -> */,
/* pos 0033: 8 */ 0xA0 /* ' ' -> */,
/* pos 0034: 9 */ 0x00, 0x01 /* - terminal marker 1 - */,
/* pos 0036: 10 */ 0x6F /* 'o' */, 0x07, 0x00 /* (to 0x003D state 11) */,
0x74 /* 't' */, 0xB2, 0x00 /* (to 0x00EB state 119) */,
0x08, /* fail */
/* pos 003d: 11 */ 0xF3 /* 's' -> */,
/* pos 003e: 12 */ 0xF4 /* 't' -> */,
/* pos 003f: 13 */ 0xBA /* ':' -> */,
/* pos 0040: 14 */ 0x00, 0x02 /* - terminal marker 2 - */,
/* pos 0042: 15 */ 0x6F /* 'o' */, 0x07, 0x00 /* (to 0x0049 state 16) */,
0x61 /* 'a' */, 0xF8, 0x00 /* (to 0x013D state 177) */,
0x08, /* fail */
/* pos 0049: 16 */ 0x6E /* 'n' */, 0x07, 0x00 /* (to 0x0050 state 17) */,
0x6F /* 'o' */, 0x0D, 0x01 /* (to 0x0159 state 203) */,
0x08, /* fail */
/* pos 0050: 17 */ 0x6E /* 'n' */, 0x07, 0x00 /* (to 0x0057 state 18) */,
0x74 /* 't' */, 0x0C, 0x01 /* (to 0x015F state 208) */,
0x08, /* fail */
/* pos 0057: 18 */ 0xE5 /* 'e' -> */,
/* pos 0058: 19 */ 0xE3 /* 'c' -> */,
/* pos 0059: 20 */ 0xF4 /* 't' -> */,
/* pos 005a: 21 */ 0xE9 /* 'i' -> */,
/* pos 005b: 22 */ 0xEF /* 'o' -> */,
/* pos 005c: 23 */ 0xEE /* 'n' -> */,
/* pos 005d: 24 */ 0xBA /* ':' -> */,
/* pos 005e: 25 */ 0x00, 0x03 /* - terminal marker 3 - */,
/* pos 0060: 26 */ 0xE5 /* 'e' -> */,
/* pos 0061: 27 */ 0xE3 /* 'c' -> */,
/* pos 0062: 28 */ 0xAD /* '-' -> */,
/* pos 0063: 29 */ 0xF7 /* 'w' -> */,
/* pos 0064: 30 */ 0xE5 /* 'e' -> */,
/* pos 0065: 31 */ 0xE2 /* 'b' -> */,
/* pos 0066: 32 */ 0xF3 /* 's' -> */,
/* pos 0067: 33 */ 0xEF /* 'o' -> */,
/* pos 0068: 34 */ 0xE3 /* 'c' -> */,
/* pos 0069: 35 */ 0xEB /* 'k' -> */,
/* pos 006a: 36 */ 0xE5 /* 'e' -> */,
/* pos 006b: 37 */ 0xF4 /* 't' -> */,
/* pos 006c: 38 */ 0xAD /* '-' -> */,
/* pos 006d: 39 */ 0x6B /* 'k' */, 0x19, 0x00 /* (to 0x0086 state 40) */,
0x70 /* 'p' */, 0x28, 0x00 /* (to 0x0098 state 47) */,
0x64 /* 'd' */, 0x40, 0x00 /* (to 0x00B3 state 71) */,
0x76 /* 'v' */, 0x49, 0x00 /* (to 0x00BF state 80) */,
0x6F /* 'o' */, 0x4F, 0x00 /* (to 0x00C8 state 88) */,
0x65 /* 'e' */, 0x54, 0x00 /* (to 0x00D0 state 95) */,
0x61 /* 'a' */, 0x5D, 0x00 /* (to 0x00DC state 106) */,
0x6E /* 'n' */, 0x62, 0x00 /* (to 0x00E4 state 113) */,
0x08, /* fail */
/* pos 0086: 40 */ 0xE5 /* 'e' -> */,
/* pos 0087: 41 */ 0xF9 /* 'y' -> */,
/* pos 0088: 42 */ 0x31 /* '1' */, 0x0A, 0x00 /* (to 0x0092 state 43) */,
0x32 /* '2' */, 0x0A, 0x00 /* (to 0x0095 state 45) */,
0x3A /* ':' */, 0x2F, 0x00 /* (to 0x00BD state 79) */,
0x08, /* fail */
/* pos 0092: 43 */ 0xBA /* ':' -> */,
/* pos 0093: 44 */ 0x00, 0x04 /* - terminal marker 4 - */,
/* pos 0095: 45 */ 0xBA /* ':' -> */,
/* pos 0096: 46 */ 0x00, 0x05 /* - terminal marker 5 - */,
/* pos 0098: 47 */ 0xF2 /* 'r' -> */,
/* pos 0099: 48 */ 0xEF /* 'o' -> */,
/* pos 009a: 49 */ 0xF4 /* 't' -> */,
/* pos 009b: 50 */ 0xEF /* 'o' -> */,
/* pos 009c: 51 */ 0xE3 /* 'c' -> */,
/* pos 009d: 52 */ 0xEF /* 'o' -> */,
/* pos 009e: 53 */ 0xEC /* 'l' -> */,
/* pos 009f: 54 */ 0xBA /* ':' -> */,
/* pos 00a0: 55 */ 0x00, 0x06 /* - terminal marker 6 - */,
/* pos 00a2: 56 */ 0xF0 /* 'p' -> */,
/* pos 00a3: 57 */ 0xE7 /* 'g' -> */,
/* pos 00a4: 58 */ 0xF2 /* 'r' -> */,
/* pos 00a5: 59 */ 0xE1 /* 'a' -> */,
/* pos 00a6: 60 */ 0xE4 /* 'd' -> */,
/* pos 00a7: 61 */ 0xE5 /* 'e' -> */,
/* pos 00a8: 62 */ 0xBA /* ':' -> */,
/* pos 00a9: 63 */ 0x00, 0x07 /* - terminal marker 7 - */,
/* pos 00ab: 64 */ 0xF2 /* 'r' -> */,
/* pos 00ac: 65 */ 0xE9 /* 'i' -> */,
/* pos 00ad: 66 */ 0xE7 /* 'g' -> */,
/* pos 00ae: 67 */ 0xE9 /* 'i' -> */,
/* pos 00af: 68 */ 0xEE /* 'n' -> */,
/* pos 00b0: 69 */ 0xBA /* ':' -> */,
/* pos 00b1: 70 */ 0x00, 0x08 /* - terminal marker 8 - */,
/* pos 00b3: 71 */ 0xF2 /* 'r' -> */,
/* pos 00b4: 72 */ 0xE1 /* 'a' -> */,
/* pos 00b5: 73 */ 0xE6 /* 'f' -> */,
/* pos 00b6: 74 */ 0xF4 /* 't' -> */,
/* pos 00b7: 75 */ 0xBA /* ':' -> */,
/* pos 00b8: 76 */ 0x00, 0x09 /* - terminal marker 9 - */,
/* pos 00ba: 77 */ 0x8A /* '.' -> */,
/* pos 00bb: 78 */ 0x00, 0x0A /* - terminal marker 10 - */,
/* pos 00bd: 79 */ 0x00, 0x0B /* - terminal marker 11 - */,
/* pos 00bf: 80 */ 0xE5 /* 'e' -> */,
/* pos 00c0: 81 */ 0xF2 /* 'r' -> */,
/* pos 00c1: 82 */ 0xF3 /* 's' -> */,
/* pos 00c2: 83 */ 0xE9 /* 'i' -> */,
/* pos 00c3: 84 */ 0xEF /* 'o' -> */,
/* pos 00c4: 85 */ 0xEE /* 'n' -> */,
/* pos 00c5: 86 */ 0xBA /* ':' -> */,
/* pos 00c6: 87 */ 0x00, 0x0C /* - terminal marker 12 - */,
/* pos 00c8: 88 */ 0xF2 /* 'r' -> */,
/* pos 00c9: 89 */ 0xE9 /* 'i' -> */,
/* pos 00ca: 90 */ 0xE7 /* 'g' -> */,
/* pos 00cb: 91 */ 0xE9 /* 'i' -> */,
/* pos 00cc: 92 */ 0xEE /* 'n' -> */,
/* pos 00cd: 93 */ 0xBA /* ':' -> */,
/* pos 00ce: 94 */ 0x00, 0x0D /* - terminal marker 13 - */,
/* pos 00d0: 95 */ 0xF8 /* 'x' -> */,
/* pos 00d1: 96 */ 0xF4 /* 't' -> */,
/* pos 00d2: 97 */ 0xE5 /* 'e' -> */,
/* pos 00d3: 98 */ 0xEE /* 'n' -> */,
/* pos 00d4: 99 */ 0xF3 /* 's' -> */,
/* pos 00d5: 100 */ 0xE9 /* 'i' -> */,
/* pos 00d6: 101 */ 0xEF /* 'o' -> */,
/* pos 00d7: 102 */ 0xEE /* 'n' -> */,
/* pos 00d8: 103 */ 0xF3 /* 's' -> */,
/* pos 00d9: 104 */ 0xBA /* ':' -> */,
/* pos 00da: 105 */ 0x00, 0x0E /* - terminal marker 14 - */,
/* pos 00dc: 106 */ 0xE3 /* 'c' -> */,
/* pos 00dd: 107 */ 0xE3 /* 'c' -> */,
/* pos 00de: 108 */ 0xE5 /* 'e' -> */,
/* pos 00df: 109 */ 0xF0 /* 'p' -> */,
/* pos 00e0: 110 */ 0xF4 /* 't' -> */,
/* pos 00e1: 111 */ 0xBA /* ':' -> */,
/* pos 00e2: 112 */ 0x00, 0x0F /* - terminal marker 15 - */,
/* pos 00e4: 113 */ 0xEF /* 'o' -> */,
/* pos 00e5: 114 */ 0xEE /* 'n' -> */,
/* pos 00e6: 115 */ 0xE3 /* 'c' -> */,
/* pos 00e7: 116 */ 0xE5 /* 'e' -> */,
/* pos 00e8: 117 */ 0xBA /* ':' -> */,
/* pos 00e9: 118 */ 0x00, 0x10 /* - terminal marker 16 - */,
/* pos 00eb: 119 */ 0xF4 /* 't' -> */,
/* pos 00ec: 120 */ 0xF0 /* 'p' -> */,
/* pos 00ed: 121 */ 0xAF /* '/' -> */,
/* pos 00ee: 122 */ 0xB1 /* '1' -> */,
/* pos 00ef: 123 */ 0xAE /* '.' -> */,
/* pos 00f0: 124 */ 0xB1 /* '1' -> */,
/* pos 00f1: 125 */ 0xA0 /* ' ' -> */,
/* pos 00f2: 126 */ 0x00, 0x11 /* - terminal marker 17 - */,
/* pos 00f4: 127 */ 0x63 /* 'c' */, 0x07, 0x00 /* (to 0x00FB state 128) */,
0x75 /* 'u' */, 0x54, 0x00 /* (to 0x014B state 190) */,
0x08, /* fail */
/* pos 00fb: 128 */ 0xE3 /* 'c' -> */,
/* pos 00fc: 129 */ 0xE5 /* 'e' -> */,
/* pos 00fd: 130 */ 0xF0 /* 'p' -> */,
/* pos 00fe: 131 */ 0xF4 /* 't' -> */,
/* pos 00ff: 132 */ 0x3A /* ':' */, 0x07, 0x00 /* (to 0x0106 state 133) */,
0x2D /* '-' */, 0x19, 0x00 /* (to 0x011B state 152) */,
0x08, /* fail */
/* pos 0106: 133 */ 0x00, 0x12 /* - terminal marker 18 - */,
/* pos 0108: 134 */ 0xE6 /* 'f' -> */,
/* pos 0109: 135 */ 0xAD /* '-' -> */,
/* pos 010a: 136 */ 0xED /* 'm' -> */,
/* pos 010b: 137 */ 0xEF /* 'o' -> */,
/* pos 010c: 138 */ 0xE4 /* 'd' -> */,
/* pos 010d: 139 */ 0xE9 /* 'i' -> */,
/* pos 010e: 140 */ 0xE6 /* 'f' -> */,
/* pos 010f: 141 */ 0xE9 /* 'i' -> */,
/* pos 0110: 142 */ 0xE5 /* 'e' -> */,
/* pos 0111: 143 */ 0xE4 /* 'd' -> */,
/* pos 0112: 144 */ 0xAD /* '-' -> */,
/* pos 0113: 145 */ 0xF3 /* 's' -> */,
/* pos 0114: 146 */ 0xE9 /* 'i' -> */,
/* pos 0115: 147 */ 0xEE /* 'n' -> */,
/* pos 0116: 148 */ 0xE3 /* 'c' -> */,
/* pos 0117: 149 */ 0xE5 /* 'e' -> */,
/* pos 0118: 150 */ 0xBA /* ':' -> */,
/* pos 0119: 151 */ 0x00, 0x13 /* - terminal marker 19 - */,
/* pos 011b: 152 */ 0x65 /* 'e' */, 0x07, 0x00 /* (to 0x0122 state 153) */,
0x6C /* 'l' */, 0x0E, 0x00 /* (to 0x012C state 162) */,
0x08, /* fail */
/* pos 0122: 153 */ 0xEE /* 'n' -> */,
/* pos 0123: 154 */ 0xE3 /* 'c' -> */,
/* pos 0124: 155 */ 0xEF /* 'o' -> */,
/* pos 0125: 156 */ 0xE4 /* 'd' -> */,
/* pos 0126: 157 */ 0xE9 /* 'i' -> */,
/* pos 0127: 158 */ 0xEE /* 'n' -> */,
/* pos 0128: 159 */ 0xE7 /* 'g' -> */,
/* pos 0129: 160 */ 0xBA /* ':' -> */,
/* pos 012a: 161 */ 0x00, 0x14 /* - terminal marker 20 - */,
/* pos 012c: 162 */ 0xE1 /* 'a' -> */,
/* pos 012d: 163 */ 0xEE /* 'n' -> */,
/* pos 012e: 164 */ 0xE7 /* 'g' -> */,
/* pos 012f: 165 */ 0xF5 /* 'u' -> */,
/* pos 0130: 166 */ 0xE1 /* 'a' -> */,
/* pos 0131: 167 */ 0xE7 /* 'g' -> */,
/* pos 0132: 168 */ 0xE5 /* 'e' -> */,
/* pos 0133: 169 */ 0xBA /* ':' -> */,
/* pos 0134: 170 */ 0x00, 0x15 /* - terminal marker 21 - */,
/* pos 0136: 171 */ 0xE1 /* 'a' -> */,
/* pos 0137: 172 */ 0xE7 /* 'g' -> */,
/* pos 0138: 173 */ 0xED /* 'm' -> */,
/* pos 0139: 174 */ 0xE1 /* 'a' -> */,
/* pos 013a: 175 */ 0xBA /* ':' -> */,
/* pos 013b: 176 */ 0x00, 0x16 /* - terminal marker 22 - */,
/* pos 013d: 177 */ 0xE3 /* 'c' -> */,
/* pos 013e: 178 */ 0xE8 /* 'h' -> */,
/* pos 013f: 179 */ 0xE5 /* 'e' -> */,
/* pos 0140: 180 */ 0xAD /* '-' -> */,
/* pos 0141: 181 */ 0xE3 /* 'c' -> */,
/* pos 0142: 182 */ 0xEF /* 'o' -> */,
/* pos 0143: 183 */ 0xEE /* 'n' -> */,
/* pos 0144: 184 */ 0xF4 /* 't' -> */,
/* pos 0145: 185 */ 0xF2 /* 'r' -> */,
/* pos 0146: 186 */ 0xEF /* 'o' -> */,
/* pos 0147: 187 */ 0xEC /* 'l' -> */,
/* pos 0148: 188 */ 0xBA /* ':' -> */,
/* pos 0149: 189 */ 0x00, 0x17 /* - terminal marker 23 - */,
/* pos 014b: 190 */ 0xF4 /* 't' -> */,
/* pos 014c: 191 */ 0xE8 /* 'h' -> */,
/* pos 014d: 192 */ 0xEF /* 'o' -> */,
/* pos 014e: 193 */ 0xF2 /* 'r' -> */,
/* pos 014f: 194 */ 0xE9 /* 'i' -> */,
/* pos 0150: 195 */ 0xFA /* 'z' -> */,
/* pos 0151: 196 */ 0xE1 /* 'a' -> */,
/* pos 0152: 197 */ 0xF4 /* 't' -> */,
/* pos 0153: 198 */ 0xE9 /* 'i' -> */,
/* pos 0154: 199 */ 0xEF /* 'o' -> */,
/* pos 0155: 200 */ 0xEE /* 'n' -> */,
/* pos 0156: 201 */ 0xBA /* ':' -> */,
/* pos 0157: 202 */ 0x00, 0x18 /* - terminal marker 24 - */,
/* pos 0159: 203 */ 0xEB /* 'k' -> */,
/* pos 015a: 204 */ 0xE9 /* 'i' -> */,
/* pos 015b: 205 */ 0xE5 /* 'e' -> */,
/* pos 015c: 206 */ 0xBA /* ':' -> */,
/* pos 015d: 207 */ 0x00, 0x19 /* - terminal marker 25 - */,
/* pos 015f: 208 */ 0xE5 /* 'e' -> */,
/* pos 0160: 209 */ 0xEE /* 'n' -> */,
/* pos 0161: 210 */ 0xF4 /* 't' -> */,
/* pos 0162: 211 */ 0xAD /* '-' -> */,
/* pos 0163: 212 */ 0x6C /* 'l' */, 0x07, 0x00 /* (to 0x016A state 213) */,
0x74 /* 't' */, 0x0C, 0x00 /* (to 0x0172 state 220) */,
0x08, /* fail */
/* pos 016a: 213 */ 0xE5 /* 'e' -> */,
/* pos 016b: 214 */ 0xEE /* 'n' -> */,
/* pos 016c: 215 */ 0xE7 /* 'g' -> */,
/* pos 016d: 216 */ 0xF4 /* 't' -> */,
/* pos 016e: 217 */ 0xE8 /* 'h' -> */,
/* pos 016f: 218 */ 0xBA /* ':' -> */,
/* pos 0170: 219 */ 0x00, 0x1A /* - terminal marker 26 - */,
/* pos 0172: 220 */ 0xF9 /* 'y' -> */,
/* pos 0173: 221 */ 0xF0 /* 'p' -> */,
/* pos 0174: 222 */ 0xE5 /* 'e' -> */,
/* pos 0175: 223 */ 0xBA /* ':' -> */,
/* pos 0176: 224 */ 0x00, 0x1B /* - terminal marker 27 - */,
/* pos 0178: 225 */ 0xE1 /* 'a' -> */,
/* pos 0179: 226 */ 0xF4 /* 't' -> */,
/* pos 017a: 227 */ 0xE5 /* 'e' -> */,
/* pos 017b: 228 */ 0xBA /* ':' -> */,
/* pos 017c: 229 */ 0x00, 0x1C /* - terminal marker 28 - */,
/* pos 017e: 230 */ 0x61 /* 'a' */, 0x07, 0x00 /* (to 0x0185 state 231) */,
0x65 /* 'e' */, 0x0A, 0x00 /* (to 0x018B state 236) */,
0x08, /* fail */
/* pos 0185: 231 */ 0xEE /* 'n' -> */,
/* pos 0186: 232 */ 0xE7 /* 'g' -> */,
/* pos 0187: 233 */ 0xE5 /* 'e' -> */,
/* pos 0188: 234 */ 0xBA /* ':' -> */,
/* pos 0189: 235 */ 0x00, 0x1D /* - terminal marker 29 - */,
/* pos 018b: 236 */ 0xE6 /* 'f' -> */,
/* pos 018c: 237 */ 0xE5 /* 'e' -> */,
/* pos 018d: 238 */ 0xF2 /* 'r' -> */,
/* pos 018e: 239 */ 0xE5 /* 'e' -> */,
/* pos 018f: 240 */ 0xF2 /* 'r' -> */,
/* pos 0190: 241 */ 0xBA /* ':' -> */,
/* pos 0191: 242 */ 0x00, 0x1E /* - terminal marker 30 - */,
/* total size 403 bytes */

View file

@ -3,7 +3,7 @@
*
* High efficiency lexical state parser
*
* Copyright (C)2011-2013 Andy Green <andy@warmcat.com>
* Copyright (C)2011-2014 Andy Green <andy@warmcat.com>
*
* Licensed under LGPL2
*
@ -58,6 +58,17 @@ const char *set[] = {
};
/*
* b7 = 0 = 1-byte seq
* 0x08 = fail
* 2-byte seq
* 0x00 - 0x07, then terminal as given in 2nd byte
3-byte seq
* no match: go fwd 3 byte, match: jump fwd by amt in +1/+2 bytes
* = 1 = 1-byte seq
* no match: die, match go fwd 1 byte
*/
unsigned char lextable[] = {
#include "lextable.h"
};
@ -69,29 +80,41 @@ struct state {
int state[PARALLEL];
int count;
int bytepos;
int real_pos;
};
struct state state[1000];
int next = 1;
#define FAIL_CHAR 0x08
int lextable_decode(int pos, char c)
{
while (1) {
if (!lextable[pos + 1]) /* terminal marker */
if (lextable[pos] & (1 << 7)) { /* 1-byte, fail on mismatch */
if ((lextable[pos] & 0x7f) != c)
return -1;
/* fall thru */
pos++;
if (lextable[pos] == FAIL_CHAR)
return -1;
return pos;
} else { /* b7 = 0, end or 3-byte */
if (lextable[pos] < FAIL_CHAR) /* terminal marker */
return pos;
if ((lextable[pos] & 0x7f) == c) /* goto */
return pos + (lextable[pos + 1] << 1);
if (lextable[pos] & 0x80) /* fail */
return -1;
pos += 2;
if (lextable[pos] == c) /* goto */
return pos + (lextable[pos + 1]) +
(lextable[pos + 2] << 8);
/* fall thru goto */
pos += 3;
/* continue */
}
}
}
int main(void)
{
int n = 0;
@ -101,6 +124,8 @@ int main(void)
int walk;
int saw;
int y;
int j;
int pos = 0;
while (n < sizeof(set) / sizeof(set[0])) {
@ -149,74 +174,140 @@ again:
walk += (2 * state[n].count);
}
/* compute everyone's position first */
pos = 0;
walk = 0;
for (n = 0; n < next; n++) {
state[n].real_pos = pos;
for (m = 0; m < state[n].count; m++) {
if (!m)
fprintf(stdout, "/* pos %3d: state %3d */ ",
walk, n);
else
fprintf(stdout, " ");
y = state[n].c[m];
saw = state[n].state[m];
if (m == state[n].count - 1)
y |= 0x80; /* last option */
if (saw == 0) // c is a terminal then
fprintf(stdout, " 0x%02X, 0x00 "
"/* - terminal marker %2d - */, \n",
y, y - 0x80);
else { /* c is a character and we need a byte delta */
if ((state[saw].bytepos - walk) / 2 > 0xff) {
fprintf(stdout,
"Tried to jump > 510 bytes ahead\n");
return 1;
if (state[n].state[m] == 0)
pos += 2; /* terminal marker */
else { /* c is a character */
if ((state[state[n].state[m]].bytepos -
walk) == 2)
pos++;
else {
pos += 3;
if (m == state[n].count - 1)
pos++; /* fail */
}
prev = y &0x7f;
if (prev < 32 || prev > 126)
prev = '.';
fprintf(stdout, " 0x%02X /* '%c' */, 0x%02X "
"/* (to pos %3d state %3d) */,\n",
y, prev,
(state[saw].bytepos - walk) / 2,
state[saw].bytepos, saw);
}
walk += 2;
}
}
fprintf(stdout, "/* total size %d bytes */\n", walk);
walk = 0;
pos = 0;
for (n = 0; n < next; n++) {
for (m = 0; m < state[n].count; m++) {
if (!m)
fprintf(stdout, "/* pos %04x: %3d */ ",
state[n].real_pos, n);
else
fprintf(stdout, " ");
y = state[n].c[m];
saw = state[n].state[m];
if (saw == 0) { // c is a terminal then
if (y > 0x7ff) {
fprintf(stderr, "terminal too big\n");
return 2;
}
fprintf(stdout, " 0x%02X, 0x%02X "
" "
"/* - terminal marker %2d - */,\n",
y >> 8, y & 0xff, y & 0x7f);
pos += 2;
walk += 2;
continue;
}
/* c is a character */
prev = y &0x7f;
if (prev < 32 || prev > 126)
prev = '.';
if ((state[saw].bytepos - walk) == 2) {
fprintf(stdout, " 0x%02X /* '%c' -> */,\n",
y | 0x80, prev);
pos++;
walk += 2;
continue;
}
j = state[saw].real_pos - pos;
if (j > 0xffff) {
fprintf(stderr,
"Jump > 64K bytes ahead (%d to %d)\n",
state[n].real_pos, state[saw].real_pos);
return 1;
}
fprintf(stdout, " 0x%02X /* '%c' */, 0x%02X, 0x%02X "
"/* (to 0x%04X state %3d) */,\n",
y, prev,
j & 0xff, j >> 8,
state[saw].real_pos, saw);
pos += 3;
if (m == state[n].count - 1) {
fprintf(stdout,
" 0x%02X, /* fail */\n",
FAIL_CHAR);
pos++; /* fail */
}
walk += 2;
}
}
fprintf(stdout, "/* total size %d bytes */\n", pos);
/*
* Test parser... real parser code is the same
* Try to parse every legal input string
*/
for (n = 0; n < sizeof(set) / sizeof(set[0]); n++) {
walk = 0;
m = 0;
y = -1;
if (set[n][0] == '\0')
continue;
fprintf(stderr, "Trying '%s'\n", set[n]);
fprintf(stderr, " trying '%s'\n", set[n]);
while (set[n][m]) {
walk = lextable_decode(walk, set[n][m]);
if (walk < 0) {
fprintf(stderr, "failed\n");
break;
return 3;
}
if (lextable[walk + 1] == 0) {
fprintf(stderr, "decode: %d\n",
lextable[walk] & 0x7f);
if (lextable[walk] < FAIL_CHAR) {
y = (lextable[walk] << 8) + lextable[walk + 1];
break;
}
m++;
}
if (y != n) {
fprintf(stderr, "decode failed %d\n", y);
return 4;
}
}
fprintf(stderr, "All decode OK\n");
return 0;
}

View file

@ -25,22 +25,34 @@ unsigned char lextable[] = {
#include "lextable.h"
};
#define FAIL_CHAR 0x08
int lextable_decode(int pos, char c)
{
while (pos >= 0) {
if (lextable[pos + 1] == 0) /* terminal marker */
c = tolower(c);
while (1) {
if (lextable[pos] & (1 << 7)) { /* 1-byte, fail on mismatch */
if ((lextable[pos] & 0x7f) != c)
return -1;
/* fall thru */
pos++;
if (lextable[pos] == FAIL_CHAR)
return -1;
return pos;
} else { /* b7 = 0, end or 3-byte */
if (lextable[pos] < FAIL_CHAR) /* terminal marker */
return pos;
/* case insensitive - RFC2616 */
if ((lextable[pos] & 0x7f) == tolower(c))
return pos + (lextable[pos + 1] << 1);
if (lextable[pos] & 0x80)
return -1;
pos += 2;
if (lextable[pos] == c) /* goto */
return pos + (lextable[pos + 1]) +
(lextable[pos + 2] << 8);
/* fall thru goto */
pos += 3;
/* continue */
}
}
return pos;
}
int lws_allocate_header_table(struct libwebsocket *wsi)
@ -405,11 +417,11 @@ swallow:
lwsl_info("Unknown method - dropping\n");
return -1;
}
if (lextable[wsi->u.hdr.lextable_pos + 1] == 0) {
if (lextable[wsi->u.hdr.lextable_pos] < FAIL_CHAR) {
/* terminal state */
n = lextable[wsi->u.hdr.lextable_pos] & 0x7f;
n = (lextable[wsi->u.hdr.lextable_pos] << 8) | lextable[wsi->u.hdr.lextable_pos + 1];
lwsl_parser("known hdr %d\n", n);