6 #include <simo/geom/detail/types.hpp>     7 #include <simo/io/wkt_token.hpp>    41     bool parser_error = 
false;
    56 #pragma GCC diagnostic push    57 #pragma GCC diagnostic ignored "-Wunused-parameter"    58 #pragma GCC diagnostic ignored "-Wunused-variable"    62 #pragma clang diagnostic push    63 #pragma clang diagnostic ignored "-Wunused-parameter"    64 #pragma clang diagnostic ignored "-Wunused-variable"    69 #pragma warning(disable: 4100)    70 #pragma warning(disable: 4189)   122 #define YYCODETYPE unsigned char   124 #define YYACTIONTYPE unsigned short int   125 #define ParseTOKENTYPE double   131 #define YYSTACKDEPTH 1048576   133 #define ParseARG_SDECL  struct wkt_result *result ;   134 #define ParseARG_PDECL , struct wkt_result *result    135 #define ParseARG_FETCH  struct wkt_result *result  = yypParser->result    136 #define ParseARG_STORE yypParser->result  = result    139 #define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)   140 #define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)   141 #define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)   156 # define yytestcase(X)   207 static const YYACTIONTYPE yy_action[] = {
   208     602,  173,  321,  311,  301,  265,  262,  240,  238,  231,
   209     368,  367,  361,  360,  359,  352,  351,  345,  344,  343,
   210     336,  335,  329,  328,  327,  326,  325,  319,  318,  317,
   211      56,  125,   57,   68,   63,  185,   25,   85,  169,  171,
   212     172,  170,   60,   49,   69,   53,   72,   70,   58,   71,
   213      50,   61,   54,   64,   62,   59,   66,   55,   65,   52,
   214      67,   51,  353,  271,  337,  374,  354,  278,  338,  384,
   215     355,  280,  339,  391,  356,  282,  340,  393,  357,  285,
   216     341,  395,  358,  291,  342,  226,  374,  337,  271,  353,
   217     384,  338,  278,  354,  391,  339,  280,  355,  393,  340,
   218     282,  356,  395,  341,  285,  357,  226,  342,  291,  358,
   219      63,   57,   36,   68,  206,  244,    5,  170,  171,  137,
   220     172,   53,   49,  164,   69,   71,   70,   77,   58,   64,
   221      61,  223,   54,   55,   59,  131,   66,  125,  158,  149,
   222      29,  316,  161,  154,   80,   86,   41,  133,  147,  281,
   223      56,  120,  141,  137,    9,  249,  144,  125,  169,  269,
   224      10,  215,   60,  175,   11,  187,   72,  241,   93,  157,
   225      50,   75,  122,  261,   62,  306,  131,  376,   12,  131,
   226      37,   76,  112,   94,  313,  137,  210,  237,  131,  124,
   227     189,  253,   27,   78,  131,  190,   83,  303,  288,  309,
   228     120,   90,  130,   40,  293,   81,   41,  309,  137,  146,
   229     349,  309,  131,  346,   40,    1,  177,  309,   37,  176,
   230     323,  258,  120,  120,   23,  118,    6,  174,   82,  297,
   231     131,  394,  137,  230,   23,   33,   38,   91,  131,  235,
   232     140,  131,  370,    3,  120,  209,  386,  104,  156,   92,
   233     137,  103,  120,   88,  379,  120,   30,  198,  167,   96,
   234     200,  125,  125,  202,  120,  137,  228,  155,  205,  199,
   235     125,   34,   13,  192,  137,   87,   79,  125,  137,  191,
   236     137,  222,  214,  204,  233,  125,  213,  245,  166,  168,
   237     120,  203,    7,  365,  125,  145,  388,  131,    4,  397,
   238     188,   46,  273,  125,  208,  333,  120,  162,  201,   84,
   239     114,  186,   21,  256,  100,  383,   27,   97,   98,  310,
   240      46,   99,  109,  194,  330,   34,  106,  381,  110,   95,
   241     146,   38,  105,  102,  221,  197,  107,  116,  195,  162,
   242     121,  372,  108,  309,  373,  111,   83,  196,  308,  331,
   243       2,  126,  299,  128,  132,  168,  295,  135,  178,   48,
   244     138,  139,  101,  284,   15,  113,   41,  115,  142,  117,
   245     320,  119,  220,  219,  123,  127,  300,  129,  218,  290,
   246     134,  217,  143,  216,   24,    8,  136,  279,  152,  179,
   247     150,  151,  276,   37,  180,  225,  242,   19,  270,   42,
   248     268,  148,  159,  211,  212,  224,  181,  264,   23,  160,
   249     182,  259,   74,  165,   73,  183,   40,  193,  153,  184,
   250     399,  390,  307,  298,  289,  277,  275,  267,  263,  315,
   251     257,  255,  247,  243,   89,   28,  239,  250,   35,  227,
   252      39,  229,   22,  396,  382,  389,  380,  371,  375,   45,
   253     385,   44,  398,   43,  234,  305,  283,  232,   32,   31,
   254      26,  274,  377,  246,  366,   18,  252,   16,   14,  254,
   255     236,  334,  287,  266,   47,  272,   20,  286,  347,  314,
   256     294,   17,  304,  387,  292,  302,  312,  322,  324,  392,
   257     378,  332,  369,  350,  348,  364,  251,  363,  260,  603,
   258     362,  163,  207,  603,  603,  603,  603,  603,  296,  248,
   260 static const YYCODETYPE yy_lookahead[] = {
   261      35,   36,   37,   38,   39,   40,   41,   42,   43,   44,
   262      45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
   263      55,   56,   57,   58,   59,   60,   61,   62,   63,   64,
   264       2,   65,    4,    5,    6,   85,    7,   71,   10,   11,
   265      12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
   266      22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
   267      32,   33,   38,   40,   37,   39,   42,   44,   41,   43,
   268      46,   48,   45,   47,   50,   52,   49,   51,   54,   56,
   269      53,   55,   58,   60,   57,   59,   39,   37,   40,   38,
   270      43,   41,   44,   42,   47,   45,   48,   46,   51,   49,
   271      52,   50,   55,   53,   56,   54,   59,   57,   60,   58,
   272       6,    4,    7,    5,   75,   85,    7,   13,   11,   65,
   273      12,   17,   15,   69,   16,   21,   19,   73,   20,   25,
   274      23,  121,   24,   29,   27,   65,   28,   65,   68,   67,
   275       7,    3,   72,   71,  120,  118,    8,  124,  122,    3,
   276       2,   65,   66,   65,    8,    3,   70,   65,   10,    3,
   277       8,   73,   14,   71,    8,   74,   18,   74,  118,  122,
   278      22,  120,  124,    3,   26,    3,   65,    3,    8,   65,
   279       8,   99,    8,   72,    3,   65,   72,    3,   65,    8,
   280      75,    3,    8,   73,   65,   72,    8,    3,    3,    1,
   281      65,   72,    8,    8,    3,   70,    8,    1,   65,    8,
   282       3,    1,   65,  119,    8,    8,   73,    1,    8,   72,
   283       3,    3,   65,   65,    8,    8,    8,   70,   70,    3,
   284      65,    3,   65,  102,    8,    8,    8,   72,   65,   75,
   285      73,   65,    3,    7,   65,   72,    3,    8,   72,   70,
   286      65,    8,   65,    7,    3,   65,    8,   70,   73,    8,
   287      70,   65,   65,  102,   65,   65,    3,   71,   71,   70,
   288      65,    8,    7,   73,   65,   98,   71,   65,   65,   76,
   289      65,  119,   73,   71,    3,   65,   73,    3,   73,    8,
   290      65,   71,    8,    3,   65,   70,    3,   65,    8,   76,
   291      71,    8,    3,   65,   72,    3,   65,    8,   74,   71,
   292       8,   70,    7,   83,    7,   93,    8,   86,    7,  111,
   293       8,   86,    7,   90,  113,    8,    7,   90,    7,   89,
   294       8,    8,   87,   89,  113,   93,   87,    7,   91,    8,
   295       7,   91,   88,    1,   92,   88,    8,   92,   65,  125,
   296       7,   65,   65,    7,   65,    8,   65,    7,   78,    8,
   297      65,   65,  109,   65,    7,  109,    8,  108,    7,  108,
   298     112,  107,  112,  111,  107,  106,  110,  106,  110,  105,
   299     101,  105,   66,   77,    7,    7,  101,   78,    7,   79,
   300       7,   67,   79,    8,   80,  125,  123,    8,  104,    7,
   301      80,  100,    7,   76,  104,  123,   81,   81,    8,   68,
   302      82,   82,    7,    7,   69,   83,    8,   77,  100,   84,
   303       0,   77,    9,    9,    9,    9,    9,    9,    9,   66,
   304       9,    9,    9,    9,   98,    7,    9,  103,    7,   87,
   305       7,    9,    7,    9,   89,    9,    9,    9,    9,    7,
   306       9,    7,    9,    7,  106,   67,    9,    9,    7,    7,
   307       7,  108,   96,    9,  127,    7,    9,    7,    7,  107,
   308      86,  117,   69,    9,    7,    9,    7,    9,  129,  115,
   309     109,    7,  114,   97,    9,    9,    9,    9,  116,   88,
   310      94,    9,   95,  126,    9,    9,    9,    9,  128,  130,
   311     121,   99,  103,  130,  130,  130,  130,  130,   68,   84,
   313 #define YY_SHIFT_USE_DFLT (-1)   314 #define YY_SHIFT_MAX 225   315 static const short yy_shift_ofst[] = {
   316      28,  148,  104,  148,  107,  107,  108,  104,  108,  198,
   317     206,  210,  216,  342,  342,  342,  342,  342,  342,  342,
   318     342,  342,  342,  342,  342,  342,  342,  342,  342,  342,
   319     342,  342,  342,  342,  342,  342,  342,  342,  342,  342,
   320     342,  342,  342,  342,  342,  342,  342,  342,  342,  263,
   321     281,  284,  290,  293,  299,  302,  138,  172,  174,  181,
   322     184,  188,  194,  195,  201,  207,  217,  218,  226,  228,
   323     239,  243,  251,  406,  227,  109,  405,   29,   29,  105,
   324     109,  133,  133,  227,  105,  105,  236,  246,  248,  246,
   325     265,  265,  133,  236,  305,  307,  308,  311,  308,  311,
   326     312,  315,  307,  312,  317,  319,  317,  319,  321,  322,
   327     323,  321,  323,  315,  322,  330,  331,  330,  331,  333,
   328     342,  338,  343,  333,  338,  342,  342,  346,  347,  346,
   329     347,  342,  342,  343,  350,  351,  350,  342,  342,  342,
   330     357,  361,  358,  361,  377,  377,  351,  378,  381,  383,
   331     385,  383,  389,  381,  392,  392,  265,  378,  395,  400,
   332     395,  305,  389,  405,  406,  408,  357,  357,  248,  146,
   333     152,  156,  170,  420,  413,  414,  415,  447,  416,  417,
   334     418,  419,  421,  422,  423,  424,  428,  427,  431,  432,
   335     433,  434,  435,  436,  437,  438,  439,  441,  442,  444,
   336     446,  443,  448,  451,  452,  453,  454,  457,  458,  460,
   337     461,  464,  466,  467,  469,  474,  468,  475,  476,  477,
   338     478,  482,  485,  486,  487,  488,
   340 #define YY_REDUCE_USE_DFLT (-51)   341 #define YY_REDUCE_MAX 168   342 static const short yy_reduce_ofst[] = {
   343     -35,   50,   48,   27,   24,   51,   47,   23,   26,   86,
   344      54,   72,   70,  165,  176,  185,  114,  167,  173,  232,
   345      88,  111,  215,  147,  225,  120,  205,  241,  135,  158,
   346     187,  197,  212,  220,  229,  238,  -34,   92,  123,  129,
   347     143,  157,  196,  179,  190,  199,  200,  209,  213,  352,
   348     348,  349,  337,  355,  353,  354,  363,  388,  366,  364,
   349     384,  362,  368,  403,  371,  367,  372,  370,  440,  401,
   350     397,  386,  396,  425,  402,  379,  399,  -50,   30,   39,
   351      10,   91,   93,   82,  115,  164,   94,  131,  177,  161,
   352     203,  223,  234,  162,  230,  222,  231,  233,  235,  237,
   353     240,  211,  242,  244,  245,  247,  249,  250,  252,  253,
   354     254,  255,  257,  221,  256,  258,  259,  260,  261,  208,
   355     283,  264,  224,  262,  267,  286,  287,  266,  269,  268,
   356     271,  289,  291,  270,  274,  279,  276,  295,  296,  298,
   357     306,  280,  316,  309,  310,  313,  285,  273,  294,  314,
   358     324,  320,  301,  300,  325,  326,  327,  282,  328,  341,
   359     329,  332,  318,  334,  335,  345,  340,  344,  336,
   361 static const YYACTIONTYPE yy_default[] = {
   362     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   363     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   364     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   365     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   366     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   367     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   368     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   369     601,  601,  601,  465,  601,  571,  519,  467,  467,  443,
   370     571,  441,  441,  601,  443,  443,  563,  517,  601,  517,
   371     445,  445,  441,  563,  463,  491,  601,  485,  601,  485,
   372     601,  535,  491,  601,  601,  487,  601,  487,  489,  601,
   373     601,  489,  601,  535,  601,  533,  601,  533,  601,  531,
   374     601,  601,  587,  531,  601,  601,  601,  529,  601,  529,
   375     601,  601,  601,  587,  523,  601,  523,  601,  601,  601,
   376     447,  453,  601,  453,  455,  455,  601,  579,  521,  457,
   377     601,  457,  601,  521,  459,  459,  445,  579,  461,  601,
   378     461,  463,  601,  519,  465,  601,  447,  447,  601,  601,
   379     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   380     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   381     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   382     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   383     601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
   384     601,  601,  601,  601,  601,  601,  578,  496,  495,  482,
   385     518,  407,  525,  537,  538,  444,  494,  493,  406,  481,
   386     405,  442,  580,  480,  468,  599,  514,  479,  466,  478,
   387     520,  591,  526,  539,  540,  477,  464,  476,  597,  462,
   388     598,  475,  404,  474,  460,  403,  515,  473,  458,  472,
   389     522,  581,  527,  541,  542,  471,  456,  470,  582,  454,
   390     583,  469,  584,  452,  440,  585,  516,  436,  435,  451,
   391     524,  586,  528,  543,  544,  439,  434,  433,  450,  438,
   392     530,  402,  545,  549,  550,  432,  431,  449,  437,  428,
   393     532,  401,  546,  551,  552,  430,  429,  427,  426,  425,
   394     534,  400,  547,  553,  554,  424,  423,  422,  421,  420,
   395     536,  588,  548,  555,  556,  419,  418,  557,  558,  559,
   396     560,  561,  562,  417,  416,  415,  564,  600,  589,  593,
   397     594,  414,  413,  565,  566,  567,  568,  569,  570,  412,
   398     411,  410,  572,  592,  590,  595,  596,  409,  408,  508,
   399     507,  502,  488,  490,  573,  503,  509,  510,  506,  505,
   400     501,  486,  500,  492,  574,  504,  511,  512,  499,  484,
   401     448,  575,  498,  576,  497,  577,  483,  446,  513,
   403 #define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))   416 static const YYCODETYPE yyFallback[] = {
   433   YYACTIONTYPE stateno;  
   445 #ifdef YYTRACKMAXSTACKDEPTH   452   yyStackEntry *yystack;        
   454   yyStackEntry yystack[YYSTACKDEPTH];  
   461 static FILE *yyTraceFILE = 0;
   462 static char *yyTracePrompt = 0;
   483 void ParseTrace(FILE *TraceFILE, 
char *zTracePrompt){
   484   yyTraceFILE = TraceFILE;
   485   yyTracePrompt = zTracePrompt;
   486   if( yyTraceFILE==0 ) yyTracePrompt = 0;
   487   else if( yyTracePrompt==0 ) yyTraceFILE = 0;
   494 static const char *
const yyTokenName[] = { 
   495   "$",             
"WKT_NUM",       
"WKT_POINT_TAGGED_TEXT",  
"WKT_EMPTY_SET",
   496   "WKT_POINT_Z_TAGGED_TEXT",  
"WKT_POINT_M_TAGGED_TEXT",  
"WKT_POINT_ZM_TAGGED_TEXT",  
"WKT_COMMA",   
   497   "WKT_LPAREN",    
"WKT_RPAREN",    
"WKT_MULTIPOINT_TAGGED_TEXT",  
"WKT_MULTIPOINT_Z_TAGGED_TEXT",
   498   "WKT_MULTIPOINT_M_TAGGED_TEXT",  
"WKT_MULTIPOINT_ZM_TAGGED_TEXT",  
"WKT_LINESTRING_TAGGED_TEXT",  
"WKT_LINESTRING_Z_TAGGED_TEXT",
   499   "WKT_LINESTRING_M_TAGGED_TEXT",  
"WKT_LINESTRING_ZM_TAGGED_TEXT",  
"WKT_MULTILINESTRING_TAGGED_TEXT",  
"WKT_MULTILINESTRING_Z_TAGGED_TEXT",
   500   "WKT_MULTILINESTRING_M_TAGGED_TEXT",  
"WKT_MULTILINESTRING_ZM_TAGGED_TEXT",  
"WKT_POLYGON_TAGGED_TEXT",  
"WKT_POLYGON_Z_TAGGED_TEXT",
   501   "WKT_POLYGON_M_TAGGED_TEXT",  
"WKT_POLYGON_ZM_TAGGED_TEXT",  
"WKT_MULTIPOLYGON_TAGGED_TEXT",  
"WKT_MULTIPOLYGON_Z_TAGGED_TEXT",
   502   "WKT_MULTIPOLYGON_M_TAGGED_TEXT",  
"WKT_MULTIPOLYGON_ZM_TAGGED_TEXT",  
"WKT_GEOMETRYCOLLECTION_TAGGED_TEXT",  
"WKT_GEOMETRYCOLLECTION_Z_TAGGED_TEXT",
   503   "WKT_GEOMETRYCOLLECTION_M_TAGGED_TEXT",  
"WKT_GEOMETRYCOLLECTION_ZM_TAGGED_TEXT",  
"error",         
"program",     
   504   "wkt_text",      
"point",         
"point_z",       
"point_m",     
   505   "point_zm",      
"multipoint",    
"multipoint_z",  
"multipoint_m",
   506   "multipoint_zm",  
"linestring",    
"linestring_z",  
"linestring_m",
   507   "linestring_zm",  
"multilinestring",  
"multilinestring_z",  
"multilinestring_m",
   508   "multilinestring_zm",  
"polygon",       
"polygon_z",     
"polygon_m",   
   509   "polygon_zm",    
"multipolygon",  
"multipolygon_z",  
"multipolygon_m",
   510   "multipolygon_zm",  
"geometrycollection",  
"geometrycollection_z",  
"geometrycollection_m",
   511   "geometrycollection_zm",  
"coord",         
"point_text",    
"point_text_z",
   512   "point_text_m",  
"point_text_zm",  
"coord_xy",      
"coord_xyz",   
   513   "coord_xym",     
"coord_xyzm",    
"coord_xy_repeated",  
"coord_xyz_repeated",
   514   "coord_xym_repeated",  
"coord_xyzm_repeated",  
"multipoint_text",  
"multipoint_text_2",
   515   "multipoint_text_z",  
"multipoint_text_z_2",  
"multipoint_text_m",  
"multipoint_text_m_2",
   516   "multipoint_text_zm",  
"multipoint_text_zm_2",  
"linestring_text",  
"linestring_text_z",
   517   "linestring_text_m",  
"linestring_text_zm",  
"linestring_text_repeated",  
"linestring_text_z_repeated",
   518   "linestring_text_m_repeated",  
"linestring_text_zm_repeated",  
"multilinestring_text",  
"multilinestring_text_z",
   519   "multilinestring_text_m",  
"multilinestring_text_zm",  
"ring_text",     
"ring_text_z", 
   520   "ring_text_m",   
"ring_text_zm",  
"ring_text_repeated",  
"ring_text_z_repeated",
   521   "ring_text_m_repeated",  
"ring_text_zm_repeated",  
"polygon_text",  
"polygon_text_z",
   522   "polygon_text_m",  
"polygon_text_zm",  
"polygon_text_repeated",  
"polygon_text_z_repeated",
   523   "polygon_text_m_repeated",  
"polygon_text_zm_repeated",  
"multipolygon_text",  
"multipolygon_text_z",
   524   "multipolygon_text_m",  
"multipolygon_text_zm",  
"geometry_text",  
"geometry_text_repeated",
   525   "geometry_text_z",  
"geometry_text_z_repeated",  
"geometry_text_m",  
"geometry_text_m_repeated",
   526   "geometry_text_zm",  
"geometry_text_zm_repeated",  
"geometrycollection_text",  
"geometrycollection_text_z",
   527   "geometrycollection_text_m",  
"geometrycollection_text_zm",
   534 static const char *
const yyRuleName[] = {
   535   "program ::= wkt_text",
   536   "wkt_text ::= point",
   537   "wkt_text ::= point_z",
   538   "wkt_text ::= point_m",
   539   "wkt_text ::= point_zm",
   540   "wkt_text ::= multipoint",
   541   "wkt_text ::= multipoint_z",
   542   "wkt_text ::= multipoint_m",
   543   "wkt_text ::= multipoint_zm",
   544   "wkt_text ::= linestring",
   545   "wkt_text ::= linestring_z",
   546   "wkt_text ::= linestring_m",
   547   "wkt_text ::= linestring_zm",
   548   "wkt_text ::= multilinestring",
   549   "wkt_text ::= multilinestring_z",
   550   "wkt_text ::= multilinestring_m",
   551   "wkt_text ::= multilinestring_zm",
   552   "wkt_text ::= polygon",
   553   "wkt_text ::= polygon_z",
   554   "wkt_text ::= polygon_m",
   555   "wkt_text ::= polygon_zm",
   556   "wkt_text ::= multipolygon",
   557   "wkt_text ::= multipolygon_z",
   558   "wkt_text ::= multipolygon_m",
   559   "wkt_text ::= multipolygon_zm",
   560   "wkt_text ::= geometrycollection",
   561   "wkt_text ::= geometrycollection_z",
   562   "wkt_text ::= geometrycollection_m",
   563   "wkt_text ::= geometrycollection_zm",
   565   "point ::= WKT_POINT_TAGGED_TEXT WKT_EMPTY_SET",
   566   "point ::= WKT_POINT_TAGGED_TEXT point_text",
   567   "point_z ::= WKT_POINT_Z_TAGGED_TEXT WKT_EMPTY_SET",
   568   "point_z ::= WKT_POINT_Z_TAGGED_TEXT point_text_z",
   569   "point_m ::= WKT_POINT_M_TAGGED_TEXT WKT_EMPTY_SET",
   570   "point_m ::= WKT_POINT_M_TAGGED_TEXT point_text_m",
   571   "point_zm ::= WKT_POINT_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   572   "point_zm ::= WKT_POINT_ZM_TAGGED_TEXT point_text_zm",
   573   "coord_xy ::= coord coord",
   574   "coord_xyz ::= coord coord coord",
   575   "coord_xym ::= coord coord coord",
   576   "coord_xyzm ::= coord coord coord coord",
   577   "coord_xy_repeated ::=",
   578   "coord_xy_repeated ::= WKT_COMMA coord_xy coord_xy_repeated",
   579   "coord_xyz_repeated ::=",
   580   "coord_xyz_repeated ::= WKT_COMMA coord_xyz coord_xyz_repeated",
   581   "coord_xym_repeated ::=",
   582   "coord_xym_repeated ::= WKT_COMMA coord_xym coord_xym_repeated",
   583   "coord_xyzm_repeated ::=",
   584   "coord_xyzm_repeated ::= WKT_COMMA coord_xyzm coord_xyzm_repeated",
   585   "point_text ::= WKT_LPAREN coord_xy WKT_RPAREN",
   586   "point_text_z ::= WKT_LPAREN coord_xyz WKT_RPAREN",
   587   "point_text_m ::= WKT_LPAREN coord_xym WKT_RPAREN",
   588   "point_text_zm ::= WKT_LPAREN coord_xyzm WKT_RPAREN",
   589   "multipoint_text ::=",
   590   "multipoint_text ::= WKT_COMMA point_text multipoint_text",
   591   "multipoint_text_2 ::=",
   592   "multipoint_text_2 ::= WKT_COMMA coord_xy multipoint_text_2",
   593   "multipoint_text_z ::=",
   594   "multipoint_text_z ::= WKT_COMMA point_text_z multipoint_text_z",
   595   "multipoint_text_z_2 ::=",
   596   "multipoint_text_z_2 ::= WKT_COMMA coord_xyz multipoint_text_z_2",
   597   "multipoint_text_m ::=",
   598   "multipoint_text_m ::= WKT_COMMA point_text_m multipoint_text_m",
   599   "multipoint_text_m_2 ::=",
   600   "multipoint_text_m_2 ::= WKT_COMMA coord_xym multipoint_text_m_2",
   601   "multipoint_text_zm ::=",
   602   "multipoint_text_zm ::= WKT_COMMA point_text_zm multipoint_text_zm",
   603   "multipoint_text_zm_2 ::=",
   604   "multipoint_text_zm_2 ::= WKT_COMMA coord_xyzm multipoint_text_zm_2",
   605   "multipoint ::= WKT_MULTIPOINT_TAGGED_TEXT WKT_EMPTY_SET",
   606   "multipoint ::= WKT_MULTIPOINT_TAGGED_TEXT WKT_LPAREN point_text multipoint_text WKT_RPAREN",
   607   "multipoint ::= WKT_MULTIPOINT_TAGGED_TEXT WKT_LPAREN coord_xy multipoint_text_2 WKT_RPAREN",
   608   "multipoint_z ::= WKT_MULTIPOINT_Z_TAGGED_TEXT WKT_EMPTY_SET",
   609   "multipoint_z ::= WKT_MULTIPOINT_Z_TAGGED_TEXT WKT_LPAREN point_text_z multipoint_text_z WKT_RPAREN",
   610   "multipoint_z ::= WKT_MULTIPOINT_Z_TAGGED_TEXT WKT_LPAREN coord_xyz multipoint_text_z_2 WKT_RPAREN",
   611   "multipoint_m ::= WKT_MULTIPOINT_M_TAGGED_TEXT WKT_EMPTY_SET",
   612   "multipoint_m ::= WKT_MULTIPOINT_M_TAGGED_TEXT WKT_LPAREN point_text_m multipoint_text_m WKT_RPAREN",
   613   "multipoint_m ::= WKT_MULTIPOINT_M_TAGGED_TEXT WKT_LPAREN coord_xym multipoint_text_m_2 WKT_RPAREN",
   614   "multipoint_zm ::= WKT_MULTIPOINT_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   615   "multipoint_zm ::= WKT_MULTIPOINT_ZM_TAGGED_TEXT WKT_LPAREN point_text_zm multipoint_text_zm WKT_RPAREN",
   616   "multipoint_zm ::= WKT_MULTIPOINT_ZM_TAGGED_TEXT WKT_LPAREN coord_xyzm multipoint_text_zm_2 WKT_RPAREN",
   617   "linestring_text ::= WKT_LPAREN coord_xy WKT_COMMA coord_xy coord_xy_repeated WKT_RPAREN",
   618   "linestring_text_z ::= WKT_LPAREN coord_xyz WKT_COMMA coord_xyz coord_xyz_repeated WKT_RPAREN",
   619   "linestring_text_m ::= WKT_LPAREN coord_xym WKT_COMMA coord_xym coord_xym_repeated WKT_RPAREN",
   620   "linestring_text_zm ::= WKT_LPAREN coord_xyzm WKT_COMMA coord_xyzm coord_xyzm_repeated WKT_RPAREN",
   621   "linestring_text_repeated ::=",
   622   "linestring_text_repeated ::= WKT_COMMA linestring_text linestring_text_repeated",
   623   "linestring_text_z_repeated ::=",
   624   "linestring_text_z_repeated ::= WKT_COMMA linestring_text_z linestring_text_z_repeated",
   625   "linestring_text_m_repeated ::=",
   626   "linestring_text_m_repeated ::= WKT_COMMA linestring_text_m linestring_text_m_repeated",
   627   "linestring_text_zm_repeated ::=",
   628   "linestring_text_zm_repeated ::= WKT_COMMA linestring_text_zm linestring_text_zm_repeated",
   629   "linestring ::= WKT_LINESTRING_TAGGED_TEXT WKT_EMPTY_SET",
   630   "linestring ::= WKT_LINESTRING_TAGGED_TEXT linestring_text",
   631   "linestring_z ::= WKT_LINESTRING_Z_TAGGED_TEXT WKT_EMPTY_SET",
   632   "linestring_z ::= WKT_LINESTRING_Z_TAGGED_TEXT linestring_text_z",
   633   "linestring_m ::= WKT_LINESTRING_M_TAGGED_TEXT WKT_EMPTY_SET",
   634   "linestring_m ::= WKT_LINESTRING_M_TAGGED_TEXT linestring_text_m",
   635   "linestring_zm ::= WKT_LINESTRING_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   636   "linestring_zm ::= WKT_LINESTRING_ZM_TAGGED_TEXT linestring_text_zm",
   637   "multilinestring_text ::= WKT_LPAREN linestring_text linestring_text_repeated WKT_RPAREN",
   638   "multilinestring_text_z ::= WKT_LPAREN linestring_text_z linestring_text_z_repeated WKT_RPAREN",
   639   "multilinestring_text_m ::= WKT_LPAREN linestring_text_m linestring_text_m_repeated WKT_RPAREN",
   640   "multilinestring_text_zm ::= WKT_LPAREN linestring_text_zm linestring_text_zm_repeated WKT_RPAREN",
   641   "multilinestring ::= WKT_MULTILINESTRING_TAGGED_TEXT WKT_EMPTY_SET",
   642   "multilinestring ::= WKT_MULTILINESTRING_TAGGED_TEXT multilinestring_text",
   643   "multilinestring_z ::= WKT_MULTILINESTRING_Z_TAGGED_TEXT WKT_EMPTY_SET",
   644   "multilinestring_z ::= WKT_MULTILINESTRING_Z_TAGGED_TEXT multilinestring_text_z",
   645   "multilinestring_m ::= WKT_MULTILINESTRING_M_TAGGED_TEXT WKT_EMPTY_SET",
   646   "multilinestring_m ::= WKT_MULTILINESTRING_M_TAGGED_TEXT multilinestring_text_m",
   647   "multilinestring_zm ::= WKT_MULTILINESTRING_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   648   "multilinestring_zm ::= WKT_MULTILINESTRING_ZM_TAGGED_TEXT multilinestring_text_zm",
   649   "ring_text ::= WKT_LPAREN coord_xy WKT_COMMA coord_xy WKT_COMMA coord_xy WKT_COMMA coord_xy coord_xy_repeated WKT_RPAREN",
   650   "ring_text_z ::= WKT_LPAREN coord_xyz WKT_COMMA coord_xyz WKT_COMMA coord_xyz WKT_COMMA coord_xyz coord_xyz_repeated WKT_RPAREN",
   651   "ring_text_m ::= WKT_LPAREN coord_xym WKT_COMMA coord_xym WKT_COMMA coord_xym WKT_COMMA coord_xym coord_xym_repeated WKT_RPAREN",
   652   "ring_text_zm ::= WKT_LPAREN coord_xyzm WKT_COMMA coord_xyzm WKT_COMMA coord_xyzm WKT_COMMA coord_xyzm coord_xyzm_repeated WKT_RPAREN",
   653   "ring_text_repeated ::=",
   654   "ring_text_repeated ::= WKT_COMMA ring_text ring_text_repeated",
   655   "ring_text_z_repeated ::=",
   656   "ring_text_z_repeated ::= WKT_COMMA ring_text_z ring_text_z_repeated",
   657   "ring_text_m_repeated ::=",
   658   "ring_text_m_repeated ::= WKT_COMMA ring_text_m ring_text_m_repeated",
   659   "ring_text_zm_repeated ::=",
   660   "ring_text_zm_repeated ::= WKT_COMMA ring_text_zm ring_text_zm_repeated",
   661   "polygon_text ::= WKT_LPAREN ring_text ring_text_repeated WKT_RPAREN",
   662   "polygon_text_z ::= WKT_LPAREN ring_text_z ring_text_z_repeated WKT_RPAREN",
   663   "polygon_text_m ::= WKT_LPAREN ring_text_m ring_text_m_repeated WKT_RPAREN",
   664   "polygon_text_zm ::= WKT_LPAREN ring_text_zm ring_text_zm_repeated WKT_RPAREN",
   665   "polygon_text_repeated ::=",
   666   "polygon_text_repeated ::= WKT_COMMA polygon_text polygon_text_repeated",
   667   "polygon_text_z_repeated ::=",
   668   "polygon_text_z_repeated ::= WKT_COMMA polygon_text_z polygon_text_z_repeated",
   669   "polygon_text_m_repeated ::=",
   670   "polygon_text_m_repeated ::= WKT_COMMA polygon_text_m polygon_text_m_repeated",
   671   "polygon_text_zm_repeated ::=",
   672   "polygon_text_zm_repeated ::= WKT_COMMA polygon_text_zm polygon_text_zm_repeated",
   673   "polygon ::= WKT_POLYGON_TAGGED_TEXT WKT_EMPTY_SET",
   674   "polygon ::= WKT_POLYGON_TAGGED_TEXT polygon_text",
   675   "polygon_z ::= WKT_POLYGON_Z_TAGGED_TEXT WKT_EMPTY_SET",
   676   "polygon_z ::= WKT_POLYGON_Z_TAGGED_TEXT polygon_text_z",
   677   "polygon_m ::= WKT_POLYGON_M_TAGGED_TEXT WKT_EMPTY_SET",
   678   "polygon_m ::= WKT_POLYGON_M_TAGGED_TEXT polygon_text_m",
   679   "polygon_zm ::= WKT_POLYGON_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   680   "polygon_zm ::= WKT_POLYGON_ZM_TAGGED_TEXT polygon_text_zm",
   681   "multipolygon_text ::= WKT_LPAREN polygon_text polygon_text_repeated WKT_RPAREN",
   682   "multipolygon_text_z ::= WKT_LPAREN polygon_text_z polygon_text_z_repeated WKT_RPAREN",
   683   "multipolygon_text_m ::= WKT_LPAREN polygon_text_m polygon_text_m_repeated WKT_RPAREN",
   684   "multipolygon_text_zm ::= WKT_LPAREN polygon_text_zm polygon_text_zm_repeated WKT_RPAREN",
   685   "multipolygon ::= WKT_MULTIPOLYGON_TAGGED_TEXT WKT_EMPTY_SET",
   686   "multipolygon ::= WKT_MULTIPOLYGON_TAGGED_TEXT multipolygon_text",
   687   "multipolygon_z ::= WKT_MULTIPOLYGON_Z_TAGGED_TEXT WKT_EMPTY_SET",
   688   "multipolygon_z ::= WKT_MULTIPOLYGON_Z_TAGGED_TEXT multipolygon_text_z",
   689   "multipolygon_m ::= WKT_MULTIPOLYGON_M_TAGGED_TEXT WKT_EMPTY_SET",
   690   "multipolygon_m ::= WKT_MULTIPOLYGON_M_TAGGED_TEXT multipolygon_text_m",
   691   "multipolygon_zm ::= WKT_MULTIPOLYGON_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   692   "multipolygon_zm ::= WKT_MULTIPOLYGON_ZM_TAGGED_TEXT multipolygon_text_zm",
   693   "geometry_text ::= point",
   694   "geometry_text ::= multipoint",
   695   "geometry_text ::= linestring",
   696   "geometry_text ::= multilinestring",
   697   "geometry_text ::= polygon",
   698   "geometry_text ::= multipolygon",
   699   "geometry_text_repeated ::=",
   700   "geometry_text_repeated ::= WKT_COMMA geometry_text geometry_text_repeated",
   701   "geometry_text_z ::= point_z",
   702   "geometry_text_z ::= multipoint_z",
   703   "geometry_text_z ::= linestring_z",
   704   "geometry_text_z ::= multilinestring_z",
   705   "geometry_text_z ::= polygon_z",
   706   "geometry_text_z ::= multipolygon_z",
   707   "geometry_text_z_repeated ::=",
   708   "geometry_text_z_repeated ::= WKT_COMMA geometry_text_z geometry_text_z_repeated",
   709   "geometry_text_m ::= point_m",
   710   "geometry_text_m ::= multipoint_m",
   711   "geometry_text_m ::= linestring_m",
   712   "geometry_text_m ::= multilinestring_m",
   713   "geometry_text_m ::= polygon_m",
   714   "geometry_text_m ::= multipolygon_m",
   715   "geometry_text_m_repeated ::=",
   716   "geometry_text_m_repeated ::= WKT_COMMA geometry_text_m geometry_text_m_repeated",
   717   "geometry_text_zm ::= point_zm",
   718   "geometry_text_zm ::= multipoint_zm",
   719   "geometry_text_zm ::= linestring_zm",
   720   "geometry_text_zm ::= multilinestring_zm",
   721   "geometry_text_zm ::= polygon_zm",
   722   "geometry_text_zm ::= multipolygon_zm",
   723   "geometry_text_zm_repeated ::=",
   724   "geometry_text_zm_repeated ::= WKT_COMMA geometry_text_zm geometry_text_zm_repeated",
   725   "geometrycollection_text ::= WKT_LPAREN geometry_text geometry_text_repeated WKT_RPAREN",
   726   "geometrycollection_text_z ::= WKT_LPAREN geometry_text_z geometry_text_z_repeated WKT_RPAREN",
   727   "geometrycollection_text_m ::= WKT_LPAREN geometry_text_m geometry_text_m_repeated WKT_RPAREN",
   728   "geometrycollection_text_zm ::= WKT_LPAREN geometry_text_zm geometry_text_zm_repeated WKT_RPAREN",
   729   "geometrycollection ::= WKT_GEOMETRYCOLLECTION_TAGGED_TEXT WKT_EMPTY_SET",
   730   "geometrycollection ::= WKT_GEOMETRYCOLLECTION_TAGGED_TEXT geometrycollection_text",
   731   "geometrycollection_z ::= WKT_GEOMETRYCOLLECTION_Z_TAGGED_TEXT WKT_EMPTY_SET",
   732   "geometrycollection_z ::= WKT_GEOMETRYCOLLECTION_Z_TAGGED_TEXT geometrycollection_text_z",
   733   "geometrycollection_m ::= WKT_GEOMETRYCOLLECTION_M_TAGGED_TEXT WKT_EMPTY_SET",
   734   "geometrycollection_m ::= WKT_GEOMETRYCOLLECTION_M_TAGGED_TEXT geometrycollection_text_m",
   735   "geometrycollection_zm ::= WKT_GEOMETRYCOLLECTION_ZM_TAGGED_TEXT WKT_EMPTY_SET",
   736   "geometrycollection_zm ::= WKT_GEOMETRYCOLLECTION_ZM_TAGGED_TEXT geometrycollection_text_zm",
   745 static void yyGrowStack(yyParser *p){
   749   newSize = p->yystksz*2 + 100;
   750   pNew = realloc(p->yystack, newSize*
sizeof(pNew[0]));
   753     p->yystksz = newSize;
   756       fprintf(yyTraceFILE,
"%sStack grows to %d entries!\n",
   757               yyTracePrompt, p->yystksz);
   776 void *ParseAlloc(
void *(*mallocProc)(
size_t)){
   778   pParser = (yyParser*)(*mallocProc)( (size_t)
sizeof(yyParser) );
   781 #ifdef YYTRACKMAXSTACKDEPTH   782     pParser->yyidxMax = 0;
   785     pParser->yystack = NULL;
   786     pParser->yystksz = 0;
   787     yyGrowStack(pParser);
   798 static void yy_destructor(
   827 static int yy_pop_parser_stack(yyParser *pParser){
   829   yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
   831   if( pParser->yyidx<0 ) 
return 0;
   833   if( yyTraceFILE && pParser->yyidx>=0 ){
   834     fprintf(yyTraceFILE,
"%sPopping %s\n",
   836       yyTokenName[yytos->major]);
   839   yymajor = yytos->major;
   840   yy_destructor(pParser, yymajor, &yytos->minor);
   859   void (*freeProc)(
void*)     
   861   yyParser *pParser = (yyParser*)p;
   862   if( pParser==0 ) 
return;
   863   while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
   865   free(pParser->yystack);
   867   (*freeProc)((
void*)pParser);
   873 #ifdef YYTRACKMAXSTACKDEPTH   874 int ParseStackPeak(
void *p){
   875   yyParser *pParser = (yyParser*)p;
   876   return pParser->yyidxMax;
   888 static int yy_find_shift_action(
   890   YYCODETYPE iLookAhead     
   893   int stateno = pParser->yystack[pParser->yyidx].stateno;
   895   if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
   896     return yy_default[stateno];
   898   assert( iLookAhead!=YYNOCODE );
   900   if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
   903       YYCODETYPE iFallback;            
   904       if( iLookAhead<
sizeof(yyFallback)/
sizeof(yyFallback[0])
   905              && (iFallback = yyFallback[iLookAhead])!=0 ){
   908           fprintf(yyTraceFILE, 
"%sFALLBACK %s => %s\n",
   909              yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
   912         return yy_find_shift_action(pParser, iFallback);
   917         int j = i - iLookAhead + YYWILDCARD;
   918         if( j>=0 && j<YY_SZ_ACTTAB && yy_lookahead[j]==YYWILDCARD ){
   921             fprintf(yyTraceFILE, 
"%sWILDCARD %s => %s\n",
   922                yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
   930     return yy_default[stateno];
   944 static int yy_find_reduce_action(
   946   YYCODETYPE iLookAhead     
   950   if( stateno>YY_REDUCE_MAX ){
   951     return yy_default[stateno];
   954   assert( stateno<=YY_REDUCE_MAX );
   956   i = yy_reduce_ofst[stateno];
   957   assert( i!=YY_REDUCE_USE_DFLT );
   958   assert( iLookAhead!=YYNOCODE );
   961   if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
   962     return yy_default[stateno];
   965   assert( i>=0 && i<YY_SZ_ACTTAB );
   966   assert( yy_lookahead[i]==iLookAhead );
   974 static void yyStackOverflow(yyParser *yypParser, 
YYMINORTYPE *yypMinor){
   979      fprintf(yyTraceFILE,
"%sStack Overflow!\n",yyTracePrompt);
   982    while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
   986     result->parser_error = 
true;
   993 static void yy_shift(
  1001 #ifdef YYTRACKMAXSTACKDEPTH  1002   if( yypParser->yyidx>yypParser->yyidxMax ){
  1003     yypParser->yyidxMax = yypParser->yyidx;
  1007   if( yypParser->yyidx>=YYSTACKDEPTH ){
  1008     yyStackOverflow(yypParser, yypMinor);
  1012   if( yypParser->yyidx>=yypParser->yystksz ){
  1013     yyGrowStack(yypParser);
  1014     if( yypParser->yyidx>=yypParser->yystksz ){
  1015       yyStackOverflow(yypParser, yypMinor);
  1020   yytos = &yypParser->yystack[yypParser->yyidx];
  1021   yytos->stateno = (YYACTIONTYPE)yyNewState;
  1022   yytos->major = (YYCODETYPE)yyMajor;
  1023   yytos->minor = *yypMinor;
  1025   if( yyTraceFILE && yypParser->yyidx>0 ){
  1027     fprintf(yyTraceFILE,
"%sShift %d\n",yyTracePrompt,yyNewState);
  1028     fprintf(yyTraceFILE,
"%sStack:",yyTracePrompt);
  1029     for(i=1; i<=yypParser->yyidx; i++)
  1030       fprintf(yyTraceFILE,
" %s",yyTokenName[yypParser->yystack[i].major]);
  1031     fprintf(yyTraceFILE,
"\n");
  1039 static const struct {
  1247 static void yy_accept(yyParser*);  
  1253 static void yy_reduce(
  1254   yyParser *yypParser,         
  1260   yyStackEntry *yymsp;            
  1263   yymsp = &yypParser->yystack[yypParser->yyidx];
  1265   if( yyTraceFILE && yyruleno>=0 
  1266         && yyruleno<(
int)(
sizeof(yyRuleName)/
sizeof(yyRuleName[0])) ){
  1267     fprintf(yyTraceFILE, 
"%sReduce [%s].\n", yyTracePrompt,
  1268       yyRuleName[yyruleno]);
  1287   yygotominor = yyzerominor;
  1300 { yygotominor.yy0 = yymsp[0].minor.yy0; }
  1304     result->data.coords.push_back(0);
  1305     result->data.coords.push_back(0);
  1306     result->data.geom_type = geometry_type::POINT;
  1311     result->data.geom_type = geometry_type::POINT;
  1316     result->data.coords.push_back(0);
  1317     result->data.coords.push_back(0);
  1318     result->data.coords.push_back(0);
  1319     result->data.geom_type = geometry_type::POINTZ;
  1324     result->data.geom_type = geometry_type::POINTZ;
  1329     result->data.coords.push_back(0);
  1330     result->data.coords.push_back(0);
  1331     result->data.coords.push_back(0);
  1332     result->data.geom_type = geometry_type::POINTM;
  1337     result->data.geom_type = geometry_type::POINTM;
  1342     result->data.coords.push_back(0);
  1343     result->data.coords.push_back(0);
  1344     result->data.coords.push_back(0);
  1345     result->data.coords.push_back(0);
  1346     result->data.geom_type = geometry_type::POINTZM;
  1351     result->data.geom_type = geometry_type::POINTZM;
  1356     result->data.coords.push_back(yymsp[-1].minor.yy0);
  1357     result->data.coords.push_back(yymsp[0].minor.yy0);
  1361       case 40:  yytestcase(yyruleno==40);
  1363     result->data.coords.push_back(yymsp[-2].minor.yy0);
  1364     result->data.coords.push_back(yymsp[-1].minor.yy0);
  1365     result->data.coords.push_back(yymsp[0].minor.yy0);
  1370     result->data.coords.push_back(yymsp[-3].minor.yy0);
  1371     result->data.coords.push_back(yymsp[-2].minor.yy0);
  1372     result->data.coords.push_back(yymsp[-1].minor.yy0);
  1373     result->data.coords.push_back(yymsp[0].minor.yy0);
  1377       case 71:  yytestcase(yyruleno==71);
  1378       case 72:  yytestcase(yyruleno==72);
  1380     result->data.geom_type = geometry_type::MULTIPOINT;
  1384       case 74:  yytestcase(yyruleno==74);
  1385       case 75:  yytestcase(yyruleno==75);
  1387     result->data.geom_type = geometry_type::MULTIPOINTZ;
  1391       case 77:  yytestcase(yyruleno==77);
  1392       case 78:  yytestcase(yyruleno==78);
  1394     result->data.geom_type = geometry_type::MULTIPOINTM;
  1398       case 80:  yytestcase(yyruleno==80);
  1399       case 81:  yytestcase(yyruleno==81);
  1401     result->data.geom_type = geometry_type::MULTIPOINTZM;
  1405       case 83:  yytestcase(yyruleno==83);
  1406       case 84:  yytestcase(yyruleno==84);
  1407       case 85:  yytestcase(yyruleno==85);
  1408       case 114:  yytestcase(yyruleno==114);
  1409       case 115:  yytestcase(yyruleno==115);
  1410       case 116:  yytestcase(yyruleno==116);
  1411       case 117:  yytestcase(yyruleno==117);
  1413     result->data.offsets.push_back(result->data.coords.size());
  1417       case 95:  yytestcase(yyruleno==95);
  1419     result->data.geom_type = geometry_type::LINESTRING;
  1423       case 97:  yytestcase(yyruleno==97);
  1425     result->data.geom_type = geometry_type::LINESTRINGZ;
  1429       case 99:  yytestcase(yyruleno==99);
  1431     result->data.geom_type = geometry_type::LINESTRINGM;
  1435       case 101:  yytestcase(yyruleno==101);
  1437     result->data.geom_type = geometry_type::LINESTRINGZM;
  1441       case 107:  yytestcase(yyruleno==107);
  1443     result->data.geom_type = geometry_type::MULTILINESTRING;
  1447       case 109:  yytestcase(yyruleno==109);
  1449     result->data.geom_type = geometry_type::MULTILINESTRINGZ;
  1453       case 111:  yytestcase(yyruleno==111);
  1455     result->data.geom_type = geometry_type::MULTILINESTRINGM;
  1459       case 113:  yytestcase(yyruleno==113);
  1461     result->data.geom_type = geometry_type::MULTILINESTRINGZM;
  1465       case 139:  yytestcase(yyruleno==139);
  1467     result->data.geom_type = geometry_type::POLYGON;
  1471       case 141:  yytestcase(yyruleno==141);
  1473     result->data.geom_type = geometry_type::POLYGONZ;
  1477       case 143:  yytestcase(yyruleno==143);
  1479     result->data.geom_type = geometry_type::POLYGONM;
  1483       case 145:  yytestcase(yyruleno==145);
  1485     result->data.geom_type = geometry_type::POLYGONZM;
  1489       case 151:  yytestcase(yyruleno==151);
  1491     result->data.geom_type = geometry_type::MULTIPOLYGON;
  1495       case 153:  yytestcase(yyruleno==153);
  1497     result->data.geom_type = geometry_type::MULTIPOLYGONZ;
  1501       case 155:  yytestcase(yyruleno==155);
  1503     result->data.geom_type = geometry_type::MULTIPOLYGONM;
  1507       case 157:  yytestcase(yyruleno==157);
  1509     result->data.geom_type = geometry_type::MULTIPOLYGONZM;
  1513       case 195:  yytestcase(yyruleno==195);
  1515     result->data.geom_type = geometry_type::GEOMETRYCOLLECTION;
  1519       case 197:  yytestcase(yyruleno==197);
  1521     result->data.geom_type = geometry_type::GEOMETRYCOLLECTIONZ;
  1525       case 199:  yytestcase(yyruleno==199);
  1527     result->data.geom_type = geometry_type::GEOMETRYCOLLECTIONM;
  1531       case 201:  yytestcase(yyruleno==201);
  1533     result->data.geom_type = geometry_type::GEOMETRYCOLLECTIONZM;
  1537        yytestcase(yyruleno==0);
  1538        yytestcase(yyruleno==1);
  1539        yytestcase(yyruleno==2);
  1540        yytestcase(yyruleno==3);
  1541        yytestcase(yyruleno==4);
  1542        yytestcase(yyruleno==5);
  1543        yytestcase(yyruleno==6);
  1544        yytestcase(yyruleno==7);
  1545        yytestcase(yyruleno==8);
  1546        yytestcase(yyruleno==9);
  1547        yytestcase(yyruleno==10);
  1548        yytestcase(yyruleno==11);
  1549        yytestcase(yyruleno==12);
  1550        yytestcase(yyruleno==13);
  1551        yytestcase(yyruleno==14);
  1552        yytestcase(yyruleno==15);
  1553        yytestcase(yyruleno==16);
  1554        yytestcase(yyruleno==17);
  1555        yytestcase(yyruleno==18);
  1556        yytestcase(yyruleno==19);
  1557        yytestcase(yyruleno==20);
  1558        yytestcase(yyruleno==21);
  1559        yytestcase(yyruleno==22);
  1560        yytestcase(yyruleno==23);
  1561        yytestcase(yyruleno==24);
  1562        yytestcase(yyruleno==25);
  1563        yytestcase(yyruleno==26);
  1564        yytestcase(yyruleno==27);
  1565        yytestcase(yyruleno==28);
  1566        yytestcase(yyruleno==42);
  1567        yytestcase(yyruleno==43);
  1568        yytestcase(yyruleno==44);
  1569        yytestcase(yyruleno==45);
  1570        yytestcase(yyruleno==46);
  1571        yytestcase(yyruleno==47);
  1572        yytestcase(yyruleno==48);
  1573        yytestcase(yyruleno==49);
  1574        yytestcase(yyruleno==50);
  1575        yytestcase(yyruleno==51);
  1576        yytestcase(yyruleno==52);
  1577        yytestcase(yyruleno==53);
  1578        yytestcase(yyruleno==54);
  1579        yytestcase(yyruleno==55);
  1580        yytestcase(yyruleno==56);
  1581        yytestcase(yyruleno==57);
  1582        yytestcase(yyruleno==58);
  1583        yytestcase(yyruleno==59);
  1584        yytestcase(yyruleno==60);
  1585        yytestcase(yyruleno==61);
  1586        yytestcase(yyruleno==62);
  1587        yytestcase(yyruleno==63);
  1588        yytestcase(yyruleno==64);
  1589        yytestcase(yyruleno==65);
  1590        yytestcase(yyruleno==66);
  1591        yytestcase(yyruleno==67);
  1592        yytestcase(yyruleno==68);
  1593        yytestcase(yyruleno==69);
  1594        yytestcase(yyruleno==86);
  1595        yytestcase(yyruleno==87);
  1596        yytestcase(yyruleno==88);
  1597        yytestcase(yyruleno==89);
  1598        yytestcase(yyruleno==90);
  1599        yytestcase(yyruleno==91);
  1600        yytestcase(yyruleno==92);
  1601        yytestcase(yyruleno==93);
  1602        yytestcase(yyruleno==102);
  1603        yytestcase(yyruleno==103);
  1604        yytestcase(yyruleno==104);
  1605        yytestcase(yyruleno==105);
  1606        yytestcase(yyruleno==118);
  1607        yytestcase(yyruleno==119);
  1608        yytestcase(yyruleno==120);
  1609        yytestcase(yyruleno==121);
  1610        yytestcase(yyruleno==122);
  1611        yytestcase(yyruleno==123);
  1612        yytestcase(yyruleno==124);
  1613        yytestcase(yyruleno==125);
  1614        yytestcase(yyruleno==126);
  1615        yytestcase(yyruleno==127);
  1616        yytestcase(yyruleno==128);
  1617        yytestcase(yyruleno==129);
  1618        yytestcase(yyruleno==130);
  1619        yytestcase(yyruleno==131);
  1620        yytestcase(yyruleno==132);
  1621        yytestcase(yyruleno==133);
  1622        yytestcase(yyruleno==134);
  1623        yytestcase(yyruleno==135);
  1624        yytestcase(yyruleno==136);
  1625        yytestcase(yyruleno==137);
  1626        yytestcase(yyruleno==146);
  1627        yytestcase(yyruleno==147);
  1628        yytestcase(yyruleno==148);
  1629        yytestcase(yyruleno==149);
  1630        yytestcase(yyruleno==158);
  1631        yytestcase(yyruleno==159);
  1632        yytestcase(yyruleno==160);
  1633        yytestcase(yyruleno==161);
  1634        yytestcase(yyruleno==162);
  1635        yytestcase(yyruleno==163);
  1636        yytestcase(yyruleno==164);
  1637        yytestcase(yyruleno==165);
  1638        yytestcase(yyruleno==166);
  1639        yytestcase(yyruleno==167);
  1640        yytestcase(yyruleno==168);
  1641        yytestcase(yyruleno==169);
  1642        yytestcase(yyruleno==170);
  1643        yytestcase(yyruleno==171);
  1644        yytestcase(yyruleno==172);
  1645        yytestcase(yyruleno==173);
  1646        yytestcase(yyruleno==174);
  1647        yytestcase(yyruleno==175);
  1648        yytestcase(yyruleno==176);
  1649        yytestcase(yyruleno==177);
  1650        yytestcase(yyruleno==178);
  1651        yytestcase(yyruleno==179);
  1652        yytestcase(yyruleno==180);
  1653        yytestcase(yyruleno==181);
  1654        yytestcase(yyruleno==182);
  1655        yytestcase(yyruleno==183);
  1656        yytestcase(yyruleno==184);
  1657        yytestcase(yyruleno==185);
  1658        yytestcase(yyruleno==186);
  1659        yytestcase(yyruleno==187);
  1660        yytestcase(yyruleno==188);
  1661        yytestcase(yyruleno==189);
  1662        yytestcase(yyruleno==190);
  1663        yytestcase(yyruleno==191);
  1664        yytestcase(yyruleno==192);
  1665        yytestcase(yyruleno==193);
  1668   yygoto = yyRuleInfo[yyruleno].lhs;
  1669   yysize = yyRuleInfo[yyruleno].nrhs;
  1670   yypParser->yyidx -= yysize;
  1671   yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
  1672   if( yyact < YYNSTATE ){
  1681       yymsp->stateno = (YYACTIONTYPE)yyact;
  1682       yymsp->major = (YYCODETYPE)yygoto;
  1683       yymsp->minor = yygotominor;
  1687       yy_shift(yypParser,yyact,yygoto,&yygotominor);
  1690     assert( yyact == YYNSTATE + YYNRULE + 1 );
  1691     yy_accept(yypParser);
  1698 #ifndef YYNOERRORRECOVERY  1699 static void yy_parse_failed(
  1705     fprintf(yyTraceFILE,
"%sFail!\n",yyTracePrompt);
  1708   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
  1718 static void yy_syntax_error(
  1719   yyParser *yypParser,           
  1724 #define TOKEN (yyminor.yy0)  1726     result->parser_error = 
true;
  1727 #ifdef SHAPES_VERBOSE  1728     int n = 
sizeof(yyTokenName) / 
sizeof(yyTokenName[0]);
  1729     for (
int i = 0; i < n; ++i) {
  1730         int a = yy_find_shift_action(yypParser, (YYCODETYPE)i);
  1731         if (a < YYNSTATE + YYNRULE) {
  1732             printf(
"possible token: %s\n", yyTokenName[i]);
  1742 static void yy_accept(
  1748     fprintf(yyTraceFILE,
"%sAccept!\n",yyTracePrompt);
  1751   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
  1779   ParseTOKENTYPE yyminor       
  1785 #ifdef YYERRORSYMBOL  1788   yyParser *yypParser;  
  1791   yypParser = (yyParser*)yyp;
  1792   if( yypParser->yyidx<0 ){
  1794     if( yypParser->yystksz <=0 ){
  1796       yyminorunion = yyzerominor;
  1797       yyStackOverflow(yypParser, &yyminorunion);
  1801     yypParser->yyidx = 0;
  1802     yypParser->yyerrcnt = -1;
  1803     yypParser->yystack[0].stateno = 0;
  1804     yypParser->yystack[0].major = 0;
  1806   yyminorunion.yy0 = yyminor;
  1807   yyendofinput = (yymajor==0);
  1812     fprintf(yyTraceFILE,
"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
  1817     yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
  1818     if( yyact<YYNSTATE ){
  1819       assert( !yyendofinput );  
  1820       yy_shift(yypParser,yyact,yymajor,&yyminorunion);
  1821       yypParser->yyerrcnt--;
  1823     }
else if( yyact < YYNSTATE + YYNRULE ){
  1824       yy_reduce(yypParser,yyact-YYNSTATE);
  1826       assert( yyact == YY_ERROR_ACTION );
  1827 #ifdef YYERRORSYMBOL  1832         fprintf(yyTraceFILE,
"%sSyntax Error!\n",yyTracePrompt);
  1835 #ifdef YYERRORSYMBOL  1855       if( yypParser->yyerrcnt<0 ){
  1856         yy_syntax_error(yypParser,yymajor,yyminorunion);
  1858       yymx = yypParser->yystack[yypParser->yyidx].major;
  1859       if( yymx==YYERRORSYMBOL || yyerrorhit ){
  1862           fprintf(yyTraceFILE,
"%sDiscard input token %s\n",
  1863              yyTracePrompt,yyTokenName[yymajor]);
  1866         yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
  1870           yypParser->yyidx >= 0 &&
  1871           yymx != YYERRORSYMBOL &&
  1872           (yyact = yy_find_reduce_action(
  1873                         yypParser->yystack[yypParser->yyidx].stateno,
  1874                         YYERRORSYMBOL)) >= YYNSTATE
  1876           yy_pop_parser_stack(yypParser);
  1878         if( yypParser->yyidx < 0 || yymajor==0 ){
  1879           yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
  1880           yy_parse_failed(yypParser);
  1882         }
else if( yymx!=YYERRORSYMBOL ){
  1885           yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
  1888       yypParser->yyerrcnt = 3;
  1890 #elif defined(YYNOERRORRECOVERY)  1898       yy_syntax_error(yypParser,yymajor,yyminorunion);
  1899       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
  1912       if( yypParser->yyerrcnt<=0 ){
  1913         yy_syntax_error(yypParser,yymajor,yyminorunion);
  1915       yypParser->yyerrcnt = 3;
  1916       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
  1918         yy_parse_failed(yypParser);
  1923   }
while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
  1929 #pragma GCC diagnostic pop  1933 #pragma clang diagnostic pop  1937 #pragma warning(pop) geometry_type geom_type
the dimension type of the geometry 
wkt_data data
the parser result data 
std::vector< std::size_t > offsets
the offsets in the coordinates sequence 
std::vector< double > coords
the coordinates as a sequence of numbers 
A Well-known text (WKT) markup language parser results. 
A Well-known text (WKT) markup language parser result data.