Coverage Report

Created: 2026-12-01 06:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/postgis/liblwgeom/lwin_wkt_parse.c
Line
Count
Source
1
/* A Bison parser, made by GNU Bison 3.8.2.  */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6
   Inc.
7
8
   This program is free software: you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation, either version 3 of the License, or
11
   (at your option) any later version.
12
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
18
   You should have received a copy of the GNU General Public License
19
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
20
21
/* As a special exception, you may create a larger work that contains
22
   part or all of the Bison parser skeleton and distribute that work
23
   under terms of your choice, so long as that work isn't itself a
24
   parser generator using the skeleton or a modified version thereof
25
   as a parser skeleton.  Alternatively, if you modify or redistribute
26
   the parser skeleton itself, you may (at your option) remove this
27
   special exception, which will cause the skeleton and the resulting
28
   Bison output files to be licensed under the GNU General Public
29
   License without this special exception.
30
31
   This special exception was added by the Free Software Foundation in
32
   version 2.2 of Bison.  */
33
34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
   simplifying the original so-called "semantic" parser.  */
36
37
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38
   especially those whose name start with YY_ or yy_.  They are
39
   private implementation details that can be changed or removed.  */
40
41
/* All symbols defined below should begin with yy or YY, to avoid
42
   infringing on user name space.  This should be done even for local
43
   variables, as they might otherwise be expanded by user macros.
44
   There are some unavoidable exceptions within include files to
45
   define necessary library symbols; they are noted "INFRINGES ON
46
   USER NAME SPACE" below.  */
47
48
/* Identify Bison output, and Bison version.  */
49
#define YYBISON 30802
50
51
/* Bison version string.  */
52
#define YYBISON_VERSION "3.8.2"
53
54
/* Skeleton name.  */
55
#define YYSKELETON_NAME "yacc.c"
56
57
/* Pure parsers.  */
58
#define YYPURE 0
59
60
/* Push parsers.  */
61
#define YYPUSH 0
62
63
/* Pull parsers.  */
64
#define YYPULL 1
65
66
/* Substitute the variable and function names.  */
67
#define yyparse wkt_yyparse
68
2.49M
#define yylex wkt_yylex
69
1.63k
#define yyerror wkt_yyerror
70
#define yydebug wkt_yydebug
71
2.06k
#define yynerrs wkt_yynerrs
72
2.49M
#define yylval wkt_yylval
73
14.2M
#define yychar wkt_yychar
74
2.50M
#define yylloc wkt_yylloc
75
76
/* First part of user prologue.  */
77
#line 1 "lwin_wkt_parse.y"
78
79
/* WKT Parser */
80
#include <stdio.h>
81
#include <string.h>
82
#include <strings.h>
83
#include <stdlib.h>
84
#include "lwin_wkt.h"
85
#include "lwin_wkt_parse.h"
86
#include "lwgeom_log.h"
87
88
/* Prototypes to quiet the compiler */
89
int wkt_yyparse(void);
90
void wkt_yyerror(const char *str);
91
int wkt_yylex(void);
92
93
/* Declare the global parser variable */
94
LWGEOM_PARSER_RESULT global_parser_result;
95
96
/* Turn on/off verbose parsing (turn off for production) */
97
int wkt_yydebug = 0;
98
99
/*
100
 * Error handler called by the bison parser. Mostly we will be
101
 * catching our own errors and filling out the message and errlocation
102
 * from WKT_ERROR in the grammar, but we keep this one
103
 * around just in case.
104
 */
105
void
106
wkt_yyerror(__attribute__((__unused__)) const char *str)
107
1.63k
{
108
  /* If we haven't already set a message and location, let's set one now. */
109
1.63k
  if (!global_parser_result.message)
110
1.56k
  {
111
1.56k
    global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
112
1.56k
    global_parser_result.errcode = PARSER_ERROR_OTHER;
113
1.56k
    global_parser_result.errlocation = wkt_yylloc.last_column;
114
1.56k
  }
115
1.63k
  LWDEBUGF(4, "%s", str);
116
1.63k
}
117
118
/**
119
 * Parse a WKT geometry string into an LWGEOM structure. Note that this
120
 * process uses globals and is not re-entrant, so don't call it within itself
121
 * (eg, from within other functions in lwin_wkt.c) or from a threaded program.
122
 * Note that parser_result.wkinput picks up a reference to wktstr.
123
 */
124
int
125
lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, const char *wktstr, int parser_check_flags)
126
2.71k
{
127
2.71k
  int parse_rv = 0;
128
129
  /* Clean up our global parser result. */
130
2.71k
  lwgeom_parser_result_init(&global_parser_result);
131
  /* Work-around possible bug in GNU Bison 3.0.2 resulting in wkt_yylloc
132
   * members not being initialized on yyparse() as documented here:
133
   * https://www.gnu.org/software/bison/manual/html_node/Location-Type.html
134
   * See discussion here:
135
   * http://lists.osgeo.org/pipermail/postgis-devel/2014-September/024506.html
136
   */
137
2.71k
  wkt_yylloc.last_column = wkt_yylloc.last_line = wkt_yylloc.first_column = wkt_yylloc.first_line = 1;
138
139
  /* Set the input text string, and parse checks. */
140
2.71k
  global_parser_result.wkinput = wktstr;
141
2.71k
  global_parser_result.parser_check_flags = parser_check_flags;
142
143
2.71k
  wkt_lexer_init(wktstr);   /* Lexer ready */
144
2.71k
  parse_rv = wkt_yyparse(); /* Run the parse */
145
2.71k
  LWDEBUGF(4, "wkt_yyparse returned %d", parse_rv);
146
2.71k
  wkt_lexer_close(); /* Clean up lexer */
147
148
  /* A non-zero parser return is an error. */
149
2.71k
  if (parse_rv || global_parser_result.errcode)
150
2.07k
  {
151
2.07k
    if (!global_parser_result.errcode)
152
0
    {
153
0
      global_parser_result.errcode = PARSER_ERROR_OTHER;
154
0
      global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER];
155
0
      global_parser_result.errlocation = wkt_yylloc.last_column;
156
0
    }
157
2.07k
    else if (global_parser_result.geom)
158
54
    {
159
54
      lwgeom_free(global_parser_result.geom);
160
54
      global_parser_result.geom = NULL;
161
54
    }
162
163
2.07k
    LWDEBUGF(5,
164
2.07k
       "error returned by wkt_yyparse() @ %d: [%d] '%s'",
165
2.07k
       global_parser_result.errlocation,
166
2.07k
       global_parser_result.errcode,
167
2.07k
       global_parser_result.message);
168
169
    /* Copy the global values into the return pointer */
170
2.07k
    *parser_result = global_parser_result;
171
2.07k
    wkt_yylex_destroy();
172
2.07k
    return LW_FAILURE;
173
2.07k
  }
174
175
  /* Copy the global value into the return pointer */
176
632
  *parser_result = global_parser_result;
177
632
  wkt_yylex_destroy();
178
632
  return LW_SUCCESS;
179
2.71k
}
180
181
#define SET_PARSER_ERROR(parser_errcode) \
182
0
  do \
183
0
  { \
184
0
    global_parser_result.errcode = (parser_errcode); \
185
0
    global_parser_result.message = parser_error_messages[(parser_errcode)]; \
186
0
    global_parser_result.errlocation = wkt_yylloc.last_column; \
187
0
  } while (0)
188
189
#define WKT_ERROR() \
190
1.86M
  { \
191
1.86M
    if (global_parser_result.errcode != 0) \
192
1.86M
    { \
193
428
      YYERROR; \
194
428
    } \
195
1.86M
  }
196
197
0
#define WKT_NURBS_MAX_KNOT_COUNT 10000
198
199
struct WKT_NURBS_CONTROLPOINTS {
200
  POINTARRAY *points;
201
  POINTARRAY *weights;
202
};
203
204
static void wkt_parser_nurbs_controlpoints_free(WKT_NURBS_CONTROLPOINTS *controlpoints);
205
206
static WKT_NURBS_CONTROLPOINTS *
207
wkt_parser_nurbs_controlpoints_new(POINT point, double weight, char *dimensionality)
208
0
{
209
0
  WKT_NURBS_CONTROLPOINTS *controlpoints;
210
0
  lwflags_t flags = 0;
211
212
0
  if (!isfinite(weight) || weight <= 0.0)
213
0
  {
214
0
    SET_PARSER_ERROR(PARSER_ERROR_OTHER);
215
0
    return NULL;
216
0
  }
217
218
0
  controlpoints = lwalloc(sizeof(WKT_NURBS_CONTROLPOINTS));
219
0
  controlpoints->points = NULL;
220
0
  controlpoints->weights = NULL;
221
0
  controlpoints->points = wkt_parser_ptarray_new(point);
222
0
  controlpoints->weights = wkt_parser_ptarray_new(wkt_parser_coord_2(weight, 0));
223
0
  if (dimensionality)
224
0
  {
225
0
    int hasz;
226
0
    int hasm;
227
0
    int ndims;
228
229
0
    for (size_t i = 0; i < strlen(dimensionality); i++)
230
0
    {
231
0
      if (dimensionality[i] == 'Z' || dimensionality[i] == 'z')
232
0
        FLAGS_SET_Z(flags, LW_TRUE);
233
0
      else if (dimensionality[i] == 'M' || dimensionality[i] == 'm')
234
0
        FLAGS_SET_M(flags, LW_TRUE);
235
0
    }
236
237
0
    hasz = FLAGS_GET_Z(flags);
238
0
    hasm = FLAGS_GET_M(flags);
239
0
    ndims = 2 + hasz + hasm;
240
0
    if (FLAGS_NDIMS(controlpoints->points->flags) != ndims)
241
0
    {
242
0
      wkt_parser_nurbs_controlpoints_free(controlpoints);
243
0
      SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS);
244
0
      return NULL;
245
0
    }
246
0
    FLAGS_SET_Z(controlpoints->points->flags, hasz);
247
0
    FLAGS_SET_M(controlpoints->points->flags, hasm);
248
0
  }
249
0
  return controlpoints;
250
0
}
251
252
static void
253
wkt_parser_nurbs_controlpoints_free(WKT_NURBS_CONTROLPOINTS *controlpoints)
254
0
{
255
0
  if (!controlpoints)
256
0
    return;
257
0
  if (controlpoints->points)
258
0
    ptarray_free(controlpoints->points);
259
0
  if (controlpoints->weights)
260
0
    ptarray_free(controlpoints->weights);
261
0
  lwfree(controlpoints);
262
0
}
263
264
static WKT_NURBS_CONTROLPOINTS *
265
wkt_parser_nurbs_controlpoints_add(WKT_NURBS_CONTROLPOINTS *controlpoints, WKT_NURBS_CONTROLPOINTS *next)
266
0
{
267
0
  POINT4D point;
268
0
  POINT4D weight;
269
270
0
  if (!controlpoints || !next)
271
0
  {
272
0
    wkt_parser_nurbs_controlpoints_free(controlpoints);
273
0
    wkt_parser_nurbs_controlpoints_free(next);
274
0
    SET_PARSER_ERROR(PARSER_ERROR_OTHER);
275
0
    return NULL;
276
0
  }
277
278
0
  if (FLAGS_GET_ZM(controlpoints->points->flags) != FLAGS_GET_ZM(next->points->flags))
279
0
  {
280
0
    wkt_parser_nurbs_controlpoints_free(controlpoints);
281
0
    wkt_parser_nurbs_controlpoints_free(next);
282
0
    SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS);
283
0
    return NULL;
284
0
  }
285
286
0
  getPoint4d_p(next->points, 0, &point);
287
0
  getPoint4d_p(next->weights, 0, &weight);
288
0
  ptarray_append_point(controlpoints->points, &point, LW_TRUE);
289
0
  ptarray_append_point(controlpoints->weights, &weight, LW_TRUE);
290
0
  wkt_parser_nurbs_controlpoints_free(next);
291
0
  return controlpoints;
292
0
}
293
294
static char *
295
wkt_parser_nurbscurve_iso_dimensionality(char *outer, char *controlpoints)
296
0
{
297
0
  if (outer && controlpoints && strcasecmp(outer, controlpoints) != 0)
298
0
  {
299
0
    SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS);
300
0
    return NULL;
301
0
  }
302
303
0
  return outer ? outer : controlpoints;
304
0
}
305
306
static POINTARRAY *
307
wkt_parser_knot_list_add_repeated(POINTARRAY *knots, double value, double multiplicity)
308
0
{
309
0
  uint32_t repeat_count;
310
311
0
  if (!isfinite(value) || !isfinite(multiplicity) || multiplicity < 1.0 ||
312
0
      multiplicity > WKT_NURBS_MAX_KNOT_COUNT || fabs(multiplicity - round(multiplicity)) >= 1e-10)
313
0
  {
314
0
    if (knots)
315
0
      ptarray_free(knots);
316
0
    SET_PARSER_ERROR(PARSER_ERROR_OTHER);
317
0
    return NULL;
318
0
  }
319
320
0
  repeat_count = (uint32_t)round(multiplicity);
321
0
  if (knots && knots->npoints > WKT_NURBS_MAX_KNOT_COUNT - repeat_count)
322
0
  {
323
0
    ptarray_free(knots);
324
0
    SET_PARSER_ERROR(PARSER_ERROR_OTHER);
325
0
    return NULL;
326
0
  }
327
328
0
  for (uint32_t i = 0; i < repeat_count; i++)
329
0
  {
330
0
    POINT knot = wkt_parser_coord_2(value, 0);
331
0
    knots = knots ? wkt_parser_ptarray_add_coord(knots, knot) : wkt_parser_ptarray_new(knot);
332
0
    if (!knots)
333
0
      return NULL;
334
0
  }
335
0
  return knots;
336
0
}
337
338
#line 338 "lwin_wkt_parse.c"
339
340
#ifndef YY_CAST
341
#ifdef __cplusplus
342
#define YY_CAST(Type, Val) static_cast<Type>(Val)
343
#define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val)
344
#else
345
7.73M
#define YY_CAST(Type, Val) ((Type)(Val))
346
#define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val))
347
#endif
348
#endif
349
#ifndef YY_NULLPTR
350
#if defined __cplusplus
351
#if 201103L <= __cplusplus
352
#define YY_NULLPTR nullptr
353
#else
354
#define YY_NULLPTR 0
355
#endif
356
#else
357
#define YY_NULLPTR ((void *)0)
358
#endif
359
#endif
360
361
#include "lwin_wkt_parse.h"
362
/* Symbol kind.  */
363
enum yysymbol_kind_t
364
{
365
  YYSYMBOL_YYEMPTY = -2,
366
  YYSYMBOL_YYEOF = 0,                  /* "end of file"  */
367
  YYSYMBOL_YYerror = 1,                /* error  */
368
  YYSYMBOL_YYUNDEF = 2,                /* "invalid token"  */
369
  YYSYMBOL_POINT_TOK = 3,              /* POINT_TOK  */
370
  YYSYMBOL_LINESTRING_TOK = 4,         /* LINESTRING_TOK  */
371
  YYSYMBOL_POLYGON_TOK = 5,            /* POLYGON_TOK  */
372
  YYSYMBOL_MPOINT_TOK = 6,             /* MPOINT_TOK  */
373
  YYSYMBOL_MLINESTRING_TOK = 7,        /* MLINESTRING_TOK  */
374
  YYSYMBOL_MPOLYGON_TOK = 8,           /* MPOLYGON_TOK  */
375
  YYSYMBOL_MSURFACE_TOK = 9,           /* MSURFACE_TOK  */
376
  YYSYMBOL_MCURVE_TOK = 10,            /* MCURVE_TOK  */
377
  YYSYMBOL_CURVEPOLYGON_TOK = 11,      /* CURVEPOLYGON_TOK  */
378
  YYSYMBOL_COMPOUNDCURVE_TOK = 12,     /* COMPOUNDCURVE_TOK  */
379
  YYSYMBOL_CIRCULARSTRING_TOK = 13,    /* CIRCULARSTRING_TOK  */
380
  YYSYMBOL_COLLECTION_TOK = 14,        /* COLLECTION_TOK  */
381
  YYSYMBOL_RBRACKET_TOK = 15,          /* RBRACKET_TOK  */
382
  YYSYMBOL_LBRACKET_TOK = 16,          /* LBRACKET_TOK  */
383
  YYSYMBOL_COMMA_TOK = 17,             /* COMMA_TOK  */
384
  YYSYMBOL_EMPTY_TOK = 18,             /* EMPTY_TOK  */
385
  YYSYMBOL_SEMICOLON_TOK = 19,         /* SEMICOLON_TOK  */
386
  YYSYMBOL_TRIANGLE_TOK = 20,          /* TRIANGLE_TOK  */
387
  YYSYMBOL_TIN_TOK = 21,               /* TIN_TOK  */
388
  YYSYMBOL_POLYHEDRALSURFACE_TOK = 22, /* POLYHEDRALSURFACE_TOK  */
389
  YYSYMBOL_NURBSCURVE_TOK = 23,        /* NURBSCURVE_TOK  */
390
  YYSYMBOL_DEGREE_TOK = 24,            /* DEGREE_TOK  */
391
  YYSYMBOL_CONTROLPOINTS_TOK = 25,     /* CONTROLPOINTS_TOK  */
392
  YYSYMBOL_KNOTS_TOK = 26,             /* KNOTS_TOK  */
393
  YYSYMBOL_NURBSPOINT_TOK = 27,        /* NURBSPOINT_TOK  */
394
  YYSYMBOL_WEIGHTEDPOINT_TOK = 28,     /* WEIGHTEDPOINT_TOK  */
395
  YYSYMBOL_WEIGHT_TOK = 29,            /* WEIGHT_TOK  */
396
  YYSYMBOL_KNOT_TOK = 30,              /* KNOT_TOK  */
397
  YYSYMBOL_DOUBLE_TOK = 31,            /* DOUBLE_TOK  */
398
  YYSYMBOL_DIMENSIONALITY_TOK = 32,    /* DIMENSIONALITY_TOK  */
399
  YYSYMBOL_SRID_TOK = 33,              /* SRID_TOK  */
400
  YYSYMBOL_YYACCEPT = 34,              /* $accept  */
401
  YYSYMBOL_geometry = 35,              /* geometry  */
402
  YYSYMBOL_geometry_no_srid = 36,      /* geometry_no_srid  */
403
  YYSYMBOL_geometrycollection = 37,    /* geometrycollection  */
404
  YYSYMBOL_geometry_list = 38,         /* geometry_list  */
405
  YYSYMBOL_multisurface = 39,          /* multisurface  */
406
  YYSYMBOL_surface_list = 40,          /* surface_list  */
407
  YYSYMBOL_tin = 41,                   /* tin  */
408
  YYSYMBOL_polyhedralsurface = 42,     /* polyhedralsurface  */
409
  YYSYMBOL_multipolygon = 43,          /* multipolygon  */
410
  YYSYMBOL_polygon_list = 44,          /* polygon_list  */
411
  YYSYMBOL_patch_list = 45,            /* patch_list  */
412
  YYSYMBOL_polygon = 46,               /* polygon  */
413
  YYSYMBOL_polygon_untagged = 47,      /* polygon_untagged  */
414
  YYSYMBOL_patch = 48,                 /* patch  */
415
  YYSYMBOL_curvepolygon = 49,          /* curvepolygon  */
416
  YYSYMBOL_curvering_list = 50,        /* curvering_list  */
417
  YYSYMBOL_curvering = 51,             /* curvering  */
418
  YYSYMBOL_patchring_list = 52,        /* patchring_list  */
419
  YYSYMBOL_ring_list = 53,             /* ring_list  */
420
  YYSYMBOL_patchring = 54,             /* patchring  */
421
  YYSYMBOL_ring = 55,                  /* ring  */
422
  YYSYMBOL_compoundcurve = 56,         /* compoundcurve  */
423
  YYSYMBOL_compound_list = 57,         /* compound_list  */
424
  YYSYMBOL_multicurve = 58,            /* multicurve  */
425
  YYSYMBOL_curve_list = 59,            /* curve_list  */
426
  YYSYMBOL_multilinestring = 60,       /* multilinestring  */
427
  YYSYMBOL_linestring_list = 61,       /* linestring_list  */
428
  YYSYMBOL_circularstring = 62,        /* circularstring  */
429
  YYSYMBOL_linestring = 63,            /* linestring  */
430
  YYSYMBOL_linestring_untagged = 64,   /* linestring_untagged  */
431
  YYSYMBOL_triangle_list = 65,         /* triangle_list  */
432
  YYSYMBOL_triangle = 66,              /* triangle  */
433
  YYSYMBOL_triangle_untagged = 67,     /* triangle_untagged  */
434
  YYSYMBOL_multipoint = 68,            /* multipoint  */
435
  YYSYMBOL_point_list = 69,            /* point_list  */
436
  YYSYMBOL_point_untagged = 70,        /* point_untagged  */
437
  YYSYMBOL_point = 71,                 /* point  */
438
  YYSYMBOL_ptarray = 72,               /* ptarray  */
439
  YYSYMBOL_coordinate = 73,            /* coordinate  */
440
  YYSYMBOL_opt_dimensionality = 74,    /* opt_dimensionality  */
441
  YYSYMBOL_nurbscurve = 75,            /* nurbscurve  */
442
  YYSYMBOL_iso_controlpoint = 76,      /* iso_controlpoint  */
443
  YYSYMBOL_iso_controlpoint_list = 77, /* iso_controlpoint_list  */
444
  YYSYMBOL_iso_knot_list = 78,         /* iso_knot_list  */
445
  YYSYMBOL_weight_list = 79,           /* weight_list  */
446
  YYSYMBOL_knot_list = 80              /* knot_list  */
447
};
448
typedef enum yysymbol_kind_t yysymbol_kind_t;
449
450
#ifdef short
451
#undef short
452
#endif
453
454
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
455
   <limits.h> and (if available) <stdint.h> are included
456
   so that the code can choose integer types of a good width.  */
457
458
#ifndef __PTRDIFF_MAX__
459
#include <limits.h> /* INFRINGES ON USER NAME SPACE */
460
#if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
461
#include <stdint.h> /* INFRINGES ON USER NAME SPACE */
462
#define YY_STDINT_H
463
#endif
464
#endif
465
466
/* Narrow types that promote to a signed type and that can represent a
467
   signed or unsigned integer of at least N bits.  In tables they can
468
   save space and decrease cache pressure.  Promoting to a signed type
469
   helps avoid bugs in integer arithmetic.  */
470
471
#ifdef __INT_LEAST8_MAX__
472
typedef __INT_LEAST8_TYPE__ yytype_int8;
473
#elif defined YY_STDINT_H
474
typedef int_least8_t yytype_int8;
475
#else
476
typedef signed char yytype_int8;
477
#endif
478
479
#ifdef __INT_LEAST16_MAX__
480
typedef __INT_LEAST16_TYPE__ yytype_int16;
481
#elif defined YY_STDINT_H
482
typedef int_least16_t yytype_int16;
483
#else
484
typedef short yytype_int16;
485
#endif
486
487
/* Work around bug in HP-UX 11.23, which defines these macros
488
   incorrectly for preprocessor constants.  This workaround can likely
489
   be removed in 2023, as HPE has promised support for HP-UX 11.23
490
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
491
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
492
#ifdef __hpux
493
#undef UINT_LEAST8_MAX
494
#undef UINT_LEAST16_MAX
495
#define UINT_LEAST8_MAX 255
496
#define UINT_LEAST16_MAX 65535
497
#endif
498
499
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
500
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
501
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H && UINT_LEAST8_MAX <= INT_MAX)
502
typedef uint_least8_t yytype_uint8;
503
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
504
typedef unsigned char yytype_uint8;
505
#else
506
typedef short yytype_uint8;
507
#endif
508
509
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
510
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
511
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H && UINT_LEAST16_MAX <= INT_MAX)
512
typedef uint_least16_t yytype_uint16;
513
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
514
typedef unsigned short yytype_uint16;
515
#else
516
typedef int yytype_uint16;
517
#endif
518
519
#ifndef YYPTRDIFF_T
520
#if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
521
2.91k
#define YYPTRDIFF_T __PTRDIFF_TYPE__
522
#define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
523
#elif defined PTRDIFF_MAX
524
#ifndef ptrdiff_t
525
#include <stddef.h> /* INFRINGES ON USER NAME SPACE */
526
#endif
527
#define YYPTRDIFF_T ptrdiff_t
528
#define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
529
#else
530
#define YYPTRDIFF_T long
531
#define YYPTRDIFF_MAXIMUM LONG_MAX
532
#endif
533
#endif
534
535
#ifndef YYSIZE_T
536
#ifdef __SIZE_TYPE__
537
#define YYSIZE_T __SIZE_TYPE__
538
#elif defined size_t
539
#define YYSIZE_T size_t
540
#elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
541
#include <stddef.h> /* INFRINGES ON USER NAME SPACE */
542
#define YYSIZE_T size_t
543
#else
544
#define YYSIZE_T unsigned
545
#endif
546
#endif
547
548
#define YYSIZE_MAXIMUM \
549
  YY_CAST(YYPTRDIFF_T, (YYPTRDIFF_MAXIMUM < YY_CAST(YYSIZE_T, -1) ? YYPTRDIFF_MAXIMUM : YY_CAST(YYSIZE_T, -1)))
550
551
450
#define YYSIZEOF(X) YY_CAST(YYPTRDIFF_T, sizeof(X))
552
553
/* Stored state numbers (used for stacks). */
554
typedef yytype_int16 yy_state_t;
555
556
/* State numbers in computations.  */
557
typedef int yy_state_fast_t;
558
559
#ifndef YY_
560
#if defined YYENABLE_NLS && YYENABLE_NLS
561
#if ENABLE_NLS
562
#include <libintl.h> /* INFRINGES ON USER NAME SPACE */
563
#define YY_(Msgid) dgettext("bison-runtime", Msgid)
564
#endif
565
#endif
566
#ifndef YY_
567
1.63k
#define YY_(Msgid) Msgid
568
#endif
569
#endif
570
571
#ifndef YY_ATTRIBUTE_PURE
572
#if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
573
#define YY_ATTRIBUTE_PURE __attribute__((__pure__))
574
#else
575
#define YY_ATTRIBUTE_PURE
576
#endif
577
#endif
578
579
#ifndef YY_ATTRIBUTE_UNUSED
580
#if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
581
#define YY_ATTRIBUTE_UNUSED __attribute__((__unused__))
582
#else
583
#define YY_ATTRIBUTE_UNUSED
584
#endif
585
#endif
586
587
/* Suppress unused-variable warnings by "using" E.  */
588
#if !defined lint || defined __GNUC__
589
66.5k
#define YY_USE(E) ((void)(E))
590
#else
591
#define YY_USE(E) /* empty */
592
#endif
593
594
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
595
#if defined __GNUC__ && !defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
596
#if __GNUC__ * 100 + __GNUC_MINOR__ < 407
597
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
598
  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"")
599
#else
600
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
601
  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \
602
      _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
603
#endif
604
#define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")
605
#else
606
#define YY_INITIAL_VALUE(Value) Value
607
#endif
608
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
609
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
610
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
611
#endif
612
#ifndef YY_INITIAL_VALUE
613
#define YY_INITIAL_VALUE(Value) /* Nothing. */
614
#endif
615
616
#if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__
617
#define YY_IGNORE_USELESS_CAST_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"")
618
#define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop")
619
#endif
620
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
621
#define YY_IGNORE_USELESS_CAST_BEGIN
622
#define YY_IGNORE_USELESS_CAST_END
623
#endif
624
625
4.61M
#define YY_ASSERT(E) ((void)(0 && (E)))
626
627
#if !defined yyoverflow
628
629
/* The parser invokes alloca or malloc; define the necessary symbols.  */
630
631
#ifdef YYSTACK_USE_ALLOCA
632
#if YYSTACK_USE_ALLOCA
633
#ifdef __GNUC__
634
#define YYSTACK_ALLOC __builtin_alloca
635
#elif defined __BUILTIN_VA_ARG_INCR
636
#include <alloca.h> /* INFRINGES ON USER NAME SPACE */
637
#elif defined _AIX
638
#define YYSTACK_ALLOC __alloca
639
#elif defined _MSC_VER
640
#include <malloc.h> /* INFRINGES ON USER NAME SPACE */
641
#define alloca _alloca
642
#else
643
#define YYSTACK_ALLOC alloca
644
#if !defined _ALLOCA_H && !defined EXIT_SUCCESS
645
#include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
646
/* Use EXIT_SUCCESS as a witness for stdlib.h.  */
647
#ifndef EXIT_SUCCESS
648
#define EXIT_SUCCESS 0
649
#endif
650
#endif
651
#endif
652
#endif
653
#endif
654
655
#ifdef YYSTACK_ALLOC
656
/* Pacify GCC's 'empty if-body' warning.  */
657
#define YYSTACK_FREE(Ptr) \
658
  do \
659
  { /* empty */ \
660
    ; \
661
  } while (0)
662
#ifndef YYSTACK_ALLOC_MAXIMUM
663
/* The OS might guarantee only one guard page at the bottom of the stack,
664
   and a page size can be as small as 4096 bytes.  So we cannot safely
665
   invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
666
   to allow for a few compiler-allocated temporary stack slots.  */
667
#define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
668
#endif
669
#else
670
#define YYSTACK_ALLOC YYMALLOC
671
50
#define YYSTACK_FREE YYFREE
672
#ifndef YYSTACK_ALLOC_MAXIMUM
673
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
674
#endif
675
#if (defined __cplusplus && !defined EXIT_SUCCESS && \
676
     !((defined YYMALLOC || defined malloc) && (defined YYFREE || defined free)))
677
#include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
678
#ifndef EXIT_SUCCESS
679
#define EXIT_SUCCESS 0
680
#endif
681
#endif
682
#ifndef YYMALLOC
683
#define YYMALLOC malloc
684
#if !defined malloc && !defined EXIT_SUCCESS
685
void *malloc(YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
686
#endif
687
#endif
688
#ifndef YYFREE
689
50
#define YYFREE free
690
#if !defined free && !defined EXIT_SUCCESS
691
void free(void *); /* INFRINGES ON USER NAME SPACE */
692
#endif
693
#endif
694
#endif
695
#endif /* !defined yyoverflow */
696
697
#if (!defined yyoverflow && (!defined __cplusplus || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL && \
698
                  defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
699
700
/* A type that is properly aligned for any stack member.  */
701
union yyalloc {
702
  yy_state_t yyss_alloc;
703
  YYSTYPE yyvs_alloc;
704
  YYLTYPE yyls_alloc;
705
};
706
707
/* The size of the maximum gap between one aligned stack and the next.  */
708
150
#define YYSTACK_GAP_MAXIMUM (YYSIZEOF(union yyalloc) - 1)
709
710
/* The size of an array large to enough to hold all stacks, each with
711
   N elements.  */
712
#define YYSTACK_BYTES(N) \
713
  ((N) * (YYSIZEOF(yy_state_t) + YYSIZEOF(YYSTYPE) + YYSIZEOF(YYLTYPE)) + 2 * YYSTACK_GAP_MAXIMUM)
714
715
#define YYCOPY_NEEDED 1
716
717
/* Relocate STACK from its old location to the new one.  The
718
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
719
   elements in the stack, and YYPTR gives the new location of the
720
   stack.  Advance YYPTR to a properly aligned location for the next
721
   stack.  */
722
#define YYSTACK_RELOCATE(Stack_alloc, Stack) \
723
150
  do \
724
150
  { \
725
150
    YYPTRDIFF_T yynewbytes; \
726
150
    YYCOPY(&yyptr->Stack_alloc, Stack, yysize); \
727
150
    Stack = &yyptr->Stack_alloc; \
728
150
    yynewbytes = yystacksize * YYSIZEOF(*Stack) + YYSTACK_GAP_MAXIMUM; \
729
150
    yyptr += yynewbytes / YYSIZEOF(*yyptr); \
730
150
  } while (0)
731
732
#endif
733
734
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
735
/* Copy COUNT objects from SRC to DST.  The source and destination do
736
   not overlap.  */
737
#ifndef YYCOPY
738
#if defined __GNUC__ && 1 < __GNUC__
739
150
#define YYCOPY(Dst, Src, Count) __builtin_memcpy(Dst, Src, YY_CAST(YYSIZE_T, (Count)) * sizeof(*(Src)))
740
#else
741
#define YYCOPY(Dst, Src, Count) \
742
  do \
743
  { \
744
    YYPTRDIFF_T yyi; \
745
    for (yyi = 0; yyi < (Count); yyi++) \
746
      (Dst)[yyi] = (Src)[yyi]; \
747
  } while (0)
748
#endif
749
#endif
750
#endif /* !YYCOPY_NEEDED */
751
752
/* YYFINAL -- State number of the termination state.  */
753
4.61M
#define YYFINAL 85
754
/* YYLAST -- Last index in YYTABLE.  */
755
7.19M
#define YYLAST 409
756
757
/* YYNTOKENS -- Number of terminals.  */
758
2.11M
#define YYNTOKENS 34
759
/* YYNNTS -- Number of nonterminals.  */
760
#define YYNNTS 47
761
/* YYNRULES -- Number of rules.  */
762
#define YYNRULES 163
763
/* YYNSTATES -- Number of states.  */
764
#define YYNSTATES 370
765
766
/* YYMAXUTOK -- Last valid token kind.  */
767
3.08M
#define YYMAXUTOK 288
768
769
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
770
   as returned by yylex, with out-of-bounds checking.  */
771
#define YYTRANSLATE(YYX) \
772
3.08M
  (0 <= (YYX) && (YYX) <= YYMAXUTOK ? YY_CAST(yysymbol_kind_t, yytranslate[YYX]) : YYSYMBOL_YYUNDEF)
773
774
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
775
   as returned by yylex.  */
776
static const yytype_int8 yytranslate[] = {
777
    0, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
778
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
779
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
780
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
781
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
782
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
783
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
784
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2, 2,
785
    2, 2, 2, 2, 2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  1,  2,  3,  4, 5,
786
    6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33};
787
788
#if YYDEBUG
789
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
790
static const yytype_int16 yyrline[] = {
791
    0,   387, 387, 389, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 411,
792
    413, 415, 417, 421, 423, 427, 429, 431, 433, 437, 439, 441, 443, 445, 447, 451, 453, 455, 457, 461, 463,
793
    465, 467, 471, 473, 475, 477, 481, 483, 487, 489, 493, 495, 497, 499, 503, 505, 509, 512, 514, 516, 518,
794
    522, 524, 528, 529, 530, 531, 532, 535, 537, 541, 543, 547, 550, 553, 555, 557, 559, 563, 565, 567, 569,
795
    571, 573, 575, 577, 581, 583, 585, 587, 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, 613, 615, 617,
796
    619, 623, 625, 629, 631, 633, 635, 639, 641, 643, 645, 649, 651, 655, 657, 661, 663, 665, 667, 671, 675,
797
    677, 679, 681, 685, 687, 691, 693, 695, 699, 701, 703, 705, 709, 711, 715, 717, 719, 723, 725, 729, 738,
798
    748, 750, 753, 755, 758, 760, 764, 766, 771, 776, 778, 783, 785, 790, 795, 803, 808};
799
#endif
800
801
/** Accessing symbol of state STATE.  */
802
31.6k
#define YY_ACCESSING_SYMBOL(State) YY_CAST(yysymbol_kind_t, yystos[State])
803
804
#if YYDEBUG || 0
805
/* The user-facing name of the symbol whose (internal) number is
806
   YYSYMBOL.  No bounds checking.  */
807
static const char *yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
808
809
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
810
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
811
static const char *const yytname[] = {"\"end of file\"",
812
              "error",
813
              "\"invalid token\"",
814
              "POINT_TOK",
815
              "LINESTRING_TOK",
816
              "POLYGON_TOK",
817
              "MPOINT_TOK",
818
              "MLINESTRING_TOK",
819
              "MPOLYGON_TOK",
820
              "MSURFACE_TOK",
821
              "MCURVE_TOK",
822
              "CURVEPOLYGON_TOK",
823
              "COMPOUNDCURVE_TOK",
824
              "CIRCULARSTRING_TOK",
825
              "COLLECTION_TOK",
826
              "RBRACKET_TOK",
827
              "LBRACKET_TOK",
828
              "COMMA_TOK",
829
              "EMPTY_TOK",
830
              "SEMICOLON_TOK",
831
              "TRIANGLE_TOK",
832
              "TIN_TOK",
833
              "POLYHEDRALSURFACE_TOK",
834
              "NURBSCURVE_TOK",
835
              "DEGREE_TOK",
836
              "CONTROLPOINTS_TOK",
837
              "KNOTS_TOK",
838
              "NURBSPOINT_TOK",
839
              "WEIGHTEDPOINT_TOK",
840
              "WEIGHT_TOK",
841
              "KNOT_TOK",
842
              "DOUBLE_TOK",
843
              "DIMENSIONALITY_TOK",
844
              "SRID_TOK",
845
              "$accept",
846
              "geometry",
847
              "geometry_no_srid",
848
              "geometrycollection",
849
              "geometry_list",
850
              "multisurface",
851
              "surface_list",
852
              "tin",
853
              "polyhedralsurface",
854
              "multipolygon",
855
              "polygon_list",
856
              "patch_list",
857
              "polygon",
858
              "polygon_untagged",
859
              "patch",
860
              "curvepolygon",
861
              "curvering_list",
862
              "curvering",
863
              "patchring_list",
864
              "ring_list",
865
              "patchring",
866
              "ring",
867
              "compoundcurve",
868
              "compound_list",
869
              "multicurve",
870
              "curve_list",
871
              "multilinestring",
872
              "linestring_list",
873
              "circularstring",
874
              "linestring",
875
              "linestring_untagged",
876
              "triangle_list",
877
              "triangle",
878
              "triangle_untagged",
879
              "multipoint",
880
              "point_list",
881
              "point_untagged",
882
              "point",
883
              "ptarray",
884
              "coordinate",
885
              "opt_dimensionality",
886
              "nurbscurve",
887
              "iso_controlpoint",
888
              "iso_controlpoint_list",
889
              "iso_knot_list",
890
              "weight_list",
891
              "knot_list",
892
              YY_NULLPTR};
893
894
static const char *
895
yysymbol_name(yysymbol_kind_t yysymbol)
896
{
897
  return yytname[yysymbol];
898
}
899
#endif
900
901
4.63M
#define YYPACT_NINF (-273)
902
903
4.63M
#define yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF)
904
905
#define YYTABLE_NINF (-1)
906
907
0
#define yytable_value_is_error(Yyn) 0
908
909
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
910
   STATE-NUM.  */
911
static const yytype_int16 yypact[] = {
912
    27,   91,   95,   99,   103,  104,  110,  128,  162,  180,  187,  188,  191,  192,  197,  198,  209,  -5,   22,
913
    -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 15,   -273,
914
    9,    15,   -273, 10,   47,   -273, 80,   40,   -273, 98,   116,  -273, 121,  125,  -273, 151,  59,   -273, 152,
915
    49,   -273, 155,  49,   -273, 156,  87,   -273, 210,  15,   -273, 215,  179,  -273, 216,  52,   -273, 219,  57,
916
    -273, 224,  60,   -273, 227,  20,   -273, 228,  179,  -273, 51,   28,   -273, 15,   -273, 232,  15,   -273, 15,
917
    236,  -273, 47,   -273, 15,   -273, 237,  -273, -273, 40,   -273, 15,   -273, 240,  -273, 116,  -273, 47,   -273,
918
    241,  -273, 125,  -273, 244,  -273, -273, -273, 59,   -273, -273, 245,  -273, -273, -273, -273, 49,   -273, 248,
919
    -273, -273, -273, -273, -273, -273, 49,   -273, 249,  -273, -273, -273, -273, 87,   -273, 252,  15,   -273, -273,
920
    253,  179,  -273, 15,   77,   -273, 81,   256,  -273, 57,   -273, 85,   257,  -273, 60,   -273, 73,   107,  50,
921
    -273, -273, 94,   -273, 15,   260,  -273, 261,  264,  -273, 47,   265,  93,   -273, 40,   269,  270,  -273, 116,
922
    273,  274,  -273, 125,  277,  -273, 59,   278,  -273, 49,   281,  -273, 49,   282,  -273, 87,   285,  -273, 286,
923
    -273, 179,  289,  290,  15,   15,   -273, 57,   293,  15,   294,  -273, -273, 60,   297,  112,  117,  133,  139,
924
    144,  -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273,
925
    -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, 123,  298,
926
    301,  -273, -273, 302,  -273, 85,   -273, -273, 154,  15,   178,  181,  -273, -273, 202,  203,  -273, -273, 189,
927
    305,  211,  15,   -273, -273, -273, 206,  306,  189,  309,  212,  -273, 332,  333,  310,  334,  -273, 313,  217,
928
    212,  -273, 335,  324,  336,  212,  -273, 314,  317,  217,  189,  328,  -273, 318,  327,  338,  321,  340,  341,
929
    -273, 343,  -273, 337,  322,  15,   331,  339,  344,  -273, 346,  349,  350,  325,  -273, 326,  331,  339,  348,
930
    342,  352,  345,  353,  347,  329,  330,  351,  354,  -273, 356,  -273, -273, 359,  361,  355,  357,  358,  -273,
931
    -273, 362,  364,  365,  -273, -273, 360,  366,  -273};
932
933
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
934
   Performed when YYTABLE does not specify something else to do.  Zero
935
   means the default is an error.  */
936
static const yytype_uint8 yydefact[] = {
937
    0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   2,   19,  13,
938
    15,  16,  12,  8,   9,   7,   14,  11,  6,   5,   17,  10,  4,   18,  0,   137, 0,   0,   115, 0,   0,   55,
939
    0,   0,   128, 0,   0,   105, 0,   0,   47,  0,   0,   29,  0,   0,   91,  0,   0,   62,  0,   0,   79,  0,
940
    0,   111, 0,   0,   23,  0,   0,   123, 0,   0,   39,  0,   0,   43,  0,   0,   154, 0,   0,   1,   0,   0,
941
    139, 0,   136, 0,   0,   114, 0,   0,   73,  0,   54,  0,   133, 0,   130, 131, 0,   127, 0,   117, 0,   107,
942
    0,   104, 0,   57,  0,   49,  0,   46,  0,   33,  35,  34,  0,   28,  98,  0,   97,  100, 101, 99,  0,   90,
943
    0,   64,  67,  69,  66,  65,  68,  0,   61,  0,   84,  86,  87,  85,  0,   78,  0,   0,   110, 25,  0,   0,
944
    22,  0,   0,   122, 0,   0,   119, 0,   38,  0,   0,   51,  0,   42,  0,   0,   0,   153, 3,   140, 134, 0,
945
    0,   112, 0,   0,   52,  0,   0,   0,   125, 0,   0,   0,   102, 0,   0,   0,   44,  0,   0,   26,  0,   0,
946
    88,  0,   0,   59,  0,   0,   76,  0,   0,   108, 0,   20,  0,   0,   0,   0,   0,   36,  0,   0,   0,   0,
947
    71,  40,  0,   0,   0,   0,   0,   0,   141, 138, 135, 113, 75,  72,  53,  132, 129, 126, 116, 106, 103, 56,
948
    48,  45,  30,  32,  31,  27,  93,  92,  95,  96,  94,  89,  63,  60,  80,  82,  83,  81,  77,  109, 24,  21,
949
    0,   0,   0,   118, 37,  0,   58,  0,   50,  41,  0,   0,   0,   0,   142, 120, 0,   0,   74,  70,  144, 0,
950
    0,   0,   121, 124, 143, 0,   0,   144, 0,   0,   151, 0,   0,   0,   0,   157, 0,   0,   0,   152, 0,   0,
951
    0,   0,   161, 0,   0,   0,   144, 0,   156, 0,   0,   0,   0,   0,   0,   149, 0,   160, 0,   0,   0,   0,
952
    0,   0,   150, 0,   0,   0,   0,   163, 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   145,
953
    0,   147, 162, 0,   0,   0,   0,   0,   146, 148, 0,   0,   0,   155, 159, 0,   0,   158};
954
955
/* YYPGOTO[NTERM-NUM].  */
956
static const yytype_int16 yypgoto[] = {-273, -273, 1,    -273, 230,  -273, 247,  -273, -273, -273, 268,  221,
957
               -39,  -30,  163,  -38,  251,  190,  -273, -94,  122,  213,  -50,  250,
958
               -273, 267,  -273, 288,  -52,  -51,  -44,  234,  -273, 183,  -273, 296,
959
               218,  -273, -37,  -45,  -272, -40,  92,   100,  63,   96,   65};
960
961
/* YYDEFGOTO[NTERM-NUM].  */
962
static const yytype_int16 yydefgoto[] = {0,   18,  151, 20,  152, 21, 118, 22,  23,  24,  114, 164, 25,  115, 165, 26,
963
           132, 133, 219, 95,  220, 96, 27,  141, 28,  125, 29,  108, 30,  31,  137, 159,
964
           32,  160, 33,  101, 102, 34, 87,  88,  291, 35,  301, 302, 336, 311, 338};
965
966
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
967
   positive, shift that token.  If negative, reduce the rule whose
968
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
969
static const yytype_int16 yytable[] = {
970
    103, 19,  91,  182, 109, 126, 127, 124, 135, 136, 134, 142, 143, 128, 84,  119, 121, 129, 191, 144, 138, 298, 85,
971
    145, 120, 89,  92,  90,  93,  148, 1,   2,   3,   4,   5,   6,   7,   8,   9,   10,  11,  12,  321, 174, 168, 175,
972
    86,  13,  14,  15,  16,  169, 176, 2,   183, 178, 99,  179, 100, 103, 17,  10,  11,  94,  3,   106, 109, 107, 155,
973
    187, 9,   86,  16,  158, 226, 112, 163, 113, 126, 127, 124, 227, 173, 119, 121, 172, 128, 135, 136, 134, 129, 2,
974
    120, 213, 142, 143, 97,  214, 98,  138, 11,  218, 144, 106, 224, 107, 145, 36,  235, 37,  16,  39,  208, 40,  104,
975
    42,  105, 43,  212, 45,  48,  46,  49,  38,  225, 228, 51,  41,  52,  274, 229, 44,  106, 275, 107, 47,  50,  110,
976
    279, 111, 103, 112, 53,  113, 54,  239, 55,  249, 250, 248, 135, 136, 134, 256, 257, 251, 277, 244, 246, 252, 56,
977
    258, 138, 242, 276, 259, 245, 116, 122, 117, 123, 130, 139, 131, 140, 278, 265, 266, 57,  284, 58,  269, 1,   2,
978
    3,   4,   5,   6,   7,   8,   9,   10,  11,  12,  59,  286, 60,  287, 61,  13,  14,  15,  16,  63,  66,  64,  67,
979
    69,  72,  70,  73,  262, 62,  75,  78,  76,  79,  288, 289, 65,  68,  290, 295, 71,  74,  81,  146, 82,  147, 77,
980
    80,  149, 153, 150, 154, 156, 293, 157, 285, 300, 161, 83,  162, 166, 170, 167, 171, 177, 310, 175, 294, 180, 184,
981
    181, 185, 188, 192, 189, 193, 195, 198, 196, 199, 201, 204, 202, 205, 207, 209, 175, 210, 215, 221, 216, 222, 230,
982
    231, 175, 175, 232, 234, 175, 181, 334, 237, 238, 185, 175, 240, 241, 189, 181, 243, 247, 193, 196, 253, 255, 199,
983
    202, 260, 261, 205, 175, 263, 264, 210, 175, 268, 270, 216, 271, 273, 280, 222, 175, 281, 282, 175, 175, 292, 296,
984
    175, 297, 299, 305, 175, 306, 308, 317, 309, 318, 319, 323, 309, 324, 327, 332, 318, 333, 343, 345, 344, 346, 355,
985
    356, 344, 346, 303, 304, 307, 313, 314, 315, 322, 326, 328, 329, 325, 330, 339, 335, 340, 331, 341, 349, 342, 351,
986
    353, 197, 337, 358, 359, 350, 360, 352, 361, 365, 354, 366, 357, 369, 367, 211, 194, 272, 362, 223, 363, 364, 203,
987
    368, 254, 283, 233, 217, 206, 200, 190, 267, 186, 316, 347, 236, 312, 348, 0,   0,   0,   320};
988
989
static const yytype_int16 yycheck[] = {
990
    45,  0,   39,  97,  48,  57,  57,  57,  60,  60,  60,  63,  63,  57,  19,  54,  54,  57,  112, 63,  60,  293, 0,
991
    63,  54,  16,  16,  18,  18,  66,  3,   4,   5,   6,   7,   8,   9,   10,  11,  12,  13,  14,  314, 15,  24,  17,
992
    31,  20,  21,  22,  23,  31,  89,  4,   99,  92,  16,  94,  18,  104, 33,  12,  13,  16,  5,   16,  110, 18,  16,
993
    106, 11,  31,  23,  16,  24,  16,  16,  18,  130, 130, 130, 31,  31,  122, 122, 84,  130, 139, 139, 139, 130, 4,
994
    122, 16,  146, 146, 16,  16,  18,  139, 13,  16,  146, 16,  31,  18,  146, 16,  15,  18,  23,  16,  149, 18,  16,
995
    16,  18,  18,  155, 16,  16,  18,  18,  32,  17,  31,  16,  32,  18,  17,  175, 32,  16,  16,  18,  32,  32,  16,
996
    15,  18,  185, 16,  32,  18,  16,  189, 18,  199, 199, 199, 202, 202, 202, 205, 205, 199, 17,  196, 196, 199, 32,
997
    205, 202, 193, 31,  205, 196, 16,  16,  18,  18,  16,  16,  18,  18,  31,  213, 214, 16,  25,  18,  218, 3,   4,
998
    5,   6,   7,   8,   9,   10,  11,  12,  13,  14,  32,  17,  16,  16,  18,  20,  21,  22,  23,  16,  16,  18,  18,
999
    16,  16,  18,  18,  210, 32,  16,  16,  18,  18,  15,  15,  32,  32,  32,  16,  32,  32,  16,  16,  18,  18,  32,
1000
    32,  16,  16,  18,  18,  16,  25,  18,  275, 27,  16,  32,  18,  16,  16,  18,  18,  15,  31,  17,  287, 15,  15,
1001
    17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,
1002
    15,  17,  17,  15,  15,  17,  17,  328, 15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,
1003
    17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,
1004
    17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,  15,  17,  17,  15,
1005
    15,  17,  17,  16,  16,  16,  16,  28,  17,  26,  17,  16,  16,  31,  16,  16,  30,  16,  26,  15,  17,  16,  15,
1006
    15,  122, 31,  17,  16,  31,  15,  30,  15,  15,  31,  15,  29,  15,  17,  153, 116, 222, 31,  166, 31,  31,  139,
1007
    31,  202, 271, 181, 161, 146, 130, 110, 216, 104, 309, 339, 185, 304, 340, -1,  -1,  -1,  313};
1008
1009
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1010
   state STATE-NUM.  */
1011
static const yytype_int8 yystos[] = {
1012
    0,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 20, 21, 22, 23, 33, 35, 36, 37, 39, 41, 42, 43, 46, 49, 56, 58,
1013
    60, 62, 63, 66, 68, 71, 75, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16,
1014
    18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 16, 18, 32, 19, 0,  31,
1015
    72, 73, 16, 18, 72, 16, 18, 16, 53, 55, 16, 18, 16, 18, 69, 70, 73, 16, 18, 16, 18, 61, 64, 16, 18, 16, 18, 44, 47,
1016
    16, 18, 40, 46, 47, 49, 16, 18, 56, 59, 62, 63, 64, 75, 16, 18, 50, 51, 56, 62, 63, 64, 75, 16, 18, 57, 62, 63, 64,
1017
    75, 16, 18, 72, 16, 18, 36, 38, 16, 18, 16, 16, 18, 16, 65, 67, 16, 18, 16, 45, 48, 16, 18, 24, 31, 16, 18, 36, 31,
1018
    15, 17, 72, 15, 72, 72, 15, 17, 53, 73, 15, 17, 69, 72, 15, 17, 61, 53, 15, 17, 44, 15, 17, 40, 15, 17, 59, 15, 17,
1019
    50, 15, 17, 57, 15, 72, 15, 17, 38, 72, 16, 16, 15, 17, 65, 16, 52, 54, 15, 17, 45, 31, 17, 24, 31, 31, 73, 15, 15,
1020
    15, 55, 15, 15, 70, 15, 15, 64, 15, 15, 47, 15, 46, 47, 49, 15, 56, 62, 63, 64, 75, 15, 51, 15, 62, 63, 64, 75, 15,
1021
    15, 36, 15, 15, 72, 72, 67, 15, 72, 15, 17, 48, 15, 17, 16, 31, 17, 31, 15, 15, 15, 15, 54, 25, 72, 17, 16, 15, 15,
1022
    32, 74, 15, 25, 72, 16, 15, 17, 74, 15, 27, 76, 77, 16, 16, 15, 17, 16, 15, 17, 31, 79, 77, 16, 28, 17, 76, 15, 17,
1023
    15, 79, 74, 26, 15, 17, 31, 17, 15, 16, 16, 16, 26, 15, 17, 73, 30, 78, 31, 80, 16, 16, 15, 16, 15, 17, 15, 17, 78,
1024
    80, 17, 31, 15, 30, 15, 31, 15, 15, 29, 17, 16, 15, 15, 31, 31, 31, 15, 15, 17, 31, 15};
1025
1026
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
1027
static const yytype_int8 yyr1[] = {
1028
    0,  34, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 39, 39,
1029
    39, 39, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 45, 45, 46, 46, 46, 46,
1030
    47, 47, 48, 49, 49, 49, 49, 50, 50, 51, 51, 51, 51, 51, 52, 52, 53, 53, 54, 55, 56, 56, 56, 56, 57, 57, 57, 57,
1031
    57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 61, 61, 62, 62, 62, 62,
1032
    63, 63, 63, 63, 64, 64, 65, 65, 66, 66, 66, 66, 67, 68, 68, 68, 68, 69, 69, 70, 70, 70, 71, 71, 71, 71, 72, 72,
1033
    73, 73, 73, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 77, 77, 78, 78, 79, 79, 80, 80};
1034
1035
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
1036
static const yytype_int8 yyr2[] = {
1037
    0, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1,  1,  1,  1,  1,  1, 4, 5, 3, 2,  3, 1, 4, 5, 3, 2, 3, 3, 3,
1038
    1, 1, 1, 4, 5, 3, 2, 4, 5, 3, 2, 4, 5, 3,  2,  3,  1,  3,  1,  4, 5, 3, 2, 3,  1, 3, 4, 5, 3, 2, 3, 1, 1,
1039
    1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 4, 5, 3, 2,  3,  3,  3,  3,  1,  1, 1, 1, 4, 5,  3, 2, 3, 3, 3, 3, 3, 1, 1,
1040
    1, 1, 1, 4, 5, 3, 2, 3, 1, 4, 5, 3, 2, 4,  5,  3,  2,  3,  1,  3, 1, 6, 7, 3,  2, 5, 4, 5, 3, 2, 3, 1, 1,
1041
    3, 1, 4, 5, 3, 2, 3, 1, 2, 3, 4, 1, 0, 16, 17, 16, 17, 12, 13, 8, 9, 3, 2, 11, 3, 1, 8, 6, 3, 1, 3, 1};
1042
1043
enum
1044
{
1045
  YYENOMEM = -2
1046
};
1047
1048
#define yyerrok (yyerrstatus = 0)
1049
#define yyclearin (yychar = YYEMPTY)
1050
1051
645
#define YYACCEPT goto yyacceptlab
1052
2.06k
#define YYABORT goto yyabortlab
1053
428
#define YYERROR goto yyerrorlab
1054
1
#define YYNOMEM goto yyexhaustedlab
1055
1056
#define YYRECOVERING() (!!yyerrstatus)
1057
1058
#define YYBACKUP(Token, Value) \
1059
  do \
1060
    if (yychar == YYEMPTY) \
1061
    { \
1062
      yychar = (Token); \
1063
      yylval = (Value); \
1064
      YYPOPSTACK(yylen); \
1065
      yystate = *yyssp; \
1066
      goto yybackup; \
1067
    } \
1068
    else \
1069
    { \
1070
      yyerror(YY_("syntax error: cannot back up")); \
1071
      YYERROR; \
1072
    } \
1073
  while (0)
1074
1075
/* Backward compatibility with an undocumented macro.
1076
   Use YYerror or YYUNDEF. */
1077
#define YYERRCODE YYUNDEF
1078
1079
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1080
   If N is 0, then set CURRENT to the empty location which ends
1081
   the previous symbol: RHS[0] (always defined).  */
1082
1083
#ifndef YYLLOC_DEFAULT
1084
#define YYLLOC_DEFAULT(Current, Rhs, N) \
1085
2.11M
  do \
1086
2.11M
    if (N) \
1087
2.11M
    { \
1088
2.11M
      (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \
1089
2.11M
      (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
1090
2.11M
      (Current).last_line = YYRHSLOC(Rhs, N).last_line; \
1091
2.11M
      (Current).last_column = YYRHSLOC(Rhs, N).last_column; \
1092
2.11M
    } \
1093
2.11M
    else \
1094
2.11M
    { \
1095
0
      (Current).first_line = (Current).last_line = YYRHSLOC(Rhs, 0).last_line; \
1096
0
      (Current).first_column = (Current).last_column = YYRHSLOC(Rhs, 0).last_column; \
1097
0
    } \
1098
2.11M
  while (0)
1099
#endif
1100
1101
8.46M
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1102
1103
/* Enable debugging if requested.  */
1104
#if YYDEBUG
1105
1106
#ifndef YYFPRINTF
1107
#include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1108
#define YYFPRINTF fprintf
1109
#endif
1110
1111
#define YYDPRINTF(Args) \
1112
  do \
1113
  { \
1114
    if (yydebug) \
1115
      YYFPRINTF Args; \
1116
  } while (0)
1117
1118
/* YYLOCATION_PRINT -- Print the location on the stream.
1119
   This macro was not mandated originally: define only if we know
1120
   we won't break user code: when these are the locations we know.  */
1121
1122
#ifndef YYLOCATION_PRINT
1123
1124
#if defined YY_LOCATION_PRINT
1125
1126
/* Temporary convenience wrapper in case some people defined the
1127
   undocumented and private YY_LOCATION_PRINT macros.  */
1128
#define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
1129
1130
#elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1131
1132
/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
1133
1134
YY_ATTRIBUTE_UNUSED
1135
static int
1136
yy_location_print_(FILE *yyo, YYLTYPE const *const yylocp)
1137
{
1138
  int res = 0;
1139
  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1140
  if (0 <= yylocp->first_line)
1141
  {
1142
    res += YYFPRINTF(yyo, "%d", yylocp->first_line);
1143
    if (0 <= yylocp->first_column)
1144
      res += YYFPRINTF(yyo, ".%d", yylocp->first_column);
1145
  }
1146
  if (0 <= yylocp->last_line)
1147
  {
1148
    if (yylocp->first_line < yylocp->last_line)
1149
    {
1150
      res += YYFPRINTF(yyo, "-%d", yylocp->last_line);
1151
      if (0 <= end_col)
1152
        res += YYFPRINTF(yyo, ".%d", end_col);
1153
    }
1154
    else if (0 <= end_col && yylocp->first_column < end_col)
1155
      res += YYFPRINTF(yyo, "-%d", end_col);
1156
  }
1157
  return res;
1158
}
1159
1160
#define YYLOCATION_PRINT yy_location_print_
1161
1162
/* Temporary convenience wrapper in case some people defined the
1163
   undocumented and private YY_LOCATION_PRINT macros.  */
1164
#define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
1165
1166
#else
1167
1168
#define YYLOCATION_PRINT(File, Loc) ((void)0)
1169
/* Temporary convenience wrapper in case some people defined the
1170
   undocumented and private YY_LOCATION_PRINT macros.  */
1171
#define YY_LOCATION_PRINT YYLOCATION_PRINT
1172
1173
#endif
1174
#endif /* !defined YYLOCATION_PRINT */
1175
1176
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1177
  do \
1178
  { \
1179
    if (yydebug) \
1180
    { \
1181
      YYFPRINTF(stderr, "%s ", Title); \
1182
      yy_symbol_print(stderr, Kind, Value, Location); \
1183
      YYFPRINTF(stderr, "\n"); \
1184
    } \
1185
  } while (0)
1186
1187
/*-----------------------------------.
1188
| Print this symbol's value on YYO.  |
1189
`-----------------------------------*/
1190
1191
static void
1192
yy_symbol_value_print(FILE *yyo,
1193
          yysymbol_kind_t yykind,
1194
          YYSTYPE const *const yyvaluep,
1195
          YYLTYPE const *const yylocationp)
1196
{
1197
  FILE *yyoutput = yyo;
1198
  YY_USE(yyoutput);
1199
  YY_USE(yylocationp);
1200
  if (!yyvaluep)
1201
    return;
1202
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1203
  YY_USE(yykind);
1204
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1205
}
1206
1207
/*---------------------------.
1208
| Print this symbol on YYO.  |
1209
`---------------------------*/
1210
1211
static void
1212
yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep, YYLTYPE const *const yylocationp)
1213
{
1214
  YYFPRINTF(yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name(yykind));
1215
1216
  YYLOCATION_PRINT(yyo, yylocationp);
1217
  YYFPRINTF(yyo, ": ");
1218
  yy_symbol_value_print(yyo, yykind, yyvaluep, yylocationp);
1219
  YYFPRINTF(yyo, ")");
1220
}
1221
1222
/*------------------------------------------------------------------.
1223
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1224
| TOP (included).                                                   |
1225
`------------------------------------------------------------------*/
1226
1227
static void
1228
yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
1229
{
1230
  YYFPRINTF(stderr, "Stack now");
1231
  for (; yybottom <= yytop; yybottom++)
1232
  {
1233
    int yybot = *yybottom;
1234
    YYFPRINTF(stderr, " %d", yybot);
1235
  }
1236
  YYFPRINTF(stderr, "\n");
1237
}
1238
1239
#define YY_STACK_PRINT(Bottom, Top) \
1240
  do \
1241
  { \
1242
    if (yydebug) \
1243
      yy_stack_print((Bottom), (Top)); \
1244
  } while (0)
1245
1246
/*------------------------------------------------.
1247
| Report that the YYRULE is going to be reduced.  |
1248
`------------------------------------------------*/
1249
1250
static void
1251
yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
1252
{
1253
  int yylno = yyrline[yyrule];
1254
  int yynrhs = yyr2[yyrule];
1255
  int yyi;
1256
  YYFPRINTF(stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno);
1257
  /* The symbols being reduced.  */
1258
  for (yyi = 0; yyi < yynrhs; yyi++)
1259
  {
1260
    YYFPRINTF(stderr, "   $%d = ", yyi + 1);
1261
    yy_symbol_print(stderr,
1262
        YY_ACCESSING_SYMBOL(+yyssp[yyi + 1 - yynrhs]),
1263
        &yyvsp[(yyi + 1) - (yynrhs)],
1264
        &(yylsp[(yyi + 1) - (yynrhs)]));
1265
    YYFPRINTF(stderr, "\n");
1266
  }
1267
}
1268
1269
#define YY_REDUCE_PRINT(Rule) \
1270
  do \
1271
  { \
1272
    if (yydebug) \
1273
      yy_reduce_print(yyssp, yyvsp, yylsp, Rule); \
1274
  } while (0)
1275
1276
/* Nonzero means print parse trace.  It is left uninitialized so that
1277
   multiple parsers can coexist.  */
1278
int yydebug;
1279
#else /* !YYDEBUG */
1280
7.11M
#define YYDPRINTF(Args) ((void)0)
1281
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1282
#define YY_STACK_PRINT(Bottom, Top)
1283
#define YY_REDUCE_PRINT(Rule)
1284
#endif /* !YYDEBUG */
1285
1286
/* YYINITDEPTH -- initial size of the parser's stacks.  */
1287
#ifndef YYINITDEPTH
1288
2.71k
#define YYINITDEPTH 200
1289
#endif
1290
1291
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1292
   if the built-in stack extension method is used).
1293
1294
   Do not make this value too large; the results are undefined if
1295
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1296
   evaluated with infinite-precision integer arithmetic.  */
1297
1298
#ifndef YYMAXDEPTH
1299
103
#define YYMAXDEPTH 10000
1300
#endif
1301
1302
/*-----------------------------------------------.
1303
| Release the memory associated to this symbol.  |
1304
`-----------------------------------------------*/
1305
1306
static void
1307
yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1308
33.2k
{
1309
33.2k
  YY_USE(yyvaluep);
1310
33.2k
  YY_USE(yylocationp);
1311
33.2k
  if (!yymsg)
1312
0
    yymsg = "Deleting";
1313
33.2k
  YY_SYMBOL_PRINT(yymsg, yykind, yyvaluep, yylocationp);
1314
1315
33.2k
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1316
33.2k
  switch (yykind)
1317
33.2k
  {
1318
0
  case YYSYMBOL_geometry_no_srid: /* geometry_no_srid  */
1319
0
#line 363 "lwin_wkt_parse.y"
1320
0
  {
1321
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1322
0
  }
1323
0
#line 1487 "lwin_wkt_parse.c"
1324
0
  break;
1325
1326
0
  case YYSYMBOL_geometrycollection: /* geometrycollection  */
1327
0
#line 364 "lwin_wkt_parse.y"
1328
0
  {
1329
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1330
0
  }
1331
0
#line 1493 "lwin_wkt_parse.c"
1332
0
  break;
1333
1334
5.35k
  case YYSYMBOL_geometry_list: /* geometry_list  */
1335
5.35k
#line 365 "lwin_wkt_parse.y"
1336
5.35k
  {
1337
5.35k
    lwgeom_free(((*yyvaluep).geometryvalue));
1338
5.35k
  }
1339
5.35k
#line 1499 "lwin_wkt_parse.c"
1340
5.35k
  break;
1341
1342
0
  case YYSYMBOL_multisurface: /* multisurface  */
1343
0
#line 372 "lwin_wkt_parse.y"
1344
0
  {
1345
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1346
0
  }
1347
0
#line 1505 "lwin_wkt_parse.c"
1348
0
  break;
1349
1350
192
  case YYSYMBOL_surface_list: /* surface_list  */
1351
192
#line 350 "lwin_wkt_parse.y"
1352
192
  {
1353
192
    lwgeom_free(((*yyvaluep).geometryvalue));
1354
192
  }
1355
192
#line 1511 "lwin_wkt_parse.c"
1356
192
  break;
1357
1358
0
  case YYSYMBOL_tin: /* tin  */
1359
0
#line 380 "lwin_wkt_parse.y"
1360
0
  {
1361
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1362
0
  }
1363
0
#line 1517 "lwin_wkt_parse.c"
1364
0
  break;
1365
1366
0
  case YYSYMBOL_polyhedralsurface: /* polyhedralsurface  */
1367
0
#line 378 "lwin_wkt_parse.y"
1368
0
  {
1369
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1370
0
  }
1371
0
#line 1523 "lwin_wkt_parse.c"
1372
0
  break;
1373
1374
0
  case YYSYMBOL_multipolygon: /* multipolygon  */
1375
0
#line 371 "lwin_wkt_parse.y"
1376
0
  {
1377
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1378
0
  }
1379
0
#line 1529 "lwin_wkt_parse.c"
1380
0
  break;
1381
1382
25
  case YYSYMBOL_polygon_list: /* polygon_list  */
1383
25
#line 351 "lwin_wkt_parse.y"
1384
25
  {
1385
25
    lwgeom_free(((*yyvaluep).geometryvalue));
1386
25
  }
1387
25
#line 1535 "lwin_wkt_parse.c"
1388
25
  break;
1389
1390
26
  case YYSYMBOL_patch_list: /* patch_list  */
1391
26
#line 352 "lwin_wkt_parse.y"
1392
26
  {
1393
26
    lwgeom_free(((*yyvaluep).geometryvalue));
1394
26
  }
1395
26
#line 1541 "lwin_wkt_parse.c"
1396
26
  break;
1397
1398
0
  case YYSYMBOL_polygon: /* polygon  */
1399
0
#line 375 "lwin_wkt_parse.y"
1400
0
  {
1401
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1402
0
  }
1403
0
#line 1547 "lwin_wkt_parse.c"
1404
0
  break;
1405
1406
0
  case YYSYMBOL_polygon_untagged: /* polygon_untagged  */
1407
0
#line 377 "lwin_wkt_parse.y"
1408
0
  {
1409
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1410
0
  }
1411
0
#line 1553 "lwin_wkt_parse.c"
1412
0
  break;
1413
1414
0
  case YYSYMBOL_patch: /* patch  */
1415
0
#line 376 "lwin_wkt_parse.y"
1416
0
  {
1417
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1418
0
  }
1419
0
#line 1559 "lwin_wkt_parse.c"
1420
0
  break;
1421
1422
0
  case YYSYMBOL_curvepolygon: /* curvepolygon  */
1423
0
#line 361 "lwin_wkt_parse.y"
1424
0
  {
1425
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1426
0
  }
1427
0
#line 1565 "lwin_wkt_parse.c"
1428
0
  break;
1429
1430
76
  case YYSYMBOL_curvering_list: /* curvering_list  */
1431
76
#line 348 "lwin_wkt_parse.y"
1432
76
  {
1433
76
    lwgeom_free(((*yyvaluep).geometryvalue));
1434
76
  }
1435
76
#line 1571 "lwin_wkt_parse.c"
1436
76
  break;
1437
1438
0
  case YYSYMBOL_curvering: /* curvering  */
1439
0
#line 362 "lwin_wkt_parse.y"
1440
0
  {
1441
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1442
0
  }
1443
0
#line 1577 "lwin_wkt_parse.c"
1444
0
  break;
1445
1446
23
  case YYSYMBOL_patchring_list: /* patchring_list  */
1447
23
#line 358 "lwin_wkt_parse.y"
1448
23
  {
1449
23
    lwgeom_free(((*yyvaluep).geometryvalue));
1450
23
  }
1451
23
#line 1583 "lwin_wkt_parse.c"
1452
23
  break;
1453
1454
56
  case YYSYMBOL_ring_list: /* ring_list  */
1455
56
#line 357 "lwin_wkt_parse.y"
1456
56
  {
1457
56
    lwgeom_free(((*yyvaluep).geometryvalue));
1458
56
  }
1459
56
#line 1589 "lwin_wkt_parse.c"
1460
56
  break;
1461
1462
0
  case YYSYMBOL_patchring: /* patchring  */
1463
0
#line 342 "lwin_wkt_parse.y"
1464
0
  {
1465
0
    ptarray_free(((*yyvaluep).ptarrayvalue));
1466
0
  }
1467
0
#line 1595 "lwin_wkt_parse.c"
1468
0
  break;
1469
1470
0
  case YYSYMBOL_ring: /* ring  */
1471
0
#line 341 "lwin_wkt_parse.y"
1472
0
  {
1473
0
    ptarray_free(((*yyvaluep).ptarrayvalue));
1474
0
  }
1475
0
#line 1601 "lwin_wkt_parse.c"
1476
0
  break;
1477
1478
0
  case YYSYMBOL_compoundcurve: /* compoundcurve  */
1479
0
#line 360 "lwin_wkt_parse.y"
1480
0
  {
1481
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1482
0
  }
1483
0
#line 1607 "lwin_wkt_parse.c"
1484
0
  break;
1485
1486
93
  case YYSYMBOL_compound_list: /* compound_list  */
1487
93
#line 356 "lwin_wkt_parse.y"
1488
93
  {
1489
93
    lwgeom_free(((*yyvaluep).geometryvalue));
1490
93
  }
1491
93
#line 1613 "lwin_wkt_parse.c"
1492
93
  break;
1493
1494
0
  case YYSYMBOL_multicurve: /* multicurve  */
1495
0
#line 368 "lwin_wkt_parse.y"
1496
0
  {
1497
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1498
0
  }
1499
0
#line 1619 "lwin_wkt_parse.c"
1500
0
  break;
1501
1502
264
  case YYSYMBOL_curve_list: /* curve_list  */
1503
264
#line 355 "lwin_wkt_parse.y"
1504
264
  {
1505
264
    lwgeom_free(((*yyvaluep).geometryvalue));
1506
264
  }
1507
264
#line 1625 "lwin_wkt_parse.c"
1508
264
  break;
1509
1510
0
  case YYSYMBOL_multilinestring: /* multilinestring  */
1511
0
#line 369 "lwin_wkt_parse.y"
1512
0
  {
1513
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1514
0
  }
1515
0
#line 1631 "lwin_wkt_parse.c"
1516
0
  break;
1517
1518
15
  case YYSYMBOL_linestring_list: /* linestring_list  */
1519
15
#line 354 "lwin_wkt_parse.y"
1520
15
  {
1521
15
    lwgeom_free(((*yyvaluep).geometryvalue));
1522
15
  }
1523
15
#line 1637 "lwin_wkt_parse.c"
1524
15
  break;
1525
1526
0
  case YYSYMBOL_circularstring: /* circularstring  */
1527
0
#line 359 "lwin_wkt_parse.y"
1528
0
  {
1529
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1530
0
  }
1531
0
#line 1643 "lwin_wkt_parse.c"
1532
0
  break;
1533
1534
0
  case YYSYMBOL_linestring: /* linestring  */
1535
0
#line 366 "lwin_wkt_parse.y"
1536
0
  {
1537
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1538
0
  }
1539
0
#line 1649 "lwin_wkt_parse.c"
1540
0
  break;
1541
1542
0
  case YYSYMBOL_linestring_untagged: /* linestring_untagged  */
1543
0
#line 367 "lwin_wkt_parse.y"
1544
0
  {
1545
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1546
0
  }
1547
0
#line 1655 "lwin_wkt_parse.c"
1548
0
  break;
1549
1550
31
  case YYSYMBOL_triangle_list: /* triangle_list  */
1551
31
#line 349 "lwin_wkt_parse.y"
1552
31
  {
1553
31
    lwgeom_free(((*yyvaluep).geometryvalue));
1554
31
  }
1555
31
#line 1661 "lwin_wkt_parse.c"
1556
31
  break;
1557
1558
0
  case YYSYMBOL_triangle: /* triangle  */
1559
0
#line 381 "lwin_wkt_parse.y"
1560
0
  {
1561
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1562
0
  }
1563
0
#line 1667 "lwin_wkt_parse.c"
1564
0
  break;
1565
1566
0
  case YYSYMBOL_triangle_untagged: /* triangle_untagged  */
1567
0
#line 382 "lwin_wkt_parse.y"
1568
0
  {
1569
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1570
0
  }
1571
0
#line 1673 "lwin_wkt_parse.c"
1572
0
  break;
1573
1574
0
  case YYSYMBOL_multipoint: /* multipoint  */
1575
0
#line 370 "lwin_wkt_parse.y"
1576
0
  {
1577
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1578
0
  }
1579
0
#line 1679 "lwin_wkt_parse.c"
1580
0
  break;
1581
1582
66
  case YYSYMBOL_point_list: /* point_list  */
1583
66
#line 353 "lwin_wkt_parse.y"
1584
66
  {
1585
66
    lwgeom_free(((*yyvaluep).geometryvalue));
1586
66
  }
1587
66
#line 1685 "lwin_wkt_parse.c"
1588
66
  break;
1589
1590
0
  case YYSYMBOL_point_untagged: /* point_untagged  */
1591
0
#line 374 "lwin_wkt_parse.y"
1592
0
  {
1593
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1594
0
  }
1595
0
#line 1691 "lwin_wkt_parse.c"
1596
0
  break;
1597
1598
0
  case YYSYMBOL_point: /* point  */
1599
0
#line 373 "lwin_wkt_parse.y"
1600
0
  {
1601
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1602
0
  }
1603
0
#line 1697 "lwin_wkt_parse.c"
1604
0
  break;
1605
1606
67
  case YYSYMBOL_ptarray: /* ptarray  */
1607
67
#line 340 "lwin_wkt_parse.y"
1608
67
  {
1609
67
    ptarray_free(((*yyvaluep).ptarrayvalue));
1610
67
  }
1611
67
#line 1703 "lwin_wkt_parse.c"
1612
67
  break;
1613
1614
0
  case YYSYMBOL_nurbscurve: /* nurbscurve  */
1615
0
#line 379 "lwin_wkt_parse.y"
1616
0
  {
1617
0
    lwgeom_free(((*yyvaluep).geometryvalue));
1618
0
  }
1619
0
#line 1709 "lwin_wkt_parse.c"
1620
0
  break;
1621
1622
0
  case YYSYMBOL_iso_controlpoint: /* iso_controlpoint  */
1623
0
#line 346 "lwin_wkt_parse.y"
1624
0
  {
1625
0
    wkt_parser_nurbs_controlpoints_free(((*yyvaluep).nurbscontrolpointsvalue));
1626
0
  }
1627
0
#line 1715 "lwin_wkt_parse.c"
1628
0
  break;
1629
1630
0
  case YYSYMBOL_iso_controlpoint_list: /* iso_controlpoint_list  */
1631
0
#line 347 "lwin_wkt_parse.y"
1632
0
  {
1633
0
    wkt_parser_nurbs_controlpoints_free(((*yyvaluep).nurbscontrolpointsvalue));
1634
0
  }
1635
0
#line 1721 "lwin_wkt_parse.c"
1636
0
  break;
1637
1638
0
  case YYSYMBOL_iso_knot_list: /* iso_knot_list  */
1639
0
#line 345 "lwin_wkt_parse.y"
1640
0
  {
1641
0
    ptarray_free(((*yyvaluep).ptarrayvalue));
1642
0
  }
1643
0
#line 1727 "lwin_wkt_parse.c"
1644
0
  break;
1645
1646
0
  case YYSYMBOL_weight_list: /* weight_list  */
1647
0
#line 343 "lwin_wkt_parse.y"
1648
0
  {
1649
0
    ptarray_free(((*yyvaluep).ptarrayvalue));
1650
0
  }
1651
0
#line 1733 "lwin_wkt_parse.c"
1652
0
  break;
1653
1654
0
  case YYSYMBOL_knot_list: /* knot_list  */
1655
0
#line 344 "lwin_wkt_parse.y"
1656
0
  {
1657
0
    ptarray_free(((*yyvaluep).ptarrayvalue));
1658
0
  }
1659
0
#line 1739 "lwin_wkt_parse.c"
1660
0
  break;
1661
1662
27.0k
  default:
1663
27.0k
    break;
1664
33.2k
  }
1665
33.2k
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1666
33.2k
}
1667
1668
/* Lookahead token kind.  */
1669
int yychar;
1670
1671
/* The semantic value of the lookahead symbol.  */
1672
YYSTYPE yylval;
1673
/* Location data for the lookahead symbol.  */
1674
YYLTYPE yylloc
1675
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1676
    = {1, 1, 1, 1}
1677
#endif
1678
;
1679
/* Number of syntax errors so far.  */
1680
int yynerrs;
1681
1682
/*----------.
1683
| yyparse.  |
1684
`----------*/
1685
1686
int
1687
yyparse(void)
1688
2.71k
{
1689
2.71k
  yy_state_fast_t yystate = 0;
1690
  /* Number of tokens to shift before error messages enabled.  */
1691
2.71k
  int yyerrstatus = 0;
1692
1693
  /* Refer to the stacks through separate pointers, to allow yyoverflow
1694
     to reallocate them elsewhere.  */
1695
1696
  /* Their size.  */
1697
2.71k
  YYPTRDIFF_T yystacksize = YYINITDEPTH;
1698
1699
  /* The state stack: array, bottom, top.  */
1700
2.71k
  yy_state_t yyssa[YYINITDEPTH];
1701
2.71k
  yy_state_t *yyss = yyssa;
1702
2.71k
  yy_state_t *yyssp = yyss;
1703
1704
  /* The semantic value stack: array, bottom, top.  */
1705
2.71k
  YYSTYPE yyvsa[YYINITDEPTH];
1706
2.71k
  YYSTYPE *yyvs = yyvsa;
1707
2.71k
  YYSTYPE *yyvsp = yyvs;
1708
1709
  /* The location stack: array, bottom, top.  */
1710
2.71k
  YYLTYPE yylsa[YYINITDEPTH];
1711
2.71k
  YYLTYPE *yyls = yylsa;
1712
2.71k
  YYLTYPE *yylsp = yyls;
1713
1714
2.71k
  int yyn;
1715
  /* The return value of yyparse.  */
1716
2.71k
  int yyresult;
1717
  /* Lookahead symbol kind.  */
1718
2.71k
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1719
  /* The variables used to return semantic value and location from the
1720
     action routines.  */
1721
2.71k
  YYSTYPE yyval;
1722
2.71k
  YYLTYPE yyloc;
1723
1724
  /* The locations where the error started and ended.  */
1725
2.71k
  YYLTYPE yyerror_range[3];
1726
1727
2.15M
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1728
1729
  /* The number of symbols on the RHS of the reduced rule.
1730
     Keep to zero when no symbol should be popped.  */
1731
2.71k
  int yylen = 0;
1732
1733
2.71k
  YYDPRINTF((stderr, "Starting parse\n"));
1734
1735
2.71k
  yychar = YYEMPTY; /* Cause a token to be read.  */
1736
1737
2.71k
  yylsp[0] = yylloc;
1738
2.71k
  goto yysetstate;
1739
1740
/*------------------------------------------------------------.
1741
| yynewstate -- push a new state, which is found in yystate.  |
1742
`------------------------------------------------------------*/
1743
4.61M
yynewstate:
1744
  /* In all cases, when you get here, the value and location stacks
1745
     have just been pushed.  So pushing a state here evens the stacks.  */
1746
4.61M
  yyssp++;
1747
1748
/*--------------------------------------------------------------------.
1749
| yysetstate -- set current state (the top of the stack) to yystate.  |
1750
`--------------------------------------------------------------------*/
1751
4.61M
yysetstate:
1752
4.61M
  YYDPRINTF((stderr, "Entering state %d\n", yystate));
1753
4.61M
  YY_ASSERT(0 <= yystate && yystate < YYNSTATES);
1754
4.61M
  YY_IGNORE_USELESS_CAST_BEGIN
1755
4.61M
  *yyssp = YY_CAST(yy_state_t, yystate);
1756
4.61M
  YY_IGNORE_USELESS_CAST_END
1757
4.61M
  YY_STACK_PRINT(yyss, yyssp);
1758
1759
4.61M
  if (yyss + yystacksize - 1 <= yyssp)
1760
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1761
    YYNOMEM;
1762
#else
1763
51
  {
1764
    /* Get the current used size of the three stacks, in elements.  */
1765
51
    YYPTRDIFF_T yysize = yyssp - yyss + 1;
1766
1767
#if defined yyoverflow
1768
    {
1769
      /* Give user a chance to reallocate the stack.  Use copies of
1770
         these so that the &'s don't force the real ones into
1771
         memory.  */
1772
      yy_state_t *yyss1 = yyss;
1773
      YYSTYPE *yyvs1 = yyvs;
1774
      YYLTYPE *yyls1 = yyls;
1775
1776
      /* Each stack pointer address is followed by the size of the
1777
         data in use in that stack, in bytes.  This used to be a
1778
         conditional around just the two extra args, but that might
1779
         be undefined if yyoverflow is a macro.  */
1780
      yyoverflow(YY_("memory exhausted"),
1781
           &yyss1,
1782
           yysize * YYSIZEOF(*yyssp),
1783
           &yyvs1,
1784
           yysize * YYSIZEOF(*yyvsp),
1785
           &yyls1,
1786
           yysize * YYSIZEOF(*yylsp),
1787
           &yystacksize);
1788
      yyss = yyss1;
1789
      yyvs = yyvs1;
1790
      yyls = yyls1;
1791
    }
1792
#else /* defined YYSTACK_RELOCATE */
1793
    /* Extend the stack our own way.  */
1794
51
    if (YYMAXDEPTH <= yystacksize)
1795
1
      YYNOMEM;
1796
50
    yystacksize *= 2;
1797
50
    if (YYMAXDEPTH < yystacksize)
1798
2
      yystacksize = YYMAXDEPTH;
1799
1800
50
    {
1801
50
      yy_state_t *yyss1 = yyss;
1802
50
      union yyalloc *yyptr =
1803
50
          YY_CAST(union yyalloc *, YYSTACK_ALLOC(YY_CAST(YYSIZE_T, YYSTACK_BYTES(yystacksize))));
1804
50
      if (!yyptr)
1805
0
        YYNOMEM;
1806
50
      YYSTACK_RELOCATE(yyss_alloc, yyss);
1807
50
      YYSTACK_RELOCATE(yyvs_alloc, yyvs);
1808
50
      YYSTACK_RELOCATE(yyls_alloc, yyls);
1809
50
#undef YYSTACK_RELOCATE
1810
50
      if (yyss1 != yyssa)
1811
24
        YYSTACK_FREE(yyss1);
1812
50
    }
1813
0
#endif
1814
1815
0
    yyssp = yyss + yysize - 1;
1816
50
    yyvsp = yyvs + yysize - 1;
1817
50
    yylsp = yyls + yysize - 1;
1818
1819
50
    YY_IGNORE_USELESS_CAST_BEGIN
1820
50
    YYDPRINTF((stderr, "Stack size increased to %ld\n", YY_CAST(long, yystacksize)));
1821
50
    YY_IGNORE_USELESS_CAST_END
1822
1823
50
    if (yyss + yystacksize - 1 <= yyssp)
1824
0
      YYABORT;
1825
50
  }
1826
4.61M
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1827
1828
4.61M
  if (yystate == YYFINAL)
1829
645
    YYACCEPT;
1830
1831
4.61M
  goto yybackup;
1832
1833
/*-----------.
1834
| yybackup.  |
1835
`-----------*/
1836
4.61M
yybackup:
1837
  /* Do appropriate processing given the current state.  Read a
1838
     lookahead token if we need one and don't already have one.  */
1839
1840
  /* First try to decide what to do without reference to lookahead token.  */
1841
4.61M
  yyn = yypact[yystate];
1842
4.61M
  if (yypact_value_is_default(yyn))
1843
1.52M
    goto yydefault;
1844
1845
  /* Not known => get a lookahead token if don't already have one.  */
1846
1847
  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1848
3.08M
  if (yychar == YYEMPTY)
1849
2.49M
  {
1850
2.49M
    YYDPRINTF((stderr, "Reading a token\n"));
1851
2.49M
    yychar = yylex();
1852
2.49M
  }
1853
1854
3.08M
  if (yychar <= YYEOF)
1855
2.05k
  {
1856
2.05k
    yychar = YYEOF;
1857
2.05k
    yytoken = YYSYMBOL_YYEOF;
1858
2.05k
    YYDPRINTF((stderr, "Now at end of input.\n"));
1859
2.05k
  }
1860
3.08M
  else if (yychar == YYerror)
1861
0
  {
1862
    /* The scanner already issued an error message, process directly
1863
       to error recovery.  But do not keep the error token as
1864
       lookahead, it is too special and may lead us to an endless
1865
       loop in error recovery. */
1866
0
    yychar = YYUNDEF;
1867
0
    yytoken = YYSYMBOL_YYerror;
1868
0
    yyerror_range[1] = yylloc;
1869
0
    goto yyerrlab1;
1870
0
  }
1871
3.08M
  else
1872
3.08M
  {
1873
3.08M
    yytoken = YYTRANSLATE(yychar);
1874
3.08M
    YY_SYMBOL_PRINT("Next token is", yytoken, &yylval, &yylloc);
1875
3.08M
  }
1876
1877
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1878
     detect an error, take that action.  */
1879
3.08M
  yyn += yytoken;
1880
3.08M
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1881
588k
    goto yydefault;
1882
2.49M
  yyn = yytable[yyn];
1883
2.49M
  if (yyn <= 0)
1884
0
  {
1885
0
    if (yytable_value_is_error(yyn))
1886
0
      goto yyerrlab;
1887
0
    yyn = -yyn;
1888
0
    goto yyreduce;
1889
0
  }
1890
1891
  /* Count tokens shifted since error; after three, turn off error
1892
     status.  */
1893
2.49M
  if (yyerrstatus)
1894
0
    yyerrstatus--;
1895
1896
  /* Shift the lookahead token.  */
1897
2.49M
  YY_SYMBOL_PRINT("Shifting", yytoken, &yylval, &yylloc);
1898
2.49M
  yystate = yyn;
1899
2.49M
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1900
2.49M
  *++yyvsp = yylval;
1901
2.49M
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1902
2.49M
  *++yylsp = yylloc;
1903
1904
  /* Discard the shifted token.  */
1905
2.49M
  yychar = YYEMPTY;
1906
2.49M
  goto yynewstate;
1907
1908
/*-----------------------------------------------------------.
1909
| yydefault -- do the default action for the current state.  |
1910
`-----------------------------------------------------------*/
1911
2.11M
yydefault:
1912
2.11M
  yyn = yydefact[yystate];
1913
2.11M
  if (yyn == 0)
1914
1.63k
    goto yyerrlab;
1915
2.11M
  goto yyreduce;
1916
1917
/*-----------------------------.
1918
| yyreduce -- do a reduction.  |
1919
`-----------------------------*/
1920
2.11M
yyreduce:
1921
  /* yyn is the number of a rule to reduce with.  */
1922
2.11M
  yylen = yyr2[yyn];
1923
1924
  /* If YYLEN is nonzero, implement the default value of the action:
1925
     '$$ = $1'.
1926
1927
     Otherwise, the following line sets YYVAL to garbage.
1928
     This behavior is undocumented and Bison
1929
     users should not rely upon it.  Assigning to YYVAL
1930
     unconditionally makes the parser a bit smaller, and it avoids a
1931
     GCC warning that YYVAL may be used uninitialized.  */
1932
2.11M
  yyval = yyvsp[1 - yylen];
1933
1934
  /* Default location. */
1935
2.11M
  YYLLOC_DEFAULT(yyloc, (yylsp - yylen), yylen);
1936
2.11M
  yyerror_range[1] = yyloc;
1937
2.11M
  YY_REDUCE_PRINT(yyn);
1938
2.11M
  switch (yyn)
1939
2.11M
  {
1940
639
  case 2: /* geometry: geometry_no_srid  */
1941
639
#line 388 "lwin_wkt_parse.y"
1942
639
  {
1943
639
    wkt_parser_geometry_new((yyvsp[0].geometryvalue), SRID_UNKNOWN);
1944
639
    WKT_ERROR();
1945
639
  }
1946
0
#line 2034 "lwin_wkt_parse.c"
1947
0
  break;
1948
1949
47
  case 3: /* geometry: SRID_TOK SEMICOLON_TOK geometry_no_srid  */
1950
47
#line 390 "lwin_wkt_parse.y"
1951
47
  {
1952
47
    wkt_parser_geometry_new((yyvsp[0].geometryvalue), (yyvsp[-2].integervalue));
1953
47
    WKT_ERROR();
1954
47
  }
1955
0
#line 2040 "lwin_wkt_parse.c"
1956
0
  break;
1957
1958
1.68k
  case 4: /* geometry_no_srid: point  */
1959
1.68k
#line 393 "lwin_wkt_parse.y"
1960
1.68k
  {
1961
1.68k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
1962
1.68k
  }
1963
1.68k
#line 2046 "lwin_wkt_parse.c"
1964
1.68k
  break;
1965
1966
200
  case 5: /* geometry_no_srid: linestring  */
1967
200
#line 394 "lwin_wkt_parse.y"
1968
200
  {
1969
200
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
1970
200
  }
1971
200
#line 2052 "lwin_wkt_parse.c"
1972
200
  break;
1973
1974
414
  case 6: /* geometry_no_srid: circularstring  */
1975
414
#line 395 "lwin_wkt_parse.y"
1976
414
  {
1977
414
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
1978
414
  }
1979
414
#line 2058 "lwin_wkt_parse.c"
1980
414
  break;
1981
1982
365
  case 7: /* geometry_no_srid: compoundcurve  */
1983
365
#line 396 "lwin_wkt_parse.y"
1984
365
  {
1985
365
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
1986
365
  }
1987
365
#line 2064 "lwin_wkt_parse.c"
1988
365
  break;
1989
1990
216
  case 8: /* geometry_no_srid: polygon  */
1991
216
#line 397 "lwin_wkt_parse.y"
1992
216
  {
1993
216
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
1994
216
  }
1995
216
#line 2070 "lwin_wkt_parse.c"
1996
216
  break;
1997
1998
428
  case 9: /* geometry_no_srid: curvepolygon  */
1999
428
#line 398 "lwin_wkt_parse.y"
2000
428
  {
2001
428
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2002
428
  }
2003
428
#line 2076 "lwin_wkt_parse.c"
2004
428
  break;
2005
2006
1.62k
  case 10: /* geometry_no_srid: multipoint  */
2007
1.62k
#line 399 "lwin_wkt_parse.y"
2008
1.62k
  {
2009
1.62k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2010
1.62k
  }
2011
1.62k
#line 2082 "lwin_wkt_parse.c"
2012
1.62k
  break;
2013
2014
1.19k
  case 11: /* geometry_no_srid: multilinestring  */
2015
1.19k
#line 400 "lwin_wkt_parse.y"
2016
1.19k
  {
2017
1.19k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2018
1.19k
  }
2019
1.19k
#line 2088 "lwin_wkt_parse.c"
2020
1.19k
  break;
2021
2022
1.07k
  case 12: /* geometry_no_srid: multipolygon  */
2023
1.07k
#line 401 "lwin_wkt_parse.y"
2024
1.07k
  {
2025
1.07k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2026
1.07k
  }
2027
1.07k
#line 2094 "lwin_wkt_parse.c"
2028
1.07k
  break;
2029
2030
1.63k
  case 13: /* geometry_no_srid: multisurface  */
2031
1.63k
#line 402 "lwin_wkt_parse.y"
2032
1.63k
  {
2033
1.63k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2034
1.63k
  }
2035
1.63k
#line 2100 "lwin_wkt_parse.c"
2036
1.63k
  break;
2037
2038
1.84k
  case 14: /* geometry_no_srid: multicurve  */
2039
1.84k
#line 403 "lwin_wkt_parse.y"
2040
1.84k
  {
2041
1.84k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2042
1.84k
  }
2043
1.84k
#line 2106 "lwin_wkt_parse.c"
2044
1.84k
  break;
2045
2046
8.11k
  case 15: /* geometry_no_srid: tin  */
2047
8.11k
#line 404 "lwin_wkt_parse.y"
2048
8.11k
  {
2049
8.11k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2050
8.11k
  }
2051
8.11k
#line 2112 "lwin_wkt_parse.c"
2052
8.11k
  break;
2053
2054
1.08k
  case 16: /* geometry_no_srid: polyhedralsurface  */
2055
1.08k
#line 405 "lwin_wkt_parse.y"
2056
1.08k
  {
2057
1.08k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2058
1.08k
  }
2059
1.08k
#line 2118 "lwin_wkt_parse.c"
2060
1.08k
  break;
2061
2062
1.76k
  case 17: /* geometry_no_srid: triangle  */
2063
1.76k
#line 406 "lwin_wkt_parse.y"
2064
1.76k
  {
2065
1.76k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2066
1.76k
  }
2067
1.76k
#line 2124 "lwin_wkt_parse.c"
2068
1.76k
  break;
2069
2070
0
  case 18: /* geometry_no_srid: nurbscurve  */
2071
0
#line 407 "lwin_wkt_parse.y"
2072
0
  {
2073
0
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2074
0
  }
2075
0
#line 2130 "lwin_wkt_parse.c"
2076
0
  break;
2077
2078
4.76k
  case 19: /* geometry_no_srid: geometrycollection  */
2079
4.76k
#line 408 "lwin_wkt_parse.y"
2080
4.76k
  {
2081
4.76k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2082
4.76k
  }
2083
4.76k
#line 2136 "lwin_wkt_parse.c"
2084
4.76k
  break;
2085
2086
3.13k
  case 20: /* geometrycollection: COLLECTION_TOK LBRACKET_TOK geometry_list RBRACKET_TOK  */
2087
3.13k
#line 412 "lwin_wkt_parse.y"
2088
3.13k
  {
2089
3.13k
    (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), NULL);
2090
3.13k
    WKT_ERROR();
2091
3.13k
  }
2092
0
#line 2142 "lwin_wkt_parse.c"
2093
0
  break;
2094
2095
1.27k
  case 21: /* geometrycollection: COLLECTION_TOK DIMENSIONALITY_TOK LBRACKET_TOK geometry_list RBRACKET_TOK  */
2096
1.27k
#line 414 "lwin_wkt_parse.y"
2097
1.27k
  {
2098
1.27k
    (yyval.geometryvalue) =
2099
1.27k
        wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2100
1.27k
    WKT_ERROR();
2101
1.21k
  }
2102
0
#line 2148 "lwin_wkt_parse.c"
2103
0
  break;
2104
2105
199
  case 22: /* geometrycollection: COLLECTION_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2106
199
#line 416 "lwin_wkt_parse.y"
2107
199
  {
2108
199
    (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[-1].stringvalue));
2109
199
    WKT_ERROR();
2110
199
  }
2111
0
#line 2154 "lwin_wkt_parse.c"
2112
0
  break;
2113
2114
215
  case 23: /* geometrycollection: COLLECTION_TOK EMPTY_TOK  */
2115
215
#line 418 "lwin_wkt_parse.y"
2116
215
  {
2117
215
    (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL);
2118
215
    WKT_ERROR();
2119
215
  }
2120
0
#line 2160 "lwin_wkt_parse.c"
2121
0
  break;
2122
2123
15.9k
  case 24: /* geometry_list: geometry_list COMMA_TOK geometry_no_srid  */
2124
15.9k
#line 422 "lwin_wkt_parse.y"
2125
15.9k
  {
2126
15.9k
    (yyval.geometryvalue) =
2127
15.9k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2128
15.9k
    WKT_ERROR();
2129
15.9k
  }
2130
0
#line 2166 "lwin_wkt_parse.c"
2131
0
  break;
2132
2133
9.77k
  case 25: /* geometry_list: geometry_no_srid  */
2134
9.77k
#line 424 "lwin_wkt_parse.y"
2135
9.77k
  {
2136
9.77k
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2137
9.77k
    WKT_ERROR();
2138
9.77k
  }
2139
0
#line 2172 "lwin_wkt_parse.c"
2140
0
  break;
2141
2142
566
  case 26: /* multisurface: MSURFACE_TOK LBRACKET_TOK surface_list RBRACKET_TOK  */
2143
566
#line 428 "lwin_wkt_parse.y"
2144
566
  {
2145
566
    (yyval.geometryvalue) =
2146
566
        wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[-1].geometryvalue), NULL);
2147
566
    WKT_ERROR();
2148
566
  }
2149
0
#line 2178 "lwin_wkt_parse.c"
2150
0
  break;
2151
2152
491
  case 27: /* multisurface: MSURFACE_TOK DIMENSIONALITY_TOK LBRACKET_TOK surface_list RBRACKET_TOK  */
2153
491
#line 430 "lwin_wkt_parse.y"
2154
491
  {
2155
491
    (yyval.geometryvalue) = wkt_parser_collection_finalize(
2156
491
        MULTISURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2157
491
    WKT_ERROR();
2158
478
  }
2159
0
#line 2184 "lwin_wkt_parse.c"
2160
0
  break;
2161
2162
234
  case 28: /* multisurface: MSURFACE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2163
234
#line 432 "lwin_wkt_parse.y"
2164
234
  {
2165
234
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[-1].stringvalue));
2166
234
    WKT_ERROR();
2167
234
  }
2168
0
#line 2190 "lwin_wkt_parse.c"
2169
0
  break;
2170
2171
355
  case 29: /* multisurface: MSURFACE_TOK EMPTY_TOK  */
2172
355
#line 434 "lwin_wkt_parse.y"
2173
355
  {
2174
355
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL);
2175
355
    WKT_ERROR();
2176
355
  }
2177
0
#line 2196 "lwin_wkt_parse.c"
2178
0
  break;
2179
2180
1.49k
  case 30: /* surface_list: surface_list COMMA_TOK polygon  */
2181
1.49k
#line 438 "lwin_wkt_parse.y"
2182
1.49k
  {
2183
1.49k
    (yyval.geometryvalue) =
2184
1.49k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2185
1.49k
    WKT_ERROR();
2186
1.49k
  }
2187
0
#line 2202 "lwin_wkt_parse.c"
2188
0
  break;
2189
2190
1.34k
  case 31: /* surface_list: surface_list COMMA_TOK curvepolygon  */
2191
1.34k
#line 440 "lwin_wkt_parse.y"
2192
1.34k
  {
2193
1.34k
    (yyval.geometryvalue) =
2194
1.34k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2195
1.34k
    WKT_ERROR();
2196
1.34k
  }
2197
0
#line 2208 "lwin_wkt_parse.c"
2198
0
  break;
2199
2200
981
  case 32: /* surface_list: surface_list COMMA_TOK polygon_untagged  */
2201
981
#line 442 "lwin_wkt_parse.y"
2202
981
  {
2203
981
    (yyval.geometryvalue) =
2204
981
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2205
981
    WKT_ERROR();
2206
981
  }
2207
0
#line 2214 "lwin_wkt_parse.c"
2208
0
  break;
2209
2210
357
  case 33: /* surface_list: polygon  */
2211
357
#line 444 "lwin_wkt_parse.y"
2212
357
  {
2213
357
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2214
357
    WKT_ERROR();
2215
357
  }
2216
0
#line 2220 "lwin_wkt_parse.c"
2217
0
  break;
2218
2219
339
  case 34: /* surface_list: curvepolygon  */
2220
339
#line 446 "lwin_wkt_parse.y"
2221
339
  {
2222
339
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2223
339
    WKT_ERROR();
2224
339
  }
2225
0
#line 2226 "lwin_wkt_parse.c"
2226
0
  break;
2227
2228
553
  case 35: /* surface_list: polygon_untagged  */
2229
553
#line 448 "lwin_wkt_parse.y"
2230
553
  {
2231
553
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2232
553
    WKT_ERROR();
2233
553
  }
2234
0
#line 2232 "lwin_wkt_parse.c"
2235
0
  break;
2236
2237
227
  case 36: /* tin: TIN_TOK LBRACKET_TOK triangle_list RBRACKET_TOK  */
2238
227
#line 452 "lwin_wkt_parse.y"
2239
227
  {
2240
227
    (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), NULL);
2241
227
    WKT_ERROR();
2242
227
  }
2243
0
#line 2238 "lwin_wkt_parse.c"
2244
0
  break;
2245
2246
195
  case 37: /* tin: TIN_TOK DIMENSIONALITY_TOK LBRACKET_TOK triangle_list RBRACKET_TOK  */
2247
195
#line 454 "lwin_wkt_parse.y"
2248
195
  {
2249
195
    (yyval.geometryvalue) =
2250
195
        wkt_parser_collection_finalize(TINTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2251
195
    WKT_ERROR();
2252
194
  }
2253
0
#line 2244 "lwin_wkt_parse.c"
2254
0
  break;
2255
2256
1.50k
  case 38: /* tin: TIN_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2257
1.50k
#line 456 "lwin_wkt_parse.y"
2258
1.50k
  {
2259
1.50k
    (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[-1].stringvalue));
2260
1.50k
    WKT_ERROR();
2261
1.50k
  }
2262
0
#line 2250 "lwin_wkt_parse.c"
2263
0
  break;
2264
2265
6.18k
  case 39: /* tin: TIN_TOK EMPTY_TOK  */
2266
6.18k
#line 458 "lwin_wkt_parse.y"
2267
6.18k
  {
2268
6.18k
    (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL);
2269
6.18k
    WKT_ERROR();
2270
6.18k
  }
2271
0
#line 2256 "lwin_wkt_parse.c"
2272
0
  break;
2273
2274
265
  case 40: /* polyhedralsurface: POLYHEDRALSURFACE_TOK LBRACKET_TOK patch_list RBRACKET_TOK  */
2275
265
#line 462 "lwin_wkt_parse.y"
2276
265
  {
2277
265
    (yyval.geometryvalue) =
2278
265
        wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), NULL);
2279
265
    WKT_ERROR();
2280
265
  }
2281
0
#line 2262 "lwin_wkt_parse.c"
2282
0
  break;
2283
2284
225
  case 41: /* polyhedralsurface: POLYHEDRALSURFACE_TOK DIMENSIONALITY_TOK LBRACKET_TOK patch_list RBRACKET_TOK  */
2285
225
#line 464 "lwin_wkt_parse.y"
2286
225
  {
2287
225
    (yyval.geometryvalue) = wkt_parser_collection_finalize(
2288
225
        POLYHEDRALSURFACETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2289
225
    WKT_ERROR();
2290
224
  }
2291
0
#line 2268 "lwin_wkt_parse.c"
2292
0
  break;
2293
2294
195
  case 42: /* polyhedralsurface: POLYHEDRALSURFACE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2295
195
#line 466 "lwin_wkt_parse.y"
2296
195
  {
2297
195
    (yyval.geometryvalue) =
2298
195
        wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[-1].stringvalue));
2299
195
    WKT_ERROR();
2300
195
  }
2301
0
#line 2274 "lwin_wkt_parse.c"
2302
0
  break;
2303
2304
397
  case 43: /* polyhedralsurface: POLYHEDRALSURFACE_TOK EMPTY_TOK  */
2305
397
#line 468 "lwin_wkt_parse.y"
2306
397
  {
2307
397
    (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL);
2308
397
    WKT_ERROR();
2309
397
  }
2310
0
#line 2280 "lwin_wkt_parse.c"
2311
0
  break;
2312
2313
277
  case 44: /* multipolygon: MPOLYGON_TOK LBRACKET_TOK polygon_list RBRACKET_TOK  */
2314
277
#line 472 "lwin_wkt_parse.y"
2315
277
  {
2316
277
    (yyval.geometryvalue) =
2317
277
        wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), NULL);
2318
277
    WKT_ERROR();
2319
277
  }
2320
0
#line 2286 "lwin_wkt_parse.c"
2321
0
  break;
2322
2323
205
  case 45: /* multipolygon: MPOLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK polygon_list RBRACKET_TOK  */
2324
205
#line 474 "lwin_wkt_parse.y"
2325
205
  {
2326
205
    (yyval.geometryvalue) = wkt_parser_collection_finalize(
2327
205
        MULTIPOLYGONTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2328
205
    WKT_ERROR();
2329
204
  }
2330
0
#line 2292 "lwin_wkt_parse.c"
2331
0
  break;
2332
2333
196
  case 46: /* multipolygon: MPOLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2334
196
#line 476 "lwin_wkt_parse.y"
2335
196
  {
2336
196
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[-1].stringvalue));
2337
196
    WKT_ERROR();
2338
196
  }
2339
0
#line 2298 "lwin_wkt_parse.c"
2340
0
  break;
2341
2342
395
  case 47: /* multipolygon: MPOLYGON_TOK EMPTY_TOK  */
2343
395
#line 478 "lwin_wkt_parse.y"
2344
395
  {
2345
395
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL);
2346
395
    WKT_ERROR();
2347
395
  }
2348
0
#line 2304 "lwin_wkt_parse.c"
2349
0
  break;
2350
2351
17.1k
  case 48: /* polygon_list: polygon_list COMMA_TOK polygon_untagged  */
2352
17.1k
#line 482 "lwin_wkt_parse.y"
2353
17.1k
  {
2354
17.1k
    (yyval.geometryvalue) =
2355
17.1k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2356
17.1k
    WKT_ERROR();
2357
17.1k
  }
2358
0
#line 2310 "lwin_wkt_parse.c"
2359
0
  break;
2360
2361
507
  case 49: /* polygon_list: polygon_untagged  */
2362
507
#line 484 "lwin_wkt_parse.y"
2363
507
  {
2364
507
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2365
507
    WKT_ERROR();
2366
507
  }
2367
0
#line 2316 "lwin_wkt_parse.c"
2368
0
  break;
2369
2370
17.0k
  case 50: /* patch_list: patch_list COMMA_TOK patch  */
2371
17.0k
#line 488 "lwin_wkt_parse.y"
2372
17.0k
  {
2373
17.0k
    (yyval.geometryvalue) =
2374
17.0k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2375
17.0k
    WKT_ERROR();
2376
17.0k
  }
2377
0
#line 2322 "lwin_wkt_parse.c"
2378
0
  break;
2379
2380
516
  case 51: /* patch_list: patch  */
2381
516
#line 490 "lwin_wkt_parse.y"
2382
516
  {
2383
516
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2384
516
    WKT_ERROR();
2385
516
  }
2386
0
#line 2328 "lwin_wkt_parse.c"
2387
0
  break;
2388
2389
200
  case 52: /* polygon: POLYGON_TOK LBRACKET_TOK ring_list RBRACKET_TOK  */
2390
200
#line 494 "lwin_wkt_parse.y"
2391
200
  {
2392
200
    (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), NULL);
2393
200
    WKT_ERROR();
2394
200
  }
2395
0
#line 2334 "lwin_wkt_parse.c"
2396
0
  break;
2397
2398
228
  case 53: /* polygon: POLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK ring_list RBRACKET_TOK  */
2399
228
#line 496 "lwin_wkt_parse.y"
2400
228
  {
2401
228
    (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2402
228
    WKT_ERROR();
2403
224
  }
2404
0
#line 2340 "lwin_wkt_parse.c"
2405
0
  break;
2406
2407
592
  case 54: /* polygon: POLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2408
592
#line 498 "lwin_wkt_parse.y"
2409
592
  {
2410
592
    (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[-1].stringvalue));
2411
592
    WKT_ERROR();
2412
592
  }
2413
0
#line 2346 "lwin_wkt_parse.c"
2414
0
  break;
2415
2416
1.05k
  case 55: /* polygon: POLYGON_TOK EMPTY_TOK  */
2417
1.05k
#line 500 "lwin_wkt_parse.y"
2418
1.05k
  {
2419
1.05k
    (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL);
2420
1.05k
    WKT_ERROR();
2421
1.05k
  }
2422
0
#line 2352 "lwin_wkt_parse.c"
2423
0
  break;
2424
2425
719
  case 56: /* polygon_untagged: LBRACKET_TOK ring_list RBRACKET_TOK  */
2426
719
#line 504 "lwin_wkt_parse.y"
2427
719
  {
2428
719
    (yyval.geometryvalue) = (yyvsp[-1].geometryvalue);
2429
719
  }
2430
719
#line 2358 "lwin_wkt_parse.c"
2431
719
  break;
2432
2433
18.4k
  case 57: /* polygon_untagged: EMPTY_TOK  */
2434
18.4k
#line 506 "lwin_wkt_parse.y"
2435
18.4k
  {
2436
18.4k
    (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL);
2437
18.4k
    WKT_ERROR();
2438
18.4k
  }
2439
0
#line 2364 "lwin_wkt_parse.c"
2440
0
  break;
2441
2442
17.5k
  case 58: /* patch: LBRACKET_TOK patchring_list RBRACKET_TOK  */
2443
17.5k
#line 509 "lwin_wkt_parse.y"
2444
17.5k
  {
2445
17.5k
    (yyval.geometryvalue) = (yyvsp[-1].geometryvalue);
2446
17.5k
  }
2447
17.5k
#line 2370 "lwin_wkt_parse.c"
2448
17.5k
  break;
2449
2450
376
  case 59: /* curvepolygon: CURVEPOLYGON_TOK LBRACKET_TOK curvering_list RBRACKET_TOK  */
2451
376
#line 513 "lwin_wkt_parse.y"
2452
376
  {
2453
376
    (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), NULL);
2454
376
    WKT_ERROR();
2455
376
  }
2456
0
#line 2376 "lwin_wkt_parse.c"
2457
0
  break;
2458
2459
260
  case 60: /* curvepolygon: CURVEPOLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK curvering_list RBRACKET_TOK  */
2460
260
#line 515 "lwin_wkt_parse.y"
2461
260
  {
2462
260
    (yyval.geometryvalue) =
2463
260
        wkt_parser_curvepolygon_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2464
260
    WKT_ERROR();
2465
255
  }
2466
0
#line 2382 "lwin_wkt_parse.c"
2467
0
  break;
2468
2469
464
  case 61: /* curvepolygon: CURVEPOLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2470
464
#line 517 "lwin_wkt_parse.y"
2471
464
  {
2472
464
    (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[-1].stringvalue));
2473
464
    WKT_ERROR();
2474
464
  }
2475
0
#line 2388 "lwin_wkt_parse.c"
2476
0
  break;
2477
2478
1.01k
  case 62: /* curvepolygon: CURVEPOLYGON_TOK EMPTY_TOK  */
2479
1.01k
#line 519 "lwin_wkt_parse.y"
2480
1.01k
  {
2481
1.01k
    (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL);
2482
1.01k
    WKT_ERROR();
2483
1.01k
  }
2484
0
#line 2394 "lwin_wkt_parse.c"
2485
0
  break;
2486
2487
67.5k
  case 63: /* curvering_list: curvering_list COMMA_TOK curvering  */
2488
67.5k
#line 523 "lwin_wkt_parse.y"
2489
67.5k
  {
2490
67.5k
    (yyval.geometryvalue) =
2491
67.5k
        wkt_parser_curvepolygon_add_ring((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2492
67.5k
    WKT_ERROR();
2493
67.5k
  }
2494
0
#line 2400 "lwin_wkt_parse.c"
2495
0
  break;
2496
2497
715
  case 64: /* curvering_list: curvering  */
2498
715
#line 525 "lwin_wkt_parse.y"
2499
715
  {
2500
715
    (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[0].geometryvalue));
2501
715
    WKT_ERROR();
2502
715
  }
2503
0
#line 2406 "lwin_wkt_parse.c"
2504
0
  break;
2505
2506
67.3k
  case 65: /* curvering: linestring_untagged  */
2507
67.3k
#line 528 "lwin_wkt_parse.y"
2508
67.3k
  {
2509
67.3k
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2510
67.3k
  }
2511
67.3k
#line 2412 "lwin_wkt_parse.c"
2512
67.3k
  break;
2513
2514
194
  case 66: /* curvering: linestring  */
2515
194
#line 529 "lwin_wkt_parse.y"
2516
194
  {
2517
194
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2518
194
  }
2519
194
#line 2418 "lwin_wkt_parse.c"
2520
194
  break;
2521
2522
331
  case 67: /* curvering: compoundcurve  */
2523
331
#line 530 "lwin_wkt_parse.y"
2524
331
  {
2525
331
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2526
331
  }
2527
331
#line 2424 "lwin_wkt_parse.c"
2528
331
  break;
2529
2530
0
  case 68: /* curvering: nurbscurve  */
2531
0
#line 531 "lwin_wkt_parse.y"
2532
0
  {
2533
0
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2534
0
  }
2535
0
#line 2430 "lwin_wkt_parse.c"
2536
0
  break;
2537
2538
377
  case 69: /* curvering: circularstring  */
2539
377
#line 532 "lwin_wkt_parse.y"
2540
377
  {
2541
377
    (yyval.geometryvalue) = (yyvsp[0].geometryvalue);
2542
377
  }
2543
377
#line 2436 "lwin_wkt_parse.c"
2544
377
  break;
2545
2546
95.4k
  case 70: /* patchring_list: patchring_list COMMA_TOK patchring  */
2547
95.4k
#line 536 "lwin_wkt_parse.y"
2548
95.4k
  {
2549
95.4k
    (yyval.geometryvalue) =
2550
95.4k
        wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue), (yyvsp[0].ptarrayvalue), 'Z');
2551
95.4k
    WKT_ERROR();
2552
95.4k
  }
2553
0
#line 2442 "lwin_wkt_parse.c"
2554
0
  break;
2555
2556
17.6k
  case 71: /* patchring_list: patchring  */
2557
17.6k
#line 538 "lwin_wkt_parse.y"
2558
17.6k
  {
2559
17.6k
    (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue), 'Z');
2560
17.6k
    WKT_ERROR();
2561
17.6k
  }
2562
0
#line 2448 "lwin_wkt_parse.c"
2563
0
  break;
2564
2565
22.1k
  case 72: /* ring_list: ring_list COMMA_TOK ring  */
2566
22.1k
#line 542 "lwin_wkt_parse.y"
2567
22.1k
  {
2568
22.1k
    (yyval.geometryvalue) =
2569
22.1k
        wkt_parser_polygon_add_ring((yyvsp[-2].geometryvalue), (yyvsp[0].ptarrayvalue), '2');
2570
22.1k
    WKT_ERROR();
2571
22.1k
  }
2572
0
#line 2454 "lwin_wkt_parse.c"
2573
0
  break;
2574
2575
1.20k
  case 73: /* ring_list: ring  */
2576
1.20k
#line 544 "lwin_wkt_parse.y"
2577
1.20k
  {
2578
1.20k
    (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[0].ptarrayvalue), '2');
2579
1.20k
    WKT_ERROR();
2580
1.20k
  }
2581
0
#line 2460 "lwin_wkt_parse.c"
2582
0
  break;
2583
2584
113k
  case 74: /* patchring: LBRACKET_TOK ptarray RBRACKET_TOK  */
2585
113k
#line 547 "lwin_wkt_parse.y"
2586
113k
  {
2587
113k
    (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue);
2588
113k
  }
2589
113k
#line 2466 "lwin_wkt_parse.c"
2590
113k
  break;
2591
2592
23.3k
  case 75: /* ring: LBRACKET_TOK ptarray RBRACKET_TOK  */
2593
23.3k
#line 550 "lwin_wkt_parse.y"
2594
23.3k
  {
2595
23.3k
    (yyval.ptarrayvalue) = (yyvsp[-1].ptarrayvalue);
2596
23.3k
  }
2597
23.3k
#line 2472 "lwin_wkt_parse.c"
2598
23.3k
  break;
2599
2600
737
  case 76: /* compoundcurve: COMPOUNDCURVE_TOK LBRACKET_TOK compound_list RBRACKET_TOK  */
2601
737
#line 554 "lwin_wkt_parse.y"
2602
737
  {
2603
737
    (yyval.geometryvalue) = wkt_parser_compound_finalize((yyvsp[-1].geometryvalue), NULL);
2604
737
    WKT_ERROR();
2605
737
  }
2606
0
#line 2478 "lwin_wkt_parse.c"
2607
0
  break;
2608
2609
203
  case 77: /* compoundcurve: COMPOUNDCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK compound_list RBRACKET_TOK  */
2610
203
#line 556 "lwin_wkt_parse.y"
2611
203
  {
2612
203
    (yyval.geometryvalue) =
2613
203
        wkt_parser_compound_finalize((yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2614
203
    WKT_ERROR();
2615
199
  }
2616
0
#line 2484 "lwin_wkt_parse.c"
2617
0
  break;
2618
2619
725
  case 78: /* compoundcurve: COMPOUNDCURVE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2620
725
#line 558 "lwin_wkt_parse.y"
2621
725
  {
2622
725
    (yyval.geometryvalue) = wkt_parser_compound_finalize(NULL, (yyvsp[-1].stringvalue));
2623
725
    WKT_ERROR();
2624
725
  }
2625
0
#line 2490 "lwin_wkt_parse.c"
2626
0
  break;
2627
2628
1.01k
  case 79: /* compoundcurve: COMPOUNDCURVE_TOK EMPTY_TOK  */
2629
1.01k
#line 560 "lwin_wkt_parse.y"
2630
1.01k
  {
2631
1.01k
    (yyval.geometryvalue) = wkt_parser_compound_finalize(NULL, NULL);
2632
1.01k
    WKT_ERROR();
2633
1.01k
  }
2634
0
#line 2496 "lwin_wkt_parse.c"
2635
0
  break;
2636
2637
902
  case 80: /* compound_list: compound_list COMMA_TOK circularstring  */
2638
902
#line 564 "lwin_wkt_parse.y"
2639
902
  {
2640
902
    (yyval.geometryvalue) =
2641
902
        wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2642
902
    WKT_ERROR();
2643
901
  }
2644
0
#line 2502 "lwin_wkt_parse.c"
2645
0
  break;
2646
2647
0
  case 81: /* compound_list: compound_list COMMA_TOK nurbscurve  */
2648
0
#line 566 "lwin_wkt_parse.y"
2649
0
  {
2650
0
    (yyval.geometryvalue) =
2651
0
        wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2652
0
    WKT_ERROR();
2653
0
  }
2654
0
#line 2508 "lwin_wkt_parse.c"
2655
0
  break;
2656
2657
595
  case 82: /* compound_list: compound_list COMMA_TOK linestring  */
2658
595
#line 568 "lwin_wkt_parse.y"
2659
595
  {
2660
595
    (yyval.geometryvalue) =
2661
595
        wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2662
595
    WKT_ERROR();
2663
589
  }
2664
0
#line 2514 "lwin_wkt_parse.c"
2665
0
  break;
2666
2667
2.06k
  case 83: /* compound_list: compound_list COMMA_TOK linestring_untagged  */
2668
2.06k
#line 570 "lwin_wkt_parse.y"
2669
2.06k
  {
2670
2.06k
    (yyval.geometryvalue) =
2671
2.06k
        wkt_parser_compound_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2672
2.06k
    WKT_ERROR();
2673
2.01k
  }
2674
0
#line 2520 "lwin_wkt_parse.c"
2675
0
  break;
2676
2677
212
  case 84: /* compound_list: circularstring  */
2678
212
#line 572 "lwin_wkt_parse.y"
2679
212
  {
2680
212
    (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue));
2681
212
    WKT_ERROR();
2682
211
  }
2683
0
#line 2526 "lwin_wkt_parse.c"
2684
0
  break;
2685
2686
0
  case 85: /* compound_list: nurbscurve  */
2687
0
#line 574 "lwin_wkt_parse.y"
2688
0
  {
2689
0
    (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue));
2690
0
    WKT_ERROR();
2691
0
  }
2692
0
#line 2532 "lwin_wkt_parse.c"
2693
0
  break;
2694
2695
241
  case 86: /* compound_list: linestring  */
2696
241
#line 576 "lwin_wkt_parse.y"
2697
241
  {
2698
241
    (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue));
2699
241
    WKT_ERROR();
2700
240
  }
2701
0
#line 2538 "lwin_wkt_parse.c"
2702
0
  break;
2703
2704
640
  case 87: /* compound_list: linestring_untagged  */
2705
640
#line 578 "lwin_wkt_parse.y"
2706
640
  {
2707
640
    (yyval.geometryvalue) = wkt_parser_compound_new((yyvsp[0].geometryvalue));
2708
640
    WKT_ERROR();
2709
639
  }
2710
0
#line 2544 "lwin_wkt_parse.c"
2711
0
  break;
2712
2713
968
  case 88: /* multicurve: MCURVE_TOK LBRACKET_TOK curve_list RBRACKET_TOK  */
2714
968
#line 582 "lwin_wkt_parse.y"
2715
968
  {
2716
968
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), NULL);
2717
968
    WKT_ERROR();
2718
968
  }
2719
0
#line 2550 "lwin_wkt_parse.c"
2720
0
  break;
2721
2722
302
  case 89: /* multicurve: MCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK curve_list RBRACKET_TOK  */
2723
302
#line 584 "lwin_wkt_parse.y"
2724
302
  {
2725
302
    (yyval.geometryvalue) =
2726
302
        wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2727
302
    WKT_ERROR();
2728
287
  }
2729
0
#line 2556 "lwin_wkt_parse.c"
2730
0
  break;
2731
2732
196
  case 90: /* multicurve: MCURVE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2733
196
#line 586 "lwin_wkt_parse.y"
2734
196
  {
2735
196
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[-1].stringvalue));
2736
196
    WKT_ERROR();
2737
196
  }
2738
0
#line 2562 "lwin_wkt_parse.c"
2739
0
  break;
2740
2741
398
  case 91: /* multicurve: MCURVE_TOK EMPTY_TOK  */
2742
398
#line 588 "lwin_wkt_parse.y"
2743
398
  {
2744
398
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL);
2745
398
    WKT_ERROR();
2746
398
  }
2747
0
#line 2568 "lwin_wkt_parse.c"
2748
0
  break;
2749
2750
1.16k
  case 92: /* curve_list: curve_list COMMA_TOK circularstring  */
2751
1.16k
#line 592 "lwin_wkt_parse.y"
2752
1.16k
  {
2753
1.16k
    (yyval.geometryvalue) =
2754
1.16k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2755
1.16k
    WKT_ERROR();
2756
1.16k
  }
2757
0
#line 2574 "lwin_wkt_parse.c"
2758
0
  break;
2759
2760
1.52k
  case 93: /* curve_list: curve_list COMMA_TOK compoundcurve  */
2761
1.52k
#line 594 "lwin_wkt_parse.y"
2762
1.52k
  {
2763
1.52k
    (yyval.geometryvalue) =
2764
1.52k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2765
1.52k
    WKT_ERROR();
2766
1.52k
  }
2767
0
#line 2580 "lwin_wkt_parse.c"
2768
0
  break;
2769
2770
0
  case 94: /* curve_list: curve_list COMMA_TOK nurbscurve  */
2771
0
#line 596 "lwin_wkt_parse.y"
2772
0
  {
2773
0
    (yyval.geometryvalue) =
2774
0
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2775
0
    WKT_ERROR();
2776
0
  }
2777
0
#line 2586 "lwin_wkt_parse.c"
2778
0
  break;
2779
2780
1.24k
  case 95: /* curve_list: curve_list COMMA_TOK linestring  */
2781
1.24k
#line 598 "lwin_wkt_parse.y"
2782
1.24k
  {
2783
1.24k
    (yyval.geometryvalue) =
2784
1.24k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2785
1.24k
    WKT_ERROR();
2786
1.24k
  }
2787
0
#line 2592 "lwin_wkt_parse.c"
2788
0
  break;
2789
2790
798
  case 96: /* curve_list: curve_list COMMA_TOK linestring_untagged  */
2791
798
#line 600 "lwin_wkt_parse.y"
2792
798
  {
2793
798
    (yyval.geometryvalue) =
2794
798
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2795
798
    WKT_ERROR();
2796
798
  }
2797
0
#line 2598 "lwin_wkt_parse.c"
2798
0
  break;
2799
2800
262
  case 97: /* curve_list: circularstring  */
2801
262
#line 602 "lwin_wkt_parse.y"
2802
262
  {
2803
262
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2804
262
    WKT_ERROR();
2805
262
  }
2806
0
#line 2604 "lwin_wkt_parse.c"
2807
0
  break;
2808
2809
448
  case 98: /* curve_list: compoundcurve  */
2810
448
#line 604 "lwin_wkt_parse.y"
2811
448
  {
2812
448
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2813
448
    WKT_ERROR();
2814
448
  }
2815
0
#line 2610 "lwin_wkt_parse.c"
2816
0
  break;
2817
2818
0
  case 99: /* curve_list: nurbscurve  */
2819
0
#line 606 "lwin_wkt_parse.y"
2820
0
  {
2821
0
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2822
0
    WKT_ERROR();
2823
0
  }
2824
0
#line 2616 "lwin_wkt_parse.c"
2825
0
  break;
2826
2827
247
  case 100: /* curve_list: linestring  */
2828
247
#line 608 "lwin_wkt_parse.y"
2829
247
  {
2830
247
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2831
247
    WKT_ERROR();
2832
247
  }
2833
0
#line 2622 "lwin_wkt_parse.c"
2834
0
  break;
2835
2836
577
  case 101: /* curve_list: linestring_untagged  */
2837
577
#line 610 "lwin_wkt_parse.y"
2838
577
  {
2839
577
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2840
577
    WKT_ERROR();
2841
577
  }
2842
0
#line 2628 "lwin_wkt_parse.c"
2843
0
  break;
2844
2845
277
  case 102: /* multilinestring: MLINESTRING_TOK LBRACKET_TOK linestring_list RBRACKET_TOK  */
2846
277
#line 614 "lwin_wkt_parse.y"
2847
277
  {
2848
277
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), NULL);
2849
277
    WKT_ERROR();
2850
277
  }
2851
0
#line 2634 "lwin_wkt_parse.c"
2852
0
  break;
2853
2854
199
  case 103: /* multilinestring: MLINESTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK linestring_list RBRACKET_TOK  */
2855
199
#line 616 "lwin_wkt_parse.y"
2856
199
  {
2857
199
    (yyval.geometryvalue) =
2858
199
        wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
2859
199
    WKT_ERROR();
2860
198
  }
2861
0
#line 2640 "lwin_wkt_parse.c"
2862
0
  break;
2863
2864
318
  case 104: /* multilinestring: MLINESTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2865
318
#line 618 "lwin_wkt_parse.y"
2866
318
  {
2867
318
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[-1].stringvalue));
2868
318
    WKT_ERROR();
2869
318
  }
2870
0
#line 2646 "lwin_wkt_parse.c"
2871
0
  break;
2872
2873
400
  case 105: /* multilinestring: MLINESTRING_TOK EMPTY_TOK  */
2874
400
#line 620 "lwin_wkt_parse.y"
2875
400
  {
2876
400
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL);
2877
400
    WKT_ERROR();
2878
400
  }
2879
0
#line 2652 "lwin_wkt_parse.c"
2880
0
  break;
2881
2882
33.8k
  case 106: /* linestring_list: linestring_list COMMA_TOK linestring_untagged  */
2883
33.8k
#line 624 "lwin_wkt_parse.y"
2884
33.8k
  {
2885
33.8k
    (yyval.geometryvalue) =
2886
33.8k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2887
33.8k
    WKT_ERROR();
2888
33.8k
  }
2889
0
#line 2658 "lwin_wkt_parse.c"
2890
0
  break;
2891
2892
491
  case 107: /* linestring_list: linestring_untagged  */
2893
491
#line 626 "lwin_wkt_parse.y"
2894
491
  {
2895
491
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
2896
491
    WKT_ERROR();
2897
491
  }
2898
0
#line 2664 "lwin_wkt_parse.c"
2899
0
  break;
2900
2901
1.89k
  case 108: /* circularstring: CIRCULARSTRING_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
2902
1.89k
#line 630 "lwin_wkt_parse.y"
2903
1.89k
  {
2904
1.89k
    (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), NULL);
2905
1.89k
    WKT_ERROR();
2906
1.89k
  }
2907
0
#line 2670 "lwin_wkt_parse.c"
2908
0
  break;
2909
2910
394
  case 109: /* circularstring: CIRCULARSTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
2911
394
#line 632 "lwin_wkt_parse.y"
2912
394
  {
2913
394
    (yyval.geometryvalue) =
2914
394
        wkt_parser_circularstring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue));
2915
394
    WKT_ERROR();
2916
390
  }
2917
0
#line 2676 "lwin_wkt_parse.c"
2918
0
  break;
2919
2920
588
  case 110: /* circularstring: CIRCULARSTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2921
588
#line 634 "lwin_wkt_parse.y"
2922
588
  {
2923
588
    (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[-1].stringvalue));
2924
588
    WKT_ERROR();
2925
588
  }
2926
0
#line 2682 "lwin_wkt_parse.c"
2927
0
  break;
2928
2929
459
  case 111: /* circularstring: CIRCULARSTRING_TOK EMPTY_TOK  */
2930
459
#line 636 "lwin_wkt_parse.y"
2931
459
  {
2932
459
    (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL);
2933
459
    WKT_ERROR();
2934
459
  }
2935
0
#line 2688 "lwin_wkt_parse.c"
2936
0
  break;
2937
2938
820
  case 112: /* linestring: LINESTRING_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
2939
820
#line 640 "lwin_wkt_parse.y"
2940
820
  {
2941
820
    (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL);
2942
820
    WKT_ERROR();
2943
820
  }
2944
0
#line 2694 "lwin_wkt_parse.c"
2945
0
  break;
2946
2947
493
  case 113: /* linestring: LINESTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
2948
493
#line 642 "lwin_wkt_parse.y"
2949
493
  {
2950
493
    (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue));
2951
493
    WKT_ERROR();
2952
488
  }
2953
0
#line 2700 "lwin_wkt_parse.c"
2954
0
  break;
2955
2956
583
  case 114: /* linestring: LINESTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
2957
583
#line 644 "lwin_wkt_parse.y"
2958
583
  {
2959
583
    (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[-1].stringvalue));
2960
583
    WKT_ERROR();
2961
583
  }
2962
0
#line 2706 "lwin_wkt_parse.c"
2963
0
  break;
2964
2965
828
  case 115: /* linestring: LINESTRING_TOK EMPTY_TOK  */
2966
828
#line 646 "lwin_wkt_parse.y"
2967
828
  {
2968
828
    (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL);
2969
828
    WKT_ERROR();
2970
828
  }
2971
0
#line 2712 "lwin_wkt_parse.c"
2972
0
  break;
2973
2974
4.43k
  case 116: /* linestring_untagged: LBRACKET_TOK ptarray RBRACKET_TOK  */
2975
4.43k
#line 650 "lwin_wkt_parse.y"
2976
4.43k
  {
2977
4.43k
    (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[-1].ptarrayvalue), NULL);
2978
4.43k
    WKT_ERROR();
2979
4.43k
  }
2980
0
#line 2718 "lwin_wkt_parse.c"
2981
0
  break;
2982
2983
101k
  case 117: /* linestring_untagged: EMPTY_TOK  */
2984
101k
#line 652 "lwin_wkt_parse.y"
2985
101k
  {
2986
101k
    (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL);
2987
101k
    WKT_ERROR();
2988
101k
  }
2989
0
#line 2724 "lwin_wkt_parse.c"
2990
0
  break;
2991
2992
2.75k
  case 118: /* triangle_list: triangle_list COMMA_TOK triangle_untagged  */
2993
2.75k
#line 656 "lwin_wkt_parse.y"
2994
2.75k
  {
2995
2.75k
    (yyval.geometryvalue) =
2996
2.75k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
2997
2.75k
    WKT_ERROR();
2998
2.75k
  }
2999
0
#line 2730 "lwin_wkt_parse.c"
3000
0
  break;
3001
3002
453
  case 119: /* triangle_list: triangle_untagged  */
3003
453
#line 658 "lwin_wkt_parse.y"
3004
453
  {
3005
453
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
3006
453
    WKT_ERROR();
3007
453
  }
3008
0
#line 2736 "lwin_wkt_parse.c"
3009
0
  break;
3010
3011
196
  case 120: /* triangle: TRIANGLE_TOK LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK RBRACKET_TOK  */
3012
196
#line 662 "lwin_wkt_parse.y"
3013
196
  {
3014
196
    (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL);
3015
196
    WKT_ERROR();
3016
194
  }
3017
0
#line 2742 "lwin_wkt_parse.c"
3018
0
  break;
3019
3020
552
  case 121: /* triangle: TRIANGLE_TOK DIMENSIONALITY_TOK LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK
3021
         RBRACKET_TOK  */
3022
552
#line 664 "lwin_wkt_parse.y"
3023
552
  {
3024
552
    (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), (yyvsp[-5].stringvalue));
3025
552
    WKT_ERROR();
3026
535
  }
3027
0
#line 2748 "lwin_wkt_parse.c"
3028
0
  break;
3029
3030
583
  case 122: /* triangle: TRIANGLE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
3031
583
#line 666 "lwin_wkt_parse.y"
3032
583
  {
3033
583
    (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[-1].stringvalue));
3034
583
    WKT_ERROR();
3035
583
  }
3036
0
#line 2754 "lwin_wkt_parse.c"
3037
0
  break;
3038
3039
449
  case 123: /* triangle: TRIANGLE_TOK EMPTY_TOK  */
3040
449
#line 668 "lwin_wkt_parse.y"
3041
449
  {
3042
449
    (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL);
3043
449
    WKT_ERROR();
3044
449
  }
3045
0
#line 2760 "lwin_wkt_parse.c"
3046
0
  break;
3047
3048
3.36k
  case 124: /* triangle_untagged: LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK RBRACKET_TOK  */
3049
3.36k
#line 672 "lwin_wkt_parse.y"
3050
3.36k
  {
3051
3.36k
    (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[-2].ptarrayvalue), NULL);
3052
3.36k
    WKT_ERROR();
3053
3.20k
  }
3054
0
#line 2766 "lwin_wkt_parse.c"
3055
0
  break;
3056
3057
791
  case 125: /* multipoint: MPOINT_TOK LBRACKET_TOK point_list RBRACKET_TOK  */
3058
791
#line 676 "lwin_wkt_parse.y"
3059
791
  {
3060
791
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), NULL);
3061
791
    WKT_ERROR();
3062
791
  }
3063
0
#line 2772 "lwin_wkt_parse.c"
3064
0
  break;
3065
3066
284
  case 126: /* multipoint: MPOINT_TOK DIMENSIONALITY_TOK LBRACKET_TOK point_list RBRACKET_TOK  */
3067
284
#line 678 "lwin_wkt_parse.y"
3068
284
  {
3069
284
    (yyval.geometryvalue) =
3070
284
        wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[-1].geometryvalue), (yyvsp[-3].stringvalue));
3071
284
    WKT_ERROR();
3072
247
  }
3073
0
#line 2778 "lwin_wkt_parse.c"
3074
0
  break;
3075
3076
196
  case 127: /* multipoint: MPOINT_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
3077
196
#line 680 "lwin_wkt_parse.y"
3078
196
  {
3079
196
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[-1].stringvalue));
3080
196
    WKT_ERROR();
3081
196
  }
3082
0
#line 2784 "lwin_wkt_parse.c"
3083
0
  break;
3084
3085
395
  case 128: /* multipoint: MPOINT_TOK EMPTY_TOK  */
3086
395
#line 682 "lwin_wkt_parse.y"
3087
395
  {
3088
395
    (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL);
3089
395
    WKT_ERROR();
3090
395
  }
3091
0
#line 2790 "lwin_wkt_parse.c"
3092
0
  break;
3093
3094
203k
  case 129: /* point_list: point_list COMMA_TOK point_untagged  */
3095
203k
#line 686 "lwin_wkt_parse.y"
3096
203k
  {
3097
203k
    (yyval.geometryvalue) =
3098
203k
        wkt_parser_collection_add_geom((yyvsp[-2].geometryvalue), (yyvsp[0].geometryvalue));
3099
203k
    WKT_ERROR();
3100
203k
  }
3101
0
#line 2796 "lwin_wkt_parse.c"
3102
0
  break;
3103
3104
1.14k
  case 130: /* point_list: point_untagged  */
3105
1.14k
#line 688 "lwin_wkt_parse.y"
3106
1.14k
  {
3107
1.14k
    (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[0].geometryvalue));
3108
1.14k
    WKT_ERROR();
3109
1.14k
  }
3110
0
#line 2802 "lwin_wkt_parse.c"
3111
0
  break;
3112
3113
203k
  case 131: /* point_untagged: coordinate  */
3114
203k
#line 692 "lwin_wkt_parse.y"
3115
203k
  {
3116
203k
    (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[0].coordinatevalue)), NULL);
3117
203k
    WKT_ERROR();
3118
203k
  }
3119
0
#line 2808 "lwin_wkt_parse.c"
3120
0
  break;
3121
3122
194
  case 132: /* point_untagged: LBRACKET_TOK coordinate RBRACKET_TOK  */
3123
194
#line 694 "lwin_wkt_parse.y"
3124
194
  {
3125
194
    (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[-1].coordinatevalue)), NULL);
3126
194
    WKT_ERROR();
3127
194
  }
3128
0
#line 2814 "lwin_wkt_parse.c"
3129
0
  break;
3130
3131
786
  case 133: /* point_untagged: EMPTY_TOK  */
3132
786
#line 696 "lwin_wkt_parse.y"
3133
786
  {
3134
786
    (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL);
3135
786
    WKT_ERROR();
3136
786
  }
3137
0
#line 2820 "lwin_wkt_parse.c"
3138
0
  break;
3139
3140
319
  case 134: /* point: POINT_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
3141
319
#line 700 "lwin_wkt_parse.y"
3142
319
  {
3143
319
    (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), NULL);
3144
319
    WKT_ERROR();
3145
303
  }
3146
0
#line 2826 "lwin_wkt_parse.c"
3147
0
  break;
3148
3149
397
  case 135: /* point: POINT_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK  */
3150
397
#line 702 "lwin_wkt_parse.y"
3151
397
  {
3152
397
    (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[-1].ptarrayvalue), (yyvsp[-3].stringvalue));
3153
397
    WKT_ERROR();
3154
391
  }
3155
0
#line 2832 "lwin_wkt_parse.c"
3156
0
  break;
3157
3158
667
  case 136: /* point: POINT_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
3159
667
#line 704 "lwin_wkt_parse.y"
3160
667
  {
3161
667
    (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[-1].stringvalue));
3162
667
    WKT_ERROR();
3163
667
  }
3164
0
#line 2838 "lwin_wkt_parse.c"
3165
0
  break;
3166
3167
321
  case 137: /* point: POINT_TOK EMPTY_TOK  */
3168
321
#line 706 "lwin_wkt_parse.y"
3169
321
  {
3170
321
    (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL);
3171
321
    WKT_ERROR();
3172
321
  }
3173
0
#line 2844 "lwin_wkt_parse.c"
3174
0
  break;
3175
3176
235k
  case 138: /* ptarray: ptarray COMMA_TOK coordinate  */
3177
235k
#line 710 "lwin_wkt_parse.y"
3178
235k
  {
3179
235k
    (yyval.ptarrayvalue) =
3180
235k
        wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue), (yyvsp[0].coordinatevalue));
3181
235k
    WKT_ERROR();
3182
235k
  }
3183
0
#line 2850 "lwin_wkt_parse.c"
3184
0
  break;
3185
3186
149k
  case 139: /* ptarray: coordinate  */
3187
149k
#line 712 "lwin_wkt_parse.y"
3188
149k
  {
3189
149k
    (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[0].coordinatevalue));
3190
149k
    WKT_ERROR();
3191
149k
  }
3192
0
#line 2856 "lwin_wkt_parse.c"
3193
0
  break;
3194
3195
577k
  case 140: /* coordinate: DOUBLE_TOK DOUBLE_TOK  */
3196
577k
#line 716 "lwin_wkt_parse.y"
3197
577k
  {
3198
577k
    (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[-1].doublevalue), (yyvsp[0].doublevalue));
3199
577k
    WKT_ERROR();
3200
577k
  }
3201
0
#line 2862 "lwin_wkt_parse.c"
3202
0
  break;
3203
3204
9.73k
  case 141: /* coordinate: DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK  */
3205
9.73k
#line 718 "lwin_wkt_parse.y"
3206
9.73k
  {
3207
9.73k
    (yyval.coordinatevalue) =
3208
9.73k
        wkt_parser_coord_3((yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue));
3209
9.73k
    WKT_ERROR();
3210
9.73k
  }
3211
0
#line 2868 "lwin_wkt_parse.c"
3212
0
  break;
3213
3214
1.05k
  case 142: /* coordinate: DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK  */
3215
1.05k
#line 720 "lwin_wkt_parse.y"
3216
1.05k
  {
3217
1.05k
    (yyval.coordinatevalue) = wkt_parser_coord_4(
3218
1.05k
        (yyvsp[-3].doublevalue), (yyvsp[-2].doublevalue), (yyvsp[-1].doublevalue), (yyvsp[0].doublevalue));
3219
1.05k
    WKT_ERROR();
3220
1.05k
  }
3221
0
#line 2874 "lwin_wkt_parse.c"
3222
0
  break;
3223
3224
0
  case 143: /* opt_dimensionality: DIMENSIONALITY_TOK  */
3225
0
#line 724 "lwin_wkt_parse.y"
3226
0
  {
3227
0
    (yyval.stringvalue) = (yyvsp[0].stringvalue);
3228
0
  }
3229
0
#line 2880 "lwin_wkt_parse.c"
3230
0
  break;
3231
3232
0
  case 144: /* opt_dimensionality: %empty  */
3233
0
#line 725 "lwin_wkt_parse.y"
3234
0
  {
3235
0
    (yyval.stringvalue) = NULL;
3236
0
  }
3237
0
#line 2886 "lwin_wkt_parse.c"
3238
0
  break;
3239
3240
0
  case 145: /* nurbscurve: NURBSCURVE_TOK LBRACKET_TOK DEGREE_TOK DOUBLE_TOK COMMA_TOK CONTROLPOINTS_TOK
3241
         opt_dimensionality LBRACKET_TOK iso_controlpoint_list RBRACKET_TOK COMMA_TOK KNOTS_TOK LBRACKET_TOK
3242
         iso_knot_list RBRACKET_TOK RBRACKET_TOK  */
3243
0
#line 730 "lwin_wkt_parse.y"
3244
0
  {
3245
0
    (yyval.geometryvalue) =
3246
0
        wkt_parser_nurbscurve_new((yyvsp[-12].doublevalue),
3247
0
                (yyvsp[-7].nurbscontrolpointsvalue)->points,
3248
0
                (yyvsp[-7].nurbscontrolpointsvalue)->weights,
3249
0
                (yyvsp[-2].ptarrayvalue),
3250
0
                wkt_parser_nurbscurve_iso_dimensionality(NULL, (yyvsp[-9].stringvalue)));
3251
0
    (yyvsp[-7].nurbscontrolpointsvalue)->points = NULL;
3252
0
    (yyvsp[-7].nurbscontrolpointsvalue)->weights = NULL;
3253
0
    wkt_parser_nurbs_controlpoints_free((yyvsp[-7].nurbscontrolpointsvalue));
3254
0
    WKT_ERROR();
3255
0
  }
3256
0
#line 2899 "lwin_wkt_parse.c"
3257
0
  break;
3258
3259
0
  case 146: /* nurbscurve: NURBSCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK DEGREE_TOK DOUBLE_TOK COMMA_TOK
3260
         CONTROLPOINTS_TOK opt_dimensionality LBRACKET_TOK iso_controlpoint_list RBRACKET_TOK COMMA_TOK
3261
         KNOTS_TOK LBRACKET_TOK iso_knot_list RBRACKET_TOK RBRACKET_TOK  */
3262
0
#line 739 "lwin_wkt_parse.y"
3263
0
  {
3264
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new(
3265
0
        (yyvsp[-12].doublevalue),
3266
0
        (yyvsp[-7].nurbscontrolpointsvalue)->points,
3267
0
        (yyvsp[-7].nurbscontrolpointsvalue)->weights,
3268
0
        (yyvsp[-2].ptarrayvalue),
3269
0
        wkt_parser_nurbscurve_iso_dimensionality((yyvsp[-15].stringvalue), (yyvsp[-9].stringvalue)));
3270
0
    (yyvsp[-7].nurbscontrolpointsvalue)->points = NULL;
3271
0
    (yyvsp[-7].nurbscontrolpointsvalue)->weights = NULL;
3272
0
    wkt_parser_nurbs_controlpoints_free((yyvsp[-7].nurbscontrolpointsvalue));
3273
0
    WKT_ERROR();
3274
0
  }
3275
0
#line 2912 "lwin_wkt_parse.c"
3276
0
  break;
3277
3278
0
  case 147: /* nurbscurve: NURBSCURVE_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK ptarray RBRACKET_TOK
3279
         COMMA_TOK LBRACKET_TOK weight_list RBRACKET_TOK COMMA_TOK LBRACKET_TOK knot_list RBRACKET_TOK
3280
         RBRACKET_TOK  */
3281
0
#line 749 "lwin_wkt_parse.y"
3282
0
  {
3283
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new((yyvsp[-13].doublevalue),
3284
0
                  (yyvsp[-10].ptarrayvalue),
3285
0
                  (yyvsp[-6].ptarrayvalue),
3286
0
                  (yyvsp[-2].ptarrayvalue),
3287
0
                  NULL);
3288
0
    WKT_ERROR();
3289
0
  }
3290
0
#line 2918 "lwin_wkt_parse.c"
3291
0
  break;
3292
3293
0
  case 148: /* nurbscurve: NURBSCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK
3294
         ptarray RBRACKET_TOK COMMA_TOK LBRACKET_TOK weight_list RBRACKET_TOK COMMA_TOK LBRACKET_TOK
3295
         knot_list RBRACKET_TOK RBRACKET_TOK  */
3296
0
#line 751 "lwin_wkt_parse.y"
3297
0
  {
3298
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new((yyvsp[-13].doublevalue),
3299
0
                  (yyvsp[-10].ptarrayvalue),
3300
0
                  (yyvsp[-6].ptarrayvalue),
3301
0
                  (yyvsp[-2].ptarrayvalue),
3302
0
                  (yyvsp[-15].stringvalue));
3303
0
    WKT_ERROR();
3304
0
  }
3305
0
#line 2924 "lwin_wkt_parse.c"
3306
0
  break;
3307
3308
0
  case 149: /* nurbscurve: NURBSCURVE_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK ptarray RBRACKET_TOK
3309
         COMMA_TOK LBRACKET_TOK weight_list RBRACKET_TOK RBRACKET_TOK  */
3310
0
#line 754 "lwin_wkt_parse.y"
3311
0
  {
3312
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new(
3313
0
        (yyvsp[-9].doublevalue), (yyvsp[-6].ptarrayvalue), (yyvsp[-2].ptarrayvalue), NULL, NULL);
3314
0
    WKT_ERROR();
3315
0
  }
3316
0
#line 2930 "lwin_wkt_parse.c"
3317
0
  break;
3318
3319
0
  case 150: /* nurbscurve: NURBSCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK
3320
         ptarray RBRACKET_TOK COMMA_TOK LBRACKET_TOK weight_list RBRACKET_TOK RBRACKET_TOK  */
3321
0
#line 756 "lwin_wkt_parse.y"
3322
0
  {
3323
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new((yyvsp[-9].doublevalue),
3324
0
                  (yyvsp[-6].ptarrayvalue),
3325
0
                  (yyvsp[-2].ptarrayvalue),
3326
0
                  NULL,
3327
0
                  (yyvsp[-11].stringvalue));
3328
0
    WKT_ERROR();
3329
0
  }
3330
0
#line 2936 "lwin_wkt_parse.c"
3331
0
  break;
3332
3333
0
  case 151: /* nurbscurve: NURBSCURVE_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK ptarray RBRACKET_TOK
3334
         RBRACKET_TOK  */
3335
0
#line 759 "lwin_wkt_parse.y"
3336
0
  {
3337
0
    (yyval.geometryvalue) =
3338
0
        wkt_parser_nurbscurve_new((yyvsp[-5].doublevalue), (yyvsp[-2].ptarrayvalue), NULL, NULL, NULL);
3339
0
    WKT_ERROR();
3340
0
  }
3341
0
#line 2942 "lwin_wkt_parse.c"
3342
0
  break;
3343
3344
0
  case 152: /* nurbscurve: NURBSCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK LBRACKET_TOK
3345
         ptarray RBRACKET_TOK RBRACKET_TOK  */
3346
0
#line 761 "lwin_wkt_parse.y"
3347
0
  {
3348
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_new(
3349
0
        (yyvsp[-5].doublevalue), (yyvsp[-2].ptarrayvalue), NULL, NULL, (yyvsp[-7].stringvalue));
3350
0
    WKT_ERROR();
3351
0
  }
3352
0
#line 2948 "lwin_wkt_parse.c"
3353
0
  break;
3354
3355
0
  case 153: /* nurbscurve: NURBSCURVE_TOK DIMENSIONALITY_TOK EMPTY_TOK  */
3356
0
#line 765 "lwin_wkt_parse.y"
3357
0
  {
3358
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_empty((yyvsp[-1].stringvalue));
3359
0
    WKT_ERROR();
3360
0
  }
3361
0
#line 2954 "lwin_wkt_parse.c"
3362
0
  break;
3363
3364
0
  case 154: /* nurbscurve: NURBSCURVE_TOK EMPTY_TOK  */
3365
0
#line 767 "lwin_wkt_parse.y"
3366
0
  {
3367
0
    (yyval.geometryvalue) = wkt_parser_nurbscurve_empty(NULL);
3368
0
    WKT_ERROR();
3369
0
  }
3370
0
#line 2960 "lwin_wkt_parse.c"
3371
0
  break;
3372
3373
0
  case 155: /* iso_controlpoint: NURBSPOINT_TOK LBRACKET_TOK WEIGHTEDPOINT_TOK opt_dimensionality LBRACKET_TOK
3374
         coordinate RBRACKET_TOK COMMA_TOK WEIGHT_TOK DOUBLE_TOK RBRACKET_TOK  */
3375
0
#line 772 "lwin_wkt_parse.y"
3376
0
  {
3377
0
    (yyval.nurbscontrolpointsvalue) = wkt_parser_nurbs_controlpoints_new(
3378
0
        (yyvsp[-5].coordinatevalue), (yyvsp[-1].doublevalue), (yyvsp[-7].stringvalue));
3379
0
    WKT_ERROR();
3380
0
  }
3381
0
#line 2966 "lwin_wkt_parse.c"
3382
0
  break;
3383
3384
0
  case 156: /* iso_controlpoint_list: iso_controlpoint_list COMMA_TOK iso_controlpoint  */
3385
0
#line 777 "lwin_wkt_parse.y"
3386
0
  {
3387
0
    (yyval.nurbscontrolpointsvalue) = wkt_parser_nurbs_controlpoints_add(
3388
0
        (yyvsp[-2].nurbscontrolpointsvalue), (yyvsp[0].nurbscontrolpointsvalue));
3389
0
    WKT_ERROR();
3390
0
  }
3391
0
#line 2972 "lwin_wkt_parse.c"
3392
0
  break;
3393
3394
0
  case 157: /* iso_controlpoint_list: iso_controlpoint  */
3395
0
#line 779 "lwin_wkt_parse.y"
3396
0
  {
3397
0
    (yyval.nurbscontrolpointsvalue) = (yyvsp[0].nurbscontrolpointsvalue);
3398
0
  }
3399
0
#line 2978 "lwin_wkt_parse.c"
3400
0
  break;
3401
3402
0
  case 158: /* iso_knot_list: iso_knot_list COMMA_TOK KNOT_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK DOUBLE_TOK
3403
         RBRACKET_TOK  */
3404
0
#line 784 "lwin_wkt_parse.y"
3405
0
  {
3406
0
    (yyval.ptarrayvalue) = wkt_parser_knot_list_add_repeated(
3407
0
        (yyvsp[-7].ptarrayvalue), (yyvsp[-3].doublevalue), (yyvsp[-1].doublevalue));
3408
0
    WKT_ERROR();
3409
0
  }
3410
0
#line 2984 "lwin_wkt_parse.c"
3411
0
  break;
3412
3413
0
  case 159: /* iso_knot_list: KNOT_TOK LBRACKET_TOK DOUBLE_TOK COMMA_TOK DOUBLE_TOK RBRACKET_TOK  */
3414
0
#line 786 "lwin_wkt_parse.y"
3415
0
  {
3416
0
    (yyval.ptarrayvalue) =
3417
0
        wkt_parser_knot_list_add_repeated(NULL, (yyvsp[-3].doublevalue), (yyvsp[-1].doublevalue));
3418
0
    WKT_ERROR();
3419
0
  }
3420
0
#line 2990 "lwin_wkt_parse.c"
3421
0
  break;
3422
3423
0
  case 160: /* weight_list: weight_list COMMA_TOK DOUBLE_TOK  */
3424
0
#line 791 "lwin_wkt_parse.y"
3425
0
  {
3426
0
    (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue),
3427
0
                    wkt_parser_coord_2((yyvsp[0].doublevalue), 0));
3428
0
    WKT_ERROR();
3429
0
  }
3430
0
#line 2999 "lwin_wkt_parse.c"
3431
0
  break;
3432
3433
0
  case 161: /* weight_list: DOUBLE_TOK  */
3434
0
#line 796 "lwin_wkt_parse.y"
3435
0
  {
3436
0
    (yyval.ptarrayvalue) = wkt_parser_ptarray_new(wkt_parser_coord_2((yyvsp[0].doublevalue), 0));
3437
0
    WKT_ERROR();
3438
0
  }
3439
0
#line 3008 "lwin_wkt_parse.c"
3440
0
  break;
3441
3442
0
  case 162: /* knot_list: knot_list COMMA_TOK DOUBLE_TOK  */
3443
0
#line 804 "lwin_wkt_parse.y"
3444
0
  {
3445
0
    (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[-2].ptarrayvalue),
3446
0
                    wkt_parser_coord_2((yyvsp[0].doublevalue), 0));
3447
0
    WKT_ERROR();
3448
0
  }
3449
0
#line 3017 "lwin_wkt_parse.c"
3450
0
  break;
3451
3452
0
  case 163: /* knot_list: DOUBLE_TOK  */
3453
0
#line 809 "lwin_wkt_parse.y"
3454
0
  {
3455
0
    (yyval.ptarrayvalue) = wkt_parser_ptarray_new(wkt_parser_coord_2((yyvsp[0].doublevalue), 0));
3456
0
    WKT_ERROR();
3457
0
  }
3458
0
#line 3026 "lwin_wkt_parse.c"
3459
0
  break;
3460
3461
0
#line 3030 "lwin_wkt_parse.c"
3462
3463
0
  default:
3464
0
    break;
3465
2.11M
  }
3466
  /* User semantic actions sometimes alter yychar, and that requires
3467
     that yytoken be updated with the new translation.  We take the
3468
     approach of translating immediately before every use of yytoken.
3469
     One alternative is translating here after every semantic action,
3470
     but that translation would be missed if the semantic action invokes
3471
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3472
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
3473
     incorrect destructor might then be invoked immediately.  In the
3474
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
3475
     to an incorrect destructor call or verbose syntax error message
3476
     before the lookahead is translated.  */
3477
2.11M
  YY_SYMBOL_PRINT("-> $$ =", YY_CAST(yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
3478
3479
2.11M
  YYPOPSTACK(yylen);
3480
2.11M
  yylen = 0;
3481
3482
2.11M
  *++yyvsp = yyval;
3483
2.11M
  *++yylsp = yyloc;
3484
3485
  /* Now 'shift' the result of the reduction.  Determine what state
3486
     that goes to, based on the state we popped back to and the rule
3487
     number reduced by.  */
3488
2.11M
  {
3489
2.11M
    const int yylhs = yyr1[yyn] - YYNTOKENS;
3490
2.11M
    const int yyi = yypgoto[yylhs] + *yyssp;
3491
2.11M
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]);
3492
2.11M
  }
3493
3494
2.11M
  goto yynewstate;
3495
3496
/*--------------------------------------.
3497
| yyerrlab -- here on detecting error.  |
3498
`--------------------------------------*/
3499
1.63k
yyerrlab:
3500
  /* Make sure we have latest lookahead translation.  See comments at
3501
     user semantic actions for why this is necessary.  */
3502
1.63k
  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE(yychar);
3503
  /* If not already recovering from an error, report this error.  */
3504
1.63k
  if (!yyerrstatus)
3505
1.63k
  {
3506
1.63k
    ++yynerrs;
3507
1.63k
    yyerror(YY_("syntax error"));
3508
1.63k
  }
3509
3510
1.63k
  yyerror_range[1] = yylloc;
3511
1.63k
  if (yyerrstatus == 3)
3512
0
  {
3513
    /* If just tried and failed to reuse lookahead token after an
3514
       error, discard it.  */
3515
3516
0
    if (yychar <= YYEOF)
3517
0
    {
3518
      /* Return failure if at end of input.  */
3519
0
      if (yychar == YYEOF)
3520
0
        YYABORT;
3521
0
    }
3522
0
    else
3523
0
    {
3524
0
      yydestruct("Error: discarding", yytoken, &yylval, &yylloc);
3525
0
      yychar = YYEMPTY;
3526
0
    }
3527
0
  }
3528
3529
  /* Else will try to reuse lookahead token after shifting the error
3530
     token.  */
3531
1.63k
  goto yyerrlab1;
3532
3533
/*---------------------------------------------------.
3534
| yyerrorlab -- error raised explicitly by YYERROR.  |
3535
`---------------------------------------------------*/
3536
1.63k
yyerrorlab:
3537
  /* Pacify compilers when the user code never invokes YYERROR and the
3538
     label yyerrorlab therefore never appears in user code.  */
3539
428
  if (0)
3540
0
    YYERROR;
3541
428
  ++yynerrs;
3542
3543
  /* Do not reclaim the symbols of the rule whose action triggered
3544
     this YYERROR.  */
3545
428
  YYPOPSTACK(yylen);
3546
428
  yylen = 0;
3547
428
  YY_STACK_PRINT(yyss, yyssp);
3548
428
  yystate = *yyssp;
3549
428
  goto yyerrlab1;
3550
3551
/*-------------------------------------------------------------.
3552
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
3553
`-------------------------------------------------------------*/
3554
2.06k
yyerrlab1:
3555
2.06k
  yyerrstatus = 3; /* Each real token shifted decrements this.  */
3556
3557
  /* Pop stack until we find a state that shifts the error token.  */
3558
2.06k
  for (;;)
3559
22.4k
  {
3560
22.4k
    yyn = yypact[yystate];
3561
22.4k
    if (!yypact_value_is_default(yyn))
3562
22.4k
    {
3563
22.4k
      yyn += YYSYMBOL_YYerror;
3564
22.4k
      if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
3565
0
      {
3566
0
        yyn = yytable[yyn];
3567
0
        if (0 < yyn)
3568
0
          break;
3569
0
      }
3570
22.4k
    }
3571
3572
    /* Pop the current state because it cannot handle the error token.  */
3573
22.4k
    if (yyssp == yyss)
3574
2.06k
      YYABORT;
3575
3576
20.3k
    yyerror_range[1] = *yylsp;
3577
20.3k
    yydestruct("Error: popping", YY_ACCESSING_SYMBOL(yystate), yyvsp, yylsp);
3578
20.3k
    YYPOPSTACK(1);
3579
20.3k
    yystate = *yyssp;
3580
20.3k
    YY_STACK_PRINT(yyss, yyssp);
3581
20.3k
  }
3582
3583
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3584
0
  *++yyvsp = yylval;
3585
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
3586
3587
0
  yyerror_range[2] = yylloc;
3588
0
  ++yylsp;
3589
0
  YYLLOC_DEFAULT(*yylsp, yyerror_range, 2);
3590
3591
  /* Shift the error token.  */
3592
0
  YY_SYMBOL_PRINT("Shifting", YY_ACCESSING_SYMBOL(yyn), yyvsp, yylsp);
3593
3594
0
  yystate = yyn;
3595
0
  goto yynewstate;
3596
3597
/*-------------------------------------.
3598
| yyacceptlab -- YYACCEPT comes here.  |
3599
`-------------------------------------*/
3600
645
yyacceptlab:
3601
645
  yyresult = 0;
3602
645
  goto yyreturnlab;
3603
3604
/*-----------------------------------.
3605
| yyabortlab -- YYABORT comes here.  |
3606
`-----------------------------------*/
3607
2.06k
yyabortlab:
3608
2.06k
  yyresult = 1;
3609
2.06k
  goto yyreturnlab;
3610
3611
/*-----------------------------------------------------------.
3612
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
3613
`-----------------------------------------------------------*/
3614
1
yyexhaustedlab:
3615
1
  yyerror(YY_("memory exhausted"));
3616
1
  yyresult = 2;
3617
1
  goto yyreturnlab;
3618
3619
/*----------------------------------------------------------.
3620
| yyreturnlab -- parsing is finished, clean up and return.  |
3621
`----------------------------------------------------------*/
3622
2.71k
yyreturnlab:
3623
2.71k
  if (yychar != YYEMPTY)
3624
1.64k
  {
3625
    /* Make sure we have latest lookahead translation.  See comments at
3626
       user semantic actions for why this is necessary.  */
3627
1.64k
    yytoken = YYTRANSLATE(yychar);
3628
1.64k
    yydestruct("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
3629
1.64k
  }
3630
  /* Do not reclaim the symbols of the rule whose action triggered
3631
     this YYABORT or YYACCEPT.  */
3632
2.71k
  YYPOPSTACK(yylen);
3633
2.71k
  YY_STACK_PRINT(yyss, yyssp);
3634
13.9k
  while (yyssp != yyss)
3635
11.2k
  {
3636
11.2k
    yydestruct("Cleanup: popping", YY_ACCESSING_SYMBOL(+*yyssp), yyvsp, yylsp);
3637
11.2k
    YYPOPSTACK(1);
3638
11.2k
  }
3639
2.71k
#ifndef yyoverflow
3640
2.71k
  if (yyss != yyssa)
3641
26
    YYSTACK_FREE(yyss);
3642
2.71k
#endif
3643
3644
2.71k
  return yyresult;
3645
2.06k
}