PostGIS  2.1.10dev-r@@SVN_REVISION@@
int yyparse ( )

Definition at line 1864 of file lwin_wkt_parse.c.

References COLLECTIONTYPE, COMPOUNDTYPE, YYSTYPE::coordinatevalue, YYSTYPE::doublevalue, YYLTYPE::first_column, YYLTYPE::first_line, YYSTYPE::geometryvalue, YYLTYPE::last_column, YYLTYPE::last_line, MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POLYHEDRALSURFACETYPE, YYSTYPE::ptarrayvalue, SRID_UNKNOWN, YYSTYPE::stringvalue, TINTYPE, WKT_ERROR, wkt_parser_circularstring_new(), wkt_parser_collection_add_geom(), wkt_parser_collection_finalize(), wkt_parser_collection_new(), wkt_parser_compound_add_geom(), wkt_parser_coord_2(), wkt_parser_coord_3(), wkt_parser_coord_4(), wkt_parser_curvepolygon_add_ring(), wkt_parser_curvepolygon_finalize(), wkt_parser_curvepolygon_new(), wkt_parser_geometry_new(), wkt_parser_linestring_new(), wkt_parser_point_new(), wkt_parser_polygon_add_ring(), wkt_parser_polygon_finalize(), wkt_parser_polygon_new(), wkt_parser_ptarray_add_coord(), wkt_parser_ptarray_new(), wkt_parser_triangle_new(), YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylloc, YYLLOC_DEFAULT, yyalloc::yyls_alloc, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact_value_is_default, YYPOPSTACK, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSYNTAX_ERROR, yytable_value_is_error, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.

1868 {
1869  int yystate;
1870  /* Number of tokens to shift before error messages enabled. */
1871  int yyerrstatus;
1872 
1873  /* The stacks and their tools:
1874  `yyss': related to states.
1875  `yyvs': related to semantic values.
1876  `yyls': related to locations.
1877 
1878  Refer to the stacks thru separate pointers, to allow yyoverflow
1879  to reallocate them elsewhere. */
1880 
1881  /* The state stack. */
1882  yytype_int16 yyssa[YYINITDEPTH];
1883  yytype_int16 *yyss;
1884  yytype_int16 *yyssp;
1885 
1886  /* The semantic value stack. */
1887  YYSTYPE yyvsa[YYINITDEPTH];
1888  YYSTYPE *yyvs;
1889  YYSTYPE *yyvsp;
1890 
1891  /* The location stack. */
1892  YYLTYPE yylsa[YYINITDEPTH];
1893  YYLTYPE *yyls;
1894  YYLTYPE *yylsp;
1895 
1896  /* The locations where the error started and ended. */
1897  YYLTYPE yyerror_range[3];
1898 
1899  YYSIZE_T yystacksize;
1900 
1901  int yyn;
1902  int yyresult;
1903  /* Lookahead token as an internal (translated) token number. */
1904  int yytoken;
1905  /* The variables used to return semantic value and location from the
1906  action routines. */
1907  YYSTYPE yyval;
1908  YYLTYPE yyloc;
1909 
1910 #if YYERROR_VERBOSE
1911  /* Buffer for error messages, and its allocated size. */
1912  char yymsgbuf[128];
1913  char *yymsg = yymsgbuf;
1914  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1915 #endif
1916 
1917 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1918 
1919  /* The number of symbols on the RHS of the reduced rule.
1920  Keep to zero when no symbol should be popped. */
1921  int yylen = 0;
1922 
1923  yytoken = 0;
1924  yyss = yyssa;
1925  yyvs = yyvsa;
1926  yyls = yylsa;
1927  yystacksize = YYINITDEPTH;
1928 
1929  YYDPRINTF ((stderr, "Starting parse\n"));
1930 
1931  yystate = 0;
1932  yyerrstatus = 0;
1933  yynerrs = 0;
1934  yychar = YYEMPTY; /* Cause a token to be read. */
1935 
1936  /* Initialize stack pointers.
1937  Waste one element of value and location stack
1938  so that they stay on the same level as the state stack.
1939  The wasted elements are never initialized. */
1940  yyssp = yyss;
1941  yyvsp = yyvs;
1942  yylsp = yyls;
1943 
1944 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1945  /* Initialize the default location before parsing starts. */
1946  yylloc.first_line = yylloc.last_line = 1;
1947  yylloc.first_column = yylloc.last_column = 1;
1948 #endif
1949 
1950  goto yysetstate;
1951 
1952 /*------------------------------------------------------------.
1953 | yynewstate -- Push a new state, which is found in yystate. |
1954 `------------------------------------------------------------*/
1955  yynewstate:
1956  /* In all cases, when you get here, the value and location stacks
1957  have just been pushed. So pushing a state here evens the stacks. */
1958  yyssp++;
1959 
1960  yysetstate:
1961  *yyssp = yystate;
1962 
1963  if (yyss + yystacksize - 1 <= yyssp)
1964  {
1965  /* Get the current used size of the three stacks, in elements. */
1966  YYSIZE_T yysize = yyssp - yyss + 1;
1967 
1968 #ifdef yyoverflow
1969  {
1970  /* Give user a chance to reallocate the stack. Use copies of
1971  these so that the &'s don't force the real ones into
1972  memory. */
1973  YYSTYPE *yyvs1 = yyvs;
1974  yytype_int16 *yyss1 = yyss;
1975  YYLTYPE *yyls1 = yyls;
1976 
1977  /* Each stack pointer address is followed by the size of the
1978  data in use in that stack, in bytes. This used to be a
1979  conditional around just the two extra args, but that might
1980  be undefined if yyoverflow is a macro. */
1981  yyoverflow (YY_("memory exhausted"),
1982  &yyss1, yysize * sizeof (*yyssp),
1983  &yyvs1, yysize * sizeof (*yyvsp),
1984  &yyls1, yysize * sizeof (*yylsp),
1985  &yystacksize);
1986 
1987  yyls = yyls1;
1988  yyss = yyss1;
1989  yyvs = yyvs1;
1990  }
1991 #else /* no yyoverflow */
1992 # ifndef YYSTACK_RELOCATE
1993  goto yyexhaustedlab;
1994 # else
1995  /* Extend the stack our own way. */
1996  if (YYMAXDEPTH <= yystacksize)
1997  goto yyexhaustedlab;
1998  yystacksize *= 2;
1999  if (YYMAXDEPTH < yystacksize)
2000  yystacksize = YYMAXDEPTH;
2001 
2002  {
2003  yytype_int16 *yyss1 = yyss;
2004  union yyalloc *yyptr =
2005  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2006  if (! yyptr)
2007  goto yyexhaustedlab;
2008  YYSTACK_RELOCATE (yyss_alloc, yyss);
2009  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2010  YYSTACK_RELOCATE (yyls_alloc, yyls);
2011 # undef YYSTACK_RELOCATE
2012  if (yyss1 != yyssa)
2013  YYSTACK_FREE (yyss1);
2014  }
2015 # endif
2016 #endif /* no yyoverflow */
2017 
2018  yyssp = yyss + yysize - 1;
2019  yyvsp = yyvs + yysize - 1;
2020  yylsp = yyls + yysize - 1;
2021 
2022  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2023  (unsigned long int) yystacksize));
2024 
2025  if (yyss + yystacksize - 1 <= yyssp)
2026  YYABORT;
2027  }
2028 
2029  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2030 
2031  if (yystate == YYFINAL)
2032  YYACCEPT;
2033 
2034  goto yybackup;
2035 
2036 /*-----------.
2037 | yybackup. |
2038 `-----------*/
2039 yybackup:
2040 
2041  /* Do appropriate processing given the current state. Read a
2042  lookahead token if we need one and don't already have one. */
2043 
2044  /* First try to decide what to do without reference to lookahead token. */
2045  yyn = yypact[yystate];
2046  if (yypact_value_is_default (yyn))
2047  goto yydefault;
2048 
2049  /* Not known => get a lookahead token if don't already have one. */
2050 
2051  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2052  if (yychar == YYEMPTY)
2053  {
2054  YYDPRINTF ((stderr, "Reading a token: "));
2055  yychar = YYLEX;
2056  }
2057 
2058  if (yychar <= YYEOF)
2059  {
2060  yychar = yytoken = YYEOF;
2061  YYDPRINTF ((stderr, "Now at end of input.\n"));
2062  }
2063  else
2064  {
2065  yytoken = YYTRANSLATE (yychar);
2066  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2067  }
2068 
2069  /* If the proper action on seeing token YYTOKEN is to reduce or to
2070  detect an error, take that action. */
2071  yyn += yytoken;
2072  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2073  goto yydefault;
2074  yyn = yytable[yyn];
2075  if (yyn <= 0)
2076  {
2077  if (yytable_value_is_error (yyn))
2078  goto yyerrlab;
2079  yyn = -yyn;
2080  goto yyreduce;
2081  }
2082 
2083  /* Count tokens shifted since error; after three, turn off error
2084  status. */
2085  if (yyerrstatus)
2086  yyerrstatus--;
2087 
2088  /* Shift the lookahead token. */
2089  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2090 
2091  /* Discard the shifted token. */
2092  yychar = YYEMPTY;
2093 
2094  yystate = yyn;
2095  *++yyvsp = yylval;
2096  *++yylsp = yylloc;
2097  goto yynewstate;
2098 
2099 
2100 /*-----------------------------------------------------------.
2101 | yydefault -- do the default action for the current state. |
2102 `-----------------------------------------------------------*/
2103 yydefault:
2104  yyn = yydefact[yystate];
2105  if (yyn == 0)
2106  goto yyerrlab;
2107  goto yyreduce;
2108 
2109 
2110 /*-----------------------------.
2111 | yyreduce -- Do a reduction. |
2112 `-----------------------------*/
2113 yyreduce:
2114  /* yyn is the number of a rule to reduce with. */
2115  yylen = yyr2[yyn];
2116 
2117  /* If YYLEN is nonzero, implement the default value of the action:
2118  `$$ = $1'.
2119 
2120  Otherwise, the following line sets YYVAL to garbage.
2121  This behavior is undocumented and Bison
2122  users should not rely upon it. Assigning to YYVAL
2123  unconditionally makes the parser a bit smaller, and it avoids a
2124  GCC warning that YYVAL may be used uninitialized. */
2125  yyval = yyvsp[1-yylen];
2126 
2127  /* Default location. */
2128  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2129  YY_REDUCE_PRINT (yyn);
2130  switch (yyn)
2131  {
2132  case 2:
2133 
2134 /* Line 1806 of yacc.c */
2135 #line 203 "lwin_wkt_parse.y"
2136  { wkt_parser_geometry_new((yyvsp[(1) - (1)].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
2137  break;
2138 
2139  case 3:
2140 
2141 /* Line 1806 of yacc.c */
2142 #line 205 "lwin_wkt_parse.y"
2143  { wkt_parser_geometry_new((yyvsp[(3) - (3)].geometryvalue), (yyvsp[(1) - (3)].integervalue)); WKT_ERROR(); }
2144  break;
2145 
2146  case 4:
2147 
2148 /* Line 1806 of yacc.c */
2149 #line 208 "lwin_wkt_parse.y"
2150  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2151  break;
2152 
2153  case 5:
2154 
2155 /* Line 1806 of yacc.c */
2156 #line 209 "lwin_wkt_parse.y"
2157  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2158  break;
2159 
2160  case 6:
2161 
2162 /* Line 1806 of yacc.c */
2163 #line 210 "lwin_wkt_parse.y"
2164  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2165  break;
2166 
2167  case 7:
2168 
2169 /* Line 1806 of yacc.c */
2170 #line 211 "lwin_wkt_parse.y"
2171  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2172  break;
2173 
2174  case 8:
2175 
2176 /* Line 1806 of yacc.c */
2177 #line 212 "lwin_wkt_parse.y"
2178  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2179  break;
2180 
2181  case 9:
2182 
2183 /* Line 1806 of yacc.c */
2184 #line 213 "lwin_wkt_parse.y"
2185  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2186  break;
2187 
2188  case 10:
2189 
2190 /* Line 1806 of yacc.c */
2191 #line 214 "lwin_wkt_parse.y"
2192  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2193  break;
2194 
2195  case 11:
2196 
2197 /* Line 1806 of yacc.c */
2198 #line 215 "lwin_wkt_parse.y"
2199  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2200  break;
2201 
2202  case 12:
2203 
2204 /* Line 1806 of yacc.c */
2205 #line 216 "lwin_wkt_parse.y"
2206  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2207  break;
2208 
2209  case 13:
2210 
2211 /* Line 1806 of yacc.c */
2212 #line 217 "lwin_wkt_parse.y"
2213  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2214  break;
2215 
2216  case 14:
2217 
2218 /* Line 1806 of yacc.c */
2219 #line 218 "lwin_wkt_parse.y"
2220  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2221  break;
2222 
2223  case 15:
2224 
2225 /* Line 1806 of yacc.c */
2226 #line 219 "lwin_wkt_parse.y"
2227  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2228  break;
2229 
2230  case 16:
2231 
2232 /* Line 1806 of yacc.c */
2233 #line 220 "lwin_wkt_parse.y"
2234  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2235  break;
2236 
2237  case 17:
2238 
2239 /* Line 1806 of yacc.c */
2240 #line 221 "lwin_wkt_parse.y"
2241  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2242  break;
2243 
2244  case 18:
2245 
2246 /* Line 1806 of yacc.c */
2247 #line 222 "lwin_wkt_parse.y"
2248  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2249  break;
2250 
2251  case 19:
2252 
2253 /* Line 1806 of yacc.c */
2254 #line 226 "lwin_wkt_parse.y"
2255  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2256  break;
2257 
2258  case 20:
2259 
2260 /* Line 1806 of yacc.c */
2261 #line 228 "lwin_wkt_parse.y"
2262  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2263  break;
2264 
2265  case 21:
2266 
2267 /* Line 1806 of yacc.c */
2268 #line 230 "lwin_wkt_parse.y"
2269  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2270  break;
2271 
2272  case 22:
2273 
2274 /* Line 1806 of yacc.c */
2275 #line 232 "lwin_wkt_parse.y"
2277  break;
2278 
2279  case 23:
2280 
2281 /* Line 1806 of yacc.c */
2282 #line 236 "lwin_wkt_parse.y"
2283  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2284  break;
2285 
2286  case 24:
2287 
2288 /* Line 1806 of yacc.c */
2289 #line 238 "lwin_wkt_parse.y"
2290  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2291  break;
2292 
2293  case 25:
2294 
2295 /* Line 1806 of yacc.c */
2296 #line 242 "lwin_wkt_parse.y"
2297  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2298  break;
2299 
2300  case 26:
2301 
2302 /* Line 1806 of yacc.c */
2303 #line 244 "lwin_wkt_parse.y"
2304  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2305  break;
2306 
2307  case 27:
2308 
2309 /* Line 1806 of yacc.c */
2310 #line 246 "lwin_wkt_parse.y"
2311  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2312  break;
2313 
2314  case 28:
2315 
2316 /* Line 1806 of yacc.c */
2317 #line 248 "lwin_wkt_parse.y"
2319  break;
2320 
2321  case 29:
2322 
2323 /* Line 1806 of yacc.c */
2324 #line 252 "lwin_wkt_parse.y"
2325  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2326  break;
2327 
2328  case 30:
2329 
2330 /* Line 1806 of yacc.c */
2331 #line 254 "lwin_wkt_parse.y"
2332  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2333  break;
2334 
2335  case 31:
2336 
2337 /* Line 1806 of yacc.c */
2338 #line 256 "lwin_wkt_parse.y"
2339  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2340  break;
2341 
2342  case 32:
2343 
2344 /* Line 1806 of yacc.c */
2345 #line 258 "lwin_wkt_parse.y"
2346  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2347  break;
2348 
2349  case 33:
2350 
2351 /* Line 1806 of yacc.c */
2352 #line 260 "lwin_wkt_parse.y"
2353  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2354  break;
2355 
2356  case 34:
2357 
2358 /* Line 1806 of yacc.c */
2359 #line 262 "lwin_wkt_parse.y"
2360  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2361  break;
2362 
2363  case 35:
2364 
2365 /* Line 1806 of yacc.c */
2366 #line 266 "lwin_wkt_parse.y"
2367  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2368  break;
2369 
2370  case 36:
2371 
2372 /* Line 1806 of yacc.c */
2373 #line 268 "lwin_wkt_parse.y"
2374  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2375  break;
2376 
2377  case 37:
2378 
2379 /* Line 1806 of yacc.c */
2380 #line 270 "lwin_wkt_parse.y"
2381  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2382  break;
2383 
2384  case 38:
2385 
2386 /* Line 1806 of yacc.c */
2387 #line 272 "lwin_wkt_parse.y"
2388  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
2389  break;
2390 
2391  case 39:
2392 
2393 /* Line 1806 of yacc.c */
2394 #line 276 "lwin_wkt_parse.y"
2395  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2396  break;
2397 
2398  case 40:
2399 
2400 /* Line 1806 of yacc.c */
2401 #line 278 "lwin_wkt_parse.y"
2402  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2403  break;
2404 
2405  case 41:
2406 
2407 /* Line 1806 of yacc.c */
2408 #line 280 "lwin_wkt_parse.y"
2409  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2410  break;
2411 
2412  case 42:
2413 
2414 /* Line 1806 of yacc.c */
2415 #line 282 "lwin_wkt_parse.y"
2417  break;
2418 
2419  case 43:
2420 
2421 /* Line 1806 of yacc.c */
2422 #line 286 "lwin_wkt_parse.y"
2423  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2424  break;
2425 
2426  case 44:
2427 
2428 /* Line 1806 of yacc.c */
2429 #line 288 "lwin_wkt_parse.y"
2430  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2431  break;
2432 
2433  case 45:
2434 
2435 /* Line 1806 of yacc.c */
2436 #line 290 "lwin_wkt_parse.y"
2437  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2438  break;
2439 
2440  case 46:
2441 
2442 /* Line 1806 of yacc.c */
2443 #line 292 "lwin_wkt_parse.y"
2445  break;
2446 
2447  case 47:
2448 
2449 /* Line 1806 of yacc.c */
2450 #line 296 "lwin_wkt_parse.y"
2451  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2452  break;
2453 
2454  case 48:
2455 
2456 /* Line 1806 of yacc.c */
2457 #line 298 "lwin_wkt_parse.y"
2458  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2459  break;
2460 
2461  case 49:
2462 
2463 /* Line 1806 of yacc.c */
2464 #line 302 "lwin_wkt_parse.y"
2465  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2466  break;
2467 
2468  case 50:
2469 
2470 /* Line 1806 of yacc.c */
2471 #line 304 "lwin_wkt_parse.y"
2472  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2473  break;
2474 
2475  case 51:
2476 
2477 /* Line 1806 of yacc.c */
2478 #line 308 "lwin_wkt_parse.y"
2479  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2480  break;
2481 
2482  case 52:
2483 
2484 /* Line 1806 of yacc.c */
2485 #line 310 "lwin_wkt_parse.y"
2486  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2487  break;
2488 
2489  case 53:
2490 
2491 /* Line 1806 of yacc.c */
2492 #line 312 "lwin_wkt_parse.y"
2493  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2494  break;
2495 
2496  case 54:
2497 
2498 /* Line 1806 of yacc.c */
2499 #line 314 "lwin_wkt_parse.y"
2500  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2501  break;
2502 
2503  case 55:
2504 
2505 /* Line 1806 of yacc.c */
2506 #line 318 "lwin_wkt_parse.y"
2507  { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); }
2508  break;
2509 
2510  case 56:
2511 
2512 /* Line 1806 of yacc.c */
2513 #line 320 "lwin_wkt_parse.y"
2514  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2515  break;
2516 
2517  case 57:
2518 
2519 /* Line 1806 of yacc.c */
2520 #line 323 "lwin_wkt_parse.y"
2521  { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); }
2522  break;
2523 
2524  case 58:
2525 
2526 /* Line 1806 of yacc.c */
2527 #line 327 "lwin_wkt_parse.y"
2528  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2529  break;
2530 
2531  case 59:
2532 
2533 /* Line 1806 of yacc.c */
2534 #line 329 "lwin_wkt_parse.y"
2535  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2536  break;
2537 
2538  case 60:
2539 
2540 /* Line 1806 of yacc.c */
2541 #line 331 "lwin_wkt_parse.y"
2542  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2543  break;
2544 
2545  case 61:
2546 
2547 /* Line 1806 of yacc.c */
2548 #line 333 "lwin_wkt_parse.y"
2549  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
2550  break;
2551 
2552  case 62:
2553 
2554 /* Line 1806 of yacc.c */
2555 #line 337 "lwin_wkt_parse.y"
2556  { (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2557  break;
2558 
2559  case 63:
2560 
2561 /* Line 1806 of yacc.c */
2562 #line 339 "lwin_wkt_parse.y"
2563  { (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2564  break;
2565 
2566  case 64:
2567 
2568 /* Line 1806 of yacc.c */
2569 #line 342 "lwin_wkt_parse.y"
2570  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2571  break;
2572 
2573  case 65:
2574 
2575 /* Line 1806 of yacc.c */
2576 #line 343 "lwin_wkt_parse.y"
2577  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2578  break;
2579 
2580  case 66:
2581 
2582 /* Line 1806 of yacc.c */
2583 #line 344 "lwin_wkt_parse.y"
2584  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2585  break;
2586 
2587  case 67:
2588 
2589 /* Line 1806 of yacc.c */
2590 #line 345 "lwin_wkt_parse.y"
2591  { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); }
2592  break;
2593 
2594  case 68:
2595 
2596 /* Line 1806 of yacc.c */
2597 #line 349 "lwin_wkt_parse.y"
2598  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'Z'); WKT_ERROR(); }
2599  break;
2600 
2601  case 69:
2602 
2603 /* Line 1806 of yacc.c */
2604 #line 351 "lwin_wkt_parse.y"
2605  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'Z'); WKT_ERROR(); }
2606  break;
2607 
2608  case 70:
2609 
2610 /* Line 1806 of yacc.c */
2611 #line 355 "lwin_wkt_parse.y"
2612  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'2'); WKT_ERROR(); }
2613  break;
2614 
2615  case 71:
2616 
2617 /* Line 1806 of yacc.c */
2618 #line 357 "lwin_wkt_parse.y"
2619  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'2'); WKT_ERROR(); }
2620  break;
2621 
2622  case 72:
2623 
2624 /* Line 1806 of yacc.c */
2625 #line 360 "lwin_wkt_parse.y"
2626  { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); }
2627  break;
2628 
2629  case 73:
2630 
2631 /* Line 1806 of yacc.c */
2632 #line 363 "lwin_wkt_parse.y"
2633  { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); }
2634  break;
2635 
2636  case 74:
2637 
2638 /* Line 1806 of yacc.c */
2639 #line 367 "lwin_wkt_parse.y"
2640  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2641  break;
2642 
2643  case 75:
2644 
2645 /* Line 1806 of yacc.c */
2646 #line 369 "lwin_wkt_parse.y"
2647  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2648  break;
2649 
2650  case 76:
2651 
2652 /* Line 1806 of yacc.c */
2653 #line 371 "lwin_wkt_parse.y"
2654  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2655  break;
2656 
2657  case 77:
2658 
2659 /* Line 1806 of yacc.c */
2660 #line 373 "lwin_wkt_parse.y"
2662  break;
2663 
2664  case 78:
2665 
2666 /* Line 1806 of yacc.c */
2667 #line 377 "lwin_wkt_parse.y"
2668  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2669  break;
2670 
2671  case 79:
2672 
2673 /* Line 1806 of yacc.c */
2674 #line 379 "lwin_wkt_parse.y"
2675  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2676  break;
2677 
2678  case 80:
2679 
2680 /* Line 1806 of yacc.c */
2681 #line 381 "lwin_wkt_parse.y"
2682  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2683  break;
2684 
2685  case 81:
2686 
2687 /* Line 1806 of yacc.c */
2688 #line 383 "lwin_wkt_parse.y"
2689  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2690  break;
2691 
2692  case 82:
2693 
2694 /* Line 1806 of yacc.c */
2695 #line 385 "lwin_wkt_parse.y"
2696  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2697  break;
2698 
2699  case 83:
2700 
2701 /* Line 1806 of yacc.c */
2702 #line 387 "lwin_wkt_parse.y"
2703  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2704  break;
2705 
2706  case 84:
2707 
2708 /* Line 1806 of yacc.c */
2709 #line 391 "lwin_wkt_parse.y"
2710  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2711  break;
2712 
2713  case 85:
2714 
2715 /* Line 1806 of yacc.c */
2716 #line 393 "lwin_wkt_parse.y"
2717  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2718  break;
2719 
2720  case 86:
2721 
2722 /* Line 1806 of yacc.c */
2723 #line 395 "lwin_wkt_parse.y"
2724  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2725  break;
2726 
2727  case 87:
2728 
2729 /* Line 1806 of yacc.c */
2730 #line 397 "lwin_wkt_parse.y"
2732  break;
2733 
2734  case 88:
2735 
2736 /* Line 1806 of yacc.c */
2737 #line 401 "lwin_wkt_parse.y"
2738  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2739  break;
2740 
2741  case 89:
2742 
2743 /* Line 1806 of yacc.c */
2744 #line 403 "lwin_wkt_parse.y"
2745  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2746  break;
2747 
2748  case 90:
2749 
2750 /* Line 1806 of yacc.c */
2751 #line 405 "lwin_wkt_parse.y"
2752  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2753  break;
2754 
2755  case 91:
2756 
2757 /* Line 1806 of yacc.c */
2758 #line 407 "lwin_wkt_parse.y"
2759  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2760  break;
2761 
2762  case 92:
2763 
2764 /* Line 1806 of yacc.c */
2765 #line 409 "lwin_wkt_parse.y"
2766  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2767  break;
2768 
2769  case 93:
2770 
2771 /* Line 1806 of yacc.c */
2772 #line 411 "lwin_wkt_parse.y"
2773  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2774  break;
2775 
2776  case 94:
2777 
2778 /* Line 1806 of yacc.c */
2779 #line 413 "lwin_wkt_parse.y"
2780  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2781  break;
2782 
2783  case 95:
2784 
2785 /* Line 1806 of yacc.c */
2786 #line 415 "lwin_wkt_parse.y"
2787  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2788  break;
2789 
2790  case 96:
2791 
2792 /* Line 1806 of yacc.c */
2793 #line 419 "lwin_wkt_parse.y"
2794  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2795  break;
2796 
2797  case 97:
2798 
2799 /* Line 1806 of yacc.c */
2800 #line 421 "lwin_wkt_parse.y"
2801  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2802  break;
2803 
2804  case 98:
2805 
2806 /* Line 1806 of yacc.c */
2807 #line 423 "lwin_wkt_parse.y"
2808  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2809  break;
2810 
2811  case 99:
2812 
2813 /* Line 1806 of yacc.c */
2814 #line 425 "lwin_wkt_parse.y"
2816  break;
2817 
2818  case 100:
2819 
2820 /* Line 1806 of yacc.c */
2821 #line 429 "lwin_wkt_parse.y"
2822  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2823  break;
2824 
2825  case 101:
2826 
2827 /* Line 1806 of yacc.c */
2828 #line 431 "lwin_wkt_parse.y"
2829  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2830  break;
2831 
2832  case 102:
2833 
2834 /* Line 1806 of yacc.c */
2835 #line 435 "lwin_wkt_parse.y"
2836  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
2837  break;
2838 
2839  case 103:
2840 
2841 /* Line 1806 of yacc.c */
2842 #line 437 "lwin_wkt_parse.y"
2843  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2844  break;
2845 
2846  case 104:
2847 
2848 /* Line 1806 of yacc.c */
2849 #line 439 "lwin_wkt_parse.y"
2850  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2851  break;
2852 
2853  case 105:
2854 
2855 /* Line 1806 of yacc.c */
2856 #line 441 "lwin_wkt_parse.y"
2857  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
2858  break;
2859 
2860  case 106:
2861 
2862 /* Line 1806 of yacc.c */
2863 #line 445 "lwin_wkt_parse.y"
2864  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
2865  break;
2866 
2867  case 107:
2868 
2869 /* Line 1806 of yacc.c */
2870 #line 447 "lwin_wkt_parse.y"
2871  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2872  break;
2873 
2874  case 108:
2875 
2876 /* Line 1806 of yacc.c */
2877 #line 449 "lwin_wkt_parse.y"
2878  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2879  break;
2880 
2881  case 109:
2882 
2883 /* Line 1806 of yacc.c */
2884 #line 451 "lwin_wkt_parse.y"
2885  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2886  break;
2887 
2888  case 110:
2889 
2890 /* Line 1806 of yacc.c */
2891 #line 455 "lwin_wkt_parse.y"
2892  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(2) - (3)].ptarrayvalue), NULL); WKT_ERROR(); }
2893  break;
2894 
2895  case 111:
2896 
2897 /* Line 1806 of yacc.c */
2898 #line 457 "lwin_wkt_parse.y"
2899  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2900  break;
2901 
2902  case 112:
2903 
2904 /* Line 1806 of yacc.c */
2905 #line 461 "lwin_wkt_parse.y"
2906  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2907  break;
2908 
2909  case 113:
2910 
2911 /* Line 1806 of yacc.c */
2912 #line 463 "lwin_wkt_parse.y"
2913  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2914  break;
2915 
2916  case 114:
2917 
2918 /* Line 1806 of yacc.c */
2919 #line 467 "lwin_wkt_parse.y"
2920  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(4) - (6)].ptarrayvalue), NULL); WKT_ERROR(); }
2921  break;
2922 
2923  case 115:
2924 
2925 /* Line 1806 of yacc.c */
2926 #line 469 "lwin_wkt_parse.y"
2927  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(5) - (7)].ptarrayvalue), (yyvsp[(2) - (7)].stringvalue)); WKT_ERROR(); }
2928  break;
2929 
2930  case 116:
2931 
2932 /* Line 1806 of yacc.c */
2933 #line 471 "lwin_wkt_parse.y"
2934  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2935  break;
2936 
2937  case 117:
2938 
2939 /* Line 1806 of yacc.c */
2940 #line 473 "lwin_wkt_parse.y"
2941  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
2942  break;
2943 
2944  case 118:
2945 
2946 /* Line 1806 of yacc.c */
2947 #line 477 "lwin_wkt_parse.y"
2948  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(3) - (5)].ptarrayvalue), NULL); WKT_ERROR(); }
2949  break;
2950 
2951  case 119:
2952 
2953 /* Line 1806 of yacc.c */
2954 #line 481 "lwin_wkt_parse.y"
2955  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); }
2956  break;
2957 
2958  case 120:
2959 
2960 /* Line 1806 of yacc.c */
2961 #line 483 "lwin_wkt_parse.y"
2962  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
2963  break;
2964 
2965  case 121:
2966 
2967 /* Line 1806 of yacc.c */
2968 #line 485 "lwin_wkt_parse.y"
2969  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
2970  break;
2971 
2972  case 122:
2973 
2974 /* Line 1806 of yacc.c */
2975 #line 487 "lwin_wkt_parse.y"
2977  break;
2978 
2979  case 123:
2980 
2981 /* Line 1806 of yacc.c */
2982 #line 491 "lwin_wkt_parse.y"
2983  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); }
2984  break;
2985 
2986  case 124:
2987 
2988 /* Line 1806 of yacc.c */
2989 #line 493 "lwin_wkt_parse.y"
2990  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); }
2991  break;
2992 
2993  case 125:
2994 
2995 /* Line 1806 of yacc.c */
2996 #line 497 "lwin_wkt_parse.y"
2997  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)),NULL); WKT_ERROR(); }
2998  break;
2999 
3000  case 126:
3001 
3002 /* Line 1806 of yacc.c */
3003 #line 499 "lwin_wkt_parse.y"
3004  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(2) - (3)].coordinatevalue)),NULL); WKT_ERROR(); }
3005  break;
3006 
3007  case 127:
3008 
3009 /* Line 1806 of yacc.c */
3010 #line 501 "lwin_wkt_parse.y"
3011  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
3012  break;
3013 
3014  case 128:
3015 
3016 /* Line 1806 of yacc.c */
3017 #line 505 "lwin_wkt_parse.y"
3018  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); }
3019  break;
3020 
3021  case 129:
3022 
3023 /* Line 1806 of yacc.c */
3024 #line 507 "lwin_wkt_parse.y"
3025  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); }
3026  break;
3027 
3028  case 130:
3029 
3030 /* Line 1806 of yacc.c */
3031 #line 509 "lwin_wkt_parse.y"
3032  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); }
3033  break;
3034 
3035  case 131:
3036 
3037 /* Line 1806 of yacc.c */
3038 #line 511 "lwin_wkt_parse.y"
3039  { (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
3040  break;
3041 
3042  case 132:
3043 
3044 /* Line 1806 of yacc.c */
3045 #line 515 "lwin_wkt_parse.y"
3046  { (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[(1) - (3)].ptarrayvalue), (yyvsp[(3) - (3)].coordinatevalue)); WKT_ERROR(); }
3047  break;
3048 
3049  case 133:
3050 
3051 /* Line 1806 of yacc.c */
3052 #line 517 "lwin_wkt_parse.y"
3053  { (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)); WKT_ERROR(); }
3054  break;
3055 
3056  case 134:
3057 
3058 /* Line 1806 of yacc.c */
3059 #line 521 "lwin_wkt_parse.y"
3060  { (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[(1) - (2)].doublevalue), (yyvsp[(2) - (2)].doublevalue)); WKT_ERROR(); }
3061  break;
3062 
3063  case 135:
3064 
3065 /* Line 1806 of yacc.c */
3066 #line 523 "lwin_wkt_parse.y"
3067  { (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[(1) - (3)].doublevalue), (yyvsp[(2) - (3)].doublevalue), (yyvsp[(3) - (3)].doublevalue)); WKT_ERROR(); }
3068  break;
3069 
3070  case 136:
3071 
3072 /* Line 1806 of yacc.c */
3073 #line 525 "lwin_wkt_parse.y"
3074  { (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[(1) - (4)].doublevalue), (yyvsp[(2) - (4)].doublevalue), (yyvsp[(3) - (4)].doublevalue), (yyvsp[(4) - (4)].doublevalue)); WKT_ERROR(); }
3075  break;
3076 
3077 
3078 
3079 /* Line 1806 of yacc.c */
3080 #line 3081 "lwin_wkt_parse.c"
3081  default: break;
3082  }
3083  /* User semantic actions sometimes alter yychar, and that requires
3084  that yytoken be updated with the new translation. We take the
3085  approach of translating immediately before every use of yytoken.
3086  One alternative is translating here after every semantic action,
3087  but that translation would be missed if the semantic action invokes
3088  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3089  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3090  incorrect destructor might then be invoked immediately. In the
3091  case of YYERROR or YYBACKUP, subsequent parser actions might lead
3092  to an incorrect destructor call or verbose syntax error message
3093  before the lookahead is translated. */
3094  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3095 
3096  YYPOPSTACK (yylen);
3097  yylen = 0;
3098  YY_STACK_PRINT (yyss, yyssp);
3099 
3100  *++yyvsp = yyval;
3101  *++yylsp = yyloc;
3102 
3103  /* Now `shift' the result of the reduction. Determine what state
3104  that goes to, based on the state we popped back to and the rule
3105  number reduced by. */
3106 
3107  yyn = yyr1[yyn];
3108 
3109  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3110  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3111  yystate = yytable[yystate];
3112  else
3113  yystate = yydefgoto[yyn - YYNTOKENS];
3114 
3115  goto yynewstate;
3116 
3117 
3118 /*------------------------------------.
3119 | yyerrlab -- here on detecting error |
3120 `------------------------------------*/
3121 yyerrlab:
3122  /* Make sure we have latest lookahead translation. See comments at
3123  user semantic actions for why this is necessary. */
3124  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3125 
3126  /* If not already recovering from an error, report this error. */
3127  if (!yyerrstatus)
3128  {
3129  ++yynerrs;
3130 #if ! YYERROR_VERBOSE
3131  yyerror (YY_("syntax error"));
3132 #else
3133 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3134  yyssp, yytoken)
3135  {
3136  char const *yymsgp = YY_("syntax error");
3137  int yysyntax_error_status;
3138  yysyntax_error_status = YYSYNTAX_ERROR;
3139  if (yysyntax_error_status == 0)
3140  yymsgp = yymsg;
3141  else if (yysyntax_error_status == 1)
3142  {
3143  if (yymsg != yymsgbuf)
3144  YYSTACK_FREE (yymsg);
3145  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3146  if (!yymsg)
3147  {
3148  yymsg = yymsgbuf;
3149  yymsg_alloc = sizeof yymsgbuf;
3150  yysyntax_error_status = 2;
3151  }
3152  else
3153  {
3154  yysyntax_error_status = YYSYNTAX_ERROR;
3155  yymsgp = yymsg;
3156  }
3157  }
3158  yyerror (yymsgp);
3159  if (yysyntax_error_status == 2)
3160  goto yyexhaustedlab;
3161  }
3162 # undef YYSYNTAX_ERROR
3163 #endif
3164  }
3165 
3166  yyerror_range[1] = yylloc;
3167 
3168  if (yyerrstatus == 3)
3169  {
3170  /* If just tried and failed to reuse lookahead token after an
3171  error, discard it. */
3172 
3173  if (yychar <= YYEOF)
3174  {
3175  /* Return failure if at end of input. */
3176  if (yychar == YYEOF)
3177  YYABORT;
3178  }
3179  else
3180  {
3181  yydestruct ("Error: discarding",
3182  yytoken, &yylval, &yylloc);
3183  yychar = YYEMPTY;
3184  }
3185  }
3186 
3187  /* Else will try to reuse lookahead token after shifting the error
3188  token. */
3189  goto yyerrlab1;
3190 
3191 
3192 /*---------------------------------------------------.
3193 | yyerrorlab -- error raised explicitly by YYERROR. |
3194 `---------------------------------------------------*/
3195 yyerrorlab:
3196 
3197  /* Pacify compilers like GCC when the user code never invokes
3198  YYERROR and the label yyerrorlab therefore never appears in user
3199  code. */
3200  if (/*CONSTCOND*/ 0)
3201  goto yyerrorlab;
3202 
3203  yyerror_range[1] = yylsp[1-yylen];
3204  /* Do not reclaim the symbols of the rule which action triggered
3205  this YYERROR. */
3206  YYPOPSTACK (yylen);
3207  yylen = 0;
3208  YY_STACK_PRINT (yyss, yyssp);
3209  yystate = *yyssp;
3210  goto yyerrlab1;
3211 
3212 
3213 /*-------------------------------------------------------------.
3214 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3215 `-------------------------------------------------------------*/
3216 yyerrlab1:
3217  yyerrstatus = 3; /* Each real token shifted decrements this. */
3218 
3219  for (;;)
3220  {
3221  yyn = yypact[yystate];
3222  if (!yypact_value_is_default (yyn))
3223  {
3224  yyn += YYTERROR;
3225  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3226  {
3227  yyn = yytable[yyn];
3228  if (0 < yyn)
3229  break;
3230  }
3231  }
3232 
3233  /* Pop the current state because it cannot handle the error token. */
3234  if (yyssp == yyss)
3235  YYABORT;
3236 
3237  yyerror_range[1] = *yylsp;
3238  yydestruct ("Error: popping",
3239  yystos[yystate], yyvsp, yylsp);
3240  YYPOPSTACK (1);
3241  yystate = *yyssp;
3242  YY_STACK_PRINT (yyss, yyssp);
3243  }
3244 
3245  *++yyvsp = yylval;
3246 
3247  yyerror_range[2] = yylloc;
3248  /* Using YYLLOC is tempting, but would change the location of
3249  the lookahead. YYLOC is available though. */
3250  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
3251  *++yylsp = yyloc;
3252 
3253  /* Shift the error token. */
3254  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3255 
3256  yystate = yyn;
3257  goto yynewstate;
3258 
3259 
3260 /*-------------------------------------.
3261 | yyacceptlab -- YYACCEPT comes here. |
3262 `-------------------------------------*/
3263 yyacceptlab:
3264  yyresult = 0;
3265  goto yyreturn;
3266 
3267 /*-----------------------------------.
3268 | yyabortlab -- YYABORT comes here. |
3269 `-----------------------------------*/
3270 yyabortlab:
3271  yyresult = 1;
3272  goto yyreturn;
3273 
3274 #if !defined(yyoverflow) || YYERROR_VERBOSE
3275 /*-------------------------------------------------.
3276 | yyexhaustedlab -- memory exhaustion comes here. |
3277 `-------------------------------------------------*/
3278 yyexhaustedlab:
3279  yyerror (YY_("memory exhausted"));
3280  yyresult = 2;
3281  /* Fall through. */
3282 #endif
3283 
3284 yyreturn:
3285  if (yychar != YYEMPTY)
3286  {
3287  /* Make sure we have latest lookahead translation. See comments at
3288  user semantic actions for why this is necessary. */
3289  yytoken = YYTRANSLATE (yychar);
3290  yydestruct ("Cleanup: discarding lookahead",
3291  yytoken, &yylval, &yylloc);
3292  }
3293  /* Do not reclaim the symbols of the rule which action triggered
3294  this YYABORT or YYACCEPT. */
3295  YYPOPSTACK (yylen);
3296  YY_STACK_PRINT (yyss, yyssp);
3297  while (yyssp != yyss)
3298  {
3299  yydestruct ("Cleanup: popping",
3300  yystos[*yyssp], yyvsp, yylsp);
3301  YYPOPSTACK (1);
3302  }
3303 #ifndef yyoverflow
3304  if (yyss != yyssa)
3305  YYSTACK_FREE (yyss);
3306 #endif
3307 #if YYERROR_VERBOSE
3308  if (yymsg != yymsgbuf)
3309  YYSTACK_FREE (yymsg);
3310 #endif
3311  /* Make sure YYID is used. */
3312  return YYID (yyresult);
3313 }
LWGEOM * wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:508
#define YYABORT
LWGEOM * wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality)
Definition: lwin_wkt.c:397
short int yytype_int16
POINT coordinatevalue
LWGEOM * wkt_parser_point_new(POINTARRAY *pa, char *dimensionality)
Create a new point.
Definition: lwin_wkt.c:293
#define MULTICURVETYPE
Definition: liblwgeom.h:70
LWGEOM * wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:729
static const yytype_uint8 yydefact[]
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:458
char * stringvalue
POINTARRAY * ptarrayvalue
yytype_int16 yyss_alloc
#define yytable_value_is_error(yytable_value)
LWGEOM * wkt_parser_curvepolygon_new(LWGEOM *ring)
Definition: lwin_wkt.c:540
#define YYINITDEPTH
LWGEOM * wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality)
Create a new circularstring.
Definition: lwin_wkt.c:361
#define YYFINAL
static void yydestruct(char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) const
#define COMPOUNDTYPE
Definition: liblwgeom.h:68
#define MULTIPOINTTYPE
Definition: liblwgeom.h:63
YYLTYPE yyls_alloc
LWGEOM * wkt_parser_collection_new(LWGEOM *geom)
Definition: lwin_wkt.c:671
#define YYTERROR
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:72
#define YYEOF
#define YYEMPTY
#define YYTRANSLATE(YYX)
#define YYLEX
LWGEOM * wkt_parser_collection_finalize(int lwtype, LWGEOM *col, char *dimensionality)
Definition: lwin_wkt.c:752
static const yytype_uint8 yycheck[]
LWGEOM * wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality)
Create a new linestring.
Definition: lwin_wkt.c:327
#define YYSTACK_ALLOC
#define yynerrs
#define yyerror
static const yytype_uint8 yyr1[]
#define yypact_value_is_default(yystate)
LWGEOM * geometryvalue
LWGEOM * wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:639
POINTARRAY * wkt_parser_ptarray_new(POINT p)
Start a point array from the first coordinate.
Definition: lwin_wkt.c:276
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition: lwin_wkt.c:238
#define YYNTOKENS
#define YY_(msgid)
#define YYID(n)
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:154
#define TINTYPE
Definition: liblwgeom.h:74
static const yytype_uint8 yyr2[]
static const yytype_uint8 yystos[]
#define yylval
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
double doublevalue
static const yytype_int16 yypgoto[]
#define YYSTACK_BYTES(N)
#define yylloc
#define yychar
POINT wkt_parser_coord_2(double c1, double c2)
Build a 2d coordinate.
Definition: lwin_wkt.c:194
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:65
#define YYACCEPT
LWGEOM * wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:697
#define YYLLOC_DEFAULT(Current, Rhs, N)
LWGEOM * wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:433
#define MULTISURFACETYPE
Definition: liblwgeom.h:71
POINT wkt_parser_coord_3(double c1, double c2, double c3)
Note, if this is an XYM coordinate we'll have to fix it later when we build the object itself and hav...
Definition: lwin_wkt.c:210
#define YYSYNTAX_ERROR
#define YYSTACK_FREE
YYSTYPE yyvs_alloc
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define WKT_ERROR()
void wkt_parser_geometry_new(LWGEOM *geom, int srid)
Definition: lwin_wkt.c:799
LWGEOM * wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring)
Definition: lwin_wkt.c:558
#define YY_REDUCE_PRINT(Rule)
#define YYSIZE_T
static const yytype_int16 yypact[]
#define MULTILINETYPE
Definition: liblwgeom.h:64
#define YYLAST
#define YYMAXDEPTH
static const yytype_int16 yydefgoto[]
#define COLLECTIONTYPE
Definition: liblwgeom.h:66
static const yytype_uint16 yytable[]
POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4)
Definition: lwin_wkt.c:225
#define YYDPRINTF(Args)
#define YYPOPSTACK(N)

Here is the call graph for this function: