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