PostGIS  2.5.0dev-r@@SVN_REVISION@@
lwin_wkt_parse.c
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  *
6  * PostGIS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * PostGIS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  **********************************************************************
20  *
21  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
22  *
23  **********************************************************************/
24 
25 
26 /* Bison implementation for Yacc-like parsers in C
27 
28  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
29 
30  This program is free software: you can redistribute it and/or modify
31  it under the terms of the GNU General Public License as published by
32  the Free Software Foundation, either version 3 of the License, or
33  (at your option) any later version.
34 
35  This program is distributed in the hope that it will be useful,
36  but WITHOUT ANY WARRANTY; without even the implied warranty of
37  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38  GNU General Public License for more details.
39 
40  You should have received a copy of the GNU General Public License
41  along with this program. If not, see <http://www.gnu.org/licenses/>. */
42 
43 /* As a special exception, you may create a larger work that contains
44  part or all of the Bison parser skeleton and distribute that work
45  under terms of your choice, so long as that work isn't itself a
46  parser generator using the skeleton or a modified version thereof
47  as a parser skeleton. Alternatively, if you modify or redistribute
48  the parser skeleton itself, you may (at your option) remove this
49  special exception, which will cause the skeleton and the resulting
50  Bison output files to be licensed under the GNU General Public
51  License without this special exception.
52 
53  This special exception was added by the Free Software Foundation in
54  version 2.2 of Bison. */
55 
56 /* C LALR(1) parser skeleton written by Richard Stallman, by
57  simplifying the original so-called "semantic" parser. */
58 
59 /* All symbols defined below should begin with yy or YY, to avoid
60  infringing on user name space. This should be done even for local
61  variables, as they might otherwise be expanded by user macros.
62  There are some unavoidable exceptions within include files to
63  define necessary library symbols; they are noted "INFRINGES ON
64  USER NAME SPACE" below. */
65 
66 /* Identify Bison output. */
67 #define YYBISON 1
68 
69 /* Bison version. */
70 #define YYBISON_VERSION "3.0.4"
71 
72 /* Skeleton name. */
73 #define YYSKELETON_NAME "yacc.c"
74 
75 /* Pure parsers. */
76 #define YYPURE 0
77 
78 /* Push parsers. */
79 #define YYPUSH 0
80 
81 /* Pull parsers. */
82 #define YYPULL 1
83 
84 
85 /* Substitute the variable and function names. */
86 #define yyparse wkt_yyparse
87 #define yylex wkt_yylex
88 #define yyerror wkt_yyerror
89 #define yydebug wkt_yydebug
90 #define yynerrs wkt_yynerrs
91 
92 #define yylval wkt_yylval
93 #define yychar wkt_yychar
94 #define yylloc wkt_yylloc
95 
96 /* Copy the first part of user declarations. */
97 #line 1 "lwin_wkt_parse.y" /* yacc.c:339 */
98 
99 
100 /* WKT Parser */
101 #include <stdio.h>
102 #include <string.h>
103 #include <stdlib.h>
104 #include "lwin_wkt.h"
105 #include "lwin_wkt_parse.h"
106 #include "lwgeom_log.h"
107 
108 
109 /* Prototypes to quiet the compiler */
110 int wkt_yyparse(void);
111 void wkt_yyerror(const char *str);
112 int wkt_yylex(void);
113 
114 
115 /* Declare the global parser variable */
117 
118 /* Turn on/off verbose parsing (turn off for production) */
119 int wkt_yydebug = 0;
120 
121 /*
122 * Error handler called by the bison parser. Mostly we will be
123 * catching our own errors and filling out the message and errlocation
124 * from WKT_ERROR in the grammar, but we keep this one
125 * around just in case.
126 */
127 void wkt_yyerror(const char *str)
128 {
129  /* If we haven't already set a message and location, let's set one now. */
130  if ( ! global_parser_result.message )
131  {
132  global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
133  global_parser_result.errcode = PARSER_ERROR_OTHER;
134  global_parser_result.errlocation = wkt_yylloc.last_column;
135  }
136  LWDEBUGF(4,"%s", str);
137 }
138 
145 int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parser_check_flags)
146 {
147  int parse_rv = 0;
148 
149  /* Clean up our global parser result. */
150  lwgeom_parser_result_init(&global_parser_result);
151  /* Work-around possible bug in GNU Bison 3.0.2 resulting in wkt_yylloc
152  * members not being initialized on yyparse() as documented here:
153  * https://www.gnu.org/software/bison/manual/html_node/Location-Type.html
154  * See discussion here:
155  * http://lists.osgeo.org/pipermail/postgis-devel/2014-September/024506.html
156  */
159 
160  /* Set the input text string, and parse checks. */
161  global_parser_result.wkinput = wktstr;
162  global_parser_result.parser_check_flags = parser_check_flags;
163 
164  wkt_lexer_init(wktstr); /* Lexer ready */
165  parse_rv = wkt_yyparse(); /* Run the parse */
166  LWDEBUGF(4,"wkt_yyparse returned %d", parse_rv);
167  wkt_lexer_close(); /* Clean up lexer */
168 
169  /* A non-zero parser return is an error. */
170  if ( parse_rv != 0 )
171  {
172  if( ! global_parser_result.errcode )
173  {
174  global_parser_result.errcode = PARSER_ERROR_OTHER;
175  global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
176  global_parser_result.errlocation = wkt_yylloc.last_column;
177  }
178 
179  LWDEBUGF(5, "error returned by wkt_yyparse() @ %d: [%d] '%s'",
180  global_parser_result.errlocation,
181  global_parser_result.errcode,
182  global_parser_result.message);
183 
184  /* Copy the global values into the return pointer */
185  *parser_result = global_parser_result;
187  return LW_FAILURE;
188  }
189 
190  /* Copy the global value into the return pointer */
191  *parser_result = global_parser_result;
193  return LW_SUCCESS;
194 }
195 
196 #define WKT_ERROR() { if ( global_parser_result.errcode != 0 ) { YYERROR; } }
197 
198 
199 
200 #line 178 "lwin_wkt_parse.c" /* yacc.c:339 */
201 
202 # ifndef YY_NULLPTR
203 # if defined __cplusplus && 201103L <= __cplusplus
204 # define YY_NULLPTR nullptr
205 # else
206 # define YY_NULLPTR 0
207 # endif
208 # endif
209 
210 /* Enabling verbose error messages. */
211 #ifdef YYERROR_VERBOSE
212 # undef YYERROR_VERBOSE
213 # define YYERROR_VERBOSE 1
214 #else
215 # define YYERROR_VERBOSE 1
216 #endif
217 
218 /* In a future release of Bison, this section will be replaced
219  by #include "lwin_wkt_parse.h". */
220 #ifndef YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
221 # define YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED
222 /* Debug traces. */
223 #ifndef YYDEBUG
224 # define YYDEBUG 0
225 #endif
226 #if YYDEBUG
227 extern int wkt_yydebug;
228 #endif
229 
230 /* Token type. */
231 #ifndef YYTOKENTYPE
232 # define YYTOKENTYPE
233  enum yytokentype
234  {
235  POINT_TOK = 258,
236  LINESTRING_TOK = 259,
237  POLYGON_TOK = 260,
238  MPOINT_TOK = 261,
239  MLINESTRING_TOK = 262,
240  MPOLYGON_TOK = 263,
241  MSURFACE_TOK = 264,
242  MCURVE_TOK = 265,
243  CURVEPOLYGON_TOK = 266,
244  COMPOUNDCURVE_TOK = 267,
245  CIRCULARSTRING_TOK = 268,
246  COLLECTION_TOK = 269,
247  RBRACKET_TOK = 270,
248  LBRACKET_TOK = 271,
249  COMMA_TOK = 272,
250  EMPTY_TOK = 273,
251  SEMICOLON_TOK = 274,
252  TRIANGLE_TOK = 275,
253  TIN_TOK = 276,
254  POLYHEDRALSURFACE_TOK = 277,
255  DOUBLE_TOK = 278,
256  DIMENSIONALITY_TOK = 279,
257  SRID_TOK = 280
258  };
259 #endif
260 /* Tokens. */
261 #define POINT_TOK 258
262 #define LINESTRING_TOK 259
263 #define POLYGON_TOK 260
264 #define MPOINT_TOK 261
265 #define MLINESTRING_TOK 262
266 #define MPOLYGON_TOK 263
267 #define MSURFACE_TOK 264
268 #define MCURVE_TOK 265
269 #define CURVEPOLYGON_TOK 266
270 #define COMPOUNDCURVE_TOK 267
271 #define CIRCULARSTRING_TOK 268
272 #define COLLECTION_TOK 269
273 #define RBRACKET_TOK 270
274 #define LBRACKET_TOK 271
275 #define COMMA_TOK 272
276 #define EMPTY_TOK 273
277 #define SEMICOLON_TOK 274
278 #define TRIANGLE_TOK 275
279 #define TIN_TOK 276
280 #define POLYHEDRALSURFACE_TOK 277
281 #define DOUBLE_TOK 278
282 #define DIMENSIONALITY_TOK 279
283 #define SRID_TOK 280
284 
285 /* Value type. */
286 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
287 
288 union YYSTYPE
289 {
290 #line 108 "lwin_wkt_parse.y" /* yacc.c:355 */
291 
292  int integervalue;
293  double doublevalue;
294  char *stringvalue;
298 
299 #line 277 "lwin_wkt_parse.c" /* yacc.c:355 */
300 };
301 
302 typedef union YYSTYPE YYSTYPE;
303 # define YYSTYPE_IS_TRIVIAL 1
304 # define YYSTYPE_IS_DECLARED 1
305 #endif
306 
307 /* Location type. */
308 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
309 typedef struct YYLTYPE YYLTYPE;
310 struct YYLTYPE
311 {
312  int first_line;
313  int first_column;
314  int last_line;
315  int last_column;
316 };
317 # define YYLTYPE_IS_DECLARED 1
318 # define YYLTYPE_IS_TRIVIAL 1
319 #endif
320 
321 
322 extern YYSTYPE wkt_yylval;
323 extern YYLTYPE wkt_yylloc;
324 int wkt_yyparse (void);
325 
326 #endif /* !YY_WKT_YY_LWIN_WKT_PARSE_H_INCLUDED */
327 
328 /* Copy the second part of user declarations. */
329 
330 #line 308 "lwin_wkt_parse.c" /* yacc.c:358 */
331 
332 #ifdef short
333 # undef short
334 #endif
335 
336 #ifdef YYTYPE_UINT8
337 typedef YYTYPE_UINT8 yytype_uint8;
338 #else
339 typedef unsigned char yytype_uint8;
340 #endif
341 
342 #ifdef YYTYPE_INT8
343 typedef YYTYPE_INT8 yytype_int8;
344 #else
345 typedef signed char yytype_int8;
346 #endif
347 
348 #ifdef YYTYPE_UINT16
349 typedef YYTYPE_UINT16 yytype_uint16;
350 #else
351 typedef unsigned short int yytype_uint16;
352 #endif
353 
354 #ifdef YYTYPE_INT16
355 typedef YYTYPE_INT16 yytype_int16;
356 #else
357 typedef short int yytype_int16;
358 #endif
359 
360 #ifndef YYSIZE_T
361 # ifdef __SIZE_TYPE__
362 # define YYSIZE_T __SIZE_TYPE__
363 # elif defined size_t
364 # define YYSIZE_T size_t
365 # elif ! defined YYSIZE_T
366 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
367 # define YYSIZE_T size_t
368 # else
369 # define YYSIZE_T unsigned int
370 # endif
371 #endif
372 
373 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
374 
375 #ifndef YY_
376 # if defined YYENABLE_NLS && YYENABLE_NLS
377 # if ENABLE_NLS
378 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
379 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
380 # endif
381 # endif
382 # ifndef YY_
383 # define YY_(Msgid) Msgid
384 # endif
385 #endif
386 
387 #ifndef YY_ATTRIBUTE
388 # if (defined __GNUC__ \
389  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
390  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
391 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
392 # else
393 # define YY_ATTRIBUTE(Spec) /* empty */
394 # endif
395 #endif
396 
397 #ifndef YY_ATTRIBUTE_PURE
398 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
399 #endif
400 
401 #ifndef YY_ATTRIBUTE_UNUSED
402 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
403 #endif
404 
405 #if !defined _Noreturn \
406  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
407 # if defined _MSC_VER && 1200 <= _MSC_VER
408 # define _Noreturn __declspec (noreturn)
409 # else
410 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
411 # endif
412 #endif
413 
414 /* Suppress unused-variable warnings by "using" E. */
415 #if ! defined lint || defined __GNUC__
416 # define YYUSE(E) ((void) (E))
417 #else
418 # define YYUSE(E) /* empty */
419 #endif
420 
421 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
422 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
423 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
424  _Pragma ("GCC diagnostic push") \
425  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
426  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
427 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
428  _Pragma ("GCC diagnostic pop")
429 #else
430 # define YY_INITIAL_VALUE(Value) Value
431 #endif
432 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
433 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
434 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
435 #endif
436 #ifndef YY_INITIAL_VALUE
437 # define YY_INITIAL_VALUE(Value) /* Nothing. */
438 #endif
439 
440 
441 #if ! defined yyoverflow || YYERROR_VERBOSE
442 
443 /* The parser invokes alloca or malloc; define the necessary symbols. */
444 
445 # ifdef YYSTACK_USE_ALLOCA
446 # if YYSTACK_USE_ALLOCA
447 # ifdef __GNUC__
448 # define YYSTACK_ALLOC __builtin_alloca
449 # elif defined __BUILTIN_VA_ARG_INCR
450 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
451 # elif defined _AIX
452 # define YYSTACK_ALLOC __alloca
453 # elif defined _MSC_VER
454 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
455 # define alloca _alloca
456 # else
457 # define YYSTACK_ALLOC alloca
458 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
459 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
460  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
461 # ifndef EXIT_SUCCESS
462 # define EXIT_SUCCESS 0
463 # endif
464 # endif
465 # endif
466 # endif
467 # endif
468 
469 # ifdef YYSTACK_ALLOC
470  /* Pacify GCC's 'empty if-body' warning. */
471 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
472 # ifndef YYSTACK_ALLOC_MAXIMUM
473  /* The OS might guarantee only one guard page at the bottom of the stack,
474  and a page size can be as small as 4096 bytes. So we cannot safely
475  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
476  to allow for a few compiler-allocated temporary stack slots. */
477 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
478 # endif
479 # else
480 # define YYSTACK_ALLOC YYMALLOC
481 # define YYSTACK_FREE YYFREE
482 # ifndef YYSTACK_ALLOC_MAXIMUM
483 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
484 # endif
485 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
486  && ! ((defined YYMALLOC || defined malloc) \
487  && (defined YYFREE || defined free)))
488 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
489 # ifndef EXIT_SUCCESS
490 # define EXIT_SUCCESS 0
491 # endif
492 # endif
493 # ifndef YYMALLOC
494 # define YYMALLOC malloc
495 # if ! defined malloc && ! defined EXIT_SUCCESS
496 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
497 # endif
498 # endif
499 # ifndef YYFREE
500 # define YYFREE free
501 # if ! defined free && ! defined EXIT_SUCCESS
502 void free (void *); /* INFRINGES ON USER NAME SPACE */
503 # endif
504 # endif
505 # endif
506 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
507 
508 
509 #if (! defined yyoverflow \
510  && (! defined __cplusplus \
511  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
512  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
513 
514 /* A type that is properly aligned for any stack member. */
515 union yyalloc
516 {
520 };
521 
522 /* The size of the maximum gap between one aligned stack and the next. */
523 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
524 
525 /* The size of an array large to enough to hold all stacks, each with
526  N elements. */
527 # define YYSTACK_BYTES(N) \
528  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
529  + 2 * YYSTACK_GAP_MAXIMUM)
530 
531 # define YYCOPY_NEEDED 1
532 
533 /* Relocate STACK from its old location to the new one. The
534  local variables YYSIZE and YYSTACKSIZE give the old and new number of
535  elements in the stack, and YYPTR gives the new location of the
536  stack. Advance YYPTR to a properly aligned location for the next
537  stack. */
538 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
539  do \
540  { \
541  YYSIZE_T yynewbytes; \
542  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
543  Stack = &yyptr->Stack_alloc; \
544  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
545  yyptr += yynewbytes / sizeof (*yyptr); \
546  } \
547  while (0)
548 
549 #endif
550 
551 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
552 /* Copy COUNT objects from SRC to DST. The source and destination do
553  not overlap. */
554 # ifndef YYCOPY
555 # if defined __GNUC__ && 1 < __GNUC__
556 # define YYCOPY(Dst, Src, Count) \
557  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
558 # else
559 # define YYCOPY(Dst, Src, Count) \
560  do \
561  { \
562  YYSIZE_T yyi; \
563  for (yyi = 0; yyi < (Count); yyi++) \
564  (Dst)[yyi] = (Src)[yyi]; \
565  } \
566  while (0)
567 # endif
568 # endif
569 #endif /* !YYCOPY_NEEDED */
570 
571 /* YYFINAL -- State number of the termination state. */
572 #define YYFINAL 80
573 /* YYLAST -- Last index in YYTABLE. */
574 #define YYLAST 294
575 
576 /* YYNTOKENS -- Number of terminals. */
577 #define YYNTOKENS 26
578 /* YYNNTS -- Number of nonterminals. */
579 #define YYNNTS 40
580 /* YYNRULES -- Number of rules. */
581 #define YYNRULES 136
582 /* YYNSTATES -- Number of states. */
583 #define YYNSTATES 264
584 
585 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
586  by yylex, with out-of-bounds checking. */
587 #define YYUNDEFTOK 2
588 #define YYMAXUTOK 280
589 
590 #define YYTRANSLATE(YYX) \
591  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
592 
593 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
594  as returned by yylex, without out-of-bounds checking. */
595 static const yytype_uint8 yytranslate[] =
596 {
597  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
611  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
614  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
623  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
624  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
625  25
626 };
627 
628 #if YYDEBUG
629  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
630 static const yytype_uint16 yyrline[] =
631 {
632  0, 212, 212, 214, 218, 219, 220, 221, 222, 223,
633  224, 225, 226, 227, 228, 229, 230, 231, 232, 235,
634  237, 239, 241, 245, 247, 251, 253, 255, 257, 261,
635  263, 265, 267, 269, 271, 275, 277, 279, 281, 285,
636  287, 289, 291, 295, 297, 299, 301, 305, 307, 311,
637  313, 317, 319, 321, 323, 327, 329, 333, 336, 338,
638  340, 342, 346, 348, 352, 353, 354, 355, 358, 360,
639  364, 366, 370, 373, 376, 378, 380, 382, 386, 388,
640  390, 392, 394, 396, 400, 402, 404, 406, 410, 412,
641  414, 416, 418, 420, 422, 424, 428, 430, 432, 434,
642  438, 440, 444, 446, 448, 450, 454, 456, 458, 460,
643  464, 466, 470, 472, 476, 478, 480, 482, 486, 490,
644  492, 494, 496, 500, 502, 506, 508, 510, 514, 516,
645  518, 520, 524, 526, 530, 532, 534
646 };
647 #endif
648 
649 #if YYDEBUG || YYERROR_VERBOSE || 1
650 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
651  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
652 static const char *const yytname[] =
653 {
654  "$end", "error", "$undefined", "POINT_TOK", "LINESTRING_TOK",
655  "POLYGON_TOK", "MPOINT_TOK", "MLINESTRING_TOK", "MPOLYGON_TOK",
656  "MSURFACE_TOK", "MCURVE_TOK", "CURVEPOLYGON_TOK", "COMPOUNDCURVE_TOK",
657  "CIRCULARSTRING_TOK", "COLLECTION_TOK", "RBRACKET_TOK", "LBRACKET_TOK",
658  "COMMA_TOK", "EMPTY_TOK", "SEMICOLON_TOK", "TRIANGLE_TOK", "TIN_TOK",
659  "POLYHEDRALSURFACE_TOK", "DOUBLE_TOK", "DIMENSIONALITY_TOK", "SRID_TOK",
660  "$accept", "geometry", "geometry_no_srid", "geometrycollection",
661  "geometry_list", "multisurface", "surface_list", "tin",
662  "polyhedralsurface", "multipolygon", "polygon_list", "patch_list",
663  "polygon", "polygon_untagged", "patch", "curvepolygon", "curvering_list",
664  "curvering", "patchring_list", "ring_list", "patchring", "ring",
665  "compoundcurve", "compound_list", "multicurve", "curve_list",
666  "multilinestring", "linestring_list", "circularstring", "linestring",
667  "linestring_untagged", "triangle_list", "triangle", "triangle_untagged",
668  "multipoint", "point_list", "point_untagged", "point", "ptarray",
669  "coordinate", YY_NULLPTR
670 };
671 #endif
672 
673 # ifdef YYPRINT
674 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
675  (internal) symbol number NUM (which must be that of a token). */
676 static const yytype_uint16 yytoknum[] =
677 {
678  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
679  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
680  275, 276, 277, 278, 279, 280
681 };
682 # endif
683 
684 #define YYPACT_NINF -90
685 
686 #define yypact_value_is_default(Yystate) \
687  (!!((Yystate) == (-90)))
688 
689 #define YYTABLE_NINF -1
690 
691 #define yytable_value_is_error(Yytable_value) \
692  0
693 
694  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
695  STATE-NUM. */
696 static const yytype_int16 yypact[] =
697 {
698  109, -2, 16, 23, 26, 36, 39, 40, 52, 53,
699  74, 79, 83, 84, 108, 137, 7, 46, -90, -90,
700  -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
701  -90, -90, -90, -90, 43, -90, 27, 43, -90, 88,
702  33, -90, 144, 140, -90, 167, 175, -90, 176, 179,
703  -90, 183, 20, -90, 184, 11, -90, 187, 11, -90,
704  188, 17, -90, 191, 43, -90, 192, 168, -90, 195,
705  51, -90, 196, 56, -90, 199, 70, -90, 200, 168,
706  -90, 68, 110, -90, 43, -90, 169, 43, -90, 43,
707  204, -90, 33, -90, 43, -90, 205, -90, -90, 140,
708  -90, 43, -90, 208, -90, 175, -90, 33, -90, 209,
709  -90, 179, -90, 212, -90, -90, -90, 20, -90, -90,
710  213, -90, -90, -90, 11, -90, 216, -90, -90, -90,
711  -90, -90, 11, -90, 217, -90, -90, -90, 17, -90,
712  220, 43, -90, -90, 221, 168, -90, 43, 80, -90,
713  93, 224, -90, 56, -90, 94, 225, -90, 70, -90,
714  -90, 105, -90, 43, 228, -90, 229, 232, -90, 33,
715  233, 44, -90, 140, 236, 237, -90, 175, 240, 241,
716  -90, 179, 244, -90, 20, 245, -90, 11, 248, -90,
717  11, 249, -90, 17, 252, -90, 253, -90, 168, 256,
718  257, 43, 43, -90, 56, 260, 43, 261, -90, -90,
719  70, 264, 112, -90, -90, -90, -90, -90, -90, -90,
720  -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
721  -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
722  -90, -90, -90, -90, -90, -90, 47, 265, 268, -90,
723  -90, 269, -90, 94, -90, -90, -90, -90, 131, 132,
724  -90, -90, -90, -90
725 };
726 
727  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
728  Performed when YYTABLE does not specify something else to do. Zero
729  means the default is an error. */
730 static const yytype_uint8 yydefact[] =
731 {
732  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
733  0, 0, 0, 0, 0, 0, 0, 0, 2, 18,
734  13, 15, 16, 12, 8, 9, 7, 14, 11, 6,
735  5, 17, 10, 4, 0, 131, 0, 0, 109, 0,
736  0, 54, 0, 0, 122, 0, 0, 99, 0, 0,
737  46, 0, 0, 28, 0, 0, 87, 0, 0, 61,
738  0, 0, 77, 0, 0, 105, 0, 0, 22, 0,
739  0, 117, 0, 0, 38, 0, 0, 42, 0, 0,
740  1, 0, 0, 133, 0, 130, 0, 0, 108, 0,
741  0, 71, 0, 53, 0, 127, 0, 124, 125, 0,
742  121, 0, 111, 0, 101, 0, 98, 0, 56, 0,
743  48, 0, 45, 0, 32, 34, 33, 0, 27, 93,
744  0, 92, 94, 95, 0, 86, 0, 63, 66, 67,
745  65, 64, 0, 60, 0, 81, 82, 83, 0, 76,
746  0, 0, 104, 24, 0, 0, 21, 0, 0, 116,
747  0, 0, 113, 0, 37, 0, 0, 50, 0, 41,
748  3, 134, 128, 0, 0, 106, 0, 0, 51, 0,
749  0, 0, 119, 0, 0, 0, 96, 0, 0, 0,
750  43, 0, 0, 25, 0, 0, 84, 0, 0, 58,
751  0, 0, 74, 0, 0, 102, 0, 19, 0, 0,
752  0, 0, 0, 35, 0, 0, 0, 0, 69, 39,
753  0, 0, 135, 132, 129, 107, 73, 70, 52, 126,
754  123, 120, 110, 100, 97, 55, 47, 44, 29, 31,
755  30, 26, 89, 88, 90, 91, 85, 62, 59, 78,
756  79, 80, 75, 103, 23, 20, 0, 0, 0, 112,
757  36, 0, 57, 0, 49, 40, 136, 114, 0, 0,
758  72, 68, 115, 118
759 };
760 
761  /* YYPGOTO[NTERM-NUM]. */
762 static const yytype_int16 yypgoto[] =
763 {
764  -90, -90, 0, -90, 5, -90, 37, -90, -90, -90,
765  48, 6, -39, -33, -42, -32, 55, -21, -90, -89,
766  -57, 118, -50, 150, -90, 165, -90, 185, -51, -49,
767  -44, 138, -90, 89, -90, 193, 121, -90, -36, -6
768 };
769 
770  /* YYDEFGOTO[NTERM-NUM]. */
771 static const yytype_int16 yydefgoto[] =
772 {
773  -1, 17, 143, 19, 144, 20, 113, 21, 22, 23,
774  109, 156, 24, 110, 157, 25, 126, 127, 207, 90,
775  208, 91, 26, 134, 27, 120, 28, 103, 29, 30,
776  131, 151, 31, 152, 32, 96, 97, 33, 82, 83
777 };
778 
779  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
780  positive, shift that token. If negative, reduce the rule whose
781  number is the opposite. If YYTABLE_NINF, syntax error. */
782 static const yytype_uint16 yytable[] =
783 {
784  18, 86, 104, 170, 121, 119, 122, 129, 128, 130,
785  135, 123, 136, 114, 34, 2, 35, 137, 179, 115,
786  116, 2, 36, 10, 11, 3, 79, 101, 140, 102,
787  11, 9, 37, 101, 38, 102, 107, 98, 108, 40,
788  39, 41, 43, 84, 44, 85, 80, 42, 164, 89,
789  45, 166, 46, 167, 47, 49, 52, 50, 53, 219,
790  48, 104, 257, 51, 54, 175, 81, 147, 55, 58,
791  56, 59, 150, 121, 119, 122, 57, 60, 114, 160,
792  123, 129, 128, 130, 115, 116, 155, 135, 171, 136,
793  61, 161, 62, 98, 137, 64, 201, 65, 63, 67,
794  70, 68, 71, 66, 87, 196, 88, 69, 72, 202,
795  206, 200, 1, 2, 3, 4, 5, 6, 7, 8,
796  9, 10, 11, 12, 73, 162, 74, 163, 212, 13,
797  14, 15, 75, 223, 16, 256, 233, 232, 234, 129,
798  128, 130, 239, 235, 240, 228, 262, 263, 226, 241,
799  199, 229, 230, 76, 185, 77, 94, 213, 95, 182,
800  92, 78, 93, 81, 211, 247, 248, 98, 254, 237,
801  251, 1, 2, 3, 4, 5, 6, 7, 8, 9,
802  10, 11, 12, 99, 165, 100, 163, 191, 13, 14,
803  15, 101, 105, 102, 106, 107, 261, 108, 244, 111,
804  117, 112, 118, 124, 132, 125, 133, 138, 141, 139,
805  142, 145, 148, 146, 149, 153, 158, 154, 159, 168,
806  172, 169, 173, 176, 180, 177, 181, 183, 186, 184,
807  187, 189, 192, 190, 193, 195, 197, 163, 198, 203,
808  209, 204, 210, 214, 215, 163, 163, 216, 218, 163,
809  169, 221, 222, 173, 163, 224, 225, 177, 169, 227,
810  231, 181, 184, 236, 238, 187, 190, 242, 243, 193,
811  163, 245, 246, 198, 163, 250, 252, 204, 253, 255,
812  258, 210, 163, 259, 260, 163, 163, 217, 194, 188,
813  178, 205, 174, 249, 220
814 };
815 
816 static const yytype_uint8 yycheck[] =
817 {
818  0, 37, 46, 92, 55, 55, 55, 58, 58, 58,
819  61, 55, 61, 52, 16, 4, 18, 61, 107, 52,
820  52, 4, 24, 12, 13, 5, 19, 16, 64, 18,
821  13, 11, 16, 16, 18, 18, 16, 43, 18, 16,
822  24, 18, 16, 16, 18, 18, 0, 24, 84, 16,
823  24, 87, 16, 89, 18, 16, 16, 18, 18, 15,
824  24, 105, 15, 24, 24, 101, 23, 16, 16, 16,
825  18, 18, 16, 124, 124, 124, 24, 24, 117, 79,
826  124, 132, 132, 132, 117, 117, 16, 138, 94, 138,
827  16, 23, 18, 99, 138, 16, 16, 18, 24, 16,
828  16, 18, 18, 24, 16, 141, 18, 24, 24, 16,
829  16, 147, 3, 4, 5, 6, 7, 8, 9, 10,
830  11, 12, 13, 14, 16, 15, 18, 17, 23, 20,
831  21, 22, 24, 177, 25, 23, 187, 187, 187, 190,
832  190, 190, 193, 187, 193, 184, 15, 15, 181, 193,
833  145, 184, 184, 16, 117, 18, 16, 163, 18, 111,
834  16, 24, 18, 23, 158, 201, 202, 173, 210, 190,
835  206, 3, 4, 5, 6, 7, 8, 9, 10, 11,
836  12, 13, 14, 16, 15, 18, 17, 132, 20, 21,
837  22, 16, 16, 18, 18, 16, 253, 18, 198, 16,
838  16, 18, 18, 16, 16, 18, 18, 16, 16, 18,
839  18, 16, 16, 18, 18, 16, 16, 18, 18, 15,
840  15, 17, 17, 15, 15, 17, 17, 15, 15, 17,
841  17, 15, 15, 17, 17, 15, 15, 17, 17, 15,
842  15, 17, 17, 15, 15, 17, 17, 15, 15, 17,
843  17, 15, 15, 17, 17, 15, 15, 17, 17, 15,
844  15, 17, 17, 15, 15, 17, 17, 15, 15, 17,
845  17, 15, 15, 17, 17, 15, 15, 17, 17, 15,
846  15, 17, 17, 15, 15, 17, 17, 169, 138, 124,
847  105, 153, 99, 204, 173
848 };
849 
850  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
851  symbol of state STATE-NUM. */
852 static const yytype_uint8 yystos[] =
853 {
854  0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
855  12, 13, 14, 20, 21, 22, 25, 27, 28, 29,
856  31, 33, 34, 35, 38, 41, 48, 50, 52, 54,
857  55, 58, 60, 63, 16, 18, 24, 16, 18, 24,
858  16, 18, 24, 16, 18, 24, 16, 18, 24, 16,
859  18, 24, 16, 18, 24, 16, 18, 24, 16, 18,
860  24, 16, 18, 24, 16, 18, 24, 16, 18, 24,
861  16, 18, 24, 16, 18, 24, 16, 18, 24, 19,
862  0, 23, 64, 65, 16, 18, 64, 16, 18, 16,
863  45, 47, 16, 18, 16, 18, 61, 62, 65, 16,
864  18, 16, 18, 53, 56, 16, 18, 16, 18, 36,
865  39, 16, 18, 32, 38, 39, 41, 16, 18, 48,
866  51, 54, 55, 56, 16, 18, 42, 43, 48, 54,
867  55, 56, 16, 18, 49, 54, 55, 56, 16, 18,
868  64, 16, 18, 28, 30, 16, 18, 16, 16, 18,
869  16, 57, 59, 16, 18, 16, 37, 40, 16, 18,
870  28, 23, 15, 17, 64, 15, 64, 64, 15, 17,
871  45, 65, 15, 17, 61, 64, 15, 17, 53, 45,
872  15, 17, 36, 15, 17, 32, 15, 17, 51, 15,
873  17, 42, 15, 17, 49, 15, 64, 15, 17, 30,
874  64, 16, 16, 15, 17, 57, 16, 44, 46, 15,
875  17, 37, 23, 65, 15, 15, 15, 47, 15, 15,
876  62, 15, 15, 56, 15, 15, 39, 15, 38, 39,
877  41, 15, 48, 54, 55, 56, 15, 43, 15, 54,
878  55, 56, 15, 15, 28, 15, 15, 64, 64, 59,
879  15, 64, 15, 17, 40, 15, 23, 15, 15, 15,
880  15, 46, 15, 15
881 };
882 
883  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
884 static const yytype_uint8 yyr1[] =
885 {
886  0, 26, 27, 27, 28, 28, 28, 28, 28, 28,
887  28, 28, 28, 28, 28, 28, 28, 28, 28, 29,
888  29, 29, 29, 30, 30, 31, 31, 31, 31, 32,
889  32, 32, 32, 32, 32, 33, 33, 33, 33, 34,
890  34, 34, 34, 35, 35, 35, 35, 36, 36, 37,
891  37, 38, 38, 38, 38, 39, 39, 40, 41, 41,
892  41, 41, 42, 42, 43, 43, 43, 43, 44, 44,
893  45, 45, 46, 47, 48, 48, 48, 48, 49, 49,
894  49, 49, 49, 49, 50, 50, 50, 50, 51, 51,
895  51, 51, 51, 51, 51, 51, 52, 52, 52, 52,
896  53, 53, 54, 54, 54, 54, 55, 55, 55, 55,
897  56, 56, 57, 57, 58, 58, 58, 58, 59, 60,
898  60, 60, 60, 61, 61, 62, 62, 62, 63, 63,
899  63, 63, 64, 64, 65, 65, 65
900 };
901 
902  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
903 static const yytype_uint8 yyr2[] =
904 {
905  0, 2, 1, 3, 1, 1, 1, 1, 1, 1,
906  1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
907  5, 3, 2, 3, 1, 4, 5, 3, 2, 3,
908  3, 3, 1, 1, 1, 4, 5, 3, 2, 4,
909  5, 3, 2, 4, 5, 3, 2, 3, 1, 3,
910  1, 4, 5, 3, 2, 3, 1, 3, 4, 5,
911  3, 2, 3, 1, 1, 1, 1, 1, 3, 1,
912  3, 1, 3, 3, 4, 5, 3, 2, 3, 3,
913  3, 1, 1, 1, 4, 5, 3, 2, 3, 3,
914  3, 3, 1, 1, 1, 1, 4, 5, 3, 2,
915  3, 1, 4, 5, 3, 2, 4, 5, 3, 2,
916  3, 1, 3, 1, 6, 7, 3, 2, 5, 4,
917  5, 3, 2, 3, 1, 1, 3, 1, 4, 5,
918  3, 2, 3, 1, 2, 3, 4
919 };
920 
921 
922 #define yyerrok (yyerrstatus = 0)
923 #define yyclearin (yychar = YYEMPTY)
924 #define YYEMPTY (-2)
925 #define YYEOF 0
926 
927 #define YYACCEPT goto yyacceptlab
928 #define YYABORT goto yyabortlab
929 #define YYERROR goto yyerrorlab
930 
931 
932 #define YYRECOVERING() (!!yyerrstatus)
933 
934 #define YYBACKUP(Token, Value) \
935 do \
936  if (yychar == YYEMPTY) \
937  { \
938  yychar = (Token); \
939  yylval = (Value); \
940  YYPOPSTACK (yylen); \
941  yystate = *yyssp; \
942  goto yybackup; \
943  } \
944  else \
945  { \
946  yyerror (YY_("syntax error: cannot back up")); \
947  YYERROR; \
948  } \
949 while (0)
950 
951 /* Error token number */
952 #define YYTERROR 1
953 #define YYERRCODE 256
954 
955 
956 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
957  If N is 0, then set CURRENT to the empty location which ends
958  the previous symbol: RHS[0] (always defined). */
959 
960 #ifndef YYLLOC_DEFAULT
961 # define YYLLOC_DEFAULT(Current, Rhs, N) \
962  do \
963  if (N) \
964  { \
965  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
966  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
967  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
968  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
969  } \
970  else \
971  { \
972  (Current).first_line = (Current).last_line = \
973  YYRHSLOC (Rhs, 0).last_line; \
974  (Current).first_column = (Current).last_column = \
975  YYRHSLOC (Rhs, 0).last_column; \
976  } \
977  while (0)
978 #endif
979 
980 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
981 
982 
983 /* Enable debugging if requested. */
984 #if YYDEBUG
985 
986 # ifndef YYFPRINTF
987 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
988 # define YYFPRINTF fprintf
989 # endif
990 
991 # define YYDPRINTF(Args) \
992 do { \
993  if (yydebug) \
994  YYFPRINTF Args; \
995 } while (0)
996 
997 
998 /* YY_LOCATION_PRINT -- Print the location on the stream.
999  This macro was not mandated originally: define only if we know
1000  we won't break user code: when these are the locations we know. */
1001 
1002 #ifndef YY_LOCATION_PRINT
1003 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1004 
1005 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1006 
1008 static unsigned
1009 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1010 {
1011  unsigned res = 0;
1012  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1013  if (0 <= yylocp->first_line)
1014  {
1015  res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1016  if (0 <= yylocp->first_column)
1017  res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1018  }
1019  if (0 <= yylocp->last_line)
1020  {
1021  if (yylocp->first_line < yylocp->last_line)
1022  {
1023  res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1024  if (0 <= end_col)
1025  res += YYFPRINTF (yyo, ".%d", end_col);
1026  }
1027  else if (0 <= end_col && yylocp->first_column < end_col)
1028  res += YYFPRINTF (yyo, "-%d", end_col);
1029  }
1030  return res;
1031  }
1032 
1033 # define YY_LOCATION_PRINT(File, Loc) \
1034  yy_location_print_ (File, &(Loc))
1035 
1036 # else
1037 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1038 # endif
1039 #endif
1040 
1041 
1042 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1043 do { \
1044  if (yydebug) \
1045  { \
1046  YYFPRINTF (stderr, "%s ", Title); \
1047  yy_symbol_print (stderr, \
1048  Type, Value, Location); \
1049  YYFPRINTF (stderr, "\n"); \
1050  } \
1051 } while (0)
1052 
1053 
1054 /*----------------------------------------.
1055 | Print this symbol's value on YYOUTPUT. |
1056 `----------------------------------------*/
1057 
1058 static void
1059 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1060 {
1061  FILE *yyo = yyoutput;
1062  YYUSE (yyo);
1063  YYUSE (yylocationp);
1064  if (!yyvaluep)
1065  return;
1066 # ifdef YYPRINT
1067  if (yytype < YYNTOKENS)
1068  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1069 # endif
1070  YYUSE (yytype);
1071 }
1072 
1073 
1074 /*--------------------------------.
1075 | Print this symbol on YYOUTPUT. |
1076 `--------------------------------*/
1077 
1078 static void
1079 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1080 {
1081  YYFPRINTF (yyoutput, "%s %s (",
1082  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1083 
1084  YY_LOCATION_PRINT (yyoutput, *yylocationp);
1085  YYFPRINTF (yyoutput, ": ");
1086  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
1087  YYFPRINTF (yyoutput, ")");
1088 }
1089 
1090 /*------------------------------------------------------------------.
1091 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1092 | TOP (included). |
1093 `------------------------------------------------------------------*/
1094 
1095 static void
1096 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1097 {
1098  YYFPRINTF (stderr, "Stack now");
1099  for (; yybottom <= yytop; yybottom++)
1100  {
1101  int yybot = *yybottom;
1102  YYFPRINTF (stderr, " %d", yybot);
1103  }
1104  YYFPRINTF (stderr, "\n");
1105 }
1106 
1107 # define YY_STACK_PRINT(Bottom, Top) \
1108 do { \
1109  if (yydebug) \
1110  yy_stack_print ((Bottom), (Top)); \
1111 } while (0)
1112 
1113 
1114 /*------------------------------------------------.
1115 | Report that the YYRULE is going to be reduced. |
1116 `------------------------------------------------*/
1117 
1118 static void
1119 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
1120 {
1121  unsigned long int yylno = yyrline[yyrule];
1122  int yynrhs = yyr2[yyrule];
1123  int yyi;
1124  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1125  yyrule - 1, yylno);
1126  /* The symbols being reduced. */
1127  for (yyi = 0; yyi < yynrhs; yyi++)
1128  {
1129  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1130  yy_symbol_print (stderr,
1131  yystos[yyssp[yyi + 1 - yynrhs]],
1132  &(yyvsp[(yyi + 1) - (yynrhs)])
1133  , &(yylsp[(yyi + 1) - (yynrhs)]) );
1134  YYFPRINTF (stderr, "\n");
1135  }
1136 }
1137 
1138 # define YY_REDUCE_PRINT(Rule) \
1139 do { \
1140  if (yydebug) \
1141  yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
1142 } while (0)
1143 
1144 /* Nonzero means print parse trace. It is left uninitialized so that
1145  multiple parsers can coexist. */
1146 int yydebug;
1147 #else /* !YYDEBUG */
1148 # define YYDPRINTF(Args)
1149 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1150 # define YY_STACK_PRINT(Bottom, Top)
1151 # define YY_REDUCE_PRINT(Rule)
1152 #endif /* !YYDEBUG */
1153 
1154 
1155 /* YYINITDEPTH -- initial size of the parser's stacks. */
1156 #ifndef YYINITDEPTH
1157 # define YYINITDEPTH 200
1158 #endif
1159 
1160 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1161  if the built-in stack extension method is used).
1162 
1163  Do not make this value too large; the results are undefined if
1164  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1165  evaluated with infinite-precision integer arithmetic. */
1166 
1167 #ifndef YYMAXDEPTH
1168 # define YYMAXDEPTH 10000
1169 #endif
1170 
1171 
1172 #if YYERROR_VERBOSE
1173 
1174 # ifndef yystrlen
1175 # if defined __GLIBC__ && defined _STRING_H
1176 # define yystrlen strlen
1177 # else
1178 /* Return the length of YYSTR. */
1179 static YYSIZE_T
1180 yystrlen (const char *yystr)
1181 {
1182  YYSIZE_T yylen;
1183  for (yylen = 0; yystr[yylen]; yylen++)
1184  continue;
1185  return yylen;
1186 }
1187 # endif
1188 # endif
1189 
1190 # ifndef yystpcpy
1191 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1192 # define yystpcpy stpcpy
1193 # else
1194 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1195  YYDEST. */
1196 static char *
1197 yystpcpy (char *yydest, const char *yysrc)
1198 {
1199  char *yyd = yydest;
1200  const char *yys = yysrc;
1201 
1202  while ((*yyd++ = *yys++) != '\0')
1203  continue;
1204 
1205  return yyd - 1;
1206 }
1207 # endif
1208 # endif
1209 
1210 # ifndef yytnamerr
1211 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1212  quotes and backslashes, so that it's suitable for yyerror. The
1213  heuristic is that double-quoting is unnecessary unless the string
1214  contains an apostrophe, a comma, or backslash (other than
1215  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1216  null, do not copy; instead, return the length of what the result
1217  would have been. */
1218 static YYSIZE_T
1219 yytnamerr (char *yyres, const char *yystr)
1220 {
1221  if (*yystr == '"')
1222  {
1223  YYSIZE_T yyn = 0;
1224  char const *yyp = yystr;
1225 
1226  for (;;)
1227  switch (*++yyp)
1228  {
1229  case '\'':
1230  case ',':
1231  goto do_not_strip_quotes;
1232 
1233  case '\\':
1234  if (*++yyp != '\\')
1235  goto do_not_strip_quotes;
1236  /* Fall through. */
1237  default:
1238  if (yyres)
1239  yyres[yyn] = *yyp;
1240  yyn++;
1241  break;
1242 
1243  case '"':
1244  if (yyres)
1245  yyres[yyn] = '\0';
1246  return yyn;
1247  }
1248  do_not_strip_quotes: ;
1249  }
1250 
1251  if (! yyres)
1252  return yystrlen (yystr);
1253 
1254  return yystpcpy (yyres, yystr) - yyres;
1255 }
1256 # endif
1257 
1258 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1259  about the unexpected token YYTOKEN for the state stack whose top is
1260  YYSSP.
1261 
1262  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1263  not large enough to hold the message. In that case, also set
1264  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1265  required number of bytes is too large to store. */
1266 static int
1267 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1268  yytype_int16 *yyssp, int yytoken)
1269 {
1270  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1271  YYSIZE_T yysize = yysize0;
1272  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1273  /* Internationalized format string. */
1274  const char *yyformat = YY_NULLPTR;
1275  /* Arguments of yyformat. */
1276  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1277  /* Number of reported tokens (one for the "unexpected", one per
1278  "expected"). */
1279  int yycount = 0;
1280 
1281  /* There are many possibilities here to consider:
1282  - If this state is a consistent state with a default action, then
1283  the only way this function was invoked is if the default action
1284  is an error action. In that case, don't check for expected
1285  tokens because there are none.
1286  - The only way there can be no lookahead present (in yychar) is if
1287  this state is a consistent state with a default action. Thus,
1288  detecting the absence of a lookahead is sufficient to determine
1289  that there is no unexpected or expected token to report. In that
1290  case, just report a simple "syntax error".
1291  - Don't assume there isn't a lookahead just because this state is a
1292  consistent state with a default action. There might have been a
1293  previous inconsistent state, consistent state with a non-default
1294  action, or user semantic action that manipulated yychar.
1295  - Of course, the expected token list depends on states to have
1296  correct lookahead information, and it depends on the parser not
1297  to perform extra reductions after fetching a lookahead from the
1298  scanner and before detecting a syntax error. Thus, state merging
1299  (from LALR or IELR) and default reductions corrupt the expected
1300  token list. However, the list is correct for canonical LR with
1301  one exception: it will still contain any token that will not be
1302  accepted due to an error action in a later state.
1303  */
1304  if (yytoken != YYEMPTY)
1305  {
1306  int yyn = yypact[*yyssp];
1307  yyarg[yycount++] = yytname[yytoken];
1308  if (!yypact_value_is_default (yyn))
1309  {
1310  /* Start YYX at -YYN if negative to avoid negative indexes in
1311  YYCHECK. In other words, skip the first -YYN actions for
1312  this state because they are default actions. */
1313  int yyxbegin = yyn < 0 ? -yyn : 0;
1314  /* Stay within bounds of both yycheck and yytname. */
1315  int yychecklim = YYLAST - yyn + 1;
1316  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1317  int yyx;
1318 
1319  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1320  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1321  && !yytable_value_is_error (yytable[yyx + yyn]))
1322  {
1323  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1324  {
1325  yycount = 1;
1326  yysize = yysize0;
1327  break;
1328  }
1329  yyarg[yycount++] = yytname[yyx];
1330  {
1331  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1332  if (! (yysize <= yysize1
1333  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1334  return 2;
1335  yysize = yysize1;
1336  }
1337  }
1338  }
1339  }
1340 
1341  switch (yycount)
1342  {
1343 # define YYCASE_(N, S) \
1344  case N: \
1345  yyformat = S; \
1346  break
1347  YYCASE_(0, YY_("syntax error"));
1348  YYCASE_(1, YY_("syntax error, unexpected %s"));
1349  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1350  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1351  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1352  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1353 # undef YYCASE_
1354  }
1355 
1356  {
1357  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1358  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1359  return 2;
1360  yysize = yysize1;
1361  }
1362 
1363  if (*yymsg_alloc < yysize)
1364  {
1365  *yymsg_alloc = 2 * yysize;
1366  if (! (yysize <= *yymsg_alloc
1367  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1368  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1369  return 1;
1370  }
1371 
1372  /* Avoid sprintf, as that infringes on the user's name space.
1373  Don't have undefined behavior even if the translation
1374  produced a string with the wrong number of "%s"s. */
1375  {
1376  char *yyp = *yymsg;
1377  int yyi = 0;
1378  while ((*yyp = *yyformat) != '\0')
1379  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1380  {
1381  yyp += yytnamerr (yyp, yyarg[yyi++]);
1382  yyformat += 2;
1383  }
1384  else
1385  {
1386  yyp++;
1387  yyformat++;
1388  }
1389  }
1390  return 0;
1391 }
1392 #endif /* YYERROR_VERBOSE */
1393 
1394 /*-----------------------------------------------.
1395 | Release the memory associated to this symbol. |
1396 `-----------------------------------------------*/
1397 
1398 static void
1399 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1400 {
1401  YYUSE (yyvaluep);
1402  YYUSE (yylocationp);
1403  if (!yymsg)
1404  yymsg = "Deleting";
1405  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1406 
1408  switch (yytype)
1409  {
1410  case 28: /* geometry_no_srid */
1411 #line 190 "lwin_wkt_parse.y" /* yacc.c:1257 */
1412  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1413 #line 1391 "lwin_wkt_parse.c" /* yacc.c:1257 */
1414  break;
1415 
1416  case 29: /* geometrycollection */
1417 #line 191 "lwin_wkt_parse.y" /* yacc.c:1257 */
1418  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1419 #line 1397 "lwin_wkt_parse.c" /* yacc.c:1257 */
1420  break;
1421 
1422  case 31: /* multisurface */
1423 #line 198 "lwin_wkt_parse.y" /* yacc.c:1257 */
1424  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1425 #line 1403 "lwin_wkt_parse.c" /* yacc.c:1257 */
1426  break;
1427 
1428  case 32: /* surface_list */
1429 #line 177 "lwin_wkt_parse.y" /* yacc.c:1257 */
1430  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1431 #line 1409 "lwin_wkt_parse.c" /* yacc.c:1257 */
1432  break;
1433 
1434  case 33: /* tin */
1435 #line 205 "lwin_wkt_parse.y" /* yacc.c:1257 */
1436  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1437 #line 1415 "lwin_wkt_parse.c" /* yacc.c:1257 */
1438  break;
1439 
1440  case 34: /* polyhedralsurface */
1441 #line 204 "lwin_wkt_parse.y" /* yacc.c:1257 */
1442  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1443 #line 1421 "lwin_wkt_parse.c" /* yacc.c:1257 */
1444  break;
1445 
1446  case 35: /* multipolygon */
1447 #line 197 "lwin_wkt_parse.y" /* yacc.c:1257 */
1448  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1449 #line 1427 "lwin_wkt_parse.c" /* yacc.c:1257 */
1450  break;
1451 
1452  case 36: /* polygon_list */
1453 #line 178 "lwin_wkt_parse.y" /* yacc.c:1257 */
1454  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1455 #line 1433 "lwin_wkt_parse.c" /* yacc.c:1257 */
1456  break;
1457 
1458  case 37: /* patch_list */
1459 #line 179 "lwin_wkt_parse.y" /* yacc.c:1257 */
1460  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1461 #line 1439 "lwin_wkt_parse.c" /* yacc.c:1257 */
1462  break;
1463 
1464  case 38: /* polygon */
1465 #line 201 "lwin_wkt_parse.y" /* yacc.c:1257 */
1466  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1467 #line 1445 "lwin_wkt_parse.c" /* yacc.c:1257 */
1468  break;
1469 
1470  case 39: /* polygon_untagged */
1471 #line 203 "lwin_wkt_parse.y" /* yacc.c:1257 */
1472  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1473 #line 1451 "lwin_wkt_parse.c" /* yacc.c:1257 */
1474  break;
1475 
1476  case 40: /* patch */
1477 #line 202 "lwin_wkt_parse.y" /* yacc.c:1257 */
1478  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1479 #line 1457 "lwin_wkt_parse.c" /* yacc.c:1257 */
1480  break;
1481 
1482  case 41: /* curvepolygon */
1483 #line 188 "lwin_wkt_parse.y" /* yacc.c:1257 */
1484  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1485 #line 1463 "lwin_wkt_parse.c" /* yacc.c:1257 */
1486  break;
1487 
1488  case 42: /* curvering_list */
1489 #line 175 "lwin_wkt_parse.y" /* yacc.c:1257 */
1490  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1491 #line 1469 "lwin_wkt_parse.c" /* yacc.c:1257 */
1492  break;
1493 
1494  case 43: /* curvering */
1495 #line 189 "lwin_wkt_parse.y" /* yacc.c:1257 */
1496  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1497 #line 1475 "lwin_wkt_parse.c" /* yacc.c:1257 */
1498  break;
1499 
1500  case 44: /* patchring_list */
1501 #line 185 "lwin_wkt_parse.y" /* yacc.c:1257 */
1502  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1503 #line 1481 "lwin_wkt_parse.c" /* yacc.c:1257 */
1504  break;
1505 
1506  case 45: /* ring_list */
1507 #line 184 "lwin_wkt_parse.y" /* yacc.c:1257 */
1508  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1509 #line 1487 "lwin_wkt_parse.c" /* yacc.c:1257 */
1510  break;
1511 
1512  case 46: /* patchring */
1513 #line 174 "lwin_wkt_parse.y" /* yacc.c:1257 */
1514  { ptarray_free(((*yyvaluep).ptarrayvalue)); }
1515 #line 1493 "lwin_wkt_parse.c" /* yacc.c:1257 */
1516  break;
1517 
1518  case 47: /* ring */
1519 #line 173 "lwin_wkt_parse.y" /* yacc.c:1257 */
1520  { ptarray_free(((*yyvaluep).ptarrayvalue)); }
1521 #line 1499 "lwin_wkt_parse.c" /* yacc.c:1257 */
1522  break;
1523 
1524  case 48: /* compoundcurve */
1525 #line 187 "lwin_wkt_parse.y" /* yacc.c:1257 */
1526  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1527 #line 1505 "lwin_wkt_parse.c" /* yacc.c:1257 */
1528  break;
1529 
1530  case 49: /* compound_list */
1531 #line 183 "lwin_wkt_parse.y" /* yacc.c:1257 */
1532  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1533 #line 1511 "lwin_wkt_parse.c" /* yacc.c:1257 */
1534  break;
1535 
1536  case 50: /* multicurve */
1537 #line 194 "lwin_wkt_parse.y" /* yacc.c:1257 */
1538  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1539 #line 1517 "lwin_wkt_parse.c" /* yacc.c:1257 */
1540  break;
1541 
1542  case 51: /* curve_list */
1543 #line 182 "lwin_wkt_parse.y" /* yacc.c:1257 */
1544  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1545 #line 1523 "lwin_wkt_parse.c" /* yacc.c:1257 */
1546  break;
1547 
1548  case 52: /* multilinestring */
1549 #line 195 "lwin_wkt_parse.y" /* yacc.c:1257 */
1550  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1551 #line 1529 "lwin_wkt_parse.c" /* yacc.c:1257 */
1552  break;
1553 
1554  case 53: /* linestring_list */
1555 #line 181 "lwin_wkt_parse.y" /* yacc.c:1257 */
1556  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1557 #line 1535 "lwin_wkt_parse.c" /* yacc.c:1257 */
1558  break;
1559 
1560  case 54: /* circularstring */
1561 #line 186 "lwin_wkt_parse.y" /* yacc.c:1257 */
1562  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1563 #line 1541 "lwin_wkt_parse.c" /* yacc.c:1257 */
1564  break;
1565 
1566  case 55: /* linestring */
1567 #line 192 "lwin_wkt_parse.y" /* yacc.c:1257 */
1568  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1569 #line 1547 "lwin_wkt_parse.c" /* yacc.c:1257 */
1570  break;
1571 
1572  case 56: /* linestring_untagged */
1573 #line 193 "lwin_wkt_parse.y" /* yacc.c:1257 */
1574  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1575 #line 1553 "lwin_wkt_parse.c" /* yacc.c:1257 */
1576  break;
1577 
1578  case 57: /* triangle_list */
1579 #line 176 "lwin_wkt_parse.y" /* yacc.c:1257 */
1580  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1581 #line 1559 "lwin_wkt_parse.c" /* yacc.c:1257 */
1582  break;
1583 
1584  case 58: /* triangle */
1585 #line 206 "lwin_wkt_parse.y" /* yacc.c:1257 */
1586  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1587 #line 1565 "lwin_wkt_parse.c" /* yacc.c:1257 */
1588  break;
1589 
1590  case 59: /* triangle_untagged */
1591 #line 207 "lwin_wkt_parse.y" /* yacc.c:1257 */
1592  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1593 #line 1571 "lwin_wkt_parse.c" /* yacc.c:1257 */
1594  break;
1595 
1596  case 60: /* multipoint */
1597 #line 196 "lwin_wkt_parse.y" /* yacc.c:1257 */
1598  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1599 #line 1577 "lwin_wkt_parse.c" /* yacc.c:1257 */
1600  break;
1601 
1602  case 61: /* point_list */
1603 #line 180 "lwin_wkt_parse.y" /* yacc.c:1257 */
1604  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1605 #line 1583 "lwin_wkt_parse.c" /* yacc.c:1257 */
1606  break;
1607 
1608  case 62: /* point_untagged */
1609 #line 200 "lwin_wkt_parse.y" /* yacc.c:1257 */
1610  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1611 #line 1589 "lwin_wkt_parse.c" /* yacc.c:1257 */
1612  break;
1613 
1614  case 63: /* point */
1615 #line 199 "lwin_wkt_parse.y" /* yacc.c:1257 */
1616  { lwgeom_free(((*yyvaluep).geometryvalue)); }
1617 #line 1595 "lwin_wkt_parse.c" /* yacc.c:1257 */
1618  break;
1619 
1620  case 64: /* ptarray */
1621 #line 172 "lwin_wkt_parse.y" /* yacc.c:1257 */
1622  { ptarray_free(((*yyvaluep).ptarrayvalue)); }
1623 #line 1601 "lwin_wkt_parse.c" /* yacc.c:1257 */
1624  break;
1625 
1626 
1627  default:
1628  break;
1629  }
1631 }
1632 
1633 
1634 
1635 
1636 /* The lookahead symbol. */
1638 
1639 /* The semantic value of the lookahead symbol. */
1641 /* Location data for the lookahead symbol. */
1643 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1644  = { 1, 1, 1, 1 }
1645 # endif
1646 ;
1647 /* Number of syntax errors so far. */
1649 
1650 
1651 /*----------.
1652 | yyparse. |
1653 `----------*/
1654 
1655 int
1656 yyparse (void)
1657 {
1658  int yystate;
1659  /* Number of tokens to shift before error messages enabled. */
1660  int yyerrstatus;
1661 
1662  /* The stacks and their tools:
1663  'yyss': related to states.
1664  'yyvs': related to semantic values.
1665  'yyls': related to locations.
1666 
1667  Refer to the stacks through separate pointers, to allow yyoverflow
1668  to reallocate them elsewhere. */
1669 
1670  /* The state stack. */
1671  yytype_int16 yyssa[YYINITDEPTH];
1672  yytype_int16 *yyss;
1673  yytype_int16 *yyssp;
1674 
1675  /* The semantic value stack. */
1676  YYSTYPE yyvsa[YYINITDEPTH];
1677  YYSTYPE *yyvs;
1678  YYSTYPE *yyvsp;
1679 
1680  /* The location stack. */
1681  YYLTYPE yylsa[YYINITDEPTH];
1682  YYLTYPE *yyls;
1683  YYLTYPE *yylsp;
1684 
1685  /* The locations where the error started and ended. */
1686  YYLTYPE yyerror_range[3];
1687 
1688  YYSIZE_T yystacksize;
1689 
1690  int yyn;
1691  int yyresult;
1692  /* Lookahead token as an internal (translated) token number. */
1693  int yytoken = 0;
1694  /* The variables used to return semantic value and location from the
1695  action routines. */
1696  YYSTYPE yyval;
1697  YYLTYPE yyloc;
1698 
1699 #if YYERROR_VERBOSE
1700  /* Buffer for error messages, and its allocated size. */
1701  char yymsgbuf[128];
1702  char *yymsg = yymsgbuf;
1703  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1704 #endif
1705 
1706 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1707 
1708  /* The number of symbols on the RHS of the reduced rule.
1709  Keep to zero when no symbol should be popped. */
1710  int yylen = 0;
1711 
1712  yyssp = yyss = yyssa;
1713  yyvsp = yyvs = yyvsa;
1714  yylsp = yyls = yylsa;
1715  yystacksize = YYINITDEPTH;
1716 
1717  YYDPRINTF ((stderr, "Starting parse\n"));
1718 
1719  yystate = 0;
1720  yyerrstatus = 0;
1721  yynerrs = 0;
1722  yychar = YYEMPTY; /* Cause a token to be read. */
1723  yylsp[0] = yylloc;
1724  goto yysetstate;
1725 
1726 /*------------------------------------------------------------.
1727 | yynewstate -- Push a new state, which is found in yystate. |
1728 `------------------------------------------------------------*/
1729  yynewstate:
1730  /* In all cases, when you get here, the value and location stacks
1731  have just been pushed. So pushing a state here evens the stacks. */
1732  yyssp++;
1733 
1734  yysetstate:
1735  *yyssp = yystate;
1736 
1737  if (yyss + yystacksize - 1 <= yyssp)
1738  {
1739  /* Get the current used size of the three stacks, in elements. */
1740  YYSIZE_T yysize = yyssp - yyss + 1;
1741 
1742 #ifdef yyoverflow
1743  {
1744  /* Give user a chance to reallocate the stack. Use copies of
1745  these so that the &'s don't force the real ones into
1746  memory. */
1747  YYSTYPE *yyvs1 = yyvs;
1748  yytype_int16 *yyss1 = yyss;
1749  YYLTYPE *yyls1 = yyls;
1750 
1751  /* Each stack pointer address is followed by the size of the
1752  data in use in that stack, in bytes. This used to be a
1753  conditional around just the two extra args, but that might
1754  be undefined if yyoverflow is a macro. */
1755  yyoverflow (YY_("memory exhausted"),
1756  &yyss1, yysize * sizeof (*yyssp),
1757  &yyvs1, yysize * sizeof (*yyvsp),
1758  &yyls1, yysize * sizeof (*yylsp),
1759  &yystacksize);
1760 
1761  yyls = yyls1;
1762  yyss = yyss1;
1763  yyvs = yyvs1;
1764  }
1765 #else /* no yyoverflow */
1766 # ifndef YYSTACK_RELOCATE
1767  goto yyexhaustedlab;
1768 # else
1769  /* Extend the stack our own way. */
1770  if (YYMAXDEPTH <= yystacksize)
1771  goto yyexhaustedlab;
1772  yystacksize *= 2;
1773  if (YYMAXDEPTH < yystacksize)
1774  yystacksize = YYMAXDEPTH;
1775 
1776  {
1777  yytype_int16 *yyss1 = yyss;
1778  union yyalloc *yyptr =
1779  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1780  if (! yyptr)
1781  goto yyexhaustedlab;
1782  YYSTACK_RELOCATE (yyss_alloc, yyss);
1783  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1784  YYSTACK_RELOCATE (yyls_alloc, yyls);
1785 # undef YYSTACK_RELOCATE
1786  if (yyss1 != yyssa)
1787  YYSTACK_FREE (yyss1);
1788  }
1789 # endif
1790 #endif /* no yyoverflow */
1791 
1792  yyssp = yyss + yysize - 1;
1793  yyvsp = yyvs + yysize - 1;
1794  yylsp = yyls + yysize - 1;
1795 
1796  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1797  (unsigned long int) yystacksize));
1798 
1799  if (yyss + yystacksize - 1 <= yyssp)
1800  YYABORT;
1801  }
1802 
1803  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1804 
1805  if (yystate == YYFINAL)
1806  YYACCEPT;
1807 
1808  goto yybackup;
1809 
1810 /*-----------.
1811 | yybackup. |
1812 `-----------*/
1813 yybackup:
1814 
1815  /* Do appropriate processing given the current state. Read a
1816  lookahead token if we need one and don't already have one. */
1817 
1818  /* First try to decide what to do without reference to lookahead token. */
1819  yyn = yypact[yystate];
1820  if (yypact_value_is_default (yyn))
1821  goto yydefault;
1822 
1823  /* Not known => get a lookahead token if don't already have one. */
1824 
1825  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1826  if (yychar == YYEMPTY)
1827  {
1828  YYDPRINTF ((stderr, "Reading a token: "));
1829  yychar = yylex ();
1830  }
1831 
1832  if (yychar <= YYEOF)
1833  {
1834  yychar = yytoken = YYEOF;
1835  YYDPRINTF ((stderr, "Now at end of input.\n"));
1836  }
1837  else
1838  {
1839  yytoken = YYTRANSLATE (yychar);
1840  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1841  }
1842 
1843  /* If the proper action on seeing token YYTOKEN is to reduce or to
1844  detect an error, take that action. */
1845  yyn += yytoken;
1846  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1847  goto yydefault;
1848  yyn = yytable[yyn];
1849  if (yyn <= 0)
1850  {
1851  if (yytable_value_is_error (yyn))
1852  goto yyerrlab;
1853  yyn = -yyn;
1854  goto yyreduce;
1855  }
1856 
1857  /* Count tokens shifted since error; after three, turn off error
1858  status. */
1859  if (yyerrstatus)
1860  yyerrstatus--;
1861 
1862  /* Shift the lookahead token. */
1863  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1864 
1865  /* Discard the shifted token. */
1866  yychar = YYEMPTY;
1867 
1868  yystate = yyn;
1870  *++yyvsp = yylval;
1872  *++yylsp = yylloc;
1873  goto yynewstate;
1874 
1875 
1876 /*-----------------------------------------------------------.
1877 | yydefault -- do the default action for the current state. |
1878 `-----------------------------------------------------------*/
1879 yydefault:
1880  yyn = yydefact[yystate];
1881  if (yyn == 0)
1882  goto yyerrlab;
1883  goto yyreduce;
1884 
1885 
1886 /*-----------------------------.
1887 | yyreduce -- Do a reduction. |
1888 `-----------------------------*/
1889 yyreduce:
1890  /* yyn is the number of a rule to reduce with. */
1891  yylen = yyr2[yyn];
1892 
1893  /* If YYLEN is nonzero, implement the default value of the action:
1894  '$$ = $1'.
1895 
1896  Otherwise, the following line sets YYVAL to garbage.
1897  This behavior is undocumented and Bison
1898  users should not rely upon it. Assigning to YYVAL
1899  unconditionally makes the parser a bit smaller, and it avoids a
1900  GCC warning that YYVAL may be used uninitialized. */
1901  yyval = yyvsp[1-yylen];
1902 
1903  /* Default location. */
1904  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1905  YY_REDUCE_PRINT (yyn);
1906  switch (yyn)
1907  {
1908  case 2:
1909 #line 213 "lwin_wkt_parse.y" /* yacc.c:1646 */
1910  { wkt_parser_geometry_new((yyvsp[0].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); }
1911 #line 1889 "lwin_wkt_parse.c" /* yacc.c:1646 */
1912  break;
1913 
1914  case 3:
1915 #line 215 "lwin_wkt_parse.y" /* yacc.c:1646 */
1916  { wkt_parser_geometry_new((yyvsp[0].geometryvalue), (yyvsp[-2].integervalue)); WKT_ERROR(); }
1917 #line 1895 "lwin_wkt_parse.c" /* yacc.c:1646 */
1918  break;
1919 
1920  case 4:
1921 #line 218 "lwin_wkt_parse.y" /* yacc.c:1646 */
1922  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1923 #line 1901 "lwin_wkt_parse.c" /* yacc.c:1646 */
1924  break;
1925 
1926  case 5:
1927 #line 219 "lwin_wkt_parse.y" /* yacc.c:1646 */
1928  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1929 #line 1907 "lwin_wkt_parse.c" /* yacc.c:1646 */
1930  break;
1931 
1932  case 6:
1933 #line 220 "lwin_wkt_parse.y" /* yacc.c:1646 */
1934  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1935 #line 1913 "lwin_wkt_parse.c" /* yacc.c:1646 */
1936  break;
1937 
1938  case 7:
1939 #line 221 "lwin_wkt_parse.y" /* yacc.c:1646 */
1940  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1941 #line 1919 "lwin_wkt_parse.c" /* yacc.c:1646 */
1942  break;
1943 
1944  case 8:
1945 #line 222 "lwin_wkt_parse.y" /* yacc.c:1646 */
1946  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1947 #line 1925 "lwin_wkt_parse.c" /* yacc.c:1646 */
1948  break;
1949 
1950  case 9:
1951 #line 223 "lwin_wkt_parse.y" /* yacc.c:1646 */
1952  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1953 #line 1931 "lwin_wkt_parse.c" /* yacc.c:1646 */
1954  break;
1955 
1956  case 10:
1957 #line 224 "lwin_wkt_parse.y" /* yacc.c:1646 */
1958  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1959 #line 1937 "lwin_wkt_parse.c" /* yacc.c:1646 */
1960  break;
1961 
1962  case 11:
1963 #line 225 "lwin_wkt_parse.y" /* yacc.c:1646 */
1964  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1965 #line 1943 "lwin_wkt_parse.c" /* yacc.c:1646 */
1966  break;
1967 
1968  case 12:
1969 #line 226 "lwin_wkt_parse.y" /* yacc.c:1646 */
1970  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1971 #line 1949 "lwin_wkt_parse.c" /* yacc.c:1646 */
1972  break;
1973 
1974  case 13:
1975 #line 227 "lwin_wkt_parse.y" /* yacc.c:1646 */
1976  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1977 #line 1955 "lwin_wkt_parse.c" /* yacc.c:1646 */
1978  break;
1979 
1980  case 14:
1981 #line 228 "lwin_wkt_parse.y" /* yacc.c:1646 */
1982  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1983 #line 1961 "lwin_wkt_parse.c" /* yacc.c:1646 */
1984  break;
1985 
1986  case 15:
1987 #line 229 "lwin_wkt_parse.y" /* yacc.c:1646 */
1988  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1989 #line 1967 "lwin_wkt_parse.c" /* yacc.c:1646 */
1990  break;
1991 
1992  case 16:
1993 #line 230 "lwin_wkt_parse.y" /* yacc.c:1646 */
1994  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
1995 #line 1973 "lwin_wkt_parse.c" /* yacc.c:1646 */
1996  break;
1997 
1998  case 17:
1999 #line 231 "lwin_wkt_parse.y" /* yacc.c:1646 */
2000  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2001 #line 1979 "lwin_wkt_parse.c" /* yacc.c:1646 */
2002  break;
2003 
2004  case 18:
2005 #line 232 "lwin_wkt_parse.y" /* yacc.c:1646 */
2006  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2007 #line 1985 "lwin_wkt_parse.c" /* yacc.c:1646 */
2008  break;
2009 
2010  case 19:
2011 #line 236 "lwin_wkt_parse.y" /* yacc.c:1646 */
2012  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2013 #line 1991 "lwin_wkt_parse.c" /* yacc.c:1646 */
2014  break;
2015 
2016  case 20:
2017 #line 238 "lwin_wkt_parse.y" /* yacc.c:1646 */
2018  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2019 #line 1997 "lwin_wkt_parse.c" /* yacc.c:1646 */
2020  break;
2021 
2022  case 21:
2023 #line 240 "lwin_wkt_parse.y" /* yacc.c:1646 */
2024  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2025 #line 2003 "lwin_wkt_parse.c" /* yacc.c:1646 */
2026  break;
2027 
2028  case 22:
2029 #line 242 "lwin_wkt_parse.y" /* yacc.c:1646 */
2031 #line 2009 "lwin_wkt_parse.c" /* yacc.c:1646 */
2032  break;
2033 
2034  case 23:
2035 #line 246 "lwin_wkt_parse.y" /* yacc.c:1646 */
2036  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2037 #line 2015 "lwin_wkt_parse.c" /* yacc.c:1646 */
2038  break;
2039 
2040  case 24:
2041 #line 248 "lwin_wkt_parse.y" /* yacc.c:1646 */
2042  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2043 #line 2021 "lwin_wkt_parse.c" /* yacc.c:1646 */
2044  break;
2045 
2046  case 25:
2047 #line 252 "lwin_wkt_parse.y" /* yacc.c:1646 */
2048  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2049 #line 2027 "lwin_wkt_parse.c" /* yacc.c:1646 */
2050  break;
2051 
2052  case 26:
2053 #line 254 "lwin_wkt_parse.y" /* yacc.c:1646 */
2054  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2055 #line 2033 "lwin_wkt_parse.c" /* yacc.c:1646 */
2056  break;
2057 
2058  case 27:
2059 #line 256 "lwin_wkt_parse.y" /* yacc.c:1646 */
2060  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2061 #line 2039 "lwin_wkt_parse.c" /* yacc.c:1646 */
2062  break;
2063 
2064  case 28:
2065 #line 258 "lwin_wkt_parse.y" /* yacc.c:1646 */
2067 #line 2045 "lwin_wkt_parse.c" /* yacc.c:1646 */
2068  break;
2069 
2070  case 29:
2071 #line 262 "lwin_wkt_parse.y" /* yacc.c:1646 */
2072  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2073 #line 2051 "lwin_wkt_parse.c" /* yacc.c:1646 */
2074  break;
2075 
2076  case 30:
2077 #line 264 "lwin_wkt_parse.y" /* yacc.c:1646 */
2078  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2079 #line 2057 "lwin_wkt_parse.c" /* yacc.c:1646 */
2080  break;
2081 
2082  case 31:
2083 #line 266 "lwin_wkt_parse.y" /* yacc.c:1646 */
2084  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2085 #line 2063 "lwin_wkt_parse.c" /* yacc.c:1646 */
2086  break;
2087 
2088  case 32:
2089 #line 268 "lwin_wkt_parse.y" /* yacc.c:1646 */
2090  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2091 #line 2069 "lwin_wkt_parse.c" /* yacc.c:1646 */
2092  break;
2093 
2094  case 33:
2095 #line 270 "lwin_wkt_parse.y" /* yacc.c:1646 */
2096  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2097 #line 2075 "lwin_wkt_parse.c" /* yacc.c:1646 */
2098  break;
2099 
2100  case 34:
2101 #line 272 "lwin_wkt_parse.y" /* yacc.c:1646 */
2102  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2103 #line 2081 "lwin_wkt_parse.c" /* yacc.c:1646 */
2104  break;
2105 
2106  case 35:
2107 #line 276 "lwin_wkt_parse.y" /* yacc.c:1646 */
2108  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2109 #line 2087 "lwin_wkt_parse.c" /* yacc.c:1646 */
2110  break;
2111 
2112  case 36:
2113 #line 278 "lwin_wkt_parse.y" /* yacc.c:1646 */
2114  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2115 #line 2093 "lwin_wkt_parse.c" /* yacc.c:1646 */
2116  break;
2117 
2118  case 37:
2119 #line 280 "lwin_wkt_parse.y" /* yacc.c:1646 */
2120  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2121 #line 2099 "lwin_wkt_parse.c" /* yacc.c:1646 */
2122  break;
2123 
2124  case 38:
2125 #line 282 "lwin_wkt_parse.y" /* yacc.c:1646 */
2126  { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); }
2127 #line 2105 "lwin_wkt_parse.c" /* yacc.c:1646 */
2128  break;
2129 
2130  case 39:
2131 #line 286 "lwin_wkt_parse.y" /* yacc.c:1646 */
2132  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2133 #line 2111 "lwin_wkt_parse.c" /* yacc.c:1646 */
2134  break;
2135 
2136  case 40:
2137 #line 288 "lwin_wkt_parse.y" /* yacc.c:1646 */
2138  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2139 #line 2117 "lwin_wkt_parse.c" /* yacc.c:1646 */
2140  break;
2141 
2142  case 41:
2143 #line 290 "lwin_wkt_parse.y" /* yacc.c:1646 */
2144  { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2145 #line 2123 "lwin_wkt_parse.c" /* yacc.c:1646 */
2146  break;
2147 
2148  case 42:
2149 #line 292 "lwin_wkt_parse.y" /* yacc.c:1646 */
2151 #line 2129 "lwin_wkt_parse.c" /* yacc.c:1646 */
2152  break;
2153 
2154  case 43:
2155 #line 296 "lwin_wkt_parse.y" /* yacc.c:1646 */
2156  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2157 #line 2135 "lwin_wkt_parse.c" /* yacc.c:1646 */
2158  break;
2159 
2160  case 44:
2161 #line 298 "lwin_wkt_parse.y" /* yacc.c:1646 */
2162  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2163 #line 2141 "lwin_wkt_parse.c" /* yacc.c:1646 */
2164  break;
2165 
2166  case 45:
2167 #line 300 "lwin_wkt_parse.y" /* yacc.c:1646 */
2168  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2169 #line 2147 "lwin_wkt_parse.c" /* yacc.c:1646 */
2170  break;
2171 
2172  case 46:
2173 #line 302 "lwin_wkt_parse.y" /* yacc.c:1646 */
2175 #line 2153 "lwin_wkt_parse.c" /* yacc.c:1646 */
2176  break;
2177 
2178  case 47:
2179 #line 306 "lwin_wkt_parse.y" /* yacc.c:1646 */
2180  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2181 #line 2159 "lwin_wkt_parse.c" /* yacc.c:1646 */
2182  break;
2183 
2184  case 48:
2185 #line 308 "lwin_wkt_parse.y" /* yacc.c:1646 */
2186  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2187 #line 2165 "lwin_wkt_parse.c" /* yacc.c:1646 */
2188  break;
2189 
2190  case 49:
2191 #line 312 "lwin_wkt_parse.y" /* yacc.c:1646 */
2192  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2193 #line 2171 "lwin_wkt_parse.c" /* yacc.c:1646 */
2194  break;
2195 
2196  case 50:
2197 #line 314 "lwin_wkt_parse.y" /* yacc.c:1646 */
2198  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2199 #line 2177 "lwin_wkt_parse.c" /* yacc.c:1646 */
2200  break;
2201 
2202  case 51:
2203 #line 318 "lwin_wkt_parse.y" /* yacc.c:1646 */
2204  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2205 #line 2183 "lwin_wkt_parse.c" /* yacc.c:1646 */
2206  break;
2207 
2208  case 52:
2209 #line 320 "lwin_wkt_parse.y" /* yacc.c:1646 */
2210  { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2211 #line 2189 "lwin_wkt_parse.c" /* yacc.c:1646 */
2212  break;
2213 
2214  case 53:
2215 #line 322 "lwin_wkt_parse.y" /* yacc.c:1646 */
2216  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2217 #line 2195 "lwin_wkt_parse.c" /* yacc.c:1646 */
2218  break;
2219 
2220  case 54:
2221 #line 324 "lwin_wkt_parse.y" /* yacc.c:1646 */
2222  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2223 #line 2201 "lwin_wkt_parse.c" /* yacc.c:1646 */
2224  break;
2225 
2226  case 55:
2227 #line 328 "lwin_wkt_parse.y" /* yacc.c:1646 */
2228  { (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
2229 #line 2207 "lwin_wkt_parse.c" /* yacc.c:1646 */
2230  break;
2231 
2232  case 56:
2233 #line 330 "lwin_wkt_parse.y" /* yacc.c:1646 */
2234  { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }
2235 #line 2213 "lwin_wkt_parse.c" /* yacc.c:1646 */
2236  break;
2237 
2238  case 57:
2239 #line 333 "lwin_wkt_parse.y" /* yacc.c:1646 */
2240  { (yyval.geometryvalue) = (yyvsp[-1].geometryvalue); }
2241 #line 2219 "lwin_wkt_parse.c" /* yacc.c:1646 */
2242  break;
2243 
2244  case 58:
2245 #line 337 "lwin_wkt_parse.y" /* yacc.c:1646 */
2246  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2247 #line 2225 "lwin_wkt_parse.c" /* yacc.c:1646 */
2248  break;
2249 
2250  case 59:
2251 #line 339 "lwin_wkt_parse.y" /* yacc.c:1646 */
2252  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2253 #line 2231 "lwin_wkt_parse.c" /* yacc.c:1646 */
2254  break;
2255 
2256  case 60:
2257 #line 341 "lwin_wkt_parse.y" /* yacc.c:1646 */
2258  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2259 #line 2237 "lwin_wkt_parse.c" /* yacc.c:1646 */
2260  break;
2261 
2262  case 61:
2263 #line 343 "lwin_wkt_parse.y" /* yacc.c:1646 */
2264  { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); }
2265 #line 2243 "lwin_wkt_parse.c" /* yacc.c:1646 */
2266  break;
2267 
2268  case 62:
2269 #line 347 "lwin_wkt_parse.y" /* yacc.c:1646 */
2270  { (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2271 #line 2249 "lwin_wkt_parse.c" /* yacc.c:1646 */
2272  break;
2273 
2274  case 63:
2275 #line 349 "lwin_wkt_parse.y" /* yacc.c:1646 */
2276  { (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2277 #line 2255 "lwin_wkt_parse.c" /* yacc.c:1646 */
2278  break;
2279 
2280  case 64:
2281 #line 352 "lwin_wkt_parse.y" /* yacc.c:1646 */
2282  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2283 #line 2261 "lwin_wkt_parse.c" /* yacc.c:1646 */
2284  break;
2285 
2286  case 65:
2287 #line 353 "lwin_wkt_parse.y" /* yacc.c:1646 */
2288  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2289 #line 2267 "lwin_wkt_parse.c" /* yacc.c:1646 */
2290  break;
2291 
2292  case 66:
2293 #line 354 "lwin_wkt_parse.y" /* yacc.c:1646 */
2294  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2295 #line 2273 "lwin_wkt_parse.c" /* yacc.c:1646 */
2296  break;
2297 
2298  case 67:
2299 #line 355 "lwin_wkt_parse.y" /* yacc.c:1646 */
2300  { (yyval.geometryvalue) = (yyvsp[0].geometryvalue); }
2301 #line 2279 "lwin_wkt_parse.c" /* yacc.c:1646 */
2302  break;
2303 
2304  case 68:
2305 #line 359 "lwin_wkt_parse.y" /* yacc.c:1646 */
2306  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
2307 #line 2285 "lwin_wkt_parse.c" /* yacc.c:1646 */
2308  break;
2309 
2310  case 69:
2311 #line 361 "lwin_wkt_parse.y" /* yacc.c:1646 */
2312  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'Z'); WKT_ERROR(); }
2313 #line 2291 "lwin_wkt_parse.c" /* yacc.c:1646 */
2314  break;
2315 
2316  case 70:
2317 #line 365 "lwin_wkt_parse.y" /* yacc.c:1646 */
2318  { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue),(yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
2319 #line 2297 "lwin_wkt_parse.c" /* yacc.c:1646 */
2320  break;
2321 
2322  case 71:
2323 #line 367 "lwin_wkt_parse.y" /* yacc.c:1646 */
2324  { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue),'2'); WKT_ERROR(); }
2325 #line 2303 "lwin_wkt_parse.c" /* yacc.c:1646 */
2326  break;
2327 
2328  case 72:
2329 #line 370 "lwin_wkt_parse.y" /* yacc.c:1646 */
2330  { (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
2331 #line 2309 "lwin_wkt_parse.c" /* yacc.c:1646 */
2332  break;
2333 
2334  case 73:
2335 #line 373 "lwin_wkt_parse.y" /* yacc.c:1646 */
2336  { (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue); }
2337 #line 2315 "lwin_wkt_parse.c" /* yacc.c:1646 */
2338  break;
2339 
2340  case 74:
2341 #line 377 "lwin_wkt_parse.y" /* yacc.c:1646 */
2342  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2343 #line 2321 "lwin_wkt_parse.c" /* yacc.c:1646 */
2344  break;
2345 
2346  case 75:
2347 #line 379 "lwin_wkt_parse.y" /* yacc.c:1646 */
2348  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2349 #line 2327 "lwin_wkt_parse.c" /* yacc.c:1646 */
2350  break;
2351 
2352  case 76:
2353 #line 381 "lwin_wkt_parse.y" /* yacc.c:1646 */
2354  { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2355 #line 2333 "lwin_wkt_parse.c" /* yacc.c:1646 */
2356  break;
2357 
2358  case 77:
2359 #line 383 "lwin_wkt_parse.y" /* yacc.c:1646 */
2361 #line 2339 "lwin_wkt_parse.c" /* yacc.c:1646 */
2362  break;
2363 
2364  case 78:
2365 #line 387 "lwin_wkt_parse.y" /* yacc.c:1646 */
2366  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2367 #line 2345 "lwin_wkt_parse.c" /* yacc.c:1646 */
2368  break;
2369 
2370  case 79:
2371 #line 389 "lwin_wkt_parse.y" /* yacc.c:1646 */
2372  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2373 #line 2351 "lwin_wkt_parse.c" /* yacc.c:1646 */
2374  break;
2375 
2376  case 80:
2377 #line 391 "lwin_wkt_parse.y" /* yacc.c:1646 */
2378  { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2379 #line 2357 "lwin_wkt_parse.c" /* yacc.c:1646 */
2380  break;
2381 
2382  case 81:
2383 #line 393 "lwin_wkt_parse.y" /* yacc.c:1646 */
2384  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2385 #line 2363 "lwin_wkt_parse.c" /* yacc.c:1646 */
2386  break;
2387 
2388  case 82:
2389 #line 395 "lwin_wkt_parse.y" /* yacc.c:1646 */
2390  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2391 #line 2369 "lwin_wkt_parse.c" /* yacc.c:1646 */
2392  break;
2393 
2394  case 83:
2395 #line 397 "lwin_wkt_parse.y" /* yacc.c:1646 */
2396  { (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2397 #line 2375 "lwin_wkt_parse.c" /* yacc.c:1646 */
2398  break;
2399 
2400  case 84:
2401 #line 401 "lwin_wkt_parse.y" /* yacc.c:1646 */
2402  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2403 #line 2381 "lwin_wkt_parse.c" /* yacc.c:1646 */
2404  break;
2405 
2406  case 85:
2407 #line 403 "lwin_wkt_parse.y" /* yacc.c:1646 */
2408  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2409 #line 2387 "lwin_wkt_parse.c" /* yacc.c:1646 */
2410  break;
2411 
2412  case 86:
2413 #line 405 "lwin_wkt_parse.y" /* yacc.c:1646 */
2414  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2415 #line 2393 "lwin_wkt_parse.c" /* yacc.c:1646 */
2416  break;
2417 
2418  case 87:
2419 #line 407 "lwin_wkt_parse.y" /* yacc.c:1646 */
2421 #line 2399 "lwin_wkt_parse.c" /* yacc.c:1646 */
2422  break;
2423 
2424  case 88:
2425 #line 411 "lwin_wkt_parse.y" /* yacc.c:1646 */
2426  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2427 #line 2405 "lwin_wkt_parse.c" /* yacc.c:1646 */
2428  break;
2429 
2430  case 89:
2431 #line 413 "lwin_wkt_parse.y" /* yacc.c:1646 */
2432  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2433 #line 2411 "lwin_wkt_parse.c" /* yacc.c:1646 */
2434  break;
2435 
2436  case 90:
2437 #line 415 "lwin_wkt_parse.y" /* yacc.c:1646 */
2438  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2439 #line 2417 "lwin_wkt_parse.c" /* yacc.c:1646 */
2440  break;
2441 
2442  case 91:
2443 #line 417 "lwin_wkt_parse.y" /* yacc.c:1646 */
2444  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2445 #line 2423 "lwin_wkt_parse.c" /* yacc.c:1646 */
2446  break;
2447 
2448  case 92:
2449 #line 419 "lwin_wkt_parse.y" /* yacc.c:1646 */
2450  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2451 #line 2429 "lwin_wkt_parse.c" /* yacc.c:1646 */
2452  break;
2453 
2454  case 93:
2455 #line 421 "lwin_wkt_parse.y" /* yacc.c:1646 */
2456  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2457 #line 2435 "lwin_wkt_parse.c" /* yacc.c:1646 */
2458  break;
2459 
2460  case 94:
2461 #line 423 "lwin_wkt_parse.y" /* yacc.c:1646 */
2462  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2463 #line 2441 "lwin_wkt_parse.c" /* yacc.c:1646 */
2464  break;
2465 
2466  case 95:
2467 #line 425 "lwin_wkt_parse.y" /* yacc.c:1646 */
2468  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2469 #line 2447 "lwin_wkt_parse.c" /* yacc.c:1646 */
2470  break;
2471 
2472  case 96:
2473 #line 429 "lwin_wkt_parse.y" /* yacc.c:1646 */
2474  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2475 #line 2453 "lwin_wkt_parse.c" /* yacc.c:1646 */
2476  break;
2477 
2478  case 97:
2479 #line 431 "lwin_wkt_parse.y" /* yacc.c:1646 */
2480  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2481 #line 2459 "lwin_wkt_parse.c" /* yacc.c:1646 */
2482  break;
2483 
2484  case 98:
2485 #line 433 "lwin_wkt_parse.y" /* yacc.c:1646 */
2486  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2487 #line 2465 "lwin_wkt_parse.c" /* yacc.c:1646 */
2488  break;
2489 
2490  case 99:
2491 #line 435 "lwin_wkt_parse.y" /* yacc.c:1646 */
2493 #line 2471 "lwin_wkt_parse.c" /* yacc.c:1646 */
2494  break;
2495 
2496  case 100:
2497 #line 439 "lwin_wkt_parse.y" /* yacc.c:1646 */
2498  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2499 #line 2477 "lwin_wkt_parse.c" /* yacc.c:1646 */
2500  break;
2501 
2502  case 101:
2503 #line 441 "lwin_wkt_parse.y" /* yacc.c:1646 */
2504  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2505 #line 2483 "lwin_wkt_parse.c" /* yacc.c:1646 */
2506  break;
2507 
2508  case 102:
2509 #line 445 "lwin_wkt_parse.y" /* yacc.c:1646 */
2510  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2511 #line 2489 "lwin_wkt_parse.c" /* yacc.c:1646 */
2512  break;
2513 
2514  case 103:
2515 #line 447 "lwin_wkt_parse.y" /* yacc.c:1646 */
2516  { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2517 #line 2495 "lwin_wkt_parse.c" /* yacc.c:1646 */
2518  break;
2519 
2520  case 104:
2521 #line 449 "lwin_wkt_parse.y" /* yacc.c:1646 */
2522  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2523 #line 2501 "lwin_wkt_parse.c" /* yacc.c:1646 */
2524  break;
2525 
2526  case 105:
2527 #line 451 "lwin_wkt_parse.y" /* yacc.c:1646 */
2528  { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); }
2529 #line 2507 "lwin_wkt_parse.c" /* yacc.c:1646 */
2530  break;
2531 
2532  case 106:
2533 #line 455 "lwin_wkt_parse.y" /* yacc.c:1646 */
2534  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2535 #line 2513 "lwin_wkt_parse.c" /* yacc.c:1646 */
2536  break;
2537 
2538  case 107:
2539 #line 457 "lwin_wkt_parse.y" /* yacc.c:1646 */
2540  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2541 #line 2519 "lwin_wkt_parse.c" /* yacc.c:1646 */
2542  break;
2543 
2544  case 108:
2545 #line 459 "lwin_wkt_parse.y" /* yacc.c:1646 */
2546  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2547 #line 2525 "lwin_wkt_parse.c" /* yacc.c:1646 */
2548  break;
2549 
2550  case 109:
2551 #line 461 "lwin_wkt_parse.y" /* yacc.c:1646 */
2552  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2553 #line 2531 "lwin_wkt_parse.c" /* yacc.c:1646 */
2554  break;
2555 
2556  case 110:
2557 #line 465 "lwin_wkt_parse.y" /* yacc.c:1646 */
2558  { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2559 #line 2537 "lwin_wkt_parse.c" /* yacc.c:1646 */
2560  break;
2561 
2562  case 111:
2563 #line 467 "lwin_wkt_parse.y" /* yacc.c:1646 */
2564  { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }
2565 #line 2543 "lwin_wkt_parse.c" /* yacc.c:1646 */
2566  break;
2567 
2568  case 112:
2569 #line 471 "lwin_wkt_parse.y" /* yacc.c:1646 */
2570  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2571 #line 2549 "lwin_wkt_parse.c" /* yacc.c:1646 */
2572  break;
2573 
2574  case 113:
2575 #line 473 "lwin_wkt_parse.y" /* yacc.c:1646 */
2576  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2577 #line 2555 "lwin_wkt_parse.c" /* yacc.c:1646 */
2578  break;
2579 
2580  case 114:
2581 #line 477 "lwin_wkt_parse.y" /* yacc.c:1646 */
2582  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
2583 #line 2561 "lwin_wkt_parse.c" /* yacc.c:1646 */
2584  break;
2585 
2586  case 115:
2587 #line 479 "lwin_wkt_parse.y" /* yacc.c:1646 */
2588  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), (yyvsp[-5].stringvalue)); WKT_ERROR(); }
2589 #line 2567 "lwin_wkt_parse.c" /* yacc.c:1646 */
2590  break;
2591 
2592  case 116:
2593 #line 481 "lwin_wkt_parse.y" /* yacc.c:1646 */
2594  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2595 #line 2573 "lwin_wkt_parse.c" /* yacc.c:1646 */
2596  break;
2597 
2598  case 117:
2599 #line 483 "lwin_wkt_parse.y" /* yacc.c:1646 */
2600  { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); }
2601 #line 2579 "lwin_wkt_parse.c" /* yacc.c:1646 */
2602  break;
2603 
2604  case 118:
2605 #line 487 "lwin_wkt_parse.y" /* yacc.c:1646 */
2606  { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL); WKT_ERROR(); }
2607 #line 2585 "lwin_wkt_parse.c" /* yacc.c:1646 */
2608  break;
2609 
2610  case 119:
2611 #line 491 "lwin_wkt_parse.y" /* yacc.c:1646 */
2612  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), NULL); WKT_ERROR(); }
2613 #line 2591 "lwin_wkt_parse.c" /* yacc.c:1646 */
2614  break;
2615 
2616  case 120:
2617 #line 493 "lwin_wkt_parse.y" /* yacc.c:1646 */
2618  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2619 #line 2597 "lwin_wkt_parse.c" /* yacc.c:1646 */
2620  break;
2621 
2622  case 121:
2623 #line 495 "lwin_wkt_parse.y" /* yacc.c:1646 */
2624  { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2625 #line 2603 "lwin_wkt_parse.c" /* yacc.c:1646 */
2626  break;
2627 
2628  case 122:
2629 #line 497 "lwin_wkt_parse.y" /* yacc.c:1646 */
2631 #line 2609 "lwin_wkt_parse.c" /* yacc.c:1646 */
2632  break;
2633 
2634  case 123:
2635 #line 501 "lwin_wkt_parse.y" /* yacc.c:1646 */
2636  { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue),(yyvsp[0].geometryvalue)); WKT_ERROR(); }
2637 #line 2615 "lwin_wkt_parse.c" /* yacc.c:1646 */
2638  break;
2639 
2640  case 124:
2641 #line 503 "lwin_wkt_parse.y" /* yacc.c:1646 */
2642  { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue)); WKT_ERROR(); }
2643 #line 2621 "lwin_wkt_parse.c" /* yacc.c:1646 */
2644  break;
2645 
2646  case 125:
2647 #line 507 "lwin_wkt_parse.y" /* yacc.c:1646 */
2648  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)),NULL); WKT_ERROR(); }
2649 #line 2627 "lwin_wkt_parse.c" /* yacc.c:1646 */
2650  break;
2651 
2652  case 126:
2653 #line 509 "lwin_wkt_parse.y" /* yacc.c:1646 */
2654  { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[-1].coordinatevalue)),NULL); WKT_ERROR(); }
2655 #line 2633 "lwin_wkt_parse.c" /* yacc.c:1646 */
2656  break;
2657 
2658  case 127:
2659 #line 511 "lwin_wkt_parse.y" /* yacc.c:1646 */
2660  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }
2661 #line 2639 "lwin_wkt_parse.c" /* yacc.c:1646 */
2662  break;
2663 
2664  case 128:
2665 #line 515 "lwin_wkt_parse.y" /* yacc.c:1646 */
2666  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), NULL); WKT_ERROR(); }
2667 #line 2645 "lwin_wkt_parse.c" /* yacc.c:1646 */
2668  break;
2669 
2670  case 129:
2671 #line 517 "lwin_wkt_parse.y" /* yacc.c:1646 */
2672  { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue)); WKT_ERROR(); }
2673 #line 2651 "lwin_wkt_parse.c" /* yacc.c:1646 */
2674  break;
2675 
2676  case 130:
2677 #line 519 "lwin_wkt_parse.y" /* yacc.c:1646 */
2678  { (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[-1].stringvalue)); WKT_ERROR(); }
2679 #line 2657 "lwin_wkt_parse.c" /* yacc.c:1646 */
2680  break;
2681 
2682  case 131:
2683 #line 521 "lwin_wkt_parse.y" /* yacc.c:1646 */
2684  { (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); }
2685 #line 2663 "lwin_wkt_parse.c" /* yacc.c:1646 */
2686  break;
2687 
2688  case 132:
2689 #line 525 "lwin_wkt_parse.y" /* yacc.c:1646 */
2690  { (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue), (yyvsp[0].coordinatevalue)); WKT_ERROR(); }
2691 #line 2669 "lwin_wkt_parse.c" /* yacc.c:1646 */
2692  break;
2693 
2694  case 133:
2695 #line 527 "lwin_wkt_parse.y" /* yacc.c:1646 */
2696  { (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)); WKT_ERROR(); }
2697 #line 2675 "lwin_wkt_parse.c" /* yacc.c:1646 */
2698  break;
2699 
2700  case 134:
2701 #line 531 "lwin_wkt_parse.y" /* yacc.c:1646 */
2702  { (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2703 #line 2681 "lwin_wkt_parse.c" /* yacc.c:1646 */
2704  break;
2705 
2706  case 135:
2707 #line 533 "lwin_wkt_parse.y" /* yacc.c:1646 */
2708  { (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2709 #line 2687 "lwin_wkt_parse.c" /* yacc.c:1646 */
2710  break;
2711 
2712  case 136:
2713 #line 535 "lwin_wkt_parse.y" /* yacc.c:1646 */
2714  { (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[-3].doublevalue), (yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue)); WKT_ERROR(); }
2715 #line 2693 "lwin_wkt_parse.c" /* yacc.c:1646 */
2716  break;
2717 
2718 
2719 #line 2697 "lwin_wkt_parse.c" /* yacc.c:1646 */
2720  default: break;
2721  }
2722  /* User semantic actions sometimes alter yychar, and that requires
2723  that yytoken be updated with the new translation. We take the
2724  approach of translating immediately before every use of yytoken.
2725  One alternative is translating here after every semantic action,
2726  but that translation would be missed if the semantic action invokes
2727  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2728  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2729  incorrect destructor might then be invoked immediately. In the
2730  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2731  to an incorrect destructor call or verbose syntax error message
2732  before the lookahead is translated. */
2733  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2734 
2735  YYPOPSTACK (yylen);
2736  yylen = 0;
2737  YY_STACK_PRINT (yyss, yyssp);
2738 
2739  *++yyvsp = yyval;
2740  *++yylsp = yyloc;
2741 
2742  /* Now 'shift' the result of the reduction. Determine what state
2743  that goes to, based on the state we popped back to and the rule
2744  number reduced by. */
2745 
2746  yyn = yyr1[yyn];
2747 
2748  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2749  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2750  yystate = yytable[yystate];
2751  else
2752  yystate = yydefgoto[yyn - YYNTOKENS];
2753 
2754  goto yynewstate;
2755 
2756 
2757 /*--------------------------------------.
2758 | yyerrlab -- here on detecting error. |
2759 `--------------------------------------*/
2760 yyerrlab:
2761  /* Make sure we have latest lookahead translation. See comments at
2762  user semantic actions for why this is necessary. */
2763  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2764 
2765  /* If not already recovering from an error, report this error. */
2766  if (!yyerrstatus)
2767  {
2768  ++yynerrs;
2769 #if ! YYERROR_VERBOSE
2770  yyerror (YY_("syntax error"));
2771 #else
2772 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2773  yyssp, yytoken)
2774  {
2775  char const *yymsgp = YY_("syntax error");
2776  int yysyntax_error_status;
2777  yysyntax_error_status = YYSYNTAX_ERROR;
2778  if (yysyntax_error_status == 0)
2779  yymsgp = yymsg;
2780  else if (yysyntax_error_status == 1)
2781  {
2782  if (yymsg != yymsgbuf)
2783  YYSTACK_FREE (yymsg);
2784  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2785  if (!yymsg)
2786  {
2787  yymsg = yymsgbuf;
2788  yymsg_alloc = sizeof yymsgbuf;
2789  yysyntax_error_status = 2;
2790  }
2791  else
2792  {
2793  yysyntax_error_status = YYSYNTAX_ERROR;
2794  yymsgp = yymsg;
2795  }
2796  }
2797  yyerror (yymsgp);
2798  if (yysyntax_error_status == 2)
2799  goto yyexhaustedlab;
2800  }
2801 # undef YYSYNTAX_ERROR
2802 #endif
2803  }
2804 
2805  yyerror_range[1] = yylloc;
2806 
2807  if (yyerrstatus == 3)
2808  {
2809  /* If just tried and failed to reuse lookahead token after an
2810  error, discard it. */
2811 
2812  if (yychar <= YYEOF)
2813  {
2814  /* Return failure if at end of input. */
2815  if (yychar == YYEOF)
2816  YYABORT;
2817  }
2818  else
2819  {
2820  yydestruct ("Error: discarding",
2821  yytoken, &yylval, &yylloc);
2822  yychar = YYEMPTY;
2823  }
2824  }
2825 
2826  /* Else will try to reuse lookahead token after shifting the error
2827  token. */
2828  goto yyerrlab1;
2829 
2830 
2831 /*---------------------------------------------------.
2832 | yyerrorlab -- error raised explicitly by YYERROR. |
2833 `---------------------------------------------------*/
2834 yyerrorlab:
2835 
2836  /* Pacify compilers like GCC when the user code never invokes
2837  YYERROR and the label yyerrorlab therefore never appears in user
2838  code. */
2839  if (/*CONSTCOND*/ 0)
2840  goto yyerrorlab;
2841 
2842  yyerror_range[1] = yylsp[1-yylen];
2843  /* Do not reclaim the symbols of the rule whose action triggered
2844  this YYERROR. */
2845  YYPOPSTACK (yylen);
2846  yylen = 0;
2847  YY_STACK_PRINT (yyss, yyssp);
2848  yystate = *yyssp;
2849  goto yyerrlab1;
2850 
2851 
2852 /*-------------------------------------------------------------.
2853 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2854 `-------------------------------------------------------------*/
2855 yyerrlab1:
2856  yyerrstatus = 3; /* Each real token shifted decrements this. */
2857 
2858  for (;;)
2859  {
2860  yyn = yypact[yystate];
2861  if (!yypact_value_is_default (yyn))
2862  {
2863  yyn += YYTERROR;
2864  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2865  {
2866  yyn = yytable[yyn];
2867  if (0 < yyn)
2868  break;
2869  }
2870  }
2871 
2872  /* Pop the current state because it cannot handle the error token. */
2873  if (yyssp == yyss)
2874  YYABORT;
2875 
2876  yyerror_range[1] = *yylsp;
2877  yydestruct ("Error: popping",
2878  yystos[yystate], yyvsp, yylsp);
2879  YYPOPSTACK (1);
2880  yystate = *yyssp;
2881  YY_STACK_PRINT (yyss, yyssp);
2882  }
2883 
2885  *++yyvsp = yylval;
2887 
2888  yyerror_range[2] = yylloc;
2889  /* Using YYLLOC is tempting, but would change the location of
2890  the lookahead. YYLOC is available though. */
2891  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2892  *++yylsp = yyloc;
2893 
2894  /* Shift the error token. */
2895  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2896 
2897  yystate = yyn;
2898  goto yynewstate;
2899 
2900 
2901 /*-------------------------------------.
2902 | yyacceptlab -- YYACCEPT comes here. |
2903 `-------------------------------------*/
2904 yyacceptlab:
2905  yyresult = 0;
2906  goto yyreturn;
2907 
2908 /*-----------------------------------.
2909 | yyabortlab -- YYABORT comes here. |
2910 `-----------------------------------*/
2911 yyabortlab:
2912  yyresult = 1;
2913  goto yyreturn;
2914 
2915 #if !defined yyoverflow || YYERROR_VERBOSE
2916 /*-------------------------------------------------.
2917 | yyexhaustedlab -- memory exhaustion comes here. |
2918 `-------------------------------------------------*/
2919 yyexhaustedlab:
2920  yyerror (YY_("memory exhausted"));
2921  yyresult = 2;
2922  /* Fall through. */
2923 #endif
2924 
2925 yyreturn:
2926  if (yychar != YYEMPTY)
2927  {
2928  /* Make sure we have latest lookahead translation. See comments at
2929  user semantic actions for why this is necessary. */
2930  yytoken = YYTRANSLATE (yychar);
2931  yydestruct ("Cleanup: discarding lookahead",
2932  yytoken, &yylval, &yylloc);
2933  }
2934  /* Do not reclaim the symbols of the rule whose action triggered
2935  this YYABORT or YYACCEPT. */
2936  YYPOPSTACK (yylen);
2937  YY_STACK_PRINT (yyss, yyssp);
2938  while (yyssp != yyss)
2939  {
2940  yydestruct ("Cleanup: popping",
2941  yystos[*yyssp], yyvsp, yylsp);
2942  YYPOPSTACK (1);
2943  }
2944 #ifndef yyoverflow
2945  if (yyss != yyssa)
2946  YYSTACK_FREE (yyss);
2947 #endif
2948 #if YYERROR_VERBOSE
2949  if (yymsg != yymsgbuf)
2950  YYSTACK_FREE (yymsg);
2951 #endif
2952  return yyresult;
2953 }
2954 #line 537 "lwin_wkt_parse.y" /* yacc.c:1906 */
2955 
2956 
#define LBRACKET_TOK
LWGEOM * wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:535
#define YYCASE_(N, S)
#define LINESTRING_TOK
#define YYABORT
LWGEOM * wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality)
Definition: lwin_wkt.c:424
#define yylex
#define COMPOUNDCURVE_TOK
#define CURVEPOLYGON_TOK
tuple res
Definition: window.py:78
short int yytype_int16
#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 yydebug
#define MULTICURVETYPE
Definition: liblwgeom.h:94
unsigned short int yytype_uint16
#define YY_NULLPTR
LWGEOM * wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:791
#define MLINESTRING_TOK
int first_line
#define yypact_value_is_default(Yystate)
int wkt_yylex_destroy(void)
static YYSIZE_T yystrlen(const char *yystr)
static const yytype_uint8 yydefact[]
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:485
#define YY_ATTRIBUTE_UNUSED
#define DOUBLE_TOK
#define MPOINT_TOK
char * stringvalue
POINTARRAY * ptarrayvalue
yytype_int16 yyss_alloc
#define YYUSE(E)
LWGEOM * wkt_parser_curvepolygon_new(LWGEOM *ring)
Definition: lwin_wkt.c:567
#define yyparse
#define YYINITDEPTH
LWGEOM * wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality)
Create a new circularstring.
Definition: lwin_wkt.c:388
#define YYFINAL
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
void ptarray_free(POINTARRAY *pa)
Definition: ptarray.c:328
#define COMPOUNDTYPE
Definition: liblwgeom.h:92
#define MULTIPOINTTYPE
Definition: liblwgeom.h:87
#define POLYGON_TOK
YYLTYPE yyls_alloc
#define LW_SUCCESS
Definition: liblwgeom.h:79
#define POINT_TOK
LWGEOM * wkt_parser_collection_new(LWGEOM *geom)
Definition: lwin_wkt.c:698
void wkt_yyerror(const char *str)
#define YYTERROR
#define MPOLYGON_TOK
static char * yystpcpy(char *yydest, const char *yysrc)
#define POLYHEDRALSURFACETYPE
Definition: liblwgeom.h:96
#define YYEOF
#define YYEMPTY
#define DIMENSIONALITY_TOK
#define YYTRANSLATE(YYX)
#define COMMA_TOK
static const yytype_uint8 yycheck[]
signed char yytype_int8
#define LW_FAILURE
Definition: liblwgeom.h:78
LWGEOM * wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality)
Create a new linestring.
Definition: lwin_wkt.c:354
#define YYSTACK_ALLOC
#define yynerrs
void wkt_lexer_init(char *str)
Definition: lwin_wkt_lex.c:662
int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parser_check_flags)
Parse a WKT geometry string into an LWGEOM structure.
#define yyerror
static const yytype_uint8 yytranslate[]
static const yytype_uint8 yyr1[]
LWGEOM * geometryvalue
yytokentype
#define yytable_value_is_error(Yytable_value)
int last_column
LWGEOM * wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality)
Definition: lwin_wkt.c:666
YYLTYPE wkt_yylloc
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
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM...
Definition: liblwgeom.h:2005
#define MSURFACE_TOK
#define YYSTACK_ALLOC_MAXIMUM
#define EMPTY_TOK
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:187
#define TINTYPE
Definition: liblwgeom.h:98
static const yytype_uint8 yyr2[]
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
#define RBRACKET_TOK
static const yytype_uint8 yystos[]
#define yylval
int integervalue
void wkt_lexer_close(void)
Definition: lwin_wkt_lex.c:670
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
double doublevalue
#define TRIANGLE_TOK
static const yytype_int16 yypgoto[]
#define YYSTACK_BYTES(N)
Definition: lwin_wkt.h:32
#define SRID_TOK
#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:89
#define YYACCEPT
static const char *const yytname[]
LWGEOM * wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom)
Definition: lwin_wkt.c:759
#define SEMICOLON_TOK
#define YYLLOC_DEFAULT(Current, Rhs, N)
LWGEOM * wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:460
#define YY_(Msgid)
int first_column
const char * parser_error_messages[]
Definition: lwin_wkt.c:37
#define MULTISURFACETYPE
Definition: liblwgeom.h:95
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:237
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
#define TIN_TOK
void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:879
#define YYSYNTAX_ERROR
#define YYSTACK_FREE
YYSTYPE yyvs_alloc
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
int wkt_yylex(void)
#define WKT_ERROR()
void wkt_parser_geometry_new(LWGEOM *geom, int srid)
Definition: lwin_wkt.c:859
void free(void *)
LWGEOM_PARSER_RESULT global_parser_result
void * malloc(YYSIZE_T)
#define POLYHEDRALSURFACE_TOK
LWGEOM * wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring)
Definition: lwin_wkt.c:585
#define CIRCULARSTRING_TOK
#define YY_REDUCE_PRINT(Rule)
#define YYSIZE_T
static const yytype_int16 yypact[]
#define MULTILINETYPE
Definition: liblwgeom.h:88
#define YYLAST
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
int wkt_yyparse(void)
#define COLLECTION_TOK
unsigned char yytype_uint8
#define YYMAXDEPTH
static const yytype_int16 yydefgoto[]
#define MCURVE_TOK
int wkt_yydebug
YYSTYPE wkt_yylval
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:2030
#define COLLECTIONTYPE
Definition: liblwgeom.h:90
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)