6 #include <simo/io/wkt_token.hpp> 32 start = cursor = source.c_str();
33 limit = start + source.size();
46 const char* marker =
nullptr;
53 unsigned int yyaccept = 0;
54 static const unsigned char yybm[] = {
55 0, 0, 0, 0, 0, 0, 0, 0,
56 0, 128, 128, 0, 0, 128, 0, 0,
57 0, 0, 0, 0, 0, 0, 0, 0,
58 0, 0, 0, 0, 0, 0, 0, 0,
59 128, 0, 0, 0, 0, 0, 0, 0,
60 0, 0, 0, 0, 0, 0, 0, 0,
61 64, 64, 64, 64, 64, 64, 64, 64,
62 64, 64, 0, 0, 0, 0, 0, 0,
63 0, 0, 0, 0, 0, 0, 0, 0,
64 0, 0, 0, 0, 0, 0, 0, 0,
65 0, 0, 0, 0, 0, 0, 0, 0,
66 0, 0, 0, 0, 0, 0, 0, 0,
67 0, 0, 0, 0, 0, 0, 0, 0,
68 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0,
73 0, 0, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 0, 0,
75 0, 0, 0, 0, 0, 0, 0, 0,
76 0, 0, 0, 0, 0, 0, 0, 0,
77 0, 0, 0, 0, 0, 0, 0, 0,
78 0, 0, 0, 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0, 0, 0, 0,
80 0, 0, 0, 0, 0, 0, 0, 0,
81 0, 0, 0, 0, 0, 0, 0, 0,
82 0, 0, 0, 0, 0, 0, 0, 0,
83 0, 0, 0, 0, 0, 0, 0, 0,
84 0, 0, 0, 0, 0, 0, 0, 0,
85 0, 0, 0, 0, 0, 0, 0, 0,
86 0, 0, 0, 0, 0, 0, 0, 0,
92 if (yych <= 0x00)
goto shapes_wkt_lexer_2;
93 if (yych <= 0x08)
goto shapes_wkt_lexer_4;
94 if (yych <=
'\n')
goto shapes_wkt_lexer_6;
95 goto shapes_wkt_lexer_4;
97 if (yych <=
'\r')
goto shapes_wkt_lexer_6;
98 if (yych ==
' ')
goto shapes_wkt_lexer_6;
99 goto shapes_wkt_lexer_4;
103 if (yych <=
'(')
goto shapes_wkt_lexer_8;
104 if (yych <=
')')
goto shapes_wkt_lexer_10;
105 if (yych <=
'+')
goto shapes_wkt_lexer_4;
106 goto shapes_wkt_lexer_12;
109 if (yych <=
'-')
goto shapes_wkt_lexer_14;
110 goto shapes_wkt_lexer_4;
112 if (yych <=
'0')
goto shapes_wkt_lexer_15;
113 if (yych <=
'9')
goto shapes_wkt_lexer_17;
114 goto shapes_wkt_lexer_4;
121 if (yych <=
'E')
goto shapes_wkt_lexer_19;
122 if (yych ==
'G')
goto shapes_wkt_lexer_20;
123 goto shapes_wkt_lexer_4;
126 if (yych <=
'L')
goto shapes_wkt_lexer_21;
127 goto shapes_wkt_lexer_22;
129 if (yych ==
'P')
goto shapes_wkt_lexer_23;
130 goto shapes_wkt_lexer_4;
135 if (yych <=
'e')
goto shapes_wkt_lexer_19;
136 if (yych ==
'g')
goto shapes_wkt_lexer_20;
137 goto shapes_wkt_lexer_4;
140 if (yych <=
'l')
goto shapes_wkt_lexer_21;
141 goto shapes_wkt_lexer_22;
143 if (yych ==
'p')
goto shapes_wkt_lexer_23;
144 goto shapes_wkt_lexer_4;
151 {
return WKT_END_OF_INPUT; }
155 {
return WKT_PARSE_ERROR; }
161 {
return WKT_LPAREN; }
164 {
return WKT_RPAREN; }
167 {
return WKT_COMMA; }
170 if (yych <=
'/')
goto shapes_wkt_lexer_5;
171 if (yych <=
'0')
goto shapes_wkt_lexer_15;
172 if (yych <=
'9')
goto shapes_wkt_lexer_17;
173 goto shapes_wkt_lexer_5;
176 yych = *(marker = ++cursor);
178 if (yych ==
'.')
goto shapes_wkt_lexer_24;
180 if (yych <=
'E')
goto shapes_wkt_lexer_26;
181 if (yych ==
'e')
goto shapes_wkt_lexer_26;
187 yych = *(marker = ++cursor);
188 if (yybm[0+yych] & 64) {
189 goto shapes_wkt_lexer_17;
192 if (yych ==
'.')
goto shapes_wkt_lexer_24;
193 goto shapes_wkt_lexer_16;
195 if (yych <=
'E')
goto shapes_wkt_lexer_26;
196 if (yych ==
'e')
goto shapes_wkt_lexer_26;
197 goto shapes_wkt_lexer_16;
201 yych = *(marker = ++cursor);
202 if (yych ==
'M')
goto shapes_wkt_lexer_27;
203 if (yych ==
'm')
goto shapes_wkt_lexer_27;
204 goto shapes_wkt_lexer_5;
207 yych = *(marker = ++cursor);
208 if (yych ==
'E')
goto shapes_wkt_lexer_28;
209 if (yych ==
'e')
goto shapes_wkt_lexer_28;
210 goto shapes_wkt_lexer_5;
213 yych = *(marker = ++cursor);
214 if (yych ==
'I')
goto shapes_wkt_lexer_29;
215 if (yych ==
'i')
goto shapes_wkt_lexer_29;
216 goto shapes_wkt_lexer_5;
219 yych = *(marker = ++cursor);
220 if (yych ==
'U')
goto shapes_wkt_lexer_30;
221 if (yych ==
'u')
goto shapes_wkt_lexer_30;
222 goto shapes_wkt_lexer_5;
225 yych = *(marker = ++cursor);
226 if (yych ==
'O')
goto shapes_wkt_lexer_31;
227 if (yych ==
'o')
goto shapes_wkt_lexer_31;
228 goto shapes_wkt_lexer_5;
231 if (yych <=
'/')
goto shapes_wkt_lexer_25;
232 if (yych <=
'9')
goto shapes_wkt_lexer_32;
239 goto shapes_wkt_lexer_16;
241 goto shapes_wkt_lexer_5;
244 goto shapes_wkt_lexer_55;
248 goto shapes_wkt_lexer_75;
250 goto shapes_wkt_lexer_96;
256 goto shapes_wkt_lexer_99;
258 goto shapes_wkt_lexer_123;
262 goto shapes_wkt_lexer_138;
264 goto shapes_wkt_lexer_150;
271 if (yych ==
'+')
goto shapes_wkt_lexer_34;
272 goto shapes_wkt_lexer_25;
274 if (yych <=
'-')
goto shapes_wkt_lexer_34;
275 if (yych <=
'/')
goto shapes_wkt_lexer_25;
276 if (yych <=
'9')
goto shapes_wkt_lexer_35;
277 goto shapes_wkt_lexer_25;
281 if (yych ==
'P')
goto shapes_wkt_lexer_37;
282 if (yych ==
'p')
goto shapes_wkt_lexer_37;
283 goto shapes_wkt_lexer_25;
286 if (yych ==
'O')
goto shapes_wkt_lexer_38;
287 if (yych ==
'o')
goto shapes_wkt_lexer_38;
288 goto shapes_wkt_lexer_25;
291 if (yych ==
'N')
goto shapes_wkt_lexer_39;
292 if (yych ==
'n')
goto shapes_wkt_lexer_39;
293 goto shapes_wkt_lexer_25;
296 if (yych ==
'L')
goto shapes_wkt_lexer_40;
297 if (yych ==
'l')
goto shapes_wkt_lexer_40;
298 goto shapes_wkt_lexer_25;
302 if (yych ==
'I')
goto shapes_wkt_lexer_41;
303 if (yych <=
'K')
goto shapes_wkt_lexer_25;
304 goto shapes_wkt_lexer_42;
307 if (yych <=
'h')
goto shapes_wkt_lexer_25;
308 goto shapes_wkt_lexer_41;
310 if (yych ==
'l')
goto shapes_wkt_lexer_42;
311 goto shapes_wkt_lexer_25;
316 yych = *(marker = ++cursor);
318 if (yych <=
'/')
goto shapes_wkt_lexer_16;
319 if (yych <=
'9')
goto shapes_wkt_lexer_32;
320 goto shapes_wkt_lexer_16;
322 if (yych <=
'E')
goto shapes_wkt_lexer_26;
323 if (yych ==
'e')
goto shapes_wkt_lexer_26;
324 goto shapes_wkt_lexer_16;
328 if (yych <=
'/')
goto shapes_wkt_lexer_25;
329 if (yych >=
':')
goto shapes_wkt_lexer_25;
332 if (yych <=
'/')
goto shapes_wkt_lexer_16;
333 if (yych <=
'9')
goto shapes_wkt_lexer_35;
334 goto shapes_wkt_lexer_16;
337 if (yych ==
'T')
goto shapes_wkt_lexer_43;
338 if (yych ==
't')
goto shapes_wkt_lexer_43;
339 goto shapes_wkt_lexer_25;
342 if (yych ==
'M')
goto shapes_wkt_lexer_44;
343 if (yych ==
'm')
goto shapes_wkt_lexer_44;
344 goto shapes_wkt_lexer_25;
347 if (yych ==
'E')
goto shapes_wkt_lexer_45;
348 if (yych ==
'e')
goto shapes_wkt_lexer_45;
349 goto shapes_wkt_lexer_25;
352 if (yych ==
'T')
goto shapes_wkt_lexer_46;
353 if (yych ==
't')
goto shapes_wkt_lexer_46;
354 goto shapes_wkt_lexer_25;
357 if (yych ==
'N')
goto shapes_wkt_lexer_47;
358 if (yych ==
'n')
goto shapes_wkt_lexer_47;
359 goto shapes_wkt_lexer_25;
362 if (yych ==
'Y')
goto shapes_wkt_lexer_48;
363 if (yych ==
'y')
goto shapes_wkt_lexer_48;
364 goto shapes_wkt_lexer_25;
367 if (yych ==
'Y')
goto shapes_wkt_lexer_49;
368 if (yych ==
'y')
goto shapes_wkt_lexer_49;
369 goto shapes_wkt_lexer_25;
372 if (yych ==
'E')
goto shapes_wkt_lexer_51;
373 if (yych ==
'e')
goto shapes_wkt_lexer_51;
374 goto shapes_wkt_lexer_25;
377 if (yych ==
'S')
goto shapes_wkt_lexer_52;
378 if (yych ==
's')
goto shapes_wkt_lexer_52;
379 goto shapes_wkt_lexer_25;
382 if (yych ==
'I')
goto shapes_wkt_lexer_53;
383 if (yych ==
'i')
goto shapes_wkt_lexer_53;
384 goto shapes_wkt_lexer_25;
387 if (yych ==
'T')
goto shapes_wkt_lexer_54;
388 if (yych ==
't')
goto shapes_wkt_lexer_54;
389 goto shapes_wkt_lexer_25;
392 if (yych ==
'G')
goto shapes_wkt_lexer_56;
393 if (yych ==
'g')
goto shapes_wkt_lexer_56;
394 goto shapes_wkt_lexer_25;
397 {
return WKT_EMPTY_SET; }
400 if (yych ==
'T')
goto shapes_wkt_lexer_57;
401 if (yych ==
't')
goto shapes_wkt_lexer_57;
402 goto shapes_wkt_lexer_25;
405 if (yych ==
'T')
goto shapes_wkt_lexer_58;
406 if (yych ==
't')
goto shapes_wkt_lexer_58;
407 goto shapes_wkt_lexer_25;
411 if (yych ==
'L')
goto shapes_wkt_lexer_59;
412 if (yych <=
'O')
goto shapes_wkt_lexer_25;
413 goto shapes_wkt_lexer_60;
416 if (yych <=
'k')
goto shapes_wkt_lexer_25;
417 goto shapes_wkt_lexer_59;
419 if (yych ==
'p')
goto shapes_wkt_lexer_60;
420 goto shapes_wkt_lexer_25;
425 yych = *(marker = ++cursor);
426 if (yybm[0+yych] & 128) {
427 goto shapes_wkt_lexer_61;
430 if (yych ==
'M')
goto shapes_wkt_lexer_63;
431 if (yych >=
'Z')
goto shapes_wkt_lexer_65;
434 if (yych >=
'm')
goto shapes_wkt_lexer_63;
436 if (yych ==
'z')
goto shapes_wkt_lexer_65;
440 {
return WKT_POINT_TAGGED_TEXT; }
443 if (yych ==
'O')
goto shapes_wkt_lexer_67;
444 if (yych ==
'o')
goto shapes_wkt_lexer_67;
445 goto shapes_wkt_lexer_25;
448 if (yych ==
'R')
goto shapes_wkt_lexer_68;
449 if (yych ==
'r')
goto shapes_wkt_lexer_68;
450 goto shapes_wkt_lexer_25;
453 if (yych ==
'R')
goto shapes_wkt_lexer_69;
454 if (yych ==
'r')
goto shapes_wkt_lexer_69;
455 goto shapes_wkt_lexer_25;
458 if (yych ==
'I')
goto shapes_wkt_lexer_70;
459 if (yych ==
'i')
goto shapes_wkt_lexer_70;
460 goto shapes_wkt_lexer_25;
463 if (yych ==
'O')
goto shapes_wkt_lexer_71;
464 if (yych ==
'o')
goto shapes_wkt_lexer_71;
465 goto shapes_wkt_lexer_25;
468 if (yybm[0+yych] & 128) {
469 goto shapes_wkt_lexer_61;
472 if (yych ==
'M')
goto shapes_wkt_lexer_63;
473 if (yych <=
'Y')
goto shapes_wkt_lexer_25;
474 goto shapes_wkt_lexer_65;
477 if (yych <=
'l')
goto shapes_wkt_lexer_25;
479 if (yych ==
'z')
goto shapes_wkt_lexer_65;
480 goto shapes_wkt_lexer_25;
485 {
return WKT_POINT_M_TAGGED_TEXT; }
488 if (yych ==
'M')
goto shapes_wkt_lexer_72;
489 if (yych ==
'm')
goto shapes_wkt_lexer_72;
490 {
return WKT_POINT_Z_TAGGED_TEXT; }
493 if (yych ==
'N')
goto shapes_wkt_lexer_74;
494 if (yych ==
'n')
goto shapes_wkt_lexer_74;
495 goto shapes_wkt_lexer_25;
498 if (yych ==
'Y')
goto shapes_wkt_lexer_76;
499 if (yych ==
'y')
goto shapes_wkt_lexer_76;
500 goto shapes_wkt_lexer_25;
503 if (yych ==
'I')
goto shapes_wkt_lexer_77;
504 if (yych ==
'i')
goto shapes_wkt_lexer_77;
505 goto shapes_wkt_lexer_25;
508 if (yych ==
'N')
goto shapes_wkt_lexer_78;
509 if (yych ==
'n')
goto shapes_wkt_lexer_78;
510 goto shapes_wkt_lexer_25;
514 if (yych ==
'I')
goto shapes_wkt_lexer_79;
515 if (yych <=
'K')
goto shapes_wkt_lexer_25;
516 goto shapes_wkt_lexer_80;
519 if (yych <=
'h')
goto shapes_wkt_lexer_25;
520 goto shapes_wkt_lexer_79;
522 if (yych ==
'l')
goto shapes_wkt_lexer_80;
523 goto shapes_wkt_lexer_25;
528 {
return WKT_POINT_ZM_TAGGED_TEXT; }
531 yych = *(marker = ++cursor);
534 if (yych <= 0x08)
goto shapes_wkt_lexer_75;
535 if (yych <=
'\n')
goto shapes_wkt_lexer_81;
537 if (yych <=
'\r')
goto shapes_wkt_lexer_81;
538 if (yych ==
' ')
goto shapes_wkt_lexer_81;
542 if (yych <=
'M')
goto shapes_wkt_lexer_83;
543 if (yych ==
'Z')
goto shapes_wkt_lexer_85;
545 if (yych <=
'm')
goto shapes_wkt_lexer_83;
546 if (yych ==
'z')
goto shapes_wkt_lexer_85;
550 {
return WKT_POLYGON_TAGGED_TEXT; }
553 if (yych ==
'C')
goto shapes_wkt_lexer_87;
554 if (yych ==
'c')
goto shapes_wkt_lexer_87;
555 goto shapes_wkt_lexer_25;
558 if (yych ==
'N')
goto shapes_wkt_lexer_88;
559 if (yych ==
'n')
goto shapes_wkt_lexer_88;
560 goto shapes_wkt_lexer_25;
563 if (yych ==
'E')
goto shapes_wkt_lexer_89;
564 if (yych ==
'e')
goto shapes_wkt_lexer_89;
565 goto shapes_wkt_lexer_25;
568 if (yych ==
'N')
goto shapes_wkt_lexer_90;
569 if (yych ==
'n')
goto shapes_wkt_lexer_90;
570 goto shapes_wkt_lexer_25;
573 if (yych ==
'Y')
goto shapes_wkt_lexer_91;
574 if (yych ==
'y')
goto shapes_wkt_lexer_91;
575 goto shapes_wkt_lexer_25;
580 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
581 if (yych <=
'\n')
goto shapes_wkt_lexer_81;
582 goto shapes_wkt_lexer_25;
584 if (yych <=
'\r')
goto shapes_wkt_lexer_81;
585 if (yych ==
' ')
goto shapes_wkt_lexer_81;
586 goto shapes_wkt_lexer_25;
590 if (yych <=
'M')
goto shapes_wkt_lexer_83;
591 if (yych ==
'Z')
goto shapes_wkt_lexer_85;
592 goto shapes_wkt_lexer_25;
594 if (yych <=
'm')
goto shapes_wkt_lexer_83;
595 if (yych ==
'z')
goto shapes_wkt_lexer_85;
596 goto shapes_wkt_lexer_25;
601 {
return WKT_POLYGON_M_TAGGED_TEXT; }
604 if (yych ==
'M')
goto shapes_wkt_lexer_92;
605 if (yych ==
'm')
goto shapes_wkt_lexer_92;
606 {
return WKT_POLYGON_Z_TAGGED_TEXT; }
609 if (yych ==
'O')
goto shapes_wkt_lexer_94;
610 if (yych ==
'o')
goto shapes_wkt_lexer_94;
611 goto shapes_wkt_lexer_25;
614 if (yych ==
'G')
goto shapes_wkt_lexer_95;
615 if (yych ==
'g')
goto shapes_wkt_lexer_95;
616 goto shapes_wkt_lexer_25;
619 if (yych ==
'S')
goto shapes_wkt_lexer_97;
620 if (yych ==
's')
goto shapes_wkt_lexer_97;
621 goto shapes_wkt_lexer_25;
624 if (yych ==
'T')
goto shapes_wkt_lexer_98;
625 if (yych ==
't')
goto shapes_wkt_lexer_98;
626 goto shapes_wkt_lexer_25;
629 if (yych ==
'G')
goto shapes_wkt_lexer_100;
630 if (yych ==
'g')
goto shapes_wkt_lexer_100;
631 goto shapes_wkt_lexer_25;
634 {
return WKT_POLYGON_ZM_TAGGED_TEXT; }
637 if (yych ==
'L')
goto shapes_wkt_lexer_101;
638 if (yych ==
'l')
goto shapes_wkt_lexer_101;
639 goto shapes_wkt_lexer_25;
642 yych = *(marker = ++cursor);
645 if (yych <= 0x08)
goto shapes_wkt_lexer_96;
646 if (yych <=
'\n')
goto shapes_wkt_lexer_102;
648 if (yych <=
'\r')
goto shapes_wkt_lexer_102;
649 if (yych ==
' ')
goto shapes_wkt_lexer_102;
653 if (yych <=
'M')
goto shapes_wkt_lexer_104;
654 if (yych ==
'Z')
goto shapes_wkt_lexer_106;
656 if (yych <=
'm')
goto shapes_wkt_lexer_104;
657 if (yych ==
'z')
goto shapes_wkt_lexer_106;
661 {
return WKT_LINESTRING_TAGGED_TEXT; }
664 if (yych ==
'T')
goto shapes_wkt_lexer_108;
665 if (yych ==
't')
goto shapes_wkt_lexer_108;
666 goto shapes_wkt_lexer_25;
669 yych = *(marker = ++cursor);
672 if (yych <= 0x08)
goto shapes_wkt_lexer_99;
673 if (yych <=
'\n')
goto shapes_wkt_lexer_109;
675 if (yych <=
'\r')
goto shapes_wkt_lexer_109;
676 if (yych ==
' ')
goto shapes_wkt_lexer_109;
680 if (yych <=
'M')
goto shapes_wkt_lexer_111;
681 if (yych ==
'Z')
goto shapes_wkt_lexer_113;
683 if (yych <=
'm')
goto shapes_wkt_lexer_111;
684 if (yych ==
'z')
goto shapes_wkt_lexer_113;
688 {
return WKT_MULTIPOINT_TAGGED_TEXT; }
689 shapes_wkt_lexer_100:
691 if (yych ==
'O')
goto shapes_wkt_lexer_115;
692 if (yych ==
'o')
goto shapes_wkt_lexer_115;
693 goto shapes_wkt_lexer_25;
694 shapes_wkt_lexer_101:
696 if (yych ==
'L')
goto shapes_wkt_lexer_116;
697 if (yych ==
'l')
goto shapes_wkt_lexer_116;
698 goto shapes_wkt_lexer_25;
699 shapes_wkt_lexer_102:
703 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
704 if (yych <=
'\n')
goto shapes_wkt_lexer_102;
705 goto shapes_wkt_lexer_25;
707 if (yych <=
'\r')
goto shapes_wkt_lexer_102;
708 if (yych ==
' ')
goto shapes_wkt_lexer_102;
709 goto shapes_wkt_lexer_25;
713 if (yych <=
'M')
goto shapes_wkt_lexer_104;
714 if (yych ==
'Z')
goto shapes_wkt_lexer_106;
715 goto shapes_wkt_lexer_25;
717 if (yych <=
'm')
goto shapes_wkt_lexer_104;
718 if (yych ==
'z')
goto shapes_wkt_lexer_106;
719 goto shapes_wkt_lexer_25;
722 shapes_wkt_lexer_104:
724 {
return WKT_LINESTRING_M_TAGGED_TEXT; }
725 shapes_wkt_lexer_106:
727 if (yych ==
'M')
goto shapes_wkt_lexer_117;
728 if (yych ==
'm')
goto shapes_wkt_lexer_117;
729 {
return WKT_LINESTRING_Z_TAGGED_TEXT; }
730 shapes_wkt_lexer_108:
732 if (yych ==
'R')
goto shapes_wkt_lexer_119;
733 if (yych ==
'r')
goto shapes_wkt_lexer_119;
734 goto shapes_wkt_lexer_25;
735 shapes_wkt_lexer_109:
739 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
740 if (yych <=
'\n')
goto shapes_wkt_lexer_109;
741 goto shapes_wkt_lexer_25;
743 if (yych <=
'\r')
goto shapes_wkt_lexer_109;
744 if (yych ==
' ')
goto shapes_wkt_lexer_109;
745 goto shapes_wkt_lexer_25;
749 if (yych <=
'M')
goto shapes_wkt_lexer_111;
750 if (yych ==
'Z')
goto shapes_wkt_lexer_113;
751 goto shapes_wkt_lexer_25;
753 if (yych <=
'm')
goto shapes_wkt_lexer_111;
754 if (yych ==
'z')
goto shapes_wkt_lexer_113;
755 goto shapes_wkt_lexer_25;
758 shapes_wkt_lexer_111:
760 {
return WKT_MULTIPOINT_M_TAGGED_TEXT; }
761 shapes_wkt_lexer_113:
763 if (yych ==
'M')
goto shapes_wkt_lexer_120;
764 if (yych ==
'm')
goto shapes_wkt_lexer_120;
765 {
return WKT_MULTIPOINT_Z_TAGGED_TEXT; }
766 shapes_wkt_lexer_115:
768 if (yych ==
'N')
goto shapes_wkt_lexer_122;
769 if (yych ==
'n')
goto shapes_wkt_lexer_122;
770 goto shapes_wkt_lexer_25;
771 shapes_wkt_lexer_116:
773 if (yych ==
'E')
goto shapes_wkt_lexer_124;
774 if (yych ==
'e')
goto shapes_wkt_lexer_124;
775 goto shapes_wkt_lexer_25;
776 shapes_wkt_lexer_117:
778 {
return WKT_LINESTRING_ZM_TAGGED_TEXT; }
779 shapes_wkt_lexer_119:
781 if (yych ==
'I')
goto shapes_wkt_lexer_125;
782 if (yych ==
'i')
goto shapes_wkt_lexer_125;
783 goto shapes_wkt_lexer_25;
784 shapes_wkt_lexer_120:
786 {
return WKT_MULTIPOINT_ZM_TAGGED_TEXT; }
787 shapes_wkt_lexer_122:
789 yych = *(marker = ++cursor);
792 if (yych <= 0x08)
goto shapes_wkt_lexer_123;
793 if (yych <=
'\n')
goto shapes_wkt_lexer_126;
795 if (yych <=
'\r')
goto shapes_wkt_lexer_126;
796 if (yych ==
' ')
goto shapes_wkt_lexer_126;
800 if (yych <=
'M')
goto shapes_wkt_lexer_128;
801 if (yych ==
'Z')
goto shapes_wkt_lexer_130;
803 if (yych <=
'm')
goto shapes_wkt_lexer_128;
804 if (yych ==
'z')
goto shapes_wkt_lexer_130;
807 shapes_wkt_lexer_123:
808 {
return WKT_MULTIPOLYGON_TAGGED_TEXT; }
809 shapes_wkt_lexer_124:
811 if (yych ==
'C')
goto shapes_wkt_lexer_132;
812 if (yych ==
'c')
goto shapes_wkt_lexer_132;
813 goto shapes_wkt_lexer_25;
814 shapes_wkt_lexer_125:
816 if (yych ==
'N')
goto shapes_wkt_lexer_133;
817 if (yych ==
'n')
goto shapes_wkt_lexer_133;
818 goto shapes_wkt_lexer_25;
819 shapes_wkt_lexer_126:
823 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
824 if (yych <=
'\n')
goto shapes_wkt_lexer_126;
825 goto shapes_wkt_lexer_25;
827 if (yych <=
'\r')
goto shapes_wkt_lexer_126;
828 if (yych ==
' ')
goto shapes_wkt_lexer_126;
829 goto shapes_wkt_lexer_25;
833 if (yych <=
'M')
goto shapes_wkt_lexer_128;
834 if (yych ==
'Z')
goto shapes_wkt_lexer_130;
835 goto shapes_wkt_lexer_25;
837 if (yych <=
'm')
goto shapes_wkt_lexer_128;
838 if (yych ==
'z')
goto shapes_wkt_lexer_130;
839 goto shapes_wkt_lexer_25;
842 shapes_wkt_lexer_128:
844 {
return WKT_MULTIPOLYGON_M_TAGGED_TEXT; }
845 shapes_wkt_lexer_130:
847 if (yych ==
'M')
goto shapes_wkt_lexer_134;
848 if (yych ==
'm')
goto shapes_wkt_lexer_134;
849 {
return WKT_MULTIPOLYGON_Z_TAGGED_TEXT; }
850 shapes_wkt_lexer_132:
852 if (yych ==
'T')
goto shapes_wkt_lexer_136;
853 if (yych ==
't')
goto shapes_wkt_lexer_136;
854 goto shapes_wkt_lexer_25;
855 shapes_wkt_lexer_133:
857 if (yych ==
'G')
goto shapes_wkt_lexer_137;
858 if (yych ==
'g')
goto shapes_wkt_lexer_137;
859 goto shapes_wkt_lexer_25;
860 shapes_wkt_lexer_134:
862 {
return WKT_MULTIPOLYGON_ZM_TAGGED_TEXT; }
863 shapes_wkt_lexer_136:
865 if (yych ==
'I')
goto shapes_wkt_lexer_139;
866 if (yych ==
'i')
goto shapes_wkt_lexer_139;
867 goto shapes_wkt_lexer_25;
868 shapes_wkt_lexer_137:
870 yych = *(marker = ++cursor);
873 if (yych <= 0x08)
goto shapes_wkt_lexer_138;
874 if (yych <=
'\n')
goto shapes_wkt_lexer_140;
876 if (yych <=
'\r')
goto shapes_wkt_lexer_140;
877 if (yych ==
' ')
goto shapes_wkt_lexer_140;
881 if (yych <=
'M')
goto shapes_wkt_lexer_142;
882 if (yych ==
'Z')
goto shapes_wkt_lexer_144;
884 if (yych <=
'm')
goto shapes_wkt_lexer_142;
885 if (yych ==
'z')
goto shapes_wkt_lexer_144;
888 shapes_wkt_lexer_138:
889 {
return WKT_MULTILINESTRING_TAGGED_TEXT; }
890 shapes_wkt_lexer_139:
892 if (yych ==
'O')
goto shapes_wkt_lexer_146;
893 if (yych ==
'o')
goto shapes_wkt_lexer_146;
894 goto shapes_wkt_lexer_25;
895 shapes_wkt_lexer_140:
899 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
900 if (yych <=
'\n')
goto shapes_wkt_lexer_140;
901 goto shapes_wkt_lexer_25;
903 if (yych <=
'\r')
goto shapes_wkt_lexer_140;
904 if (yych ==
' ')
goto shapes_wkt_lexer_140;
905 goto shapes_wkt_lexer_25;
909 if (yych <=
'M')
goto shapes_wkt_lexer_142;
910 if (yych ==
'Z')
goto shapes_wkt_lexer_144;
911 goto shapes_wkt_lexer_25;
913 if (yych <=
'm')
goto shapes_wkt_lexer_142;
914 if (yych ==
'z')
goto shapes_wkt_lexer_144;
915 goto shapes_wkt_lexer_25;
918 shapes_wkt_lexer_142:
920 {
return WKT_MULTILINESTRING_M_TAGGED_TEXT; }
921 shapes_wkt_lexer_144:
923 if (yych ==
'M')
goto shapes_wkt_lexer_147;
924 if (yych ==
'm')
goto shapes_wkt_lexer_147;
925 {
return WKT_MULTILINESTRING_Z_TAGGED_TEXT; }
926 shapes_wkt_lexer_146:
928 if (yych ==
'N')
goto shapes_wkt_lexer_149;
929 if (yych ==
'n')
goto shapes_wkt_lexer_149;
930 goto shapes_wkt_lexer_25;
931 shapes_wkt_lexer_147:
933 {
return WKT_MULTILINESTRING_ZM_TAGGED_TEXT; }
934 shapes_wkt_lexer_149:
936 yych = *(marker = ++cursor);
939 if (yych <= 0x08)
goto shapes_wkt_lexer_150;
940 if (yych <=
'\n')
goto shapes_wkt_lexer_151;
942 if (yych <=
'\r')
goto shapes_wkt_lexer_151;
943 if (yych ==
' ')
goto shapes_wkt_lexer_151;
947 if (yych <=
'M')
goto shapes_wkt_lexer_153;
948 if (yych ==
'Z')
goto shapes_wkt_lexer_155;
950 if (yych <=
'm')
goto shapes_wkt_lexer_153;
951 if (yych ==
'z')
goto shapes_wkt_lexer_155;
954 shapes_wkt_lexer_150:
955 {
return WKT_GEOMETRYCOLLECTION_TAGGED_TEXT; }
956 shapes_wkt_lexer_151:
960 if (yych <= 0x08)
goto shapes_wkt_lexer_25;
961 if (yych <=
'\n')
goto shapes_wkt_lexer_151;
962 goto shapes_wkt_lexer_25;
964 if (yych <=
'\r')
goto shapes_wkt_lexer_151;
965 if (yych ==
' ')
goto shapes_wkt_lexer_151;
966 goto shapes_wkt_lexer_25;
970 if (yych <=
'M')
goto shapes_wkt_lexer_153;
971 if (yych ==
'Z')
goto shapes_wkt_lexer_155;
972 goto shapes_wkt_lexer_25;
974 if (yych <=
'm')
goto shapes_wkt_lexer_153;
975 if (yych ==
'z')
goto shapes_wkt_lexer_155;
976 goto shapes_wkt_lexer_25;
979 shapes_wkt_lexer_153:
981 {
return WKT_GEOMETRYCOLLECTION_M_TAGGED_TEXT; }
982 shapes_wkt_lexer_155:
984 if (yych ==
'M')
goto shapes_wkt_lexer_157;
985 if (yych ==
'm')
goto shapes_wkt_lexer_157;
986 {
return WKT_GEOMETRYCOLLECTION_Z_TAGGED_TEXT; }
987 shapes_wkt_lexer_157:
989 {
return WKT_GEOMETRYCOLLECTION_ZM_TAGGED_TEXT; }
1002 return std::string(reinterpret_cast<const char*>(start), static_cast<size_t>(cursor - start));
1013 return static_cast<size_t>(start - content.c_str());
1018 std::string content;
1021 const char* start =
nullptr;
1024 const char* cursor =
nullptr;
1027 const char* limit =
nullptr;
int scan()
scan the next token
wkt_lexer(const std::string &source)
creates a wkt lexer from the given source
std::string get_token() const
returns the current token string
size_t get_position()
returns the current reading position