/src/PROJ/src/wkt1_generated_parser.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* A Bison parser, made by GNU Bison 3.5.1. */ |
2 | | |
3 | | /* Bison implementation for Yacc-like parsers in C |
4 | | |
5 | | Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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 <http://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 | | /* All symbols defined below should begin with yy or YY, to avoid |
38 | | infringing on user name space. This should be done even for local |
39 | | variables, as they might otherwise be expanded by user macros. |
40 | | There are some unavoidable exceptions within include files to |
41 | | define necessary library symbols; they are noted "INFRINGES ON |
42 | | USER NAME SPACE" below. */ |
43 | | |
44 | | /* Undocumented macros, especially those whose name start with YY_, |
45 | | are private implementation details. Do not rely on them. */ |
46 | | |
47 | | /* Identify Bison output. */ |
48 | | #define YYBISON 1 |
49 | | |
50 | | /* Bison version. */ |
51 | | #define YYBISON_VERSION "3.5.1" |
52 | | |
53 | | /* Skeleton name. */ |
54 | | #define YYSKELETON_NAME "yacc.c" |
55 | | |
56 | | /* Pure parsers. */ |
57 | | #define YYPURE 1 |
58 | | |
59 | | /* Push parsers. */ |
60 | | #define YYPUSH 0 |
61 | | |
62 | | /* Pull parsers. */ |
63 | | #define YYPULL 1 |
64 | | |
65 | | |
66 | | /* Substitute the variable and function names. */ |
67 | | #define yyparse pj_wkt1_parse |
68 | 29.7k | #define yylex pj_wkt1_lex |
69 | 543 | #define yyerror pj_wkt1_error |
70 | | #define yydebug pj_wkt1_debug |
71 | | /* #define yynerrs pj_wkt1_nerrs */ |
72 | | |
73 | | /* First part of user prologue. */ |
74 | | |
75 | | /****************************************************************************** |
76 | | * Project: PROJ |
77 | | * Purpose: WKT1 parser grammar |
78 | | * Author: Even Rouault, <even.rouault at spatialys.com> |
79 | | * |
80 | | ****************************************************************************** |
81 | | * Copyright (c) 2013-2018 Even Rouault, <even.rouault at spatialys.com> |
82 | | * |
83 | | * Permission is hereby granted, free of charge, to any person obtaining a |
84 | | * copy of this software and associated documentation files (the "Software"), |
85 | | * to deal in the Software without restriction, including without limitation |
86 | | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
87 | | * and/or sell copies of the Software, and to permit persons to whom the |
88 | | * Software is furnished to do so, subject to the following conditions: |
89 | | * |
90 | | * The above copyright notice and this permission notice shall be included |
91 | | * in all copies or substantial portions of the Software. |
92 | | * |
93 | | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
94 | | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
95 | | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
96 | | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
97 | | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
98 | | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
99 | | * DEALINGS IN THE SOFTWARE. |
100 | | ****************************************************************************/ |
101 | | |
102 | | #include "wkt1_parser.h" |
103 | | |
104 | | |
105 | | |
106 | | # ifndef YY_CAST |
107 | | # ifdef __cplusplus |
108 | | # define YY_CAST(Type, Val) static_cast<Type> (Val) |
109 | | # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) |
110 | | # else |
111 | 57.6k | # define YY_CAST(Type, Val) ((Type) (Val)) |
112 | | # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
113 | | # endif |
114 | | # endif |
115 | | # ifndef YY_NULLPTR |
116 | | # if defined __cplusplus |
117 | | # if 201103L <= __cplusplus |
118 | | # define YY_NULLPTR nullptr |
119 | | # else |
120 | | # define YY_NULLPTR 0 |
121 | | # endif |
122 | | # else |
123 | 1.71k | # define YY_NULLPTR ((void*)0) |
124 | | # endif |
125 | | # endif |
126 | | |
127 | | /* Enabling verbose error messages. */ |
128 | | #ifdef YYERROR_VERBOSE |
129 | | # undef YYERROR_VERBOSE |
130 | | # define YYERROR_VERBOSE 1 |
131 | | #else |
132 | | # define YYERROR_VERBOSE 1 |
133 | | #endif |
134 | | |
135 | | /* Use api.header.include to #include this header |
136 | | instead of duplicating it here. */ |
137 | | #ifndef YY_PJ_WKT1_WKT1_GENERATED_PARSER_H_INCLUDED |
138 | | # define YY_PJ_WKT1_WKT1_GENERATED_PARSER_H_INCLUDED |
139 | | /* Debug traces. */ |
140 | | #ifndef YYDEBUG |
141 | | # define YYDEBUG 0 |
142 | | #endif |
143 | | #if YYDEBUG |
144 | | extern int pj_wkt1_debug; |
145 | | #endif |
146 | | |
147 | | /* Token type. */ |
148 | | #ifndef YYTOKENTYPE |
149 | | # define YYTOKENTYPE |
150 | | enum yytokentype |
151 | | { |
152 | | END = 0, |
153 | | T_PARAM_MT = 258, |
154 | | T_CONCAT_MT = 259, |
155 | | T_INVERSE_MT = 260, |
156 | | T_PASSTHROUGH_MT = 261, |
157 | | T_PROJCS = 262, |
158 | | T_PROJECTION = 263, |
159 | | T_GEOGCS = 264, |
160 | | T_DATUM = 265, |
161 | | T_SPHEROID = 266, |
162 | | T_PRIMEM = 267, |
163 | | T_UNIT = 268, |
164 | | T_LINUNIT = 269, |
165 | | T_GEOCCS = 270, |
166 | | T_AUTHORITY = 271, |
167 | | T_VERT_CS = 272, |
168 | | T_VERTCS = 273, |
169 | | T_VERT_DATUM = 274, |
170 | | T_VDATUM = 275, |
171 | | T_COMPD_CS = 276, |
172 | | T_AXIS = 277, |
173 | | T_TOWGS84 = 278, |
174 | | T_FITTED_CS = 279, |
175 | | T_LOCAL_CS = 280, |
176 | | T_LOCAL_DATUM = 281, |
177 | | T_PARAMETER = 282, |
178 | | T_EXTENSION = 283, |
179 | | T_STRING = 284, |
180 | | T_NUMBER = 285, |
181 | | T_IDENTIFIER = 286 |
182 | | }; |
183 | | #endif |
184 | | |
185 | | /* Value type. */ |
186 | | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
187 | | typedef int YYSTYPE; |
188 | | # define YYSTYPE_IS_TRIVIAL 1 |
189 | | # define YYSTYPE_IS_DECLARED 1 |
190 | | #endif |
191 | | |
192 | | |
193 | | |
194 | | int pj_wkt1_parse (pj_wkt1_parse_context *context); |
195 | | |
196 | | #endif /* !YY_PJ_WKT1_WKT1_GENERATED_PARSER_H_INCLUDED */ |
197 | | |
198 | | |
199 | | |
200 | | #ifdef short |
201 | | # undef short |
202 | | #endif |
203 | | |
204 | | /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure |
205 | | <limits.h> and (if available) <stdint.h> are included |
206 | | so that the code can choose integer types of a good width. */ |
207 | | |
208 | | #ifndef __PTRDIFF_MAX__ |
209 | | # include <limits.h> /* INFRINGES ON USER NAME SPACE */ |
210 | | # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ |
211 | | # include <stdint.h> /* INFRINGES ON USER NAME SPACE */ |
212 | | # define YY_STDINT_H |
213 | | # endif |
214 | | #endif |
215 | | |
216 | | /* Narrow types that promote to a signed type and that can represent a |
217 | | signed or unsigned integer of at least N bits. In tables they can |
218 | | save space and decrease cache pressure. Promoting to a signed type |
219 | | helps avoid bugs in integer arithmetic. */ |
220 | | |
221 | | #ifdef __INT_LEAST8_MAX__ |
222 | | typedef __INT_LEAST8_TYPE__ yytype_int8; |
223 | | #elif defined YY_STDINT_H |
224 | | typedef int_least8_t yytype_int8; |
225 | | #else |
226 | | typedef signed char yytype_int8; |
227 | | #endif |
228 | | |
229 | | #ifdef __INT_LEAST16_MAX__ |
230 | | typedef __INT_LEAST16_TYPE__ yytype_int16; |
231 | | #elif defined YY_STDINT_H |
232 | | typedef int_least16_t yytype_int16; |
233 | | #else |
234 | | typedef short yytype_int16; |
235 | | #endif |
236 | | |
237 | | #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ |
238 | | typedef __UINT_LEAST8_TYPE__ yytype_uint8; |
239 | | #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ |
240 | | && UINT_LEAST8_MAX <= INT_MAX) |
241 | | typedef uint_least8_t yytype_uint8; |
242 | | #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX |
243 | | typedef unsigned char yytype_uint8; |
244 | | #else |
245 | | typedef short yytype_uint8; |
246 | | #endif |
247 | | |
248 | | #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ |
249 | | typedef __UINT_LEAST16_TYPE__ yytype_uint16; |
250 | | #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ |
251 | | && UINT_LEAST16_MAX <= INT_MAX) |
252 | | typedef uint_least16_t yytype_uint16; |
253 | | #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX |
254 | | typedef unsigned short yytype_uint16; |
255 | | #else |
256 | | typedef int yytype_uint16; |
257 | | #endif |
258 | | |
259 | | #ifndef YYPTRDIFF_T |
260 | | # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ |
261 | 6.67k | # define YYPTRDIFF_T __PTRDIFF_TYPE__ |
262 | | # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ |
263 | | # elif defined PTRDIFF_MAX |
264 | | # ifndef ptrdiff_t |
265 | | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
266 | | # endif |
267 | | # define YYPTRDIFF_T ptrdiff_t |
268 | | # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX |
269 | | # else |
270 | | # define YYPTRDIFF_T long |
271 | | # define YYPTRDIFF_MAXIMUM LONG_MAX |
272 | | # endif |
273 | | #endif |
274 | | |
275 | | #ifndef YYSIZE_T |
276 | | # ifdef __SIZE_TYPE__ |
277 | | # define YYSIZE_T __SIZE_TYPE__ |
278 | | # elif defined size_t |
279 | | # define YYSIZE_T size_t |
280 | | # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ |
281 | | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
282 | | # define YYSIZE_T size_t |
283 | | # else |
284 | | # define YYSIZE_T unsigned |
285 | | # endif |
286 | | #endif |
287 | | |
288 | | #define YYSIZE_MAXIMUM \ |
289 | 1.17k | YY_CAST (YYPTRDIFF_T, \ |
290 | | (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ |
291 | | ? YYPTRDIFF_MAXIMUM \ |
292 | | : YY_CAST (YYSIZE_T, -1))) |
293 | | |
294 | 0 | #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
295 | | |
296 | | /* Stored state numbers (used for stacks). */ |
297 | | typedef yytype_int16 yy_state_t; |
298 | | |
299 | | /* State numbers in computations. */ |
300 | | typedef int yy_state_fast_t; |
301 | | |
302 | | #ifndef YY_ |
303 | | # if defined YYENABLE_NLS && YYENABLE_NLS |
304 | | # if ENABLE_NLS |
305 | | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
306 | | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
307 | | # endif |
308 | | # endif |
309 | | # ifndef YY_ |
310 | 543 | # define YY_(Msgid) Msgid |
311 | | # endif |
312 | | #endif |
313 | | |
314 | | #ifndef YY_ATTRIBUTE_PURE |
315 | | # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) |
316 | | # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
317 | | # else |
318 | | # define YY_ATTRIBUTE_PURE |
319 | | # endif |
320 | | #endif |
321 | | |
322 | | #ifndef YY_ATTRIBUTE_UNUSED |
323 | | # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
324 | | # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) |
325 | | # else |
326 | | # define YY_ATTRIBUTE_UNUSED |
327 | | # endif |
328 | | #endif |
329 | | |
330 | | /* Suppress unused-variable warnings by "using" E. */ |
331 | | #if ! defined lint || defined __GNUC__ |
332 | 7.65k | # define YYUSE(E) ((void) (E)) |
333 | | #else |
334 | | # define YYUSE(E) /* empty */ |
335 | | #endif |
336 | | |
337 | | #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
338 | | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
339 | | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
340 | | _Pragma ("GCC diagnostic push") \ |
341 | | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ |
342 | | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
343 | | # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
344 | | _Pragma ("GCC diagnostic pop") |
345 | | #else |
346 | 1.80k | # define YY_INITIAL_VALUE(Value) Value |
347 | | #endif |
348 | | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
349 | | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
350 | | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
351 | | #endif |
352 | | #ifndef YY_INITIAL_VALUE |
353 | | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
354 | | #endif |
355 | | |
356 | | #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ |
357 | | # define YY_IGNORE_USELESS_CAST_BEGIN \ |
358 | | _Pragma ("GCC diagnostic push") \ |
359 | | _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") |
360 | | # define YY_IGNORE_USELESS_CAST_END \ |
361 | | _Pragma ("GCC diagnostic pop") |
362 | | #endif |
363 | | #ifndef YY_IGNORE_USELESS_CAST_BEGIN |
364 | | # define YY_IGNORE_USELESS_CAST_BEGIN |
365 | | # define YY_IGNORE_USELESS_CAST_END |
366 | | #endif |
367 | | |
368 | | |
369 | 56.4k | #define YY_ASSERT(E) ((void) (0 && (E))) |
370 | | |
371 | | #if ! defined yyoverflow || YYERROR_VERBOSE |
372 | | |
373 | | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
374 | | |
375 | | # ifdef YYSTACK_USE_ALLOCA |
376 | | # if YYSTACK_USE_ALLOCA |
377 | | # ifdef __GNUC__ |
378 | | # define YYSTACK_ALLOC __builtin_alloca |
379 | | # elif defined __BUILTIN_VA_ARG_INCR |
380 | | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
381 | | # elif defined _AIX |
382 | | # define YYSTACK_ALLOC __alloca |
383 | | # elif defined _MSC_VER |
384 | | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
385 | | # define alloca _alloca |
386 | | # else |
387 | | # define YYSTACK_ALLOC alloca |
388 | | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
389 | | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
390 | | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
391 | | # ifndef EXIT_SUCCESS |
392 | | # define EXIT_SUCCESS 0 |
393 | | # endif |
394 | | # endif |
395 | | # endif |
396 | | # endif |
397 | | # endif |
398 | | |
399 | | # ifdef YYSTACK_ALLOC |
400 | | /* Pacify GCC's 'empty if-body' warning. */ |
401 | | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
402 | | # ifndef YYSTACK_ALLOC_MAXIMUM |
403 | | /* The OS might guarantee only one guard page at the bottom of the stack, |
404 | | and a page size can be as small as 4096 bytes. So we cannot safely |
405 | | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
406 | | to allow for a few compiler-allocated temporary stack slots. */ |
407 | | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
408 | | # endif |
409 | | # else |
410 | | # define YYSTACK_ALLOC YYMALLOC |
411 | 0 | # define YYSTACK_FREE YYFREE |
412 | | # ifndef YYSTACK_ALLOC_MAXIMUM |
413 | 1.17k | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
414 | | # endif |
415 | | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
416 | | && ! ((defined YYMALLOC || defined malloc) \ |
417 | | && (defined YYFREE || defined free))) |
418 | | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
419 | | # ifndef EXIT_SUCCESS |
420 | | # define EXIT_SUCCESS 0 |
421 | | # endif |
422 | | # endif |
423 | | # ifndef YYMALLOC |
424 | | # define YYMALLOC malloc |
425 | | # if ! defined malloc && ! defined EXIT_SUCCESS |
426 | | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
427 | | # endif |
428 | | # endif |
429 | | # ifndef YYFREE |
430 | 0 | # define YYFREE free |
431 | | # if ! defined free && ! defined EXIT_SUCCESS |
432 | | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
433 | | # endif |
434 | | # endif |
435 | | # endif |
436 | | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
437 | | |
438 | | |
439 | | #if (! defined yyoverflow \ |
440 | | && (! defined __cplusplus \ |
441 | | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
442 | | |
443 | | /* A type that is properly aligned for any stack member. */ |
444 | | union yyalloc |
445 | | { |
446 | | yy_state_t yyss_alloc; |
447 | | YYSTYPE yyvs_alloc; |
448 | | }; |
449 | | |
450 | | /* The size of the maximum gap between one aligned stack and the next. */ |
451 | 0 | # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) |
452 | | |
453 | | /* The size of an array large to enough to hold all stacks, each with |
454 | | N elements. */ |
455 | | # define YYSTACK_BYTES(N) \ |
456 | | ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ |
457 | | + YYSTACK_GAP_MAXIMUM) |
458 | | |
459 | | # define YYCOPY_NEEDED 1 |
460 | | |
461 | | /* Relocate STACK from its old location to the new one. The |
462 | | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
463 | | elements in the stack, and YYPTR gives the new location of the |
464 | | stack. Advance YYPTR to a properly aligned location for the next |
465 | | stack. */ |
466 | | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
467 | 0 | do \ |
468 | 0 | { \ |
469 | 0 | YYPTRDIFF_T yynewbytes; \ |
470 | 0 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
471 | 0 | Stack = &yyptr->Stack_alloc; \ |
472 | 0 | yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
473 | 0 | yyptr += yynewbytes / YYSIZEOF (*yyptr); \ |
474 | 0 | } \ |
475 | 0 | while (0) |
476 | | |
477 | | #endif |
478 | | |
479 | | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
480 | | /* Copy COUNT objects from SRC to DST. The source and destination do |
481 | | not overlap. */ |
482 | | # ifndef YYCOPY |
483 | | # if defined __GNUC__ && 1 < __GNUC__ |
484 | | # define YYCOPY(Dst, Src, Count) \ |
485 | 0 | __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) |
486 | | # else |
487 | | # define YYCOPY(Dst, Src, Count) \ |
488 | | do \ |
489 | | { \ |
490 | | YYPTRDIFF_T yyi; \ |
491 | | for (yyi = 0; yyi < (Count); yyi++) \ |
492 | | (Dst)[yyi] = (Src)[yyi]; \ |
493 | | } \ |
494 | | while (0) |
495 | | # endif |
496 | | # endif |
497 | | #endif /* !YYCOPY_NEEDED */ |
498 | | |
499 | | /* YYFINAL -- State number of the termination state. */ |
500 | 56.4k | #define YYFINAL 32 |
501 | | /* YYLAST -- Last index in YYTABLE. */ |
502 | 85.3k | #define YYLAST 255 |
503 | | |
504 | | /* YYNTOKENS -- Number of terminals. */ |
505 | 27.4k | #define YYNTOKENS 37 |
506 | | /* YYNNTS -- Number of nonterminals. */ |
507 | | #define YYNNTS 72 |
508 | | /* YYNRULES -- Number of rules. */ |
509 | | #define YYNRULES 114 |
510 | | /* YYNSTATES -- Number of states. */ |
511 | | #define YYNSTATES 289 |
512 | | |
513 | 0 | #define YYUNDEFTOK 2 |
514 | 33.2k | #define YYMAXUTOK 286 |
515 | | |
516 | | |
517 | | /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
518 | | as returned by yylex, with out-of-bounds checking. */ |
519 | | #define YYTRANSLATE(YYX) \ |
520 | 33.8k | (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
521 | | |
522 | | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
523 | | as returned by yylex. */ |
524 | | static const yytype_int8 yytranslate[] = |
525 | | { |
526 | | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
527 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
528 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
529 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
530 | | 33, 35, 2, 2, 36, 2, 2, 2, 2, 2, |
531 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
532 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
533 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
534 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
535 | | 2, 32, 2, 34, 2, 2, 2, 2, 2, 2, |
536 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
537 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
538 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
539 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
540 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
541 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
542 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
543 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
544 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
545 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
546 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
547 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
548 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
549 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
550 | | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
551 | | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
552 | | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
553 | | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
554 | | 25, 26, 27, 28, 29, 30, 31 |
555 | | }; |
556 | | |
557 | | #if YYDEBUG |
558 | | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
559 | | static const yytype_int16 yyrline[] = |
560 | | { |
561 | | 0, 81, 81, 93, 93, 96, 99, 99, 102, 102, |
562 | | 102, 102, 105, 108, 110, 111, 114, 116, 117, 120, |
563 | | 123, 127, 132, 132, 132, 132, 132, 132, 135, 136, |
564 | | 139, 139, 143, 147, 148, 151, 152, 154, 155, 156, |
565 | | 157, 159, 160, 163, 166, 169, 174, 176, 177, 178, |
566 | | 179, 180, 183, 185, 186, 187, 188, 191, 195, 202, |
567 | | 202, 205, 208, 211, 214, 217, 220, 223, 226, 227, |
568 | | 228, 229, 232, 235, 238, 239, 242, 244, 245, 246, |
569 | | 249, 251, 251, 254, 256, 257, 258, 261, 264, 267, |
570 | | 272, 272, 274, 277, 282, 285, 287, 290, 293, 296, |
571 | | 299, 302, 305, 308, 311, 314, 317, 320, 323, 326, |
572 | | 328, 330, 331, 332, 335 |
573 | | }; |
574 | | #endif |
575 | | |
576 | | #if YYDEBUG || YYERROR_VERBOSE || 1 |
577 | | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
578 | | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
579 | | static const char *const yytname[] = |
580 | | { |
581 | | "\"end of string\"", "error", "$undefined", "\"PARAM_MT\"", |
582 | | "\"CONCAT_MT\"", "\"INVERSE_MT\"", "\"PASSTHROUGH_MT\"", "\"PROJCS\"", |
583 | | "\"PROJECTION\"", "\"GEOGCS\"", "\"DATUM\"", "\"SPHEROID\"", |
584 | | "\"PRIMEM\"", "\"UNIT\"", "\"LINUNIT\"", "\"GEOCCS\"", "\"AUTHORITY\"", |
585 | | "\"VERT_CS\"", "\"VERTCS\"", "\"VERT_DATUM\"", "\"VDATUM\"", |
586 | | "\"COMPD_CS\"", "\"AXIS\"", "\"TOWGS84\"", "\"FITTED_CS\"", |
587 | | "\"LOCAL_CS\"", "\"LOCAL_DATUM\"", "\"PARAMETER\"", "\"EXTENSION\"", |
588 | | "\"string\"", "\"number\"", "\"identifier\"", "'['", "'('", "']'", "')'", |
589 | | "','", "$accept", "input", "begin_node", "begin_node_name", "end_node", |
590 | | "math_transform", "param_mt", "parameter", "opt_parameter_list", |
591 | | "concat_mt", "opt_math_transform_list", "inv_mt", "passthrough_mt", |
592 | | "integer", "coordinate_system", "horz_cs_with_opt_esri_vertcs", |
593 | | "horz_cs", "projected_cs", "opt_parameter_list_linear_unit", |
594 | | "parameter_list_linear_unit", "opt_twin_axis_extension_authority", |
595 | | "opt_authority", "extension", "projection", "geographic_cs", "linunit", |
596 | | "opt_linunit_or_twin_axis_extension_authority", "datum", |
597 | | "opt_towgs84_authority_extension", "spheroid", "semi_major_axis", |
598 | | "inverse_flattening", "prime_meridian", "longitude", "angular_unit", |
599 | | "linear_unit", "unit", "conversion_factor", "geocentric_cs", |
600 | | "opt_three_axis_extension_authority", "three_axis", "authority", |
601 | | "vert_cs", "esri_vert_cs", "opt_axis_authority", "vert_datum", |
602 | | "vdatum_or_datum", "vdatum", "opt_extension_authority", "datum_type", |
603 | | "compd_cs", "head_cs", "tail_cs", "twin_axis", "axis", "towgs84", |
604 | | "towgs84_parameters", "three_parameters", "seven_parameters", "dx", "dy", |
605 | | "dz", "ex", "ey", "ez", "ppm", "fitted_cs", "to_base", "base_cs", |
606 | | "local_cs", "opt_axis_list_authority", "local_datum", YY_NULLPTR |
607 | | }; |
608 | | #endif |
609 | | |
610 | | # ifdef YYPRINT |
611 | | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
612 | | (internal) symbol number NUM (which must be that of a token). */ |
613 | | static const yytype_int16 yytoknum[] = |
614 | | { |
615 | | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
616 | | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
617 | | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
618 | | 285, 286, 91, 40, 93, 41, 44 |
619 | | }; |
620 | | # endif |
621 | | |
622 | 58.5k | #define YYPACT_NINF (-131) |
623 | | |
624 | | #define yypact_value_is_default(Yyn) \ |
625 | 58.5k | ((Yyn) == YYPACT_NINF) |
626 | | |
627 | | #define YYTABLE_NINF (-1) |
628 | | |
629 | | #define yytable_value_is_error(Yyn) \ |
630 | 0 | 0 |
631 | | |
632 | | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
633 | | STATE-NUM. */ |
634 | | static const yytype_int16 yypact[] = |
635 | | { |
636 | | 97, 33, 33, 33, 33, 33, 33, 33, 33, 10, |
637 | | -131, -131, 2, -131, -131, -131, -131, -131, -131, -131, |
638 | | -131, -131, -131, 40, 12, 38, 47, 69, 93, 95, |
639 | | 96, 89, -131, 117, -131, 102, 126, 126, 123, 1, |
640 | | 22, 135, -131, -131, 119, -131, -131, 107, 33, 110, |
641 | | 111, 33, 113, 33, -131, 114, -131, -131, 115, 33, |
642 | | 33, 33, 33, -131, -131, -131, -131, -131, 118, 33, |
643 | | 121, 150, 125, 147, 147, 127, 149, 55, 6, 91, |
644 | | 128, 135, 135, 136, 97, 129, 149, 33, 131, 157, |
645 | | 33, 134, 137, 141, 33, 138, -131, -131, 33, 139, |
646 | | 55, -131, -131, -131, -131, 140, 145, 55, 142, 55, |
647 | | -131, 143, -131, 55, 141, 144, 151, 6, 33, 152, |
648 | | 153, 149, 149, -131, 140, 154, 18, 55, 155, 6, |
649 | | -131, 19, 55, 128, -131, 135, 55, -131, 135, -131, |
650 | | 151, 159, 161, 55, 156, 158, 75, 55, 163, 160, |
651 | | -131, 162, 55, 165, 33, 33, -131, 151, -131, 169, |
652 | | -131, -131, 33, 151, -131, -131, -131, 142, -131, 55, |
653 | | 55, 164, -131, -131, 65, 55, 171, 33, 151, -131, |
654 | | 140, -131, -131, 151, 14, 55, 65, 55, -131, -131, |
655 | | 151, 166, 167, -131, 55, 170, -131, -131, -131, -131, |
656 | | 18, 55, 151, -131, 140, 172, -131, -131, 173, 175, |
657 | | -131, -131, 55, 33, 151, 151, -131, 140, -131, 151, |
658 | | 140, -131, 174, -131, 55, 178, 181, -131, 184, -131, |
659 | | 164, -131, -131, -131, 159, 98, -131, 55, -131, -131, |
660 | | 179, -131, 180, -131, -131, -131, -131, -131, 159, -131, |
661 | | 55, 55, 55, -131, -131, -131, -131, 151, -131, 187, |
662 | | 165, 182, -131, -131, -131, 55, -131, 183, 151, 159, |
663 | | -131, 190, 55, -131, -131, 185, -131, 192, -131, 188, |
664 | | 193, -131, 189, 196, -131, 191, 198, -131, -131 |
665 | | }; |
666 | | |
667 | | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
668 | | Performed when YYTABLE does not specify something else to do. Zero |
669 | | means the default is an error. */ |
670 | | static const yytype_int8 yydefact[] = |
671 | | { |
672 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
673 | | 2, 22, 28, 31, 30, 23, 24, 75, 25, 26, |
674 | | 27, 3, 4, 0, 0, 0, 0, 0, 0, 0, |
675 | | 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, |
676 | | 0, 0, 6, 7, 0, 110, 29, 0, 0, 0, |
677 | | 0, 0, 0, 0, 82, 0, 81, 89, 0, 0, |
678 | | 0, 0, 0, 107, 8, 9, 10, 11, 0, 0, |
679 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
680 | | 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
681 | | 0, 0, 0, 0, 0, 77, 64, 83, 0, 0, |
682 | | 0, 34, 33, 90, 91, 84, 0, 0, 17, 0, |
683 | | 21, 0, 108, 0, 0, 0, 41, 0, 0, 53, |
684 | | 0, 0, 0, 87, 84, 0, 0, 0, 0, 0, |
685 | | 76, 0, 0, 14, 12, 0, 0, 19, 0, 106, |
686 | | 41, 0, 0, 0, 37, 0, 0, 0, 0, 47, |
687 | | 63, 68, 0, 0, 0, 0, 79, 41, 74, 0, |
688 | | 35, 36, 0, 41, 86, 88, 15, 17, 16, 0, |
689 | | 0, 111, 42, 44, 0, 0, 0, 0, 41, 56, |
690 | | 84, 52, 62, 41, 0, 0, 0, 0, 80, 66, |
691 | | 41, 0, 0, 78, 0, 0, 85, 18, 20, 114, |
692 | | 0, 0, 41, 40, 84, 0, 32, 58, 0, 0, |
693 | | 55, 54, 0, 0, 41, 41, 51, 84, 45, 41, |
694 | | 84, 71, 0, 67, 0, 0, 0, 13, 0, 112, |
695 | | 111, 109, 39, 38, 0, 0, 99, 0, 96, 95, |
696 | | 0, 61, 0, 50, 48, 49, 70, 69, 0, 65, |
697 | | 0, 0, 0, 113, 92, 60, 59, 41, 94, 0, |
698 | | 0, 0, 73, 93, 43, 0, 100, 0, 41, 0, |
699 | | 57, 0, 0, 72, 101, 97, 46, 0, 102, 0, |
700 | | 0, 103, 0, 0, 104, 0, 0, 105, 98 |
701 | | }; |
702 | | |
703 | | /* YYPGOTO[NTERM-NUM]. */ |
704 | | static const yytype_int16 yypgoto[] = |
705 | | { |
706 | | -131, -131, -47, -2, -68, -58, -131, 79, 53, -131, |
707 | | 62, -131, -131, -131, 130, -131, 194, -131, 116, 101, |
708 | | -131, -120, -130, -131, -27, -131, -131, 16, -131, -131, |
709 | | -131, -131, 168, -131, -131, -51, -60, -29, -131, -131, |
710 | | -131, -124, 176, 199, -131, -131, -131, -131, -107, 122, |
711 | | -131, -131, -131, 51, -114, -131, -131, -131, -131, -131, |
712 | | -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, |
713 | | 7, -131 |
714 | | }; |
715 | | |
716 | | /* YYDEFGOTO[NTERM-NUM]. */ |
717 | | static const yytype_int16 yydefgoto[] = |
718 | | { |
719 | | -1, 9, 23, 24, 45, 63, 64, 99, 107, 65, |
720 | | 136, 66, 67, 111, 10, 11, 12, 13, 100, 101, |
721 | | 175, 143, 163, 88, 14, 215, 185, 49, 147, 119, |
722 | | 208, 257, 91, 183, 149, 102, 96, 190, 15, 187, |
723 | | 220, 156, 16, 17, 127, 52, 55, 56, 132, 124, |
724 | | 18, 58, 105, 204, 205, 180, 237, 238, 239, 240, |
725 | | 267, 275, 279, 282, 285, 288, 19, 68, 113, 20, |
726 | | 201, 70 |
727 | | }; |
728 | | |
729 | | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
730 | | positive, shift that token. If negative, reduce the rule whose |
731 | | number is the opposite. If YYTABLE_NINF, syntax error. */ |
732 | | static const yytype_int16 yytable[] = |
733 | | { |
734 | | 25, 26, 27, 28, 29, 30, 31, 164, 47, 97, |
735 | | 32, 48, 157, 81, 82, 83, 178, 152, 172, 94, |
736 | | 170, 53, 179, 108, 109, 95, 115, 171, 213, 1, |
737 | | 154, 2, 130, 98, 154, 154, 155, 193, 33, 134, |
738 | | 155, 137, 162, 196, 202, 139, 72, 162, 35, 75, |
739 | | 203, 77, 103, 50, 214, 54, 219, 80, 210, 158, |
740 | | 216, 150, 221, 212, 165, 21, 22, 85, 168, 34, |
741 | | 224, 151, 222, 211, 36, 173, 229, 167, 161, 181, |
742 | | 169, 154, 232, 37, 188, 116, 230, 155, 120, 42, |
743 | | 43, 154, 125, 162, 243, 244, 128, 233, 177, 246, |
744 | | 2, 198, 199, 162, 1, 38, 2, 206, 4, 5, |
745 | | 245, 2, 3, 247, 4, 5, 145, 218, 6, 223, |
746 | | 254, 7, 8, 42, 43, 44, 227, 255, 256, 39, |
747 | | 209, 40, 41, 231, 261, 5, 48, 265, 59, 60, |
748 | | 61, 62, 51, 71, 241, 69, 73, 74, 272, 76, |
749 | | 78, 79, 191, 192, 84, 273, 249, 86, 87, 90, |
750 | | 195, 89, 94, 93, 106, 114, 110, 117, 118, 258, |
751 | | 121, 123, 98, 122, 126, 129, 131, 154, 135, 138, |
752 | | 141, 155, 262, 263, 264, 133, 166, 142, 146, 148, |
753 | | 153, 159, 174, 182, 176, 189, 184, 270, 186, 194, |
754 | | 200, 207, 225, 226, 276, 236, 228, 250, 234, 235, |
755 | | 248, 242, 251, 252, 112, 259, 260, 266, 269, 271, |
756 | | 274, 277, 278, 281, 280, 283, 284, 286, 287, 197, |
757 | | 160, 268, 46, 144, 57, 217, 140, 253, 0, 0, |
758 | | 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, |
759 | | 0, 0, 0, 0, 0, 104 |
760 | | }; |
761 | | |
762 | | static const yytype_int16 yycheck[] = |
763 | | { |
764 | | 2, 3, 4, 5, 6, 7, 8, 131, 35, 77, |
765 | | 0, 10, 126, 60, 61, 62, 146, 124, 142, 13, |
766 | | 140, 20, 146, 81, 82, 76, 86, 141, 14, 7, |
767 | | 16, 9, 100, 27, 16, 16, 22, 157, 36, 107, |
768 | | 22, 109, 28, 163, 174, 113, 48, 28, 36, 51, |
769 | | 174, 53, 79, 37, 184, 39, 186, 59, 178, 127, |
770 | | 184, 121, 186, 183, 132, 32, 33, 69, 136, 29, |
771 | | 190, 122, 186, 180, 36, 143, 200, 135, 129, 147, |
772 | | 138, 16, 202, 36, 152, 87, 200, 22, 90, 34, |
773 | | 35, 16, 94, 28, 214, 215, 98, 204, 23, 219, |
774 | | 9, 169, 170, 28, 7, 36, 9, 175, 17, 18, |
775 | | 217, 9, 15, 220, 17, 18, 118, 185, 21, 187, |
776 | | 234, 24, 25, 34, 35, 36, 194, 29, 30, 36, |
777 | | 177, 36, 36, 201, 248, 18, 10, 257, 3, 4, |
778 | | 5, 6, 19, 36, 212, 26, 36, 36, 268, 36, |
779 | | 36, 36, 154, 155, 36, 269, 224, 36, 8, 12, |
780 | | 162, 36, 13, 36, 36, 36, 30, 36, 11, 237, |
781 | | 36, 30, 27, 36, 36, 36, 36, 16, 36, 36, |
782 | | 36, 22, 250, 251, 252, 106, 133, 36, 36, 36, |
783 | | 36, 36, 36, 30, 36, 30, 36, 265, 36, 30, |
784 | | 36, 30, 36, 36, 272, 30, 36, 29, 36, 36, |
785 | | 36, 213, 31, 29, 84, 36, 36, 30, 36, 36, |
786 | | 30, 36, 30, 30, 36, 36, 30, 36, 30, 167, |
787 | | 129, 260, 33, 117, 40, 184, 114, 230, -1, -1, |
788 | | -1, -1, 74, -1, -1, -1, -1, -1, -1, -1, |
789 | | -1, -1, -1, -1, -1, 79 |
790 | | }; |
791 | | |
792 | | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
793 | | symbol of state STATE-NUM. */ |
794 | | static const yytype_int8 yystos[] = |
795 | | { |
796 | | 0, 7, 9, 15, 17, 18, 21, 24, 25, 38, |
797 | | 51, 52, 53, 54, 61, 75, 79, 80, 87, 103, |
798 | | 106, 32, 33, 39, 40, 40, 40, 40, 40, 40, |
799 | | 40, 40, 0, 36, 29, 36, 36, 36, 36, 36, |
800 | | 36, 36, 34, 35, 36, 41, 80, 61, 10, 64, |
801 | | 64, 19, 82, 20, 64, 83, 84, 53, 88, 3, |
802 | | 4, 5, 6, 42, 43, 46, 48, 49, 104, 26, |
803 | | 108, 36, 40, 36, 36, 40, 36, 40, 36, 36, |
804 | | 40, 39, 39, 39, 36, 40, 36, 8, 60, 36, |
805 | | 12, 69, 69, 36, 13, 72, 73, 41, 27, 44, |
806 | | 55, 56, 72, 61, 79, 89, 36, 45, 42, 42, |
807 | | 30, 50, 51, 105, 36, 73, 40, 36, 11, 66, |
808 | | 40, 36, 36, 30, 86, 40, 36, 81, 40, 36, |
809 | | 41, 36, 85, 44, 41, 36, 47, 41, 36, 41, |
810 | | 86, 36, 36, 58, 55, 40, 36, 65, 36, 71, |
811 | | 73, 72, 85, 36, 16, 22, 78, 91, 41, 36, |
812 | | 56, 72, 28, 59, 78, 41, 45, 42, 41, 42, |
813 | | 58, 91, 78, 41, 36, 57, 36, 23, 59, 78, |
814 | | 92, 41, 30, 70, 36, 63, 36, 76, 41, 30, |
815 | | 74, 40, 40, 58, 30, 40, 58, 47, 41, 41, |
816 | | 36, 107, 59, 78, 90, 91, 41, 30, 67, 39, |
817 | | 58, 85, 58, 14, 59, 62, 78, 90, 41, 59, |
818 | | 77, 78, 91, 41, 58, 36, 36, 41, 36, 78, |
819 | | 91, 41, 58, 85, 36, 36, 30, 93, 94, 95, |
820 | | 96, 41, 40, 58, 58, 85, 58, 85, 36, 41, |
821 | | 29, 31, 29, 107, 91, 29, 30, 68, 41, 36, |
822 | | 36, 91, 41, 41, 41, 58, 30, 97, 74, 36, |
823 | | 41, 36, 58, 91, 30, 98, 41, 36, 30, 99, |
824 | | 36, 30, 100, 36, 30, 101, 36, 30, 102 |
825 | | }; |
826 | | |
827 | | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
828 | | static const yytype_int8 yyr1[] = |
829 | | { |
830 | | 0, 37, 38, 39, 39, 40, 41, 41, 42, 42, |
831 | | 42, 42, 43, 44, 45, 45, 46, 47, 47, 48, |
832 | | 49, 50, 51, 51, 51, 51, 51, 51, 52, 52, |
833 | | 53, 53, 54, 55, 55, 56, 56, 57, 57, 57, |
834 | | 57, 58, 58, 59, 60, 61, 62, 63, 63, 63, |
835 | | 63, 63, 64, 65, 65, 65, 65, 66, 67, 68, |
836 | | 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, |
837 | | 76, 76, 77, 78, 79, 79, 80, 81, 81, 81, |
838 | | 82, 83, 83, 84, 85, 85, 85, 86, 87, 88, |
839 | | 89, 89, 90, 91, 92, 93, 93, 94, 95, 96, |
840 | | 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, |
841 | | 106, 107, 107, 107, 108 |
842 | | }; |
843 | | |
844 | | /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
845 | | static const yytype_int8 yyr2[] = |
846 | | { |
847 | | 0, 2, 1, 1, 1, 2, 1, 1, 1, 1, |
848 | | 1, 1, 4, 5, 0, 3, 5, 0, 3, 4, |
849 | | 6, 1, 1, 1, 1, 1, 1, 1, 1, 3, |
850 | | 1, 1, 10, 1, 1, 3, 3, 0, 3, 3, |
851 | | 2, 0, 2, 5, 4, 10, 6, 0, 3, 3, |
852 | | 3, 2, 6, 0, 3, 3, 2, 8, 1, 1, |
853 | | 1, 6, 1, 1, 1, 6, 1, 10, 0, 3, |
854 | | 3, 2, 5, 5, 8, 1, 7, 0, 3, 2, |
855 | | 6, 1, 1, 3, 0, 3, 2, 1, 8, 1, |
856 | | 1, 1, 3, 5, 4, 1, 1, 5, 13, 1, |
857 | | 1, 1, 1, 1, 1, 1, 7, 1, 1, 10, |
858 | | 3, 0, 2, 3, 6 |
859 | | }; |
860 | | |
861 | | |
862 | | #define yyerrok (yyerrstatus = 0) |
863 | | #define yyclearin (yychar = YYEMPTY) |
864 | 65.0k | #define YYEMPTY (-2) |
865 | 33.6k | #define YYEOF 0 |
866 | | |
867 | 357 | #define YYACCEPT goto yyacceptlab |
868 | 543 | #define YYABORT goto yyabortlab |
869 | | #define YYERROR goto yyerrorlab |
870 | | |
871 | | |
872 | | #define YYRECOVERING() (!!yyerrstatus) |
873 | | |
874 | | #define YYBACKUP(Token, Value) \ |
875 | | do \ |
876 | | if (yychar == YYEMPTY) \ |
877 | | { \ |
878 | | yychar = (Token); \ |
879 | | yylval = (Value); \ |
880 | | YYPOPSTACK (yylen); \ |
881 | | yystate = *yyssp; \ |
882 | | goto yybackup; \ |
883 | | } \ |
884 | | else \ |
885 | | { \ |
886 | | yyerror (context, YY_("syntax error: cannot back up")); \ |
887 | | YYERROR; \ |
888 | | } \ |
889 | | while (0) |
890 | | |
891 | | /* Error token number */ |
892 | 24.3k | #define YYTERROR 1 |
893 | | #define YYERRCODE 256 |
894 | | |
895 | | |
896 | | |
897 | | /* Enable debugging if requested. */ |
898 | | #if YYDEBUG |
899 | | |
900 | | # ifndef YYFPRINTF |
901 | | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
902 | | # define YYFPRINTF fprintf |
903 | | # endif |
904 | | |
905 | | # define YYDPRINTF(Args) \ |
906 | | do { \ |
907 | | if (yydebug) \ |
908 | | YYFPRINTF Args; \ |
909 | | } while (0) |
910 | | |
911 | | /* This macro is provided for backward compatibility. */ |
912 | | #ifndef YY_LOCATION_PRINT |
913 | | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
914 | | #endif |
915 | | |
916 | | |
917 | | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
918 | | do { \ |
919 | | if (yydebug) \ |
920 | | { \ |
921 | | YYFPRINTF (stderr, "%s ", Title); \ |
922 | | yy_symbol_print (stderr, \ |
923 | | Type, Value, context); \ |
924 | | YYFPRINTF (stderr, "\n"); \ |
925 | | } \ |
926 | | } while (0) |
927 | | |
928 | | |
929 | | /*-----------------------------------. |
930 | | | Print this symbol's value on YYO. | |
931 | | `-----------------------------------*/ |
932 | | |
933 | | static void |
934 | | yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, pj_wkt1_parse_context *context) |
935 | | { |
936 | | FILE *yyoutput = yyo; |
937 | | YYUSE (yyoutput); |
938 | | YYUSE (context); |
939 | | if (!yyvaluep) |
940 | | return; |
941 | | # ifdef YYPRINT |
942 | | if (yytype < YYNTOKENS) |
943 | | YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
944 | | # endif |
945 | | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
946 | | YYUSE (yytype); |
947 | | YY_IGNORE_MAYBE_UNINITIALIZED_END |
948 | | } |
949 | | |
950 | | |
951 | | /*---------------------------. |
952 | | | Print this symbol on YYO. | |
953 | | `---------------------------*/ |
954 | | |
955 | | static void |
956 | | yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, pj_wkt1_parse_context *context) |
957 | | { |
958 | | YYFPRINTF (yyo, "%s %s (", |
959 | | yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
960 | | |
961 | | yy_symbol_value_print (yyo, yytype, yyvaluep, context); |
962 | | YYFPRINTF (yyo, ")"); |
963 | | } |
964 | | |
965 | | /*------------------------------------------------------------------. |
966 | | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
967 | | | TOP (included). | |
968 | | `------------------------------------------------------------------*/ |
969 | | |
970 | | static void |
971 | | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
972 | | { |
973 | | YYFPRINTF (stderr, "Stack now"); |
974 | | for (; yybottom <= yytop; yybottom++) |
975 | | { |
976 | | int yybot = *yybottom; |
977 | | YYFPRINTF (stderr, " %d", yybot); |
978 | | } |
979 | | YYFPRINTF (stderr, "\n"); |
980 | | } |
981 | | |
982 | | # define YY_STACK_PRINT(Bottom, Top) \ |
983 | | do { \ |
984 | | if (yydebug) \ |
985 | | yy_stack_print ((Bottom), (Top)); \ |
986 | | } while (0) |
987 | | |
988 | | |
989 | | /*------------------------------------------------. |
990 | | | Report that the YYRULE is going to be reduced. | |
991 | | `------------------------------------------------*/ |
992 | | |
993 | | static void |
994 | | yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, pj_wkt1_parse_context *context) |
995 | | { |
996 | | int yylno = yyrline[yyrule]; |
997 | | int yynrhs = yyr2[yyrule]; |
998 | | int yyi; |
999 | | YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", |
1000 | | yyrule - 1, yylno); |
1001 | | /* The symbols being reduced. */ |
1002 | | for (yyi = 0; yyi < yynrhs; yyi++) |
1003 | | { |
1004 | | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
1005 | | yy_symbol_print (stderr, |
1006 | | yystos[+yyssp[yyi + 1 - yynrhs]], |
1007 | | &yyvsp[(yyi + 1) - (yynrhs)] |
1008 | | , context); |
1009 | | YYFPRINTF (stderr, "\n"); |
1010 | | } |
1011 | | } |
1012 | | |
1013 | | # define YY_REDUCE_PRINT(Rule) \ |
1014 | | do { \ |
1015 | | if (yydebug) \ |
1016 | | yy_reduce_print (yyssp, yyvsp, Rule, context); \ |
1017 | | } while (0) |
1018 | | |
1019 | | /* Nonzero means print parse trace. It is left uninitialized so that |
1020 | | multiple parsers can coexist. */ |
1021 | | int yydebug; |
1022 | | #else /* !YYDEBUG */ |
1023 | | # define YYDPRINTF(Args) |
1024 | | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
1025 | | # define YY_STACK_PRINT(Bottom, Top) |
1026 | | # define YY_REDUCE_PRINT(Rule) |
1027 | | #endif /* !YYDEBUG */ |
1028 | | |
1029 | | |
1030 | | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
1031 | | #ifndef YYINITDEPTH |
1032 | 900 | # define YYINITDEPTH 200 |
1033 | | #endif |
1034 | | |
1035 | | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
1036 | | if the built-in stack extension method is used). |
1037 | | |
1038 | | Do not make this value too large; the results are undefined if |
1039 | | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
1040 | | evaluated with infinite-precision integer arithmetic. */ |
1041 | | |
1042 | | #ifndef YYMAXDEPTH |
1043 | 0 | # define YYMAXDEPTH 10000 |
1044 | | #endif |
1045 | | |
1046 | | |
1047 | | #if YYERROR_VERBOSE |
1048 | | |
1049 | | # ifndef yystrlen |
1050 | | # if defined __GLIBC__ && defined _STRING_H |
1051 | | # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) |
1052 | | # else |
1053 | | /* Return the length of YYSTR. */ |
1054 | | static YYPTRDIFF_T |
1055 | | yystrlen (const char *yystr) |
1056 | 813 | { |
1057 | 813 | YYPTRDIFF_T yylen; |
1058 | 25.3k | for (yylen = 0; yystr && yystr[yylen]; yylen++) |
1059 | 24.5k | continue; |
1060 | 813 | return yylen; |
1061 | 813 | } |
1062 | | # endif |
1063 | | # endif |
1064 | | |
1065 | | # ifndef yystpcpy |
1066 | | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
1067 | | # define yystpcpy stpcpy |
1068 | | # else |
1069 | | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
1070 | | YYDEST. */ |
1071 | | static char * |
1072 | | yystpcpy (char *yydest, const char *yysrc) |
1073 | 270 | { |
1074 | 270 | char *yyd = yydest; |
1075 | 270 | const char *yys = yysrc; |
1076 | | |
1077 | 2.03k | while ((*yyd++ = *yys++) != '\0') |
1078 | 1.76k | continue; |
1079 | | |
1080 | 270 | return yyd - 1; |
1081 | 270 | } |
1082 | | # endif |
1083 | | # endif |
1084 | | |
1085 | | # ifndef yytnamerr |
1086 | | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
1087 | | quotes and backslashes, so that it's suitable for yyerror. The |
1088 | | heuristic is that double-quoting is unnecessary unless the string |
1089 | | contains an apostrophe, a comma, or backslash (other than |
1090 | | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
1091 | | null, do not copy; instead, return the length of what the result |
1092 | | would have been. */ |
1093 | | static YYPTRDIFF_T |
1094 | | yytnamerr (char *yyres, const char *yystr) |
1095 | 2.34k | { |
1096 | 2.34k | if (*yystr == '"') |
1097 | 1.80k | { |
1098 | 1.80k | YYPTRDIFF_T yyn = 0; |
1099 | 1.80k | char const *yyp = yystr; |
1100 | | |
1101 | 1.80k | for (;;) |
1102 | 14.5k | switch (*++yyp) |
1103 | 14.5k | { |
1104 | 0 | case '\'': |
1105 | 0 | case ',': |
1106 | 0 | goto do_not_strip_quotes; |
1107 | | |
1108 | 0 | case '\\': |
1109 | 0 | if (*++yyp != '\\') |
1110 | 0 | goto do_not_strip_quotes; |
1111 | 0 | else |
1112 | 0 | goto append; |
1113 | | |
1114 | 0 | append: |
1115 | 12.7k | default: |
1116 | 12.7k | if (yyres) |
1117 | 6.35k | yyres[yyn] = *yyp; |
1118 | 12.7k | yyn++; |
1119 | 12.7k | break; |
1120 | | |
1121 | 1.80k | case '"': |
1122 | 1.80k | if (yyres) |
1123 | 903 | yyres[yyn] = '\0'; |
1124 | 1.80k | return yyn; |
1125 | 14.5k | } |
1126 | 0 | do_not_strip_quotes: ; |
1127 | 0 | } |
1128 | | |
1129 | 540 | if (yyres) |
1130 | 270 | return (YYPTRDIFF_T)(yystpcpy (yyres, yystr) - yyres); |
1131 | 270 | else |
1132 | 270 | return yystrlen (yystr); |
1133 | 540 | } |
1134 | | # endif |
1135 | | |
1136 | | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
1137 | | about the unexpected token YYTOKEN for the state stack whose top is |
1138 | | YYSSP. |
1139 | | |
1140 | | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
1141 | | not large enough to hold the message. In that case, also set |
1142 | | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
1143 | | required number of bytes is too large to store. */ |
1144 | | static int |
1145 | | yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, |
1146 | | yy_state_t *yyssp, int yytoken) |
1147 | 543 | { |
1148 | 543 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
1149 | | /* Internationalized format string. */ |
1150 | 543 | const char *yyformat = YY_NULLPTR; |
1151 | | /* Arguments of yyformat: reported tokens (one for the "unexpected", |
1152 | | one per "expected"). */ |
1153 | 543 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
1154 | | /* Actual size of YYARG. */ |
1155 | 543 | int yycount = 0; |
1156 | | /* Cumulated lengths of YYARG. */ |
1157 | 543 | YYPTRDIFF_T yysize = 0; |
1158 | | |
1159 | | /* There are many possibilities here to consider: |
1160 | | - If this state is a consistent state with a default action, then |
1161 | | the only way this function was invoked is if the default action |
1162 | | is an error action. In that case, don't check for expected |
1163 | | tokens because there are none. |
1164 | | - The only way there can be no lookahead present (in yychar) is if |
1165 | | this state is a consistent state with a default action. Thus, |
1166 | | detecting the absence of a lookahead is sufficient to determine |
1167 | | that there is no unexpected or expected token to report. In that |
1168 | | case, just report a simple "syntax error". |
1169 | | - Don't assume there isn't a lookahead just because this state is a |
1170 | | consistent state with a default action. There might have been a |
1171 | | previous inconsistent state, consistent state with a non-default |
1172 | | action, or user semantic action that manipulated yychar. |
1173 | | - Of course, the expected token list depends on states to have |
1174 | | correct lookahead information, and it depends on the parser not |
1175 | | to perform extra reductions after fetching a lookahead from the |
1176 | | scanner and before detecting a syntax error. Thus, state merging |
1177 | | (from LALR or IELR) and default reductions corrupt the expected |
1178 | | token list. However, the list is correct for canonical LR with |
1179 | | one exception: it will still contain any token that will not be |
1180 | | accepted due to an error action in a later state. |
1181 | | */ |
1182 | 543 | if (yytoken != YYEMPTY) |
1183 | 543 | { |
1184 | 543 | int yyn = yypact[+*yyssp]; |
1185 | 543 | YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
1186 | 543 | yysize = yysize0; |
1187 | 543 | yyarg[yycount++] = yytname[yytoken]; |
1188 | 543 | if (!yypact_value_is_default (yyn)) |
1189 | 543 | { |
1190 | | /* Start YYX at -YYN if negative to avoid negative indexes in |
1191 | | YYCHECK. In other words, skip the first -YYN actions for |
1192 | | this state because they are default actions. */ |
1193 | 543 | int yyxbegin = yyn < 0 ? -yyn : 0; |
1194 | | /* Stay within bounds of both yycheck and yytname. */ |
1195 | 543 | int yychecklim = YYLAST - yyn + 1; |
1196 | 543 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
1197 | 543 | int yyx; |
1198 | | |
1199 | 20.6k | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1200 | 20.0k | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
1201 | 20.0k | && !yytable_value_is_error (yytable[yyx + yyn])) |
1202 | 630 | { |
1203 | 630 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
1204 | 0 | { |
1205 | 0 | yycount = 1; |
1206 | 0 | yysize = yysize0; |
1207 | 0 | break; |
1208 | 0 | } |
1209 | 630 | yyarg[yycount++] = yytname[yyx]; |
1210 | 630 | { |
1211 | 630 | YYPTRDIFF_T yysize1 |
1212 | 630 | = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
1213 | 630 | if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
1214 | 630 | yysize = yysize1; |
1215 | 0 | else |
1216 | 0 | return 2; |
1217 | 630 | } |
1218 | 630 | } |
1219 | 543 | } |
1220 | 543 | } |
1221 | | |
1222 | 543 | switch (yycount) |
1223 | 543 | { |
1224 | 0 | # define YYCASE_(N, S) \ |
1225 | 543 | case N: \ |
1226 | 543 | yyformat = S; \ |
1227 | 543 | break |
1228 | 0 | default: /* Avoid compiler warnings. */ |
1229 | 0 | YYCASE_(0, YY_("syntax error")); |
1230 | 0 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
1231 | 488 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
1232 | 23 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
1233 | 32 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
1234 | 543 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
1235 | 543 | # undef YYCASE_ |
1236 | 543 | } |
1237 | | |
1238 | 543 | { |
1239 | | /* Don't count the "%s"s in the final size, but reserve room for |
1240 | | the terminator. */ |
1241 | 543 | YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; |
1242 | 543 | if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
1243 | 543 | yysize = yysize1; |
1244 | 0 | else |
1245 | 0 | return 2; |
1246 | 543 | } |
1247 | | |
1248 | 543 | if (*yymsg_alloc < yysize) |
1249 | 0 | { |
1250 | 0 | *yymsg_alloc = 2 * yysize; |
1251 | 0 | if (! (yysize <= *yymsg_alloc |
1252 | 0 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
1253 | 0 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
1254 | 0 | return 1; |
1255 | 0 | } |
1256 | | |
1257 | | /* Avoid sprintf, as that infringes on the user's name space. |
1258 | | Don't have undefined behavior even if the translation |
1259 | | produced a string with the wrong number of "%s"s. */ |
1260 | 543 | { |
1261 | 543 | char *yyp = *yymsg; |
1262 | 543 | int yyi = 0; |
1263 | 22.1k | while ((*yyp = *yyformat) != '\0') |
1264 | 21.6k | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
1265 | 1.17k | { |
1266 | 1.17k | yyp += yytnamerr (yyp, yyarg[yyi++]); |
1267 | 1.17k | yyformat += 2; |
1268 | 1.17k | } |
1269 | 20.4k | else |
1270 | 20.4k | { |
1271 | 20.4k | ++yyp; |
1272 | 20.4k | ++yyformat; |
1273 | 20.4k | } |
1274 | 543 | } |
1275 | 543 | return 0; |
1276 | 543 | } |
1277 | | #endif /* YYERROR_VERBOSE */ |
1278 | | |
1279 | | /*-----------------------------------------------. |
1280 | | | Release the memory associated to this symbol. | |
1281 | | `-----------------------------------------------*/ |
1282 | | |
1283 | | static void |
1284 | | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, pj_wkt1_parse_context *context) |
1285 | 2.55k | { |
1286 | 2.55k | YYUSE (yyvaluep); |
1287 | 2.55k | YYUSE (context); |
1288 | 2.55k | if (!yymsg) |
1289 | 0 | yymsg = "Deleting"; |
1290 | 2.55k | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
1291 | | |
1292 | 2.55k | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1293 | 2.55k | YYUSE (yytype); |
1294 | 2.55k | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1295 | 2.55k | } |
1296 | | |
1297 | | |
1298 | | |
1299 | | |
1300 | | /*----------. |
1301 | | | yyparse. | |
1302 | | `----------*/ |
1303 | | |
1304 | | int |
1305 | | yyparse (pj_wkt1_parse_context *context) |
1306 | 900 | { |
1307 | | /* The lookahead symbol. */ |
1308 | 900 | int yychar; |
1309 | | |
1310 | | |
1311 | | /* The semantic value of the lookahead symbol. */ |
1312 | | /* Default value used for initialization, for pacifying older GCCs |
1313 | | or non-GCC compilers. */ |
1314 | 900 | YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
1315 | 900 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
1316 | | |
1317 | | /* Number of syntax errors so far. */ |
1318 | | /* int yynerrs; */ |
1319 | | |
1320 | 900 | yy_state_fast_t yystate; |
1321 | | /* Number of tokens to shift before error messages enabled. */ |
1322 | 900 | int yyerrstatus; |
1323 | | |
1324 | | /* The stacks and their tools: |
1325 | | 'yyss': related to states. |
1326 | | 'yyvs': related to semantic values. |
1327 | | |
1328 | | Refer to the stacks through separate pointers, to allow yyoverflow |
1329 | | to reallocate them elsewhere. */ |
1330 | | |
1331 | | /* The state stack. */ |
1332 | 900 | yy_state_t yyssa[YYINITDEPTH]; |
1333 | 900 | yy_state_t *yyss; |
1334 | 900 | yy_state_t *yyssp; |
1335 | | |
1336 | | /* The semantic value stack. */ |
1337 | 900 | YYSTYPE yyvsa[YYINITDEPTH]; |
1338 | 900 | YYSTYPE *yyvs; |
1339 | 900 | YYSTYPE *yyvsp; |
1340 | | |
1341 | 900 | YYPTRDIFF_T yystacksize; |
1342 | | |
1343 | 900 | int yyn; |
1344 | 900 | int yyresult; |
1345 | | /* Lookahead token as an internal (translated) token number. */ |
1346 | 900 | int yytoken = 0; |
1347 | | /* The variables used to return semantic value and location from the |
1348 | | action routines. */ |
1349 | 900 | YYSTYPE yyval; |
1350 | | |
1351 | 900 | #if YYERROR_VERBOSE |
1352 | | /* Buffer for error messages, and its allocated size. */ |
1353 | 900 | char yymsgbuf[128]; |
1354 | 900 | char *yymsg = yymsgbuf; |
1355 | 900 | YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; |
1356 | 900 | #endif |
1357 | | |
1358 | 29.2k | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
1359 | | |
1360 | | /* The number of symbols on the RHS of the reduced rule. |
1361 | | Keep to zero when no symbol should be popped. */ |
1362 | 900 | int yylen = 0; |
1363 | | |
1364 | 900 | yyssp = yyss = yyssa; |
1365 | 900 | yyvsp = yyvs = yyvsa; |
1366 | 900 | yystacksize = YYINITDEPTH; |
1367 | | |
1368 | 900 | YYDPRINTF ((stderr, "Starting parse\n")); |
1369 | | |
1370 | 900 | yystate = 0; |
1371 | 900 | yyerrstatus = 0; |
1372 | | /* yynerrs = 0; */ |
1373 | 900 | yychar = YYEMPTY; /* Cause a token to be read. */ |
1374 | 900 | goto yysetstate; |
1375 | | |
1376 | | |
1377 | | /*------------------------------------------------------------. |
1378 | | | yynewstate -- push a new state, which is found in yystate. | |
1379 | | `------------------------------------------------------------*/ |
1380 | 55.5k | yynewstate: |
1381 | | /* In all cases, when you get here, the value and location stacks |
1382 | | have just been pushed. So pushing a state here evens the stacks. */ |
1383 | 55.5k | yyssp++; |
1384 | | |
1385 | | |
1386 | | /*--------------------------------------------------------------------. |
1387 | | | yysetstate -- set current state (the top of the stack) to yystate. | |
1388 | | `--------------------------------------------------------------------*/ |
1389 | 56.4k | yysetstate: |
1390 | 56.4k | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1391 | 56.4k | YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
1392 | 56.4k | YY_IGNORE_USELESS_CAST_BEGIN |
1393 | 56.4k | *yyssp = YY_CAST (yy_state_t, yystate); |
1394 | 56.4k | YY_IGNORE_USELESS_CAST_END |
1395 | | |
1396 | 56.4k | if (yyss + yystacksize - 1 <= yyssp) |
1397 | | #if !defined yyoverflow && !defined YYSTACK_RELOCATE |
1398 | | goto yyexhaustedlab; |
1399 | | #else |
1400 | 0 | { |
1401 | | /* Get the current used size of the three stacks, in elements. */ |
1402 | 0 | YYPTRDIFF_T yysize = (YYPTRDIFF_T)(yyssp - yyss + 1); |
1403 | |
|
1404 | | # if defined yyoverflow |
1405 | | { |
1406 | | /* Give user a chance to reallocate the stack. Use copies of |
1407 | | these so that the &'s don't force the real ones into |
1408 | | memory. */ |
1409 | | yy_state_t *yyss1 = yyss; |
1410 | | YYSTYPE *yyvs1 = yyvs; |
1411 | | |
1412 | | /* Each stack pointer address is followed by the size of the |
1413 | | data in use in that stack, in bytes. This used to be a |
1414 | | conditional around just the two extra args, but that might |
1415 | | be undefined if yyoverflow is a macro. */ |
1416 | | yyoverflow (YY_("memory exhausted"), |
1417 | | &yyss1, yysize * YYSIZEOF (*yyssp), |
1418 | | &yyvs1, yysize * YYSIZEOF (*yyvsp), |
1419 | | &yystacksize); |
1420 | | yyss = yyss1; |
1421 | | yyvs = yyvs1; |
1422 | | } |
1423 | | # else /* defined YYSTACK_RELOCATE */ |
1424 | | /* Extend the stack our own way. */ |
1425 | 0 | if (YYMAXDEPTH <= yystacksize) |
1426 | 0 | goto yyexhaustedlab; |
1427 | 0 | yystacksize *= 2; |
1428 | 0 | if (YYMAXDEPTH < yystacksize) |
1429 | 0 | yystacksize = YYMAXDEPTH; |
1430 | |
|
1431 | 0 | { |
1432 | 0 | yy_state_t *yyss1 = yyss; |
1433 | 0 | union yyalloc *yyptr = |
1434 | 0 | YY_CAST (union yyalloc *, |
1435 | 0 | YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); |
1436 | 0 | if (! yyptr) |
1437 | 0 | goto yyexhaustedlab; |
1438 | 0 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1439 | 0 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1440 | 0 | # undef YYSTACK_RELOCATE |
1441 | 0 | if (yyss1 != yyssa) |
1442 | 0 | YYSTACK_FREE (yyss1); |
1443 | 0 | } |
1444 | 0 | # endif |
1445 | | |
1446 | 0 | yyssp = yyss + yysize - 1; |
1447 | 0 | yyvsp = yyvs + yysize - 1; |
1448 | |
|
1449 | 0 | YY_IGNORE_USELESS_CAST_BEGIN |
1450 | 0 | YYDPRINTF ((stderr, "Stack size increased to %ld\n", |
1451 | 0 | YY_CAST (long, yystacksize))); |
1452 | 0 | YY_IGNORE_USELESS_CAST_END |
1453 | |
|
1454 | 0 | if (yyss + yystacksize - 1 <= yyssp) |
1455 | 0 | YYABORT; |
1456 | 0 | } |
1457 | 56.4k | #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
1458 | | |
1459 | 56.4k | if (yystate == YYFINAL) |
1460 | 357 | YYACCEPT; |
1461 | | |
1462 | 56.1k | goto yybackup; |
1463 | | |
1464 | | |
1465 | | /*-----------. |
1466 | | | yybackup. | |
1467 | | `-----------*/ |
1468 | 56.1k | yybackup: |
1469 | | /* Do appropriate processing given the current state. Read a |
1470 | | lookahead token if we need one and don't already have one. */ |
1471 | | |
1472 | | /* First try to decide what to do without reference to lookahead token. */ |
1473 | 56.1k | yyn = yypact[yystate]; |
1474 | 56.1k | if (yypact_value_is_default (yyn)) |
1475 | 23.1k | goto yydefault; |
1476 | | |
1477 | | /* Not known => get a lookahead token if don't already have one. */ |
1478 | | |
1479 | | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1480 | 32.9k | if (yychar == YYEMPTY) |
1481 | 29.7k | { |
1482 | 29.7k | YYDPRINTF ((stderr, "Reading a token: ")); |
1483 | 29.7k | yychar = yylex (&yylval, context); |
1484 | 29.7k | } |
1485 | | |
1486 | 32.9k | if (yychar <= YYEOF) |
1487 | 746 | { |
1488 | 746 | yychar = yytoken = YYEOF; |
1489 | 746 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
1490 | 746 | } |
1491 | 32.2k | else |
1492 | 32.2k | { |
1493 | 32.2k | yytoken = YYTRANSLATE (yychar); |
1494 | 32.2k | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1495 | 32.2k | } |
1496 | | |
1497 | | /* If the proper action on seeing token YYTOKEN is to reduce or to |
1498 | | detect an error, take that action. */ |
1499 | 32.9k | yyn += yytoken; |
1500 | 32.9k | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
1501 | 3.70k | goto yydefault; |
1502 | 29.2k | yyn = yytable[yyn]; |
1503 | 29.2k | if (yyn <= 0) |
1504 | 0 | { |
1505 | 0 | if (yytable_value_is_error (yyn)) |
1506 | 0 | goto yyerrlab; |
1507 | 0 | yyn = -yyn; |
1508 | 0 | goto yyreduce; |
1509 | 0 | } |
1510 | | |
1511 | | /* Count tokens shifted since error; after three, turn off error |
1512 | | status. */ |
1513 | 29.2k | if (yyerrstatus) |
1514 | 0 | yyerrstatus--; |
1515 | | |
1516 | | /* Shift the lookahead token. */ |
1517 | 29.2k | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1518 | 29.2k | yystate = yyn; |
1519 | 29.2k | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1520 | 29.2k | *++yyvsp = yylval; |
1521 | 29.2k | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1522 | | |
1523 | | /* Discard the shifted token. */ |
1524 | 29.2k | yychar = YYEMPTY; |
1525 | 29.2k | goto yynewstate; |
1526 | | |
1527 | | |
1528 | | /*-----------------------------------------------------------. |
1529 | | | yydefault -- do the default action for the current state. | |
1530 | | `-----------------------------------------------------------*/ |
1531 | 26.8k | yydefault: |
1532 | 26.8k | yyn = yydefact[yystate]; |
1533 | 26.8k | if (yyn == 0) |
1534 | 543 | goto yyerrlab; |
1535 | 26.3k | goto yyreduce; |
1536 | | |
1537 | | |
1538 | | /*-----------------------------. |
1539 | | | yyreduce -- do a reduction. | |
1540 | | `-----------------------------*/ |
1541 | 26.3k | yyreduce: |
1542 | | /* yyn is the number of a rule to reduce with. */ |
1543 | 26.3k | yylen = yyr2[yyn]; |
1544 | | |
1545 | | /* If YYLEN is nonzero, implement the default value of the action: |
1546 | | '$$ = $1'. |
1547 | | |
1548 | | Otherwise, the following line sets YYVAL to garbage. |
1549 | | This behavior is undocumented and Bison |
1550 | | users should not rely upon it. Assigning to YYVAL |
1551 | | unconditionally makes the parser a bit smaller, and it avoids a |
1552 | | GCC warning that YYVAL may be used uninitialized. */ |
1553 | 26.3k | yyval = yyvsp[1-yylen]; |
1554 | | |
1555 | | |
1556 | 26.3k | YY_REDUCE_PRINT (yyn); |
1557 | 26.3k | switch (yyn) |
1558 | 26.3k | { |
1559 | | |
1560 | | |
1561 | 26.3k | default: break; |
1562 | 26.3k | } |
1563 | | /* User semantic actions sometimes alter yychar, and that requires |
1564 | | that yytoken be updated with the new translation. We take the |
1565 | | approach of translating immediately before every use of yytoken. |
1566 | | One alternative is translating here after every semantic action, |
1567 | | but that translation would be missed if the semantic action invokes |
1568 | | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
1569 | | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
1570 | | incorrect destructor might then be invoked immediately. In the |
1571 | | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
1572 | | to an incorrect destructor call or verbose syntax error message |
1573 | | before the lookahead is translated. */ |
1574 | 26.3k | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
1575 | | |
1576 | 26.3k | YYPOPSTACK (yylen); |
1577 | 26.3k | yylen = 0; |
1578 | 26.3k | YY_STACK_PRINT (yyss, yyssp); |
1579 | | |
1580 | 26.3k | *++yyvsp = yyval; |
1581 | | |
1582 | | /* Now 'shift' the result of the reduction. Determine what state |
1583 | | that goes to, based on the state we popped back to and the rule |
1584 | | number reduced by. */ |
1585 | 26.3k | { |
1586 | 26.3k | const int yylhs = yyr1[yyn] - YYNTOKENS; |
1587 | 26.3k | const int yyi = yypgoto[yylhs] + *yyssp; |
1588 | 26.3k | yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
1589 | 26.3k | ? yytable[yyi] |
1590 | 26.3k | : yydefgoto[yylhs]); |
1591 | 26.3k | } |
1592 | | |
1593 | 26.3k | goto yynewstate; |
1594 | | |
1595 | | |
1596 | | /*--------------------------------------. |
1597 | | | yyerrlab -- here on detecting error. | |
1598 | | `--------------------------------------*/ |
1599 | 543 | yyerrlab: |
1600 | | /* Make sure we have latest lookahead translation. See comments at |
1601 | | user semantic actions for why this is necessary. */ |
1602 | 543 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
1603 | | |
1604 | | /* If not already recovering from an error, report this error. */ |
1605 | 543 | if (!yyerrstatus) |
1606 | 543 | { |
1607 | | /* ++yynerrs; */ |
1608 | | #if ! YYERROR_VERBOSE |
1609 | | yyerror (context, YY_("syntax error")); |
1610 | | #else |
1611 | 543 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
1612 | 543 | yyssp, yytoken) |
1613 | 543 | { |
1614 | 543 | char const *yymsgp = YY_("syntax error"); |
1615 | 543 | int yysyntax_error_status; |
1616 | 543 | yysyntax_error_status = YYSYNTAX_ERROR; |
1617 | 543 | if (yysyntax_error_status == 0) |
1618 | 543 | yymsgp = yymsg; |
1619 | 0 | else if (yysyntax_error_status == 1) |
1620 | 0 | { |
1621 | 0 | if (yymsg != yymsgbuf) |
1622 | 0 | YYSTACK_FREE (yymsg); |
1623 | 0 | yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); |
1624 | 0 | if (!yymsg) |
1625 | 0 | { |
1626 | 0 | yymsg = yymsgbuf; |
1627 | 0 | yymsg_alloc = sizeof yymsgbuf; |
1628 | 0 | yysyntax_error_status = 2; |
1629 | 0 | } |
1630 | 0 | else |
1631 | 0 | { |
1632 | 0 | yysyntax_error_status = YYSYNTAX_ERROR; |
1633 | 0 | yymsgp = yymsg; |
1634 | 0 | } |
1635 | 0 | } |
1636 | 543 | yyerror (context, yymsgp); |
1637 | 543 | if (yysyntax_error_status == 2) |
1638 | 0 | goto yyexhaustedlab; |
1639 | 543 | } |
1640 | 543 | # undef YYSYNTAX_ERROR |
1641 | 543 | #endif |
1642 | 543 | } |
1643 | | |
1644 | | |
1645 | | |
1646 | 543 | if (yyerrstatus == 3) |
1647 | 0 | { |
1648 | | /* If just tried and failed to reuse lookahead token after an |
1649 | | error, discard it. */ |
1650 | |
|
1651 | 0 | if (yychar <= YYEOF) |
1652 | 0 | { |
1653 | | /* Return failure if at end of input. */ |
1654 | 0 | if (yychar == YYEOF) |
1655 | 0 | YYABORT; |
1656 | 0 | } |
1657 | 0 | else |
1658 | 0 | { |
1659 | 0 | yydestruct ("Error: discarding", |
1660 | 0 | yytoken, &yylval, context); |
1661 | 0 | yychar = YYEMPTY; |
1662 | 0 | } |
1663 | 0 | } |
1664 | | |
1665 | | /* Else will try to reuse lookahead token after shifting the error |
1666 | | token. */ |
1667 | 543 | goto yyerrlab1; |
1668 | | |
1669 | | |
1670 | | /*---------------------------------------------------. |
1671 | | | yyerrorlab -- error raised explicitly by YYERROR. | |
1672 | | `---------------------------------------------------*/ |
1673 | | #if 0 |
1674 | | yyerrorlab: |
1675 | | /* Pacify compilers when the user code never invokes YYERROR and the |
1676 | | label yyerrorlab therefore never appears in user code. */ |
1677 | | if (0) |
1678 | | YYERROR; |
1679 | | |
1680 | | /* Do not reclaim the symbols of the rule whose action triggered |
1681 | | this YYERROR. */ |
1682 | | YYPOPSTACK (yylen); |
1683 | | yylen = 0; |
1684 | | YY_STACK_PRINT (yyss, yyssp); |
1685 | | yystate = *yyssp; |
1686 | | goto yyerrlab1; |
1687 | | |
1688 | | |
1689 | | /*-------------------------------------------------------------. |
1690 | | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
1691 | | `-------------------------------------------------------------*/ |
1692 | | #endif |
1693 | 543 | yyerrlab1: |
1694 | 543 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
1695 | | |
1696 | 543 | for (;;) |
1697 | 1.83k | { |
1698 | 1.83k | yyn = yypact[yystate]; |
1699 | 1.83k | if (!yypact_value_is_default (yyn)) |
1700 | 1.83k | { |
1701 | 1.83k | yyn += YYTERROR; |
1702 | 1.83k | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
1703 | 0 | { |
1704 | 0 | yyn = yytable[yyn]; |
1705 | 0 | if (0 < yyn) |
1706 | 0 | break; |
1707 | 0 | } |
1708 | 1.83k | } |
1709 | | |
1710 | | /* Pop the current state because it cannot handle the error token. */ |
1711 | 1.83k | if (yyssp == yyss) |
1712 | 543 | YYABORT; |
1713 | | |
1714 | | |
1715 | 1.29k | yydestruct ("Error: popping", |
1716 | 1.29k | yystos[yystate], yyvsp, context); |
1717 | 1.29k | YYPOPSTACK (1); |
1718 | 1.29k | yystate = *yyssp; |
1719 | 1.29k | YY_STACK_PRINT (yyss, yyssp); |
1720 | 1.29k | } |
1721 | | |
1722 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1723 | 0 | *++yyvsp = yylval; |
1724 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1725 | | |
1726 | | |
1727 | | /* Shift the error token. */ |
1728 | 0 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
1729 | |
|
1730 | 0 | yystate = yyn; |
1731 | 0 | goto yynewstate; |
1732 | | |
1733 | | |
1734 | | /*-------------------------------------. |
1735 | | | yyacceptlab -- YYACCEPT comes here. | |
1736 | | `-------------------------------------*/ |
1737 | 357 | yyacceptlab: |
1738 | 357 | yyresult = 0; |
1739 | 357 | goto yyreturn; |
1740 | | |
1741 | | |
1742 | | /*-----------------------------------. |
1743 | | | yyabortlab -- YYABORT comes here. | |
1744 | | `-----------------------------------*/ |
1745 | 543 | yyabortlab: |
1746 | 543 | yyresult = 1; |
1747 | 543 | goto yyreturn; |
1748 | | |
1749 | | |
1750 | 0 | #if !defined yyoverflow || YYERROR_VERBOSE |
1751 | | /*-------------------------------------------------. |
1752 | | | yyexhaustedlab -- memory exhaustion comes here. | |
1753 | | `-------------------------------------------------*/ |
1754 | 0 | yyexhaustedlab: |
1755 | 0 | yyerror (context, YY_("memory exhausted")); |
1756 | 0 | yyresult = 2; |
1757 | | /* Fall through. */ |
1758 | 0 | #endif |
1759 | | |
1760 | | |
1761 | | /*-----------------------------------------------------. |
1762 | | | yyreturn -- parsing is finished, return the result. | |
1763 | | `-----------------------------------------------------*/ |
1764 | 900 | yyreturn: |
1765 | 900 | if (yychar != YYEMPTY) |
1766 | 543 | { |
1767 | | /* Make sure we have latest lookahead translation. See comments at |
1768 | | user semantic actions for why this is necessary. */ |
1769 | 543 | yytoken = YYTRANSLATE (yychar); |
1770 | 543 | yydestruct ("Cleanup: discarding lookahead", |
1771 | 543 | yytoken, &yylval, context); |
1772 | 543 | } |
1773 | | /* Do not reclaim the symbols of the rule whose action triggered |
1774 | | this YYABORT or YYACCEPT. */ |
1775 | 900 | YYPOPSTACK (yylen); |
1776 | 900 | YY_STACK_PRINT (yyss, yyssp); |
1777 | 1.61k | while (yyssp != yyss) |
1778 | 714 | { |
1779 | 714 | yydestruct ("Cleanup: popping", |
1780 | 714 | yystos[+*yyssp], yyvsp, context); |
1781 | 714 | YYPOPSTACK (1); |
1782 | 714 | } |
1783 | 900 | #ifndef yyoverflow |
1784 | 900 | if (yyss != yyssa) |
1785 | 0 | YYSTACK_FREE (yyss); |
1786 | 900 | #endif |
1787 | 900 | #if YYERROR_VERBOSE |
1788 | 900 | if (yymsg != yymsgbuf) |
1789 | 0 | YYSTACK_FREE (yymsg); |
1790 | 900 | #endif |
1791 | 900 | return yyresult; |
1792 | 0 | } |