PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ yyparse()

int yyparse ( void  )

Definition at line 1640 of file lwin_wkt_parse.c.

References COLLECTIONTYPE, COMPOUNDTYPE, YYSTYPE::coordinatevalue, YYSTYPE::doublevalue, YYSTYPE::geometryvalue, YYSTYPE::integervalue, 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_compound_new(), 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_ASSERT, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYERROR, YYFINAL, YYINITDEPTH, YYLAST, yylex, yylloc, YYLLOC_DEFAULT, yyalloc::yyls_alloc, yylval, YYMAXDEPTH, yynerrs, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, YYSYNTAX_ERROR, yytable, yytable_value_is_error, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.

1641 {
1642  int yystate;
1643  /* Number of tokens to shift before error messages enabled. */
1644  int yyerrstatus;
1645 
1646  /* The stacks and their tools:
1647  'yyss': related to states.
1648  'yyvs': related to semantic values.
1649  'yyls': related to locations.
1650 
1651  Refer to the stacks through separate pointers, to allow yyoverflow
1652  to reallocate them elsewhere. */
1653 
1654  /* The state stack. */
1655  yytype_int16 yyssa[YYINITDEPTH];
1656  yytype_int16 *yyss;
1657  yytype_int16 *yyssp;
1658 
1659  /* The semantic value stack. */
1660  YYSTYPE yyvsa[YYINITDEPTH];
1661  YYSTYPE *yyvs;
1662  YYSTYPE *yyvsp;
1663 
1664  /* The location stack. */
1665  YYLTYPE yylsa[YYINITDEPTH];
1666  YYLTYPE *yyls;
1667  YYLTYPE *yylsp;
1668 
1669  /* The locations where the error started and ended. */
1670  YYLTYPE yyerror_range[3];
1671 
1672  YYSIZE_T yystacksize;
1673 
1674  int yyn;
1675  int yyresult;
1676  /* Lookahead token as an internal (translated) token number. */
1677  int yytoken = 0;
1678  /* The variables used to return semantic value and location from the
1679  action routines. */
1680  YYSTYPE yyval;
1681  YYLTYPE yyloc;
1682 
1683 #if YYERROR_VERBOSE
1684  /* Buffer for error messages, and its allocated size. */
1685  char yymsgbuf[128];
1686  char *yymsg = yymsgbuf;
1687  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1688 #endif
1689 
1690 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1691 
1692  /* The number of symbols on the RHS of the reduced rule.
1693  Keep to zero when no symbol should be popped. */
1694  int yylen = 0;
1695 
1696  yyssp = yyss = yyssa;
1697  yyvsp = yyvs = yyvsa;
1698  yylsp = yyls = yylsa;
1699  yystacksize = YYINITDEPTH;
1700 
1701  YYDPRINTF ((stderr, "Starting parse\n"));
1702 
1703  yystate = 0;
1704  yyerrstatus = 0;
1705  yynerrs = 0;
1706  yychar = YYEMPTY; /* Cause a token to be read. */
1707  yylsp[0] = yylloc;
1708  goto yysetstate;
1709 
1710 
1711 /*------------------------------------------------------------.
1712 | yynewstate -- push a new state, which is found in yystate. |
1713 `------------------------------------------------------------*/
1714 yynewstate:
1715  /* In all cases, when you get here, the value and location stacks
1716  have just been pushed. So pushing a state here evens the stacks. */
1717  yyssp++;
1718 
1719 
1720 /*--------------------------------------------------------------------.
1721 | yynewstate -- set current state (the top of the stack) to yystate. |
1722 `--------------------------------------------------------------------*/
1723 yysetstate:
1724  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1725  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1726  *yyssp = (yytype_int16) yystate;
1727 
1728  if (yyss + yystacksize - 1 <= yyssp)
1729 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1730  goto yyexhaustedlab;
1731 #else
1732  {
1733  /* Get the current used size of the three stacks, in elements. */
1734  YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1735 
1736 # if defined yyoverflow
1737  {
1738  /* Give user a chance to reallocate the stack. Use copies of
1739  these so that the &'s don't force the real ones into
1740  memory. */
1741  YYSTYPE *yyvs1 = yyvs;
1742  yytype_int16 *yyss1 = yyss;
1743  YYLTYPE *yyls1 = yyls;
1744 
1745  /* Each stack pointer address is followed by the size of the
1746  data in use in that stack, in bytes. This used to be a
1747  conditional around just the two extra args, but that might
1748  be undefined if yyoverflow is a macro. */
1749  yyoverflow (YY_("memory exhausted"),
1750  &yyss1, yysize * sizeof (*yyssp),
1751  &yyvs1, yysize * sizeof (*yyvsp),
1752  &yyls1, yysize * sizeof (*yylsp),
1753  &yystacksize);
1754  yyss = yyss1;
1755  yyvs = yyvs1;
1756  yyls = yyls1;
1757  }
1758 # else /* defined YYSTACK_RELOCATE */
1759  /* Extend the stack our own way. */
1760  if (YYMAXDEPTH <= yystacksize)
1761  goto yyexhaustedlab;
1762  yystacksize *= 2;
1763  if (YYMAXDEPTH < yystacksize)
1764  yystacksize = YYMAXDEPTH;
1765 
1766  {
1767  yytype_int16 *yyss1 = yyss;
1768  union yyalloc *yyptr =
1769  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1770  if (! yyptr)
1771  goto yyexhaustedlab;
1772  YYSTACK_RELOCATE (yyss_alloc, yyss);
1773  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1774  YYSTACK_RELOCATE (yyls_alloc, yyls);
1775 # undef YYSTACK_RELOCATE
1776  if (yyss1 != yyssa)
1777  YYSTACK_FREE (yyss1);
1778  }
1779 # endif
1780 
1781  yyssp = yyss + yysize - 1;
1782  yyvsp = yyvs + yysize - 1;
1783  yylsp = yyls + yysize - 1;
1784 
1785  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1786  (unsigned long) yystacksize));
1787 
1788  if (yyss + yystacksize - 1 <= yyssp)
1789  YYABORT;
1790  }
1791 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1792 
1793  if (yystate == YYFINAL)
1794  YYACCEPT;
1795 
1796  goto yybackup;
1797 
1798 
1799 /*-----------.
1800 | yybackup. |
1801 `-----------*/
1802 yybackup:
1803  /* Do appropriate processing given the current state. Read a
1804  lookahead token if we need one and don't already have one. */
1805 
1806  /* First try to decide what to do without reference to lookahead token. */
1807  yyn = yypact[yystate];
1808  if (yypact_value_is_default (yyn))
1809  goto yydefault;
1810 
1811  /* Not known => get a lookahead token if don't already have one. */
1812 
1813  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1814  if (yychar == YYEMPTY)
1815  {
1816  YYDPRINTF ((stderr, "Reading a token: "));
1817  yychar = yylex ();
1818  }
1819 
1820  if (yychar <= YYEOF)
1821  {
1822  yychar = yytoken = YYEOF;
1823  YYDPRINTF ((stderr, "Now at end of input.\n"));
1824  }
1825  else
1826  {
1827  yytoken = YYTRANSLATE (yychar);
1828  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1829  }
1830 
1831  /* If the proper action on seeing token YYTOKEN is to reduce or to
1832  detect an error, take that action. */
1833  yyn += yytoken;
1834  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1835  goto yydefault;
1836  yyn = yytable[yyn];
1837  if (yyn <= 0)
1838  {
1839  if (yytable_value_is_error (yyn))
1840  goto yyerrlab;
1841  yyn = -yyn;
1842  goto yyreduce;
1843  }
1844 
1845  /* Count tokens shifted since error; after three, turn off error
1846  status. */
1847  if (yyerrstatus)
1848  yyerrstatus--;
1849 
1850  /* Shift the lookahead token. */
1851  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1852 
1853  /* Discard the shifted token. */
1854  yychar = YYEMPTY;
1855 
1856  yystate = yyn;
1858  *++yyvsp = yylval;
1860  *++yylsp = yylloc;
1861  goto yynewstate;
1862 
1863 
1864 /*-----------------------------------------------------------.
1865 | yydefault -- do the default action for the current state. |
1866 `-----------------------------------------------------------*/
1867 yydefault:
1868  yyn = yydefact[yystate];
1869  if (yyn == 0)
1870  goto yyerrlab;
1871  goto yyreduce;
1872 
1873 
1874 /*-----------------------------.
1875 | yyreduce -- do a reduction. |
1876 `-----------------------------*/
1877 yyreduce:
1878  /* yyn is the number of a rule to reduce with. */
1879  yylen = yyr2[yyn];
1880 
1881  /* If YYLEN is nonzero, implement the default value of the action:
1882  '$$ = $1'.
1883 
1884  Otherwise, the following line sets YYVAL to garbage.
1885  This behavior is undocumented and Bison
1886  users should not rely upon it. Assigning to YYVAL
1887  unconditionally makes the parser a bit smaller, and it avoids a
1888  GCC warning that YYVAL may be used uninitialized. */
1889  yyval = yyvsp[1-yylen];
1890 
1891  /* Default location. */
1892  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1893  yyerror_range[1] = yyloc;
1894  YY_REDUCE_PRINT (yyn);
1895  switch (yyn)
1896  {
1897  case 2:
1898 #line 218 "lwin_wkt_parse.y"
1899  { wkt_parser_geometry_new((yyvsp[0].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
1900 #line 1901 "lwin_wkt_parse.c"
1901  break;
1902 
1903  case 3:
1904 #line 220 "lwin_wkt_parse.y"
1905  { wkt_parser_geometry_new((yyvsp[0].geometryvalue), (yyvsp[-2].integervalue)); WKT_ERROR(); }
1906 #line 1907 "lwin_wkt_parse.c"
1907  break;
1908 
1909  case 4:
1910 #line 223 "lwin_wkt_parse.y"
1911  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1912 #line 1913 "lwin_wkt_parse.c"
1913  break;
1914 
1915  case 5:
1916 #line 224 "lwin_wkt_parse.y"
1917  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1918 #line 1919 "lwin_wkt_parse.c"
1919  break;
1920 
1921  case 6:
1922 #line 225 "lwin_wkt_parse.y"
1923  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1924 #line 1925 "lwin_wkt_parse.c"
1925  break;
1926 
1927  case 7:
1928 #line 226 "lwin_wkt_parse.y"
1929  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1930 #line 1931 "lwin_wkt_parse.c"
1931  break;
1932 
1933  case 8:
1934 #line 227 "lwin_wkt_parse.y"
1935  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1936 #line 1937 "lwin_wkt_parse.c"
1937  break;
1938 
1939  case 9:
1940 #line 228 "lwin_wkt_parse.y"
1941  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1942 #line 1943 "lwin_wkt_parse.c"
1943  break;
1944 
1945  case 10:
1946 #line 229 "lwin_wkt_parse.y"
1947  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1948 #line 1949 "lwin_wkt_parse.c"
1949  break;
1950 
1951  case 11:
1952 #line 230 "lwin_wkt_parse.y"
1953  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1954 #line 1955 "lwin_wkt_parse.c"
1955  break;
1956 
1957  case 12:
1958 #line 231 "lwin_wkt_parse.y"
1959  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1960 #line 1961 "lwin_wkt_parse.c"
1961  break;
1962 
1963  case 13:
1964 #line 232 "lwin_wkt_parse.y"
1965  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1966 #line 1967 "lwin_wkt_parse.c"
1967  break;
1968 
1969  case 14:
1970 #line 233 "lwin_wkt_parse.y"
1971  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1972 #line 1973 "lwin_wkt_parse.c"
1973  break;
1974 
1975  case 15:
1976 #line 234 "lwin_wkt_parse.y"
1977  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1978 #line 1979 "lwin_wkt_parse.c"
1979  break;
1980 
1981  case 16:
1982 #line 235 "lwin_wkt_parse.y"
1983  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1984 #line 1985 "lwin_wkt_parse.c"
1985  break;
1986 
1987  case 17:
1988 #line 236 "lwin_wkt_parse.y"
1989  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1990 #line 1991 "lwin_wkt_parse.c"
1991  break;
1992 
1993  case 18:
1994 #line 237 "lwin_wkt_parse.y"
1995  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1996 #line 1997 "lwin_wkt_parse.c"
1997  break;
1998 
1999  case 19:
2000 #line 241 "lwin_wkt_parse.y"
2001  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2002 #line 2003 "lwin_wkt_parse.c"
2003  break;
2004 
2005  case 20:
2006 #line 243 "lwin_wkt_parse.y"
2007  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2008 #line 2009 "lwin_wkt_parse.c"
2009  break;
2010 
2011  case 21:
2012 #line 245 "lwin_wkt_parse.y"
2013  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2014 #line 2015 "lwin_wkt_parse.c"
2015  break;
2016 
2017  case 22:
2018 #line 247 "lwin_wkt_parse.y"
2020 #line 2021 "lwin_wkt_parse.c"
2021  break;
2022 
2023  case 23:
2024 #line 251 "lwin_wkt_parse.y"
2025  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2026 #line 2027 "lwin_wkt_parse.c"
2027  break;
2028 
2029  case 24:
2030 #line 253 "lwin_wkt_parse.y"
2031  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2032 #line 2033 "lwin_wkt_parse.c"
2033  break;
2034 
2035  case 25:
2036 #line 257 "lwin_wkt_parse.y"
2037  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2038 #line 2039 "lwin_wkt_parse.c"
2039  break;
2040 
2041  case 26:
2042 #line 259 "lwin_wkt_parse.y"
2043  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2044 #line 2045 "lwin_wkt_parse.c"
2045  break;
2046 
2047  case 27:
2048 #line 261 "lwin_wkt_parse.y"
2049  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2050 #line 2051 "lwin_wkt_parse.c"
2051  break;
2052 
2053  case 28:
2054 #line 263 "lwin_wkt_parse.y"
2056 #line 2057 "lwin_wkt_parse.c"
2057  break;
2058 
2059  case 29:
2060 #line 267 "lwin_wkt_parse.y"
2061  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2062 #line 2063 "lwin_wkt_parse.c"
2063  break;
2064 
2065  case 30:
2066 #line 269 "lwin_wkt_parse.y"
2067  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2068 #line 2069 "lwin_wkt_parse.c"
2069  break;
2070 
2071  case 31:
2072 #line 271 "lwin_wkt_parse.y"
2073  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2074 #line 2075 "lwin_wkt_parse.c"
2075  break;
2076 
2077  case 32:
2078 #line 273 "lwin_wkt_parse.y"
2079  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2080 #line 2081 "lwin_wkt_parse.c"
2081  break;
2082 
2083  case 33:
2084 #line 275 "lwin_wkt_parse.y"
2085  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2086 #line 2087 "lwin_wkt_parse.c"
2087  break;
2088 
2089  case 34:
2090 #line 277 "lwin_wkt_parse.y"
2091  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2092 #line 2093 "lwin_wkt_parse.c"
2093  break;
2094 
2095  case 35:
2096 #line 281 "lwin_wkt_parse.y"
2097  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2098 #line 2099 "lwin_wkt_parse.c"
2099  break;
2100 
2101  case 36:
2102 #line 283 "lwin_wkt_parse.y"
2103  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2104 #line 2105 "lwin_wkt_parse.c"
2105  break;
2106 
2107  case 37:
2108 #line 285 "lwin_wkt_parse.y"
2109  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2110 #line 2111 "lwin_wkt_parse.c"
2111  break;
2112 
2113  case 38:
2114 #line 287 "lwin_wkt_parse.y"
2115  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
2116 #line 2117 "lwin_wkt_parse.c"
2117  break;
2118 
2119  case 39:
2120 #line 291 "lwin_wkt_parse.y"
2121  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2122 #line 2123 "lwin_wkt_parse.c"
2123  break;
2124 
2125  case 40:
2126 #line 293 "lwin_wkt_parse.y"
2127  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2128 #line 2129 "lwin_wkt_parse.c"
2129  break;
2130 
2131  case 41:
2132 #line 295 "lwin_wkt_parse.y"
2133  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2134 #line 2135 "lwin_wkt_parse.c"
2135  break;
2136 
2137  case 42:
2138 #line 297 "lwin_wkt_parse.y"
2140 #line 2141 "lwin_wkt_parse.c"
2141  break;
2142 
2143  case 43:
2144 #line 301 "lwin_wkt_parse.y"
2145  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2146 #line 2147 "lwin_wkt_parse.c"
2147  break;
2148 
2149  case 44:
2150 #line 303 "lwin_wkt_parse.y"
2151  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2152 #line 2153 "lwin_wkt_parse.c"
2153  break;
2154 
2155  case 45:
2156 #line 305 "lwin_wkt_parse.y"
2157  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2158 #line 2159 "lwin_wkt_parse.c"
2159  break;
2160 
2161  case 46:
2162 #line 307 "lwin_wkt_parse.y"
2164 #line 2165 "lwin_wkt_parse.c"
2165  break;
2166 
2167  case 47:
2168 #line 311 "lwin_wkt_parse.y"
2169  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2170 #line 2171 "lwin_wkt_parse.c"
2171  break;
2172 
2173  case 48:
2174 #line 313 "lwin_wkt_parse.y"
2175  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2176 #line 2177 "lwin_wkt_parse.c"
2177  break;
2178 
2179  case 49:
2180 #line 317 "lwin_wkt_parse.y"
2181  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2182 #line 2183 "lwin_wkt_parse.c"
2183  break;
2184 
2185  case 50:
2186 #line 319 "lwin_wkt_parse.y"
2187  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2188 #line 2189 "lwin_wkt_parse.c"
2189  break;
2190 
2191  case 51:
2192 #line 323 "lwin_wkt_parse.y"
2193  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2194 #line 2195 "lwin_wkt_parse.c"
2195  break;
2196 
2197  case 52:
2198 #line 325 "lwin_wkt_parse.y"
2199  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2200 #line 2201 "lwin_wkt_parse.c"
2201  break;
2202 
2203  case 53:
2204 #line 327 "lwin_wkt_parse.y"
2205  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2206 #line 2207 "lwin_wkt_parse.c"
2207  break;
2208 
2209  case 54:
2210 #line 329 "lwin_wkt_parse.y"
2211  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2212 #line 2213 "lwin_wkt_parse.c"
2213  break;
2214 
2215  case 55:
2216 #line 333 "lwin_wkt_parse.y"
2217  { (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
2218 #line 2219 "lwin_wkt_parse.c"
2219  break;
2220 
2221  case 56:
2222 #line 335 "lwin_wkt_parse.y"
2223  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2224 #line 2225 "lwin_wkt_parse.c"
2225  break;
2226 
2227  case 57:
2228 #line 338 "lwin_wkt_parse.y"
2229  { (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
2230 #line 2231 "lwin_wkt_parse.c"
2231  break;
2232 
2233  case 58:
2234 #line 342 "lwin_wkt_parse.y"
2235  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2236 #line 2237 "lwin_wkt_parse.c"
2237  break;
2238 
2239  case 59:
2240 #line 344 "lwin_wkt_parse.y"
2241  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2242 #line 2243 "lwin_wkt_parse.c"
2243  break;
2244 
2245  case 60:
2246 #line 346 "lwin_wkt_parse.y"
2247  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2248 #line 2249 "lwin_wkt_parse.c"
2249  break;
2250 
2251  case 61:
2252 #line 348 "lwin_wkt_parse.y"
2253  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
2254 #line 2255 "lwin_wkt_parse.c"
2255  break;
2256 
2257  case 62:
2258 #line 352 "lwin_wkt_parse.y"
2259  { (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2260 #line 2261 "lwin_wkt_parse.c"
2261  break;
2262 
2263  case 63:
2264 #line 354 "lwin_wkt_parse.y"
2265  { (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2266 #line 2267 "lwin_wkt_parse.c"
2267  break;
2268 
2269  case 64:
2270 #line 357 "lwin_wkt_parse.y"
2271  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2272 #line 2273 "lwin_wkt_parse.c"
2273  break;
2274 
2275  case 65:
2276 #line 358 "lwin_wkt_parse.y"
2277  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2278 #line 2279 "lwin_wkt_parse.c"
2279  break;
2280 
2281  case 66:
2282 #line 359 "lwin_wkt_parse.y"
2283  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2284 #line 2285 "lwin_wkt_parse.c"
2285  break;
2286 
2287  case 67:
2288 #line 360 "lwin_wkt_parse.y"
2289  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2290 #line 2291 "lwin_wkt_parse.c"
2291  break;
2292 
2293  case 68:
2294 #line 364 "lwin_wkt_parse.y"
2295  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
2296 #line 2297 "lwin_wkt_parse.c"
2297  break;
2298 
2299  case 69:
2300 #line 366 "lwin_wkt_parse.y"
2301  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
2302 #line 2303 "lwin_wkt_parse.c"
2303  break;
2304 
2305  case 70:
2306 #line 370 "lwin_wkt_parse.y"
2307  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
2308 #line 2309 "lwin_wkt_parse.c"
2309  break;
2310 
2311  case 71:
2312 #line 372 "lwin_wkt_parse.y"
2313  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
2314 #line 2315 "lwin_wkt_parse.c"
2315  break;
2316 
2317  case 72:
2318 #line 375 "lwin_wkt_parse.y"
2319  { (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
2320 #line 2321 "lwin_wkt_parse.c"
2321  break;
2322 
2323  case 73:
2324 #line 378 "lwin_wkt_parse.y"
2325  { (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
2326 #line 2327 "lwin_wkt_parse.c"
2327  break;
2328 
2329  case 74:
2330 #line 382 "lwin_wkt_parse.y"
2331  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2332 #line 2333 "lwin_wkt_parse.c"
2333  break;
2334 
2335  case 75:
2336 #line 384 "lwin_wkt_parse.y"
2337  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2338 #line 2339 "lwin_wkt_parse.c"
2339  break;
2340 
2341  case 76:
2342 #line 386 "lwin_wkt_parse.y"
2343  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2344 #line 2345 "lwin_wkt_parse.c"
2345  break;
2346 
2347  case 77:
2348 #line 388 "lwin_wkt_parse.y"
2350 #line 2351 "lwin_wkt_parse.c"
2351  break;
2352 
2353  case 78:
2354 #line 392 "lwin_wkt_parse.y"
2355  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2356 #line 2357 "lwin_wkt_parse.c"
2357  break;
2358 
2359  case 79:
2360 #line 394 "lwin_wkt_parse.y"
2361  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2362 #line 2363 "lwin_wkt_parse.c"
2363  break;
2364 
2365  case 80:
2366 #line 396 "lwin_wkt_parse.y"
2367  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2368 #line 2369 "lwin_wkt_parse.c"
2369  break;
2370 
2371  case 81:
2372 #line 398 "lwin_wkt_parse.y"
2373  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2374 #line 2375 "lwin_wkt_parse.c"
2375  break;
2376 
2377  case 82:
2378 #line 400 "lwin_wkt_parse.y"
2379  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2380 #line 2381 "lwin_wkt_parse.c"
2381  break;
2382 
2383  case 83:
2384 #line 402 "lwin_wkt_parse.y"
2385  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2386 #line 2387 "lwin_wkt_parse.c"
2387  break;
2388 
2389  case 84:
2390 #line 406 "lwin_wkt_parse.y"
2391  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2392 #line 2393 "lwin_wkt_parse.c"
2393  break;
2394 
2395  case 85:
2396 #line 408 "lwin_wkt_parse.y"
2397  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2398 #line 2399 "lwin_wkt_parse.c"
2399  break;
2400 
2401  case 86:
2402 #line 410 "lwin_wkt_parse.y"
2403  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2404 #line 2405 "lwin_wkt_parse.c"
2405  break;
2406 
2407  case 87:
2408 #line 412 "lwin_wkt_parse.y"
2410 #line 2411 "lwin_wkt_parse.c"
2411  break;
2412 
2413  case 88:
2414 #line 416 "lwin_wkt_parse.y"
2415  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2416 #line 2417 "lwin_wkt_parse.c"
2417  break;
2418 
2419  case 89:
2420 #line 418 "lwin_wkt_parse.y"
2421  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2422 #line 2423 "lwin_wkt_parse.c"
2423  break;
2424 
2425  case 90:
2426 #line 420 "lwin_wkt_parse.y"
2427  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2428 #line 2429 "lwin_wkt_parse.c"
2429  break;
2430 
2431  case 91:
2432 #line 422 "lwin_wkt_parse.y"
2433  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2434 #line 2435 "lwin_wkt_parse.c"
2435  break;
2436 
2437  case 92:
2438 #line 424 "lwin_wkt_parse.y"
2439  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2440 #line 2441 "lwin_wkt_parse.c"
2441  break;
2442 
2443  case 93:
2444 #line 426 "lwin_wkt_parse.y"
2445  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2446 #line 2447 "lwin_wkt_parse.c"
2447  break;
2448 
2449  case 94:
2450 #line 428 "lwin_wkt_parse.y"
2451  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2452 #line 2453 "lwin_wkt_parse.c"
2453  break;
2454 
2455  case 95:
2456 #line 430 "lwin_wkt_parse.y"
2457  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2458 #line 2459 "lwin_wkt_parse.c"
2459  break;
2460 
2461  case 96:
2462 #line 434 "lwin_wkt_parse.y"
2463  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2464 #line 2465 "lwin_wkt_parse.c"
2465  break;
2466 
2467  case 97:
2468 #line 436 "lwin_wkt_parse.y"
2469  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2470 #line 2471 "lwin_wkt_parse.c"
2471  break;
2472 
2473  case 98:
2474 #line 438 "lwin_wkt_parse.y"
2475  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2476 #line 2477 "lwin_wkt_parse.c"
2477  break;
2478 
2479  case 99:
2480 #line 440 "lwin_wkt_parse.y"
2482 #line 2483 "lwin_wkt_parse.c"
2483  break;
2484 
2485  case 100:
2486 #line 444 "lwin_wkt_parse.y"
2487  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2488 #line 2489 "lwin_wkt_parse.c"
2489  break;
2490 
2491  case 101:
2492 #line 446 "lwin_wkt_parse.y"
2493  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2494 #line 2495 "lwin_wkt_parse.c"
2495  break;
2496 
2497  case 102:
2498 #line 450 "lwin_wkt_parse.y"
2499  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2500 #line 2501 "lwin_wkt_parse.c"
2501  break;
2502 
2503  case 103:
2504 #line 452 "lwin_wkt_parse.y"
2505  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2506 #line 2507 "lwin_wkt_parse.c"
2507  break;
2508 
2509  case 104:
2510 #line 454 "lwin_wkt_parse.y"
2511  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2512 #line 2513 "lwin_wkt_parse.c"
2513  break;
2514 
2515  case 105:
2516 #line 456 "lwin_wkt_parse.y"
2517  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
2518 #line 2519 "lwin_wkt_parse.c"
2519  break;
2520 
2521  case 106:
2522 #line 460 "lwin_wkt_parse.y"
2523  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2524 #line 2525 "lwin_wkt_parse.c"
2525  break;
2526 
2527  case 107:
2528 #line 462 "lwin_wkt_parse.y"
2529  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2530 #line 2531 "lwin_wkt_parse.c"
2531  break;
2532 
2533  case 108:
2534 #line 464 "lwin_wkt_parse.y"
2535  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2536 #line 2537 "lwin_wkt_parse.c"
2537  break;
2538 
2539  case 109:
2540 #line 466 "lwin_wkt_parse.y"
2541  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2542 #line 2543 "lwin_wkt_parse.c"
2543  break;
2544 
2545  case 110:
2546 #line 470 "lwin_wkt_parse.y"
2547  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2548 #line 2549 "lwin_wkt_parse.c"
2549  break;
2550 
2551  case 111:
2552 #line 472 "lwin_wkt_parse.y"
2553  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2554 #line 2555 "lwin_wkt_parse.c"
2555  break;
2556 
2557  case 112:
2558 #line 476 "lwin_wkt_parse.y"
2559  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2560 #line 2561 "lwin_wkt_parse.c"
2561  break;
2562 
2563  case 113:
2564 #line 478 "lwin_wkt_parse.y"
2565  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2566 #line 2567 "lwin_wkt_parse.c"
2567  break;
2568 
2569  case 114:
2570 #line 482 "lwin_wkt_parse.y"
2571  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
2572 #line 2573 "lwin_wkt_parse.c"
2573  break;
2574 
2575  case 115:
2576 #line 484 "lwin_wkt_parse.y"
2577  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), (yyvsp[-5].stringvalue)); WKT_ERROR(); }
2578 #line 2579 "lwin_wkt_parse.c"
2579  break;
2580 
2581  case 116:
2582 #line 486 "lwin_wkt_parse.y"
2583  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2584 #line 2585 "lwin_wkt_parse.c"
2585  break;
2586 
2587  case 117:
2588 #line 488 "lwin_wkt_parse.y"
2589  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
2590 #line 2591 "lwin_wkt_parse.c"
2591  break;
2592 
2593  case 118:
2594 #line 492 "lwin_wkt_parse.y"
2595  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
2596 #line 2597 "lwin_wkt_parse.c"
2597  break;
2598 
2599  case 119:
2600 #line 496 "lwin_wkt_parse.y"
2601  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2602 #line 2603 "lwin_wkt_parse.c"
2603  break;
2604 
2605  case 120:
2606 #line 498 "lwin_wkt_parse.y"
2607  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2608 #line 2609 "lwin_wkt_parse.c"
2609  break;
2610 
2611  case 121:
2612 #line 500 "lwin_wkt_parse.y"
2613  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2614 #line 2615 "lwin_wkt_parse.c"
2615  break;
2616 
2617  case 122:
2618 #line 502 "lwin_wkt_parse.y"
2620 #line 2621 "lwin_wkt_parse.c"
2621  break;
2622 
2623  case 123:
2624 #line 506 "lwin_wkt_parse.y"
2625  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2626 #line 2627 "lwin_wkt_parse.c"
2627  break;
2628 
2629  case 124:
2630 #line 508 "lwin_wkt_parse.y"
2631  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2632 #line 2633 "lwin_wkt_parse.c"
2633  break;
2634 
2635  case 125:
2636 #line 512 "lwin_wkt_parse.y"
2637  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)),NULL); WKT_ERROR(); }
2638 #line 2639 "lwin_wkt_parse.c"
2639  break;
2640 
2641  case 126:
2642 #line 514 "lwin_wkt_parse.y"
2643  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[-1].coordinatevalue)),NULL); WKT_ERROR(); }
2644 #line 2645 "lwin_wkt_parse.c"
2645  break;
2646 
2647  case 127:
2648 #line 516 "lwin_wkt_parse.y"
2649  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
2650 #line 2651 "lwin_wkt_parse.c"
2651  break;
2652 
2653  case 128:
2654 #line 520 "lwin_wkt_parse.y"
2655  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2656 #line 2657 "lwin_wkt_parse.c"
2657  break;
2658 
2659  case 129:
2660 #line 522 "lwin_wkt_parse.y"
2661  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2662 #line 2663 "lwin_wkt_parse.c"
2663  break;
2664 
2665  case 130:
2666 #line 524 "lwin_wkt_parse.y"
2667  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2668 #line 2669 "lwin_wkt_parse.c"
2669  break;
2670 
2671  case 131:
2672 #line 526 "lwin_wkt_parse.y"
2673  { (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
2674 #line 2675 "lwin_wkt_parse.c"
2675  break;
2676 
2677  case 132:
2678 #line 530 "lwin_wkt_parse.y"
2679  { (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue), (yyvsp[0].coordinatevalue)); WKT_ERROR(); }
2680 #line 2681 "lwin_wkt_parse.c"
2681  break;
2682 
2683  case 133:
2684 #line 532 "lwin_wkt_parse.y"
2685  { (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)); WKT_ERROR(); }
2686 #line 2687 "lwin_wkt_parse.c"
2687  break;
2688 
2689  case 134:
2690 #line 536 "lwin_wkt_parse.y"
2691  { (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2692 #line 2693 "lwin_wkt_parse.c"
2693  break;
2694 
2695  case 135:
2696 #line 538 "lwin_wkt_parse.y"
2697  { (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2698 #line 2699 "lwin_wkt_parse.c"
2699  break;
2700 
2701  case 136:
2702 #line 540 "lwin_wkt_parse.y"
2703  { (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[-3].doublevalue), (yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2704 #line 2705 "lwin_wkt_parse.c"
2705  break;
2706 
2707 
2708 #line 2709 "lwin_wkt_parse.c"
2709 
2710  default: break;
2711  }
2712  /* User semantic actions sometimes alter yychar, and that requires
2713  that yytoken be updated with the new translation. We take the
2714  approach of translating immediately before every use of yytoken.
2715  One alternative is translating here after every semantic action,
2716  but that translation would be missed if the semantic action invokes
2717  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2718  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2719  incorrect destructor might then be invoked immediately. In the
2720  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2721  to an incorrect destructor call or verbose syntax error message
2722  before the lookahead is translated. */
2723  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2724 
2725  YYPOPSTACK (yylen);
2726  yylen = 0;
2727  YY_STACK_PRINT (yyss, yyssp);
2728 
2729  *++yyvsp = yyval;
2730  *++yylsp = yyloc;
2731 
2732  /* Now 'shift' the result of the reduction. Determine what state
2733  that goes to, based on the state we popped back to and the rule
2734  number reduced by. */
2735  {
2736  const int yylhs = yyr1[yyn] - YYNTOKENS;
2737  const int yyi = yypgoto[yylhs] + *yyssp;
2738  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2739  ? yytable[yyi]
2740  : yydefgoto[yylhs]);
2741  }
2742 
2743  goto yynewstate;
2744 
2745 
2746 /*--------------------------------------.
2747 | yyerrlab -- here on detecting error. |
2748 `--------------------------------------*/
2749 yyerrlab:
2750  /* Make sure we have latest lookahead translation. See comments at
2751  user semantic actions for why this is necessary. */
2752  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2753 
2754  /* If not already recovering from an error, report this error. */
2755  if (!yyerrstatus)
2756  {
2757  ++yynerrs;
2758 #if ! YYERROR_VERBOSE
2759  yyerror (YY_("syntax error"));
2760 #else
2761 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2762  yyssp, yytoken)
2763  {
2764  char const *yymsgp = YY_("syntax error");
2765  int yysyntax_error_status;
2766  yysyntax_error_status = YYSYNTAX_ERROR;
2767  if (yysyntax_error_status == 0)
2768  yymsgp = yymsg;
2769  else if (yysyntax_error_status == 1)
2770  {
2771  if (yymsg != yymsgbuf)
2772  YYSTACK_FREE (yymsg);
2773  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2774  if (!yymsg)
2775  {
2776  yymsg = yymsgbuf;
2777  yymsg_alloc = sizeof yymsgbuf;
2778  yysyntax_error_status = 2;
2779  }
2780  else
2781  {
2782  yysyntax_error_status = YYSYNTAX_ERROR;
2783  yymsgp = yymsg;
2784  }
2785  }
2786  yyerror (yymsgp);
2787  if (yysyntax_error_status == 2)
2788  goto yyexhaustedlab;
2789  }
2790 # undef YYSYNTAX_ERROR
2791 #endif
2792  }
2793 
2794  yyerror_range[1] = yylloc;
2795 
2796  if (yyerrstatus == 3)
2797  {
2798  /* If just tried and failed to reuse lookahead token after an
2799  error, discard it. */
2800 
2801  if (yychar <= YYEOF)
2802  {
2803  /* Return failure if at end of input. */
2804  if (yychar == YYEOF)
2805  YYABORT;
2806  }
2807  else
2808  {
2809  yydestruct ("Error: discarding",
2810  yytoken, &yylval, &yylloc);
2811  yychar = YYEMPTY;
2812  }
2813  }
2814 
2815  /* Else will try to reuse lookahead token after shifting the error
2816  token. */
2817  goto yyerrlab1;
2818 
2819 
2820 /*---------------------------------------------------.
2821 | yyerrorlab -- error raised explicitly by YYERROR. |
2822 `---------------------------------------------------*/
2823 yyerrorlab:
2824  /* Pacify compilers when the user code never invokes YYERROR and the
2825  label yyerrorlab therefore never appears in user code. */
2826  if (0)
2827  YYERROR;
2828 
2829  /* Do not reclaim the symbols of the rule whose action triggered
2830  this YYERROR. */
2831  YYPOPSTACK (yylen);
2832  yylen = 0;
2833  YY_STACK_PRINT (yyss, yyssp);
2834  yystate = *yyssp;
2835  goto yyerrlab1;
2836 
2837 
2838 /*-------------------------------------------------------------.
2839 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2840 `-------------------------------------------------------------*/
2841 yyerrlab1:
2842  yyerrstatus = 3; /* Each real token shifted decrements this. */
2843 
2844  for (;;)
2845  {
2846  yyn = yypact[yystate];
2847  if (!yypact_value_is_default (yyn))
2848  {
2849  yyn += YYTERROR;
2850  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2851  {
2852  yyn = yytable[yyn];
2853  if (0 < yyn)
2854  break;
2855  }
2856  }
2857 
2858  /* Pop the current state because it cannot handle the error token. */
2859  if (yyssp == yyss)
2860  YYABORT;
2861 
2862  yyerror_range[1] = *yylsp;
2863  yydestruct ("Error: popping",
2864  yystos[yystate], yyvsp, yylsp);
2865  YYPOPSTACK (1);
2866  yystate = *yyssp;
2867  YY_STACK_PRINT (yyss, yyssp);
2868  }
2869 
2871  *++yyvsp = yylval;
2873 
2874  yyerror_range[2] = yylloc;
2875  /* Using YYLLOC is tempting, but would change the location of
2876  the lookahead. YYLOC is available though. */
2877  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2878  *++yylsp = yyloc;
2879 
2880  /* Shift the error token. */
2881  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2882 
2883  yystate = yyn;
2884  goto yynewstate;
2885 
2886 
2887 /*-------------------------------------.
2888 | yyacceptlab -- YYACCEPT comes here. |
2889 `-------------------------------------*/
2890 yyacceptlab:
2891  yyresult = 0;
2892  goto yyreturn;
2893 
2894 
2895 /*-----------------------------------.
2896 | yyabortlab -- YYABORT comes here. |
2897 `-----------------------------------*/
2898 yyabortlab:
2899  yyresult = 1;
2900  goto yyreturn;
2901 
2902 
2903 #if !defined yyoverflow || YYERROR_VERBOSE
2904 /*-------------------------------------------------.
2905 | yyexhaustedlab -- memory exhaustion comes here. |
2906 `-------------------------------------------------*/
2907 yyexhaustedlab:
2908  yyerror (YY_("memory exhausted"));
2909  yyresult = 2;
2910  /* Fall through. */
2911 #endif
2912 
2913 
2914 /*-----------------------------------------------------.
2915 | yyreturn -- parsing is finished, return the result. |
2916 `-----------------------------------------------------*/
2917 yyreturn:
2918  if (yychar != YYEMPTY)
2919  {
2920  /* Make sure we have latest lookahead translation. See comments at
2921  user semantic actions for why this is necessary. */
2922  yytoken = YYTRANSLATE (yychar);
2923  yydestruct ("Cleanup: discarding lookahead",
2924  yytoken, &yylval, &yylloc);
2925  }
2926  /* Do not reclaim the symbols of the rule whose action triggered
2927  this YYABORT or YYACCEPT. */
2928  YYPOPSTACK (yylen);
2929  YY_STACK_PRINT (yyss, yyssp);
2930  while (yyssp != yyss)
2931  {
2932  yydestruct ("Cleanup: popping",
2933  yystos[*yyssp], yyvsp, yylsp);
2934  YYPOPSTACK (1);
2935  }
2936 #ifndef yyoverflow
2937  if (yyss != yyssa)
2938  YYSTACK_FREE (yyss);
2939 #endif
2940 #if YYERROR_VERBOSE
2941  if (yymsg != yymsgbuf)
2942  YYSTACK_FREE (yymsg);
2943 #endif
2944  return yyresult;
2945 }
LWGEOM * wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:535
#define YYABORT
LWGEOM * wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality)
Definition: lwin_wkt.c:424
#define yylex
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
POINT coordinatevalue
LWGEOM * wkt_parser_point_new(POINTARRAY *pa, char *dimensionality)
Create a new point.
Definition: lwin_wkt.c:320
#define MULTICURVETYPE
Definition: liblwgeom.h:95
LWGEOM * wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:791
#define yypact_value_is_default(Yystate)
static const yytype_uint8 yydefact[]
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:485
POINTARRAY * ptarrayvalue
yytype_int16 yyss_alloc
LWGEOM * wkt_parser_curvepolygon_new(LWGEOM *ring)
Definition: lwin_wkt.c:567
#define YYINITDEPTH
LWGEOM * wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality)
Create a new circularstring.
Definition: lwin_wkt.c:388
#define YYFINAL
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
YYLTYPE yyls_alloc
LWGEOM * wkt_parser_collection_new(LWGEOM *geom)
Definition: lwin_wkt.c:698
#define YYTERROR
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:97
#define YYEOF
#define YYEMPTY
#define YYTRANSLATE(YYX)
#define YYERROR
static const yytype_uint8 yycheck[]
LWGEOM * wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality)
Create a new linestring.
Definition: lwin_wkt.c:354
#define YYSTACK_ALLOC
#define yynerrs
#define yyerror
static const yytype_uint8 yyr1[]
LWGEOM * geometryvalue
#define yytable_value_is_error(Yytable_value)
LWGEOM * wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:666
LWGEOM * wkt_parser_collection_finalize(int lwtype, LWGEOM *geom, char *dimensionality)
Definition: lwin_wkt.c:805
POINTARRAY * wkt_parser_ptarray_new(POINT p)
Start a point array from the first coordinate.
Definition: lwin_wkt.c:303
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition: lwin_wkt.c:265
#define YYNTOKENS
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:188
#define TINTYPE
Definition: liblwgeom.h:99
static const yytype_uint8 yyr2[]
static const yytype_uint8 yystos[]
#define yylval
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
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:221
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define YYACCEPT
LWGEOM * wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:759
#define YYLLOC_DEFAULT(Current, Rhs, N)
LWGEOM * wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:460
#define YY_(Msgid)
#define MULTISURFACETYPE
Definition: liblwgeom.h:96
POINT wkt_parser_coord_3(double c1, double c2, double c3)
Note, if this is an XYM coordinate we&#39;ll have to fix it later when we build the object itself and hav...
Definition: lwin_wkt.c:237
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
#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()
#define YYNSTATES
void wkt_parser_geometry_new(LWGEOM *geom, int srid)
Definition: lwin_wkt.c:859
LWGEOM * wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring)
Definition: lwin_wkt.c:585
short yytype_int16
#define YY_REDUCE_PRINT(Rule)
#define YYSIZE_T
static const yytype_int16 yypact[]
#define YY_ASSERT(E)
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define YYLAST
#define YYMAXDEPTH
static const yytype_int16 yydefgoto[]
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
static const yytype_uint16 yytable[]
POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4)
Definition: lwin_wkt.c:252
#define YYDPRINTF(Args)
LWGEOM * wkt_parser_compound_new(LWGEOM *geom)
Definition: lwin_wkt.c:724
#define YYPOPSTACK(N)
Here is the call graph for this function: