1 /* A Bison parser, made by GNU Bison 3.0.4. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33 /* C LALR(1) parser skeleton written by Richard Stallman, by 34 simplifying the original so-called "semantic" parser. */ 35 36 /* All symbols defined below should begin with yy or YY, to avoid 37 infringing on user name space. This should be done even for local 38 variables, as they might otherwise be expanded by user macros. 39 There are some unavoidable exceptions within include files to 40 define necessary library symbols; they are noted "INFRINGES ON 41 USER NAME SPACE" below. */ 42 43 /* Identify Bison output. */ 44 #define YYBISON 1 45 46 /* Bison version. */ 47 #define YYBISON_VERSION "3.0.4" 48 49 /* Skeleton name. */ 50 #define YYSKELETON_NAME "yacc.c" 51 52 /* Pure parsers. */ 53 #define YYPURE 0 54 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 61 62 63 64 /* Copy the first part of user declarations. */ 65 #line 1 "zparser.y" /* yacc.c:339 */ 66 67 /* 68 * zyparser.y -- yacc grammar for (DNS) zone files 69 * 70 * Copyright (c) 2001-2006, NLnet Labs. All rights reserved. 71 * 72 * See LICENSE for the license. 73 * 74 */ 75 76 #include "config.h" 77 78 #include <stdarg.h> 79 #include <stdio.h> 80 #include <string.h> 81 82 #include "dname.h" 83 #include "namedb.h" 84 #include "zonec.h" 85 86 /* these need to be global, otherwise they cannot be used inside yacc */ 87 zparser_type *parser; 88 89 #ifdef __cplusplus 90 extern "C" 91 #endif /* __cplusplus */ 92 int yywrap(void); 93 94 /* this hold the nxt bits */ 95 static uint8_t nxtbits[16]; 96 static int dlv_warn = 1; 97 98 /* 256 windows of 256 bits (32 bytes) */ 99 /* still need to reset the bastard somewhere */ 100 static uint8_t nsecbits[NSEC_WINDOW_COUNT][NSEC_WINDOW_BITS_SIZE]; 101 102 /* hold the highest rcode seen in a NSEC rdata , BUG #106 */ 103 uint16_t nsec_highest_rcode; 104 105 void yyerror(const char *message); 106 107 #ifdef NSEC3 108 /* parse nsec3 parameters and add the (first) rdata elements */ 109 static void 110 nsec3_add_params(const char* hash_algo_str, const char* flag_str, 111 const char* iter_str, const char* salt_str, int salt_len); 112 #endif /* NSEC3 */ 113 114 115 #line 116 "zparser.c" /* yacc.c:339 */ 116 117 # ifndef YY_NULLPTR 118 # if defined __cplusplus && 201103L <= __cplusplus 119 # define YY_NULLPTR nullptr 120 # else 121 # define YY_NULLPTR 0 122 # endif 123 # endif 124 125 /* Enabling verbose error messages. */ 126 #ifdef YYERROR_VERBOSE 127 # undef YYERROR_VERBOSE 128 # define YYERROR_VERBOSE 1 129 #else 130 # define YYERROR_VERBOSE 0 131 #endif 132 133 /* In a future release of Bison, this section will be replaced 134 by #include "zparser.h". */ 135 #ifndef YY_YY_ZPARSER_H_INCLUDED 136 # define YY_YY_ZPARSER_H_INCLUDED 137 /* Debug traces. */ 138 #ifndef YYDEBUG 139 # define YYDEBUG 0 140 #endif 141 #if YYDEBUG 142 extern int yydebug; 143 #endif 144 145 /* Token type. */ 146 #ifndef YYTOKENTYPE 147 # define YYTOKENTYPE 148 enum yytokentype 149 { 150 T_A = 258, 151 T_NS = 259, 152 T_MX = 260, 153 T_TXT = 261, 154 T_CNAME = 262, 155 T_AAAA = 263, 156 T_PTR = 264, 157 T_NXT = 265, 158 T_KEY = 266, 159 T_SOA = 267, 160 T_SIG = 268, 161 T_SRV = 269, 162 T_CERT = 270, 163 T_LOC = 271, 164 T_MD = 272, 165 T_MF = 273, 166 T_MB = 274, 167 T_MG = 275, 168 T_MR = 276, 169 T_NULL = 277, 170 T_WKS = 278, 171 T_HINFO = 279, 172 T_MINFO = 280, 173 T_RP = 281, 174 T_AFSDB = 282, 175 T_X25 = 283, 176 T_ISDN = 284, 177 T_RT = 285, 178 T_NSAP = 286, 179 T_NSAP_PTR = 287, 180 T_PX = 288, 181 T_GPOS = 289, 182 T_EID = 290, 183 T_NIMLOC = 291, 184 T_ATMA = 292, 185 T_NAPTR = 293, 186 T_KX = 294, 187 T_A6 = 295, 188 T_DNAME = 296, 189 T_SINK = 297, 190 T_OPT = 298, 191 T_APL = 299, 192 T_UINFO = 300, 193 T_UID = 301, 194 T_GID = 302, 195 T_UNSPEC = 303, 196 T_TKEY = 304, 197 T_TSIG = 305, 198 T_IXFR = 306, 199 T_AXFR = 307, 200 T_MAILB = 308, 201 T_MAILA = 309, 202 T_DS = 310, 203 T_DLV = 311, 204 T_SSHFP = 312, 205 T_RRSIG = 313, 206 T_NSEC = 314, 207 T_DNSKEY = 315, 208 T_SPF = 316, 209 T_NSEC3 = 317, 210 T_IPSECKEY = 318, 211 T_DHCID = 319, 212 T_NSEC3PARAM = 320, 213 T_TLSA = 321, 214 T_URI = 322, 215 T_NID = 323, 216 T_L32 = 324, 217 T_L64 = 325, 218 T_LP = 326, 219 T_EUI48 = 327, 220 T_EUI64 = 328, 221 T_CAA = 329, 222 T_CDS = 330, 223 T_CDNSKEY = 331, 224 T_OPENPGPKEY = 332, 225 T_CSYNC = 333, 226 T_AVC = 334, 227 DOLLAR_TTL = 335, 228 DOLLAR_ORIGIN = 336, 229 NL = 337, 230 SP = 338, 231 STR = 339, 232 PREV = 340, 233 BITLAB = 341, 234 T_TTL = 342, 235 T_RRCLASS = 343, 236 URR = 344, 237 T_UTYPE = 345 238 }; 239 #endif 240 /* Tokens. */ 241 #define T_A 258 242 #define T_NS 259 243 #define T_MX 260 244 #define T_TXT 261 245 #define T_CNAME 262 246 #define T_AAAA 263 247 #define T_PTR 264 248 #define T_NXT 265 249 #define T_KEY 266 250 #define T_SOA 267 251 #define T_SIG 268 252 #define T_SRV 269 253 #define T_CERT 270 254 #define T_LOC 271 255 #define T_MD 272 256 #define T_MF 273 257 #define T_MB 274 258 #define T_MG 275 259 #define T_MR 276 260 #define T_NULL 277 261 #define T_WKS 278 262 #define T_HINFO 279 263 #define T_MINFO 280 264 #define T_RP 281 265 #define T_AFSDB 282 266 #define T_X25 283 267 #define T_ISDN 284 268 #define T_RT 285 269 #define T_NSAP 286 270 #define T_NSAP_PTR 287 271 #define T_PX 288 272 #define T_GPOS 289 273 #define T_EID 290 274 #define T_NIMLOC 291 275 #define T_ATMA 292 276 #define T_NAPTR 293 277 #define T_KX 294 278 #define T_A6 295 279 #define T_DNAME 296 280 #define T_SINK 297 281 #define T_OPT 298 282 #define T_APL 299 283 #define T_UINFO 300 284 #define T_UID 301 285 #define T_GID 302 286 #define T_UNSPEC 303 287 #define T_TKEY 304 288 #define T_TSIG 305 289 #define T_IXFR 306 290 #define T_AXFR 307 291 #define T_MAILB 308 292 #define T_MAILA 309 293 #define T_DS 310 294 #define T_DLV 311 295 #define T_SSHFP 312 296 #define T_RRSIG 313 297 #define T_NSEC 314 298 #define T_DNSKEY 315 299 #define T_SPF 316 300 #define T_NSEC3 317 301 #define T_IPSECKEY 318 302 #define T_DHCID 319 303 #define T_NSEC3PARAM 320 304 #define T_TLSA 321 305 #define T_URI 322 306 #define T_NID 323 307 #define T_L32 324 308 #define T_L64 325 309 #define T_LP 326 310 #define T_EUI48 327 311 #define T_EUI64 328 312 #define T_CAA 329 313 #define T_CDS 330 314 #define T_CDNSKEY 331 315 #define T_OPENPGPKEY 332 316 #define T_CSYNC 333 317 #define T_AVC 334 318 #define DOLLAR_TTL 335 319 #define DOLLAR_ORIGIN 336 320 #define NL 337 321 #define SP 338 322 #define STR 339 323 #define PREV 340 324 #define BITLAB 341 325 #define T_TTL 342 326 #define T_RRCLASS 343 327 #define URR 344 328 #define T_UTYPE 345 329 330 /* Value type. */ 331 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 332 333 union YYSTYPE 334 { 335 #line 50 "zparser.y" /* yacc.c:355 */ 336 337 domain_type *domain; 338 const dname_type *dname; 339 struct lex_data data; 340 uint32_t ttl; 341 uint16_t klass; 342 uint16_t type; 343 uint16_t *unknown; 344 345 #line 346 "zparser.c" /* yacc.c:355 */ 346 }; 347 348 typedef union YYSTYPE YYSTYPE; 349 # define YYSTYPE_IS_TRIVIAL 1 350 # define YYSTYPE_IS_DECLARED 1 351 #endif 352 353 354 extern YYSTYPE yylval; 355 356 int yyparse (void); 357 358 #endif /* !YY_YY_ZPARSER_H_INCLUDED */ 359 360 /* Copy the second part of user declarations. */ 361 362 #line 363 "zparser.c" /* yacc.c:358 */ 363 364 #ifdef short 365 # undef short 366 #endif 367 368 #ifdef YYTYPE_UINT8 369 typedef YYTYPE_UINT8 yytype_uint8; 370 #else 371 typedef unsigned char yytype_uint8; 372 #endif 373 374 #ifdef YYTYPE_INT8 375 typedef YYTYPE_INT8 yytype_int8; 376 #else 377 typedef signed char yytype_int8; 378 #endif 379 380 #ifdef YYTYPE_UINT16 381 typedef YYTYPE_UINT16 yytype_uint16; 382 #else 383 typedef unsigned short int yytype_uint16; 384 #endif 385 386 #ifdef YYTYPE_INT16 387 typedef YYTYPE_INT16 yytype_int16; 388 #else 389 typedef short int yytype_int16; 390 #endif 391 392 #ifndef YYSIZE_T 393 # ifdef __SIZE_TYPE__ 394 # define YYSIZE_T __SIZE_TYPE__ 395 # elif defined size_t 396 # define YYSIZE_T size_t 397 # elif ! defined YYSIZE_T 398 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 399 # define YYSIZE_T size_t 400 # else 401 # define YYSIZE_T unsigned int 402 # endif 403 #endif 404 405 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 406 407 #ifndef YY_ 408 # if defined YYENABLE_NLS && YYENABLE_NLS 409 # if ENABLE_NLS 410 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 411 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 412 # endif 413 # endif 414 # ifndef YY_ 415 # define YY_(Msgid) Msgid 416 # endif 417 #endif 418 419 #ifndef YY_ATTRIBUTE 420 # if (defined __GNUC__ \ 421 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 422 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 423 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 424 # else 425 # define YY_ATTRIBUTE(Spec) /* empty */ 426 # endif 427 #endif 428 429 #ifndef YY_ATTRIBUTE_PURE 430 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 431 #endif 432 433 #ifndef YY_ATTRIBUTE_UNUSED 434 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 435 #endif 436 437 #if !defined _Noreturn \ 438 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 439 # if defined _MSC_VER && 1200 <= _MSC_VER 440 # define _Noreturn __declspec (noreturn) 441 # else 442 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 443 # endif 444 #endif 445 446 /* Suppress unused-variable warnings by "using" E. */ 447 #if ! defined lint || defined __GNUC__ 448 # define YYUSE(E) ((void) (E)) 449 #else 450 # define YYUSE(E) /* empty */ 451 #endif 452 453 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 454 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 455 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 456 _Pragma ("GCC diagnostic push") \ 457 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 458 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 459 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 460 _Pragma ("GCC diagnostic pop") 461 #else 462 # define YY_INITIAL_VALUE(Value) Value 463 #endif 464 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 465 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 466 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 467 #endif 468 #ifndef YY_INITIAL_VALUE 469 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 470 #endif 471 472 473 #if ! defined yyoverflow || YYERROR_VERBOSE 474 475 /* The parser invokes alloca or malloc; define the necessary symbols. */ 476 477 # ifdef YYSTACK_USE_ALLOCA 478 # if YYSTACK_USE_ALLOCA 479 # ifdef __GNUC__ 480 # define YYSTACK_ALLOC __builtin_alloca 481 # elif defined __BUILTIN_VA_ARG_INCR 482 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 483 # elif defined _AIX 484 # define YYSTACK_ALLOC __alloca 485 # elif defined _MSC_VER 486 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 487 # define alloca _alloca 488 # else 489 # define YYSTACK_ALLOC alloca 490 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 491 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 492 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 493 # ifndef EXIT_SUCCESS 494 # define EXIT_SUCCESS 0 495 # endif 496 # endif 497 # endif 498 # endif 499 # endif 500 501 # ifdef YYSTACK_ALLOC 502 /* Pacify GCC's 'empty if-body' warning. */ 503 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 504 # ifndef YYSTACK_ALLOC_MAXIMUM 505 /* The OS might guarantee only one guard page at the bottom of the stack, 506 and a page size can be as small as 4096 bytes. So we cannot safely 507 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 508 to allow for a few compiler-allocated temporary stack slots. */ 509 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 510 # endif 511 # else 512 # define YYSTACK_ALLOC YYMALLOC 513 # define YYSTACK_FREE YYFREE 514 # ifndef YYSTACK_ALLOC_MAXIMUM 515 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 516 # endif 517 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 518 && ! ((defined YYMALLOC || defined malloc) \ 519 && (defined YYFREE || defined free))) 520 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 521 # ifndef EXIT_SUCCESS 522 # define EXIT_SUCCESS 0 523 # endif 524 # endif 525 # ifndef YYMALLOC 526 # define YYMALLOC malloc 527 # if ! defined malloc && ! defined EXIT_SUCCESS 528 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 529 # endif 530 # endif 531 # ifndef YYFREE 532 # define YYFREE free 533 # if ! defined free && ! defined EXIT_SUCCESS 534 void free (void *); /* INFRINGES ON USER NAME SPACE */ 535 # endif 536 # endif 537 # endif 538 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 539 540 541 #if (! defined yyoverflow \ 542 && (! defined __cplusplus \ 543 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 544 545 /* A type that is properly aligned for any stack member. */ 546 union yyalloc 547 { 548 yytype_int16 yyss_alloc; 549 YYSTYPE yyvs_alloc; 550 }; 551 552 /* The size of the maximum gap between one aligned stack and the next. */ 553 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 554 555 /* The size of an array large to enough to hold all stacks, each with 556 N elements. */ 557 # define YYSTACK_BYTES(N) \ 558 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 559 + YYSTACK_GAP_MAXIMUM) 560 561 # define YYCOPY_NEEDED 1 562 563 /* Relocate STACK from its old location to the new one. The 564 local variables YYSIZE and YYSTACKSIZE give the old and new number of 565 elements in the stack, and YYPTR gives the new location of the 566 stack. Advance YYPTR to a properly aligned location for the next 567 stack. */ 568 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 569 do \ 570 { \ 571 YYSIZE_T yynewbytes; \ 572 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 573 Stack = &yyptr->Stack_alloc; \ 574 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 575 yyptr += yynewbytes / sizeof (*yyptr); \ 576 } \ 577 while (0) 578 579 #endif 580 581 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 582 /* Copy COUNT objects from SRC to DST. The source and destination do 583 not overlap. */ 584 # ifndef YYCOPY 585 # if defined __GNUC__ && 1 < __GNUC__ 586 # define YYCOPY(Dst, Src, Count) \ 587 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 588 # else 589 # define YYCOPY(Dst, Src, Count) \ 590 do \ 591 { \ 592 YYSIZE_T yyi; \ 593 for (yyi = 0; yyi < (Count); yyi++) \ 594 (Dst)[yyi] = (Src)[yyi]; \ 595 } \ 596 while (0) 597 # endif 598 # endif 599 #endif /* !YYCOPY_NEEDED */ 600 601 /* YYFINAL -- State number of the termination state. */ 602 #define YYFINAL 2 603 /* YYLAST -- Last index in YYTABLE. */ 604 #define YYLAST 931 605 606 /* YYNTOKENS -- Number of terminals. */ 607 #define YYNTOKENS 93 608 /* YYNNTS -- Number of nonterminals. */ 609 #define YYNNTS 74 610 /* YYNRULES -- Number of rules. */ 611 #define YYNRULES 233 612 /* YYNSTATES -- Number of states. */ 613 #define YYNSTATES 574 614 615 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned 616 by yylex, with out-of-bounds checking. */ 617 #define YYUNDEFTOK 2 618 #define YYMAXUTOK 345 619 620 #define YYTRANSLATE(YYX) \ 621 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 622 623 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 624 as returned by yylex, without out-of-bounds checking. */ 625 static const yytype_uint8 yytranslate[] = 626 { 627 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 631 2, 2, 2, 2, 2, 2, 91, 2, 2, 2, 632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 633 2, 2, 2, 2, 92, 2, 2, 2, 2, 2, 634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 639 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 643 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 644 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 646 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 647 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 648 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 649 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 650 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 651 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 652 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 653 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 654 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 655 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 656 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 657 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 658 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 659 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 660 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 661 85, 86, 87, 88, 89, 90 662 }; 663 664 #if YYDEBUG 665 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 666 static const yytype_uint16 yyrline[] = 667 { 668 0, 92, 92, 93, 96, 97, 98, 99, 107, 115, 669 135, 139, 140, 143, 144, 147, 157, 168, 174, 181, 670 186, 193, 197, 202, 207, 212, 219, 220, 241, 245, 671 249, 259, 273, 280, 281, 299, 300, 303, 311, 323, 672 340, 341, 356, 360, 370, 371, 376, 385, 397, 406, 673 417, 420, 423, 437, 438, 445, 446, 462, 463, 478, 674 479, 484, 494, 512, 513, 514, 515, 516, 517, 522, 675 523, 529, 530, 531, 532, 533, 534, 540, 541, 542, 676 543, 545, 546, 547, 548, 549, 550, 551, 552, 553, 677 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 678 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 679 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 680 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 681 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 682 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 683 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 684 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 685 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 686 644, 645, 657, 663, 670, 683, 690, 697, 705, 712, 687 719, 727, 735, 742, 746, 754, 762, 774, 782, 788, 688 794, 802, 812, 824, 832, 842, 845, 849, 855, 864, 689 873, 881, 887, 902, 912, 927, 937, 946, 955, 994, 690 998, 1002, 1009, 1016, 1023, 1030, 1036, 1043, 1052, 1061, 691 1068, 1078, 1084, 1088 692 }; 693 #endif 694 695 #if YYDEBUG || YYERROR_VERBOSE || 0 696 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 697 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 698 static const char *const yytname[] = 699 { 700 "$end", "error", "$undefined", "T_A", "T_NS", "T_MX", "T_TXT", 701 "T_CNAME", "T_AAAA", "T_PTR", "T_NXT", "T_KEY", "T_SOA", "T_SIG", 702 "T_SRV", "T_CERT", "T_LOC", "T_MD", "T_MF", "T_MB", "T_MG", "T_MR", 703 "T_NULL", "T_WKS", "T_HINFO", "T_MINFO", "T_RP", "T_AFSDB", "T_X25", 704 "T_ISDN", "T_RT", "T_NSAP", "T_NSAP_PTR", "T_PX", "T_GPOS", "T_EID", 705 "T_NIMLOC", "T_ATMA", "T_NAPTR", "T_KX", "T_A6", "T_DNAME", "T_SINK", 706 "T_OPT", "T_APL", "T_UINFO", "T_UID", "T_GID", "T_UNSPEC", "T_TKEY", 707 "T_TSIG", "T_IXFR", "T_AXFR", "T_MAILB", "T_MAILA", "T_DS", "T_DLV", 708 "T_SSHFP", "T_RRSIG", "T_NSEC", "T_DNSKEY", "T_SPF", "T_NSEC3", 709 "T_IPSECKEY", "T_DHCID", "T_NSEC3PARAM", "T_TLSA", "T_URI", "T_NID", 710 "T_L32", "T_L64", "T_LP", "T_EUI48", "T_EUI64", "T_CAA", "T_CDS", 711 "T_CDNSKEY", "T_OPENPGPKEY", "T_CSYNC", "T_AVC", "DOLLAR_TTL", 712 "DOLLAR_ORIGIN", "NL", "SP", "STR", "PREV", "BITLAB", "T_TTL", 713 "T_RRCLASS", "URR", "T_UTYPE", "'.'", "'@'", "$accept", "lines", "line", 714 "sp", "trail", "ttl_directive", "origin_directive", "rr", "owner", 715 "classttl", "dname", "abs_dname", "label", "rel_dname", "wire_dname", 716 "wire_abs_dname", "wire_label", "wire_rel_dname", "str_seq", 717 "concatenated_str_seq", "nxt_seq", "nsec_more", "nsec_seq", "str_sp_seq", 718 "str_dot_seq", "dotted_str", "type_and_rdata", "rdata_a", 719 "rdata_domain_name", "rdata_soa", "rdata_wks", "rdata_hinfo", 720 "rdata_minfo", "rdata_mx", "rdata_txt", "rdata_rp", "rdata_afsdb", 721 "rdata_x25", "rdata_isdn", "rdata_rt", "rdata_nsap", "rdata_px", 722 "rdata_aaaa", "rdata_loc", "rdata_nxt", "rdata_srv", "rdata_naptr", 723 "rdata_kx", "rdata_cert", "rdata_apl", "rdata_apl_seq", "rdata_ds", 724 "rdata_dlv", "rdata_sshfp", "rdata_dhcid", "rdata_rrsig", "rdata_nsec", 725 "rdata_nsec3", "rdata_nsec3_param", "rdata_tlsa", "rdata_dnskey", 726 "rdata_ipsec_base", "rdata_ipseckey", "rdata_nid", "rdata_l32", 727 "rdata_l64", "rdata_lp", "rdata_eui48", "rdata_eui64", "rdata_uri", 728 "rdata_caa", "rdata_openpgpkey", "rdata_csync", "rdata_unknown", YY_NULLPTR 729 }; 730 #endif 731 732 # ifdef YYPRINT 733 /* YYTOKNUM[NUM] -- (External) token number corresponding to the 734 (internal) symbol number NUM (which must be that of a token). */ 735 static const yytype_uint16 yytoknum[] = 736 { 737 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 738 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 739 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 740 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 741 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 742 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 743 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 744 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 745 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 746 345, 46, 64 747 }; 748 # endif 749 750 #define YYPACT_NINF -438 751 752 #define yypact_value_is_default(Yystate) \ 753 (!!((Yystate) == (-438))) 754 755 #define YYTABLE_NINF -1 756 757 #define yytable_value_is_error(Yytable_value) \ 758 0 759 760 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 761 STATE-NUM. */ 762 static const yytype_int16 yypact[] = 763 { 764 -438, 107, -438, -70, -68, -68, -438, -438, -438, 32, 765 -438, -438, -438, -438, -48, -438, -438, -438, 36, -68, 766 -438, -438, 25, -438, 98, 18, -438, -438, -438, -68, 767 -68, 781, 60, 14, 102, 102, -75, -58, 16, -68, 768 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 769 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 770 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 771 -68, 102, -68, -68, -68, -68, -68, -68, -68, -68, 772 -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, 773 -68, -68, -68, -68, -68, -68, -68, 145, -68, -438, 774 -438, -438, 159, -438, -438, -438, -68, -68, 69, 42, 775 -52, 69, 42, 69, 42, 42, 38, 42, 112, 121, 776 124, 72, 42, 42, 42, 42, 42, 69, 128, 42, 777 42, 132, 135, 139, 142, 151, 154, 167, 170, 42, 778 56, -438, 180, 182, 191, 112, 82, 38, 69, 194, 779 201, 203, 205, 216, 219, 228, 231, 240, 243, 250, 780 253, 260, 180, 38, 203, 262, 69, 77, -56, -438, 781 60, 60, -438, 13, -438, 53, -438, -438, 102, -438, 782 -438, -68, -438, -438, 102, 63, -438, -438, -438, -438, 783 53, -438, -438, -438, -438, -68, -438, -438, -68, -438, 784 -438, -68, -438, -438, -68, -438, -438, -68, -438, -438, 785 -68, -438, -438, -438, -438, 59, -438, -438, -438, -438, 786 -438, -438, -438, -438, -438, -438, -438, -438, -78, -438, 787 -438, -68, -438, -438, -68, -438, -438, -68, -438, -438, 788 -68, -438, -438, 102, -438, -438, 102, -438, -438, -68, 789 -438, -438, -438, 66, -438, -438, -68, -438, -438, -68, 790 -438, -438, -68, -438, -438, -438, -438, 63, -438, 102, 791 -438, -68, -438, -438, -68, -438, -438, -68, -438, -438, 792 -438, -438, -438, -438, 270, -438, -438, 71, -438, -438, 793 -438, -438, -438, -438, -68, -438, -438, -68, 102, -438, 794 -438, -438, 102, -438, -438, -68, -438, -438, -68, -438, 795 -438, -68, -438, -438, -68, -438, -438, -68, -438, -438, 796 -68, -438, -438, -68, -438, -438, 102, -438, -438, 102, 797 -438, -438, -68, -438, -438, -438, -438, -438, -438, 102, 798 -438, -438, -68, -438, -438, -438, -438, -438, -438, 92, 799 275, 118, -438, -438, 18, 29, -438, -438, 284, 293, 800 18, 301, 304, 310, 136, 273, -438, 313, 315, 18, 801 18, 18, -438, 279, -438, 18, 148, -438, 18, 320, 802 18, 29, -438, 323, 328, 336, -438, 282, -438, 160, 803 344, 353, 290, -438, 299, -438, 355, 365, 367, 84, 804 84, 84, 18, -438, -438, 372, -438, 375, -438, 102, 805 -438, 102, 63, -438, 102, -68, -68, -68, -68, -68, 806 -438, -438, -68, 102, 102, 102, 102, 102, 102, -438, 807 -68, -68, 102, 63, -68, -68, -68, -438, 282, 270, 808 -438, -438, -68, -68, 102, -438, -68, -68, -68, 53, 809 53, 53, 102, -68, 270, 290, -438, -438, 308, -438, 810 377, 379, 382, 385, 390, 86, -438, -438, -438, -438, 811 -438, -438, 18, 394, -438, 399, 401, 403, -438, -438, 812 405, 427, -438, 433, 435, 437, -438, -438, -438, -438, 813 439, -438, 102, -438, -68, -68, -68, -68, -68, 59, 814 102, -68, -68, -68, 102, -68, -68, -68, -68, 102, 815 102, -438, 403, 441, 458, 18, 403, -438, -438, 460, 816 403, 403, -438, 462, 84, 471, 403, -438, -438, 102, 817 -68, -68, 102, 102, -68, 102, 102, -68, 63, 102, 818 102, -438, 473, 478, -438, -438, 480, -438, -438, 484, 819 -438, -438, -68, -68, -68, 270, 489, 491, 18, -438, 820 -68, -68, 102, 493, 495, -438, 102, -68, -438, 95, 821 -68, 403, 102, -438 822 }; 823 824 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 825 Performed when YYTABLE does not specify something else to do. Zero 826 means the default is an error. */ 827 static const yytype_uint8 yydefact[] = 828 { 829 2, 0, 1, 0, 0, 0, 4, 11, 31, 20, 830 32, 28, 29, 3, 0, 7, 8, 9, 21, 0, 831 26, 33, 27, 10, 0, 0, 6, 5, 12, 0, 832 0, 0, 19, 30, 0, 0, 0, 23, 22, 0, 833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 834 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 836 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 838 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 839 34, 13, 0, 15, 16, 17, 0, 0, 0, 0, 840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 843 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, 844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 845 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 846 24, 25, 59, 0, 60, 0, 63, 64, 0, 65, 847 66, 0, 89, 90, 0, 42, 91, 92, 71, 72, 848 0, 119, 120, 83, 84, 0, 123, 124, 0, 115, 849 116, 0, 73, 74, 0, 113, 114, 0, 125, 126, 850 0, 131, 132, 44, 45, 0, 121, 122, 67, 68, 851 69, 70, 75, 76, 77, 78, 79, 80, 0, 81, 852 82, 0, 85, 86, 0, 87, 88, 0, 97, 98, 853 0, 99, 100, 0, 101, 102, 0, 103, 104, 0, 854 109, 110, 57, 0, 111, 112, 0, 117, 118, 0, 855 127, 128, 0, 129, 130, 133, 134, 206, 136, 0, 856 137, 0, 138, 139, 0, 140, 141, 0, 142, 143, 857 144, 145, 39, 37, 0, 35, 40, 36, 146, 147, 858 152, 153, 93, 94, 0, 148, 149, 0, 0, 105, 859 106, 55, 0, 107, 108, 0, 150, 151, 0, 154, 860 155, 0, 178, 179, 0, 156, 157, 0, 158, 159, 861 0, 160, 161, 0, 162, 163, 0, 164, 165, 0, 862 166, 167, 0, 168, 169, 170, 171, 172, 173, 0, 863 174, 175, 0, 176, 177, 95, 96, 181, 180, 0, 864 0, 61, 182, 183, 0, 0, 189, 198, 0, 0, 865 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, 866 0, 0, 192, 0, 193, 0, 0, 196, 0, 0, 867 0, 0, 205, 0, 0, 0, 53, 0, 213, 38, 868 0, 0, 0, 220, 0, 211, 0, 0, 0, 0, 869 0, 0, 0, 225, 226, 0, 229, 0, 233, 0, 870 62, 0, 43, 48, 0, 0, 0, 0, 0, 0, 871 47, 46, 0, 0, 0, 0, 0, 0, 0, 58, 872 0, 0, 0, 207, 0, 0, 0, 51, 0, 0, 873 54, 41, 0, 0, 0, 56, 0, 0, 0, 0, 874 0, 0, 0, 0, 0, 0, 232, 188, 0, 200, 875 0, 0, 0, 0, 0, 0, 186, 187, 190, 191, 876 194, 195, 0, 0, 203, 0, 0, 0, 50, 52, 877 0, 0, 219, 0, 0, 0, 221, 222, 223, 224, 878 0, 230, 0, 49, 0, 0, 0, 0, 0, 0, 879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 880 0, 231, 0, 0, 0, 0, 0, 185, 197, 0, 881 0, 0, 210, 0, 0, 0, 0, 227, 228, 0, 882 0, 0, 0, 0, 0, 0, 0, 0, 218, 0, 883 0, 217, 0, 0, 201, 204, 0, 208, 209, 0, 884 215, 216, 0, 0, 0, 0, 0, 0, 0, 214, 885 0, 0, 0, 0, 0, 202, 0, 0, 184, 0, 886 0, 0, 0, 212 887 }; 888 889 /* YYPGOTO[NTERM-NUM]. */ 890 static const yytype_int16 yypgoto[] = 891 { 892 -438, -438, -438, -1, 211, -438, -438, -438, -438, -438, 893 0, 204, 143, 224, -317, -438, -132, -438, -438, -205, 894 -438, -176, -437, -45, -438, 24, -438, -438, -103, -438, 895 -438, -438, -438, -438, -142, -438, -438, -438, -438, -438, 896 -438, -438, -438, -438, -438, -438, -438, -438, -438, -438, 897 -438, 105, -438, -438, -438, 127, -438, -438, -438, -438, 898 -137, -438, -438, -438, -438, -438, -438, -438, -438, -438, 899 -438, -438, -438, 763 900 }; 901 902 /* YYDEFGOTO[NTERM-NUM]. */ 903 static const yytype_int16 yydefgoto[] = 904 { 905 -1, 1, 13, 102, 103, 15, 16, 17, 18, 31, 906 178, 20, 21, 22, 284, 285, 286, 287, 184, 215, 907 414, 440, 388, 302, 253, 185, 99, 176, 179, 202, 908 229, 232, 235, 182, 186, 238, 241, 244, 247, 250, 909 254, 257, 191, 216, 196, 208, 260, 263, 211, 268, 910 269, 272, 275, 278, 303, 205, 288, 295, 306, 309, 911 199, 298, 299, 315, 318, 321, 324, 327, 330, 312, 912 333, 340, 343, 177 913 }; 914 915 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 916 positive, shift that token. If negative, reduce the rule whose 917 number is the opposite. If YYTABLE_NINF, syntax error. */ 918 static const yytype_uint16 yytable[] = 919 { 920 14, 19, 479, 24, 25, 7, 292, 101, 7, 188, 921 290, 193, 23, 351, 349, 7, 33, 491, 32, 218, 922 220, 222, 224, 226, 345, 28, 337, 28, 37, 38, 923 106, 28, 181, 173, 27, 28, 265, 173, 108, 109, 924 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 925 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 926 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 927 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 928 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 929 161, 162, 163, 164, 165, 166, 7, 168, 8, 28, 930 10, 28, 8, 107, 10, 170, 171, 2, 3, 11, 931 12, 169, 28, 172, 26, 195, 33, 201, 559, 339, 932 174, 28, 198, 29, 30, 28, 8, 173, 10, 234, 933 237, 173, 175, 11, 12, 101, 7, 190, 169, 28, 934 172, 101, 7, 28, 351, 173, 167, 174, 101, 7, 935 364, 228, 28, 172, 351, 28, 213, 376, 173, 347, 936 174, 173, 389, 214, 267, 28, 282, 28, 172, 28, 937 213, 173, 350, 283, 408, 174, 100, 214, 28, 282, 938 354, 28, 34, 355, 101, 7, 283, 4, 5, 6, 939 7, 8, 9, 10, 358, 28, 204, 359, 11, 12, 940 360, 173, 410, 361, 28, 207, 362, 28, 210, 363, 941 173, 28, 231, 173, 365, 28, 240, 173, 28, 243, 942 420, 173, 28, 246, 173, 28, 249, 367, 173, 35, 943 368, 173, 429, 369, 28, 252, 370, 28, 256, 371, 944 173, 169, 28, 173, 282, 373, 104, 105, 375, 36, 945 28, 259, 570, 28, 262, 378, 173, 441, 379, 173, 946 499, 380, 478, 28, 271, 28, 274, 335, 381, 173, 947 383, 173, 280, 384, 28, 277, 385, 28, 294, 0, 948 173, 0, 141, 173, 28, 297, 28, 301, 28, 305, 949 173, 0, 173, 390, 173, 0, 391, 392, 0, 28, 950 308, 394, 28, 311, 396, 173, 0, 397, 173, 0, 951 398, 28, 314, 399, 28, 317, 400, 173, 0, 401, 952 173, 0, 402, 28, 320, 0, 28, 323, 0, 173, 953 0, 405, 173, 28, 326, 0, 28, 329, 394, 173, 954 0, 407, 173, 28, 332, 28, 342, 444, 0, 173, 955 0, 173, 386, 387, 411, 169, 28, 421, 28, 409, 956 416, 169, 28, 427, 437, 438, 439, 28, 413, 424, 957 425, 426, 169, 28, 301, 428, 28, 415, 430, 412, 958 432, 169, 28, 445, 28, 417, 352, 28, 418, 353, 959 169, 28, 493, 28, 419, 356, 28, 422, 28, 423, 960 0, 357, 452, 28, 431, 433, 28, 434, 455, 0, 961 492, 28, 435, 458, 460, 461, 462, 463, 464, 28, 962 436, 465, 0, 449, 450, 451, 366, 28, 442, 472, 963 473, 0, 504, 475, 476, 477, 28, 443, 28, 446, 964 0, 480, 481, 394, 0, 483, 484, 485, 28, 447, 965 28, 448, 490, 0, 372, 28, 453, 374, 28, 454, 966 28, 494, 28, 495, 377, 28, 496, 529, 28, 497, 967 0, 533, 500, 28, 498, 535, 536, 28, 501, 0, 968 382, 540, 28, 502, 28, 503, 28, 301, 28, 505, 969 0, 394, 0, 512, 513, 514, 515, 516, 365, 0, 970 519, 520, 521, 394, 523, 524, 525, 526, 0, 393, 971 28, 506, 0, 395, 0, 532, 28, 507, 28, 508, 972 28, 509, 28, 510, 28, 530, 572, 0, 394, 542, 973 543, 0, 394, 546, 394, 394, 549, 403, 0, 394, 974 404, 28, 531, 28, 534, 28, 537, 0, 538, 0, 975 406, 556, 557, 558, 28, 539, 28, 552, 562, 563, 976 564, 28, 553, 28, 554, 0, 569, 28, 555, 571, 977 0, 394, 28, 560, 28, 561, 28, 566, 28, 567, 978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 981 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 982 456, 0, 457, 0, 0, 459, 0, 0, 0, 0, 983 0, 0, 0, 0, 466, 467, 468, 469, 470, 471, 984 0, 0, 0, 474, 0, 0, 0, 0, 0, 0, 985 0, 0, 0, 0, 0, 482, 0, 0, 0, 0, 986 486, 487, 488, 489, 0, 0, 0, 0, 0, 0, 987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 989 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 990 0, 0, 0, 511, 0, 0, 0, 0, 0, 0, 991 517, 518, 0, 0, 0, 522, 0, 0, 0, 0, 992 527, 528, 0, 0, 0, 0, 0, 0, 0, 0, 993 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 994 541, 0, 0, 544, 545, 0, 547, 548, 0, 0, 995 550, 551, 0, 0, 0, 0, 0, 0, 0, 0, 996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 997 0, 0, 0, 565, 0, 0, 0, 568, 0, 0, 998 0, 0, 0, 573, 39, 40, 41, 42, 43, 44, 999 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 1000 55, 56, 57, 0, 58, 59, 60, 61, 62, 63, 1001 64, 65, 66, 0, 67, 0, 0, 0, 0, 68, 1002 69, 0, 70, 0, 0, 71, 0, 0, 0, 0, 1003 0, 0, 0, 0, 0, 0, 72, 73, 74, 75, 1004 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 1005 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 1006 96, 0, 0, 0, 0, 97, 0, 0, 0, 0, 1007 0, 98, 180, 183, 187, 189, 192, 194, 197, 200, 1008 203, 206, 209, 212, 217, 219, 221, 223, 225, 227, 1009 230, 233, 236, 239, 242, 245, 248, 251, 255, 258, 1010 261, 264, 266, 270, 0, 273, 276, 279, 281, 289, 1011 291, 293, 296, 300, 304, 307, 310, 313, 316, 319, 1012 322, 325, 328, 331, 334, 336, 338, 341, 344, 346, 1013 0, 348 1014 }; 1015 1016 static const yytype_int16 yycheck[] = 1017 { 1018 1, 1, 439, 4, 5, 83, 148, 82, 83, 112, 1019 147, 114, 82, 91, 1, 83, 91, 454, 19, 122, 1020 123, 124, 125, 126, 166, 83, 163, 83, 29, 30, 1021 88, 83, 84, 89, 82, 83, 139, 89, 39, 40, 1022 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1023 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 1024 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 1025 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 1026 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 1027 91, 92, 93, 94, 95, 96, 83, 98, 84, 83, 1028 86, 83, 84, 87, 86, 106, 107, 0, 1, 91, 1029 92, 82, 83, 84, 82, 115, 91, 117, 555, 164, 1030 91, 83, 84, 87, 88, 83, 84, 89, 86, 129, 1031 130, 89, 108, 91, 92, 82, 83, 113, 82, 83, 1032 84, 82, 83, 83, 91, 89, 1, 91, 82, 83, 1033 91, 127, 83, 84, 91, 83, 84, 91, 89, 82, 1034 91, 89, 91, 91, 140, 83, 84, 83, 84, 83, 1035 84, 89, 173, 91, 82, 91, 33, 91, 83, 84, 1036 181, 83, 84, 184, 82, 83, 91, 80, 81, 82, 1037 83, 84, 85, 86, 195, 83, 84, 198, 91, 92, 1038 201, 89, 84, 204, 83, 84, 207, 83, 84, 210, 1039 89, 83, 84, 89, 215, 83, 84, 89, 83, 84, 1040 84, 89, 83, 84, 89, 83, 84, 228, 89, 25, 1041 231, 89, 84, 234, 83, 84, 237, 83, 84, 240, 1042 89, 82, 83, 89, 84, 246, 35, 36, 249, 25, 1043 83, 84, 569, 83, 84, 256, 89, 389, 259, 89, 1044 465, 262, 438, 83, 84, 83, 84, 162, 269, 89, 1045 271, 89, 145, 274, 83, 84, 277, 83, 84, -1, 1046 89, -1, 71, 89, 83, 84, 83, 84, 83, 84, 1047 89, -1, 89, 294, 89, -1, 297, 298, -1, 83, 1048 84, 302, 83, 84, 305, 89, -1, 308, 89, -1, 1049 311, 83, 84, 314, 83, 84, 317, 89, -1, 320, 1050 89, -1, 323, 83, 84, -1, 83, 84, -1, 89, 1051 -1, 332, 89, 83, 84, -1, 83, 84, 339, 89, 1052 -1, 342, 89, 83, 84, 83, 84, 392, -1, 89, 1053 -1, 89, 82, 83, 354, 82, 83, 84, 83, 84, 1054 360, 82, 83, 84, 82, 83, 84, 83, 84, 369, 1055 370, 371, 82, 83, 84, 375, 83, 84, 378, 355, 1056 380, 82, 83, 84, 83, 84, 175, 83, 84, 178, 1057 82, 83, 84, 83, 84, 184, 83, 84, 83, 84, 1058 -1, 190, 402, 83, 84, 381, 83, 84, 409, -1, 1059 455, 83, 84, 414, 415, 416, 417, 418, 419, 83, 1060 84, 422, -1, 399, 400, 401, 215, 83, 84, 430, 1061 431, -1, 477, 434, 435, 436, 83, 84, 83, 84, 1062 -1, 442, 443, 444, -1, 446, 447, 448, 83, 84, 1063 83, 84, 453, -1, 243, 83, 84, 246, 83, 84, 1064 83, 84, 83, 84, 253, 83, 84, 512, 83, 84, 1065 -1, 516, 472, 83, 84, 520, 521, 83, 84, -1, 1066 269, 526, 83, 84, 83, 84, 83, 84, 83, 84, 1067 -1, 492, -1, 494, 495, 496, 497, 498, 499, -1, 1068 501, 502, 503, 504, 505, 506, 507, 508, -1, 298, 1069 83, 84, -1, 302, -1, 515, 83, 84, 83, 84, 1070 83, 84, 83, 84, 83, 84, 571, -1, 529, 530, 1071 531, -1, 533, 534, 535, 536, 537, 326, -1, 540, 1072 329, 83, 84, 83, 84, 83, 84, -1, 524, -1, 1073 339, 552, 553, 554, 83, 84, 83, 84, 558, 560, 1074 561, 83, 84, 83, 84, -1, 567, 83, 84, 570, 1075 -1, 572, 83, 84, 83, 84, 83, 84, 83, 84, 1076 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1077 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1078 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1079 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1080 409, -1, 411, -1, -1, 414, -1, -1, -1, -1, 1081 -1, -1, -1, -1, 423, 424, 425, 426, 427, 428, 1082 -1, -1, -1, 432, -1, -1, -1, -1, -1, -1, 1083 -1, -1, -1, -1, -1, 444, -1, -1, -1, -1, 1084 449, 450, 451, 452, -1, -1, -1, -1, -1, -1, 1085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1087 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1088 -1, -1, -1, 492, -1, -1, -1, -1, -1, -1, 1089 499, 500, -1, -1, -1, 504, -1, -1, -1, -1, 1090 509, 510, -1, -1, -1, -1, -1, -1, -1, -1, 1091 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1092 529, -1, -1, 532, 533, -1, 535, 536, -1, -1, 1093 539, 540, -1, -1, -1, -1, -1, -1, -1, -1, 1094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1095 -1, -1, -1, 562, -1, -1, -1, 566, -1, -1, 1096 -1, -1, -1, 572, 3, 4, 5, 6, 7, 8, 1097 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1098 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, 1099 29, 30, 31, -1, 33, -1, -1, -1, -1, 38, 1100 39, -1, 41, -1, -1, 44, -1, -1, -1, -1, 1101 -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 1102 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 1103 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 1104 79, -1, -1, -1, -1, 84, -1, -1, -1, -1, 1105 -1, 90, 109, 110, 111, 112, 113, 114, 115, 116, 1106 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 1107 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 1108 137, 138, 139, 140, -1, 142, 143, 144, 145, 146, 1109 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 1110 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 1111 -1, 168 1112 }; 1113 1114 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1115 symbol of state STATE-NUM. */ 1116 static const yytype_uint8 yystos[] = 1117 { 1118 0, 94, 0, 1, 80, 81, 82, 83, 84, 85, 1119 86, 91, 92, 95, 96, 98, 99, 100, 101, 103, 1120 104, 105, 106, 82, 96, 96, 82, 82, 83, 87, 1121 88, 102, 96, 91, 84, 104, 106, 96, 96, 3, 1122 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1123 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 1124 25, 26, 27, 28, 29, 30, 31, 33, 38, 39, 1125 41, 44, 55, 56, 57, 58, 59, 60, 61, 62, 1126 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 1127 73, 74, 75, 76, 77, 78, 79, 84, 90, 119, 1128 105, 82, 96, 97, 97, 97, 88, 87, 96, 96, 1129 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 1130 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 1131 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 1132 96, 97, 96, 96, 96, 96, 96, 96, 96, 96, 1133 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 1134 96, 96, 96, 96, 96, 96, 96, 1, 96, 82, 1135 96, 96, 84, 89, 91, 118, 120, 166, 103, 121, 1136 166, 84, 126, 166, 111, 118, 127, 166, 121, 166, 1137 118, 135, 166, 121, 166, 103, 137, 166, 84, 153, 1138 166, 103, 122, 166, 84, 148, 166, 84, 138, 166, 1139 84, 141, 166, 84, 91, 112, 136, 166, 121, 166, 1140 121, 166, 121, 166, 121, 166, 121, 166, 118, 123, 1141 166, 84, 124, 166, 103, 125, 166, 103, 128, 166, 1142 84, 129, 166, 84, 130, 166, 84, 131, 166, 84, 1143 132, 166, 84, 117, 133, 166, 84, 134, 166, 84, 1144 139, 166, 84, 140, 166, 121, 166, 118, 142, 143, 1145 166, 84, 144, 166, 84, 145, 166, 84, 146, 166, 1146 148, 166, 84, 91, 107, 108, 109, 110, 149, 166, 1147 153, 166, 127, 166, 84, 150, 166, 84, 154, 155, 1148 166, 84, 116, 147, 166, 84, 151, 166, 84, 152, 1149 166, 84, 162, 166, 84, 156, 166, 84, 157, 166, 1150 84, 158, 166, 84, 159, 166, 84, 160, 166, 84, 1151 161, 166, 84, 163, 166, 144, 166, 153, 166, 116, 1152 164, 166, 84, 165, 166, 127, 166, 82, 166, 1, 1153 96, 91, 97, 97, 96, 96, 97, 97, 96, 96, 1154 96, 96, 96, 96, 91, 96, 97, 96, 96, 96, 1155 96, 96, 97, 96, 97, 96, 91, 97, 96, 96, 1156 96, 96, 97, 96, 96, 96, 82, 83, 115, 91, 1157 96, 96, 96, 97, 96, 97, 96, 96, 96, 96, 1158 96, 96, 96, 97, 97, 96, 97, 96, 82, 84, 1159 84, 103, 118, 84, 113, 84, 103, 84, 84, 84, 1160 84, 84, 84, 84, 103, 103, 103, 84, 103, 84, 1161 103, 84, 103, 118, 84, 84, 84, 82, 83, 84, 1162 114, 109, 84, 84, 116, 84, 84, 84, 84, 118, 1163 118, 118, 103, 84, 84, 96, 97, 97, 96, 97, 1164 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 1165 97, 97, 96, 96, 97, 96, 96, 96, 114, 115, 1166 96, 96, 97, 96, 96, 96, 97, 97, 97, 97, 1167 96, 115, 116, 84, 84, 84, 84, 84, 84, 112, 1168 103, 84, 84, 84, 116, 84, 84, 84, 84, 84, 1169 84, 97, 96, 96, 96, 96, 96, 97, 97, 96, 1170 96, 96, 97, 96, 96, 96, 96, 97, 97, 116, 1171 84, 84, 103, 116, 84, 116, 116, 84, 118, 84, 1172 116, 97, 96, 96, 97, 97, 96, 97, 97, 96, 1173 97, 97, 84, 84, 84, 84, 96, 96, 96, 115, 1174 84, 84, 103, 96, 96, 97, 84, 84, 97, 96, 1175 107, 96, 116, 97 1176 }; 1177 1178 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 1179 static const yytype_uint8 yyr1[] = 1180 { 1181 0, 93, 94, 94, 95, 95, 95, 95, 95, 95, 1182 95, 96, 96, 97, 97, 98, 99, 99, 100, 101, 1183 101, 102, 102, 102, 102, 102, 103, 103, 104, 104, 1184 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 1185 110, 110, 111, 111, 112, 112, 112, 112, 113, 113, 1186 114, 114, 114, 115, 115, 116, 116, 117, 117, 118, 1187 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 1188 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1189 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1190 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1191 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1192 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1193 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1194 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1195 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1196 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1197 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1198 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 1199 119, 119, 120, 121, 122, 123, 124, 125, 126, 127, 1200 128, 129, 130, 131, 131, 132, 133, 134, 135, 136, 1201 137, 138, 139, 140, 141, 142, 143, 143, 144, 145, 1202 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 1203 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 1204 165, 166, 166, 166 1205 }; 1206 1207 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 1208 static const yytype_uint8 yyr2[] = 1209 { 1210 0, 2, 0, 2, 1, 2, 2, 1, 1, 1, 1211 2, 1, 2, 1, 2, 4, 4, 4, 3, 2, 1212 1, 0, 2, 2, 4, 4, 1, 1, 1, 1, 1213 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1214 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1215 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 1216 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 1217 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1218 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1219 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1220 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1221 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1222 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1223 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 1224 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1225 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1226 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1227 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1228 3, 3, 2, 2, 14, 6, 4, 4, 4, 2, 1229 4, 4, 2, 2, 4, 4, 2, 6, 2, 2, 1230 4, 8, 12, 4, 8, 2, 1, 3, 8, 8, 1231 6, 2, 18, 2, 10, 8, 8, 8, 7, 4, 1232 2, 4, 4, 4, 4, 2, 2, 6, 6, 2, 1233 4, 6, 4, 3 1234 }; 1235 1236 1237 #define yyerrok (yyerrstatus = 0) 1238 #define yyclearin (yychar = YYEMPTY) 1239 #define YYEMPTY (-2) 1240 #define YYEOF 0 1241 1242 #define YYACCEPT goto yyacceptlab 1243 #define YYABORT goto yyabortlab 1244 #define YYERROR goto yyerrorlab 1245 1246 1247 #define YYRECOVERING() (!!yyerrstatus) 1248 1249 #define YYBACKUP(Token, Value) \ 1250 do \ 1251 if (yychar == YYEMPTY) \ 1252 { \ 1253 yychar = (Token); \ 1254 yylval = (Value); \ 1255 YYPOPSTACK (yylen); \ 1256 yystate = *yyssp; \ 1257 goto yybackup; \ 1258 } \ 1259 else \ 1260 { \ 1261 yyerror (YY_("syntax error: cannot back up")); \ 1262 YYERROR; \ 1263 } \ 1264 while (0) 1265 1266 /* Error token number */ 1267 #define YYTERROR 1 1268 #define YYERRCODE 256 1269 1270 1271 1272 /* Enable debugging if requested. */ 1273 #if YYDEBUG 1274 1275 # ifndef YYFPRINTF 1276 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1277 # define YYFPRINTF fprintf 1278 # endif 1279 1280 # define YYDPRINTF(Args) \ 1281 do { \ 1282 if (yydebug) \ 1283 YYFPRINTF Args; \ 1284 } while (0) 1285 1286 /* This macro is provided for backward compatibility. */ 1287 #ifndef YY_LOCATION_PRINT 1288 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1289 #endif 1290 1291 1292 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1293 do { \ 1294 if (yydebug) \ 1295 { \ 1296 YYFPRINTF (stderr, "%s ", Title); \ 1297 yy_symbol_print (stderr, \ 1298 Type, Value); \ 1299 YYFPRINTF (stderr, "\n"); \ 1300 } \ 1301 } while (0) 1302 1303 1304 /*----------------------------------------. 1305 | Print this symbol's value on YYOUTPUT. | 1306 `----------------------------------------*/ 1307 1308 static void 1309 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1310 { 1311 FILE *yyo = yyoutput; 1312 YYUSE (yyo); 1313 if (!yyvaluep) 1314 return; 1315 # ifdef YYPRINT 1316 if (yytype < YYNTOKENS) 1317 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1318 # endif 1319 YYUSE (yytype); 1320 } 1321 1322 1323 /*--------------------------------. 1324 | Print this symbol on YYOUTPUT. | 1325 `--------------------------------*/ 1326 1327 static void 1328 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1329 { 1330 YYFPRINTF (yyoutput, "%s %s (", 1331 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 1332 1333 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1334 YYFPRINTF (yyoutput, ")"); 1335 } 1336 1337 /*------------------------------------------------------------------. 1338 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1339 | TOP (included). | 1340 `------------------------------------------------------------------*/ 1341 1342 static void 1343 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1344 { 1345 YYFPRINTF (stderr, "Stack now"); 1346 for (; yybottom <= yytop; yybottom++) 1347 { 1348 int yybot = *yybottom; 1349 YYFPRINTF (stderr, " %d", yybot); 1350 } 1351 YYFPRINTF (stderr, "\n"); 1352 } 1353 1354 # define YY_STACK_PRINT(Bottom, Top) \ 1355 do { \ 1356 if (yydebug) \ 1357 yy_stack_print ((Bottom), (Top)); \ 1358 } while (0) 1359 1360 1361 /*------------------------------------------------. 1362 | Report that the YYRULE is going to be reduced. | 1363 `------------------------------------------------*/ 1364 1365 static void 1366 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 1367 { 1368 unsigned long int yylno = yyrline[yyrule]; 1369 int yynrhs = yyr2[yyrule]; 1370 int yyi; 1371 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1372 yyrule - 1, yylno); 1373 /* The symbols being reduced. */ 1374 for (yyi = 0; yyi < yynrhs; yyi++) 1375 { 1376 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1377 yy_symbol_print (stderr, 1378 yystos[yyssp[yyi + 1 - yynrhs]], 1379 &(yyvsp[(yyi + 1) - (yynrhs)]) 1380 ); 1381 YYFPRINTF (stderr, "\n"); 1382 } 1383 } 1384 1385 # define YY_REDUCE_PRINT(Rule) \ 1386 do { \ 1387 if (yydebug) \ 1388 yy_reduce_print (yyssp, yyvsp, Rule); \ 1389 } while (0) 1390 1391 /* Nonzero means print parse trace. It is left uninitialized so that 1392 multiple parsers can coexist. */ 1393 int yydebug; 1394 #else /* !YYDEBUG */ 1395 # define YYDPRINTF(Args) 1396 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1397 # define YY_STACK_PRINT(Bottom, Top) 1398 # define YY_REDUCE_PRINT(Rule) 1399 #endif /* !YYDEBUG */ 1400 1401 1402 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1403 #ifndef YYINITDEPTH 1404 # define YYINITDEPTH 200 1405 #endif 1406 1407 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1408 if the built-in stack extension method is used). 1409 1410 Do not make this value too large; the results are undefined if 1411 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1412 evaluated with infinite-precision integer arithmetic. */ 1413 1414 #ifndef YYMAXDEPTH 1415 # define YYMAXDEPTH 10000 1416 #endif 1417 1418 1419 #if YYERROR_VERBOSE 1420 1421 # ifndef yystrlen 1422 # if defined __GLIBC__ && defined _STRING_H 1423 # define yystrlen strlen 1424 # else 1425 /* Return the length of YYSTR. */ 1426 static YYSIZE_T 1427 yystrlen (const char *yystr) 1428 { 1429 YYSIZE_T yylen; 1430 for (yylen = 0; yystr[yylen]; yylen++) 1431 continue; 1432 return yylen; 1433 } 1434 # endif 1435 # endif 1436 1437 # ifndef yystpcpy 1438 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1439 # define yystpcpy stpcpy 1440 # else 1441 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1442 YYDEST. */ 1443 static char * 1444 yystpcpy (char *yydest, const char *yysrc) 1445 { 1446 char *yyd = yydest; 1447 const char *yys = yysrc; 1448 1449 while ((*yyd++ = *yys++) != '\0') 1450 continue; 1451 1452 return yyd - 1; 1453 } 1454 # endif 1455 # endif 1456 1457 # ifndef yytnamerr 1458 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1459 quotes and backslashes, so that it's suitable for yyerror. The 1460 heuristic is that double-quoting is unnecessary unless the string 1461 contains an apostrophe, a comma, or backslash (other than 1462 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1463 null, do not copy; instead, return the length of what the result 1464 would have been. */ 1465 static YYSIZE_T 1466 yytnamerr (char *yyres, const char *yystr) 1467 { 1468 if (*yystr == '"') 1469 { 1470 YYSIZE_T yyn = 0; 1471 char const *yyp = yystr; 1472 1473 for (;;) 1474 switch (*++yyp) 1475 { 1476 case '\'': 1477 case ',': 1478 goto do_not_strip_quotes; 1479 1480 case '\\': 1481 if (*++yyp != '\\') 1482 goto do_not_strip_quotes; 1483 /* Fall through. */ 1484 default: 1485 if (yyres) 1486 yyres[yyn] = *yyp; 1487 yyn++; 1488 break; 1489 1490 case '"': 1491 if (yyres) 1492 yyres[yyn] = '\0'; 1493 return yyn; 1494 } 1495 do_not_strip_quotes: ; 1496 } 1497 1498 if (! yyres) 1499 return yystrlen (yystr); 1500 1501 return yystpcpy (yyres, yystr) - yyres; 1502 } 1503 # endif 1504 1505 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1506 about the unexpected token YYTOKEN for the state stack whose top is 1507 YYSSP. 1508 1509 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1510 not large enough to hold the message. In that case, also set 1511 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1512 required number of bytes is too large to store. */ 1513 static int 1514 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1515 yytype_int16 *yyssp, int yytoken) 1516 { 1517 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 1518 YYSIZE_T yysize = yysize0; 1519 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1520 /* Internationalized format string. */ 1521 const char *yyformat = YY_NULLPTR; 1522 /* Arguments of yyformat. */ 1523 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1524 /* Number of reported tokens (one for the "unexpected", one per 1525 "expected"). */ 1526 int yycount = 0; 1527 1528 /* There are many possibilities here to consider: 1529 - If this state is a consistent state with a default action, then 1530 the only way this function was invoked is if the default action 1531 is an error action. In that case, don't check for expected 1532 tokens because there are none. 1533 - The only way there can be no lookahead present (in yychar) is if 1534 this state is a consistent state with a default action. Thus, 1535 detecting the absence of a lookahead is sufficient to determine 1536 that there is no unexpected or expected token to report. In that 1537 case, just report a simple "syntax error". 1538 - Don't assume there isn't a lookahead just because this state is a 1539 consistent state with a default action. There might have been a 1540 previous inconsistent state, consistent state with a non-default 1541 action, or user semantic action that manipulated yychar. 1542 - Of course, the expected token list depends on states to have 1543 correct lookahead information, and it depends on the parser not 1544 to perform extra reductions after fetching a lookahead from the 1545 scanner and before detecting a syntax error. Thus, state merging 1546 (from LALR or IELR) and default reductions corrupt the expected 1547 token list. However, the list is correct for canonical LR with 1548 one exception: it will still contain any token that will not be 1549 accepted due to an error action in a later state. 1550 */ 1551 if (yytoken != YYEMPTY) 1552 { 1553 int yyn = yypact[*yyssp]; 1554 yyarg[yycount++] = yytname[yytoken]; 1555 if (!yypact_value_is_default (yyn)) 1556 { 1557 /* Start YYX at -YYN if negative to avoid negative indexes in 1558 YYCHECK. In other words, skip the first -YYN actions for 1559 this state because they are default actions. */ 1560 int yyxbegin = yyn < 0 ? -yyn : 0; 1561 /* Stay within bounds of both yycheck and yytname. */ 1562 int yychecklim = YYLAST - yyn + 1; 1563 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1564 int yyx; 1565 1566 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1567 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1568 && !yytable_value_is_error (yytable[yyx + yyn])) 1569 { 1570 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1571 { 1572 yycount = 1; 1573 yysize = yysize0; 1574 break; 1575 } 1576 yyarg[yycount++] = yytname[yyx]; 1577 { 1578 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 1579 if (! (yysize <= yysize1 1580 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1581 return 2; 1582 yysize = yysize1; 1583 } 1584 } 1585 } 1586 } 1587 1588 switch (yycount) 1589 { 1590 # define YYCASE_(N, S) \ 1591 case N: \ 1592 yyformat = S; \ 1593 break 1594 YYCASE_(0, YY_("syntax error")); 1595 YYCASE_(1, YY_("syntax error, unexpected %s")); 1596 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1597 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1598 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1599 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1600 # undef YYCASE_ 1601 } 1602 1603 { 1604 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1605 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1606 return 2; 1607 yysize = yysize1; 1608 } 1609 1610 if (*yymsg_alloc < yysize) 1611 { 1612 *yymsg_alloc = 2 * yysize; 1613 if (! (yysize <= *yymsg_alloc 1614 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1615 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1616 return 1; 1617 } 1618 1619 /* Avoid sprintf, as that infringes on the user's name space. 1620 Don't have undefined behavior even if the translation 1621 produced a string with the wrong number of "%s"s. */ 1622 { 1623 char *yyp = *yymsg; 1624 int yyi = 0; 1625 while ((*yyp = *yyformat) != '\0') 1626 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1627 { 1628 yyp += yytnamerr (yyp, yyarg[yyi++]); 1629 yyformat += 2; 1630 } 1631 else 1632 { 1633 yyp++; 1634 yyformat++; 1635 } 1636 } 1637 return 0; 1638 } 1639 #endif /* YYERROR_VERBOSE */ 1640 1641 /*-----------------------------------------------. 1642 | Release the memory associated to this symbol. | 1643 `-----------------------------------------------*/ 1644 1645 static void 1646 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1647 { 1648 YYUSE (yyvaluep); 1649 if (!yymsg) 1650 yymsg = "Deleting"; 1651 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1652 1653 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1654 YYUSE (yytype); 1655 YY_IGNORE_MAYBE_UNINITIALIZED_END 1656 } 1657 1658 1659 1660 1661 /* The lookahead symbol. */ 1662 int yychar; 1663 1664 /* The semantic value of the lookahead symbol. */ 1665 YYSTYPE yylval; 1666 /* Number of syntax errors so far. */ 1667 int yynerrs; 1668 1669 1670 /*----------. 1671 | yyparse. | 1672 `----------*/ 1673 1674 int 1675 yyparse (void) 1676 { 1677 int yystate; 1678 /* Number of tokens to shift before error messages enabled. */ 1679 int yyerrstatus; 1680 1681 /* The stacks and their tools: 1682 'yyss': related to states. 1683 'yyvs': related to semantic values. 1684 1685 Refer to the stacks through separate pointers, to allow yyoverflow 1686 to reallocate them elsewhere. */ 1687 1688 /* The state stack. */ 1689 yytype_int16 yyssa[YYINITDEPTH]; 1690 yytype_int16 *yyss; 1691 yytype_int16 *yyssp; 1692 1693 /* The semantic value stack. */ 1694 YYSTYPE yyvsa[YYINITDEPTH]; 1695 YYSTYPE *yyvs; 1696 YYSTYPE *yyvsp; 1697 1698 YYSIZE_T yystacksize; 1699 1700 int yyn; 1701 int yyresult; 1702 /* Lookahead token as an internal (translated) token number. */ 1703 int yytoken = 0; 1704 /* The variables used to return semantic value and location from the 1705 action routines. */ 1706 YYSTYPE yyval; 1707 1708 #if YYERROR_VERBOSE 1709 /* Buffer for error messages, and its allocated size. */ 1710 char yymsgbuf[128]; 1711 char *yymsg = yymsgbuf; 1712 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1713 #endif 1714 1715 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1716 1717 /* The number of symbols on the RHS of the reduced rule. 1718 Keep to zero when no symbol should be popped. */ 1719 int yylen = 0; 1720 1721 yyssp = yyss = yyssa; 1722 yyvsp = yyvs = yyvsa; 1723 yystacksize = YYINITDEPTH; 1724 1725 YYDPRINTF ((stderr, "Starting parse\n")); 1726 1727 yystate = 0; 1728 yyerrstatus = 0; 1729 yynerrs = 0; 1730 yychar = YYEMPTY; /* Cause a token to be read. */ 1731 goto yysetstate; 1732 1733 /*------------------------------------------------------------. 1734 | yynewstate -- Push a new state, which is found in yystate. | 1735 `------------------------------------------------------------*/ 1736 yynewstate: 1737 /* In all cases, when you get here, the value and location stacks 1738 have just been pushed. So pushing a state here evens the stacks. */ 1739 yyssp++; 1740 1741 yysetstate: 1742 *yyssp = yystate; 1743 1744 if (yyss + yystacksize - 1 <= yyssp) 1745 { 1746 /* Get the current used size of the three stacks, in elements. */ 1747 YYSIZE_T yysize = yyssp - yyss + 1; 1748 1749 #ifdef yyoverflow 1750 { 1751 /* Give user a chance to reallocate the stack. Use copies of 1752 these so that the &'s don't force the real ones into 1753 memory. */ 1754 YYSTYPE *yyvs1 = yyvs; 1755 yytype_int16 *yyss1 = yyss; 1756 1757 /* Each stack pointer address is followed by the size of the 1758 data in use in that stack, in bytes. This used to be a 1759 conditional around just the two extra args, but that might 1760 be undefined if yyoverflow is a macro. */ 1761 yyoverflow (YY_("memory exhausted"), 1762 &yyss1, yysize * sizeof (*yyssp), 1763 &yyvs1, yysize * sizeof (*yyvsp), 1764 &yystacksize); 1765 1766 yyss = yyss1; 1767 yyvs = yyvs1; 1768 } 1769 #else /* no yyoverflow */ 1770 # ifndef YYSTACK_RELOCATE 1771 goto yyexhaustedlab; 1772 # else 1773 /* Extend the stack our own way. */ 1774 if (YYMAXDEPTH <= yystacksize) 1775 goto yyexhaustedlab; 1776 yystacksize *= 2; 1777 if (YYMAXDEPTH < yystacksize) 1778 yystacksize = YYMAXDEPTH; 1779 1780 { 1781 yytype_int16 *yyss1 = yyss; 1782 union yyalloc *yyptr = 1783 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1784 if (! yyptr) 1785 goto yyexhaustedlab; 1786 YYSTACK_RELOCATE (yyss_alloc, yyss); 1787 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1788 # undef YYSTACK_RELOCATE 1789 if (yyss1 != yyssa) 1790 YYSTACK_FREE (yyss1); 1791 } 1792 # endif 1793 #endif /* no yyoverflow */ 1794 1795 yyssp = yyss + yysize - 1; 1796 yyvsp = yyvs + yysize - 1; 1797 1798 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1799 (unsigned long int) yystacksize)); 1800 1801 if (yyss + yystacksize - 1 <= yyssp) 1802 YYABORT; 1803 } 1804 1805 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1806 1807 if (yystate == YYFINAL) 1808 YYACCEPT; 1809 1810 goto yybackup; 1811 1812 /*-----------. 1813 | yybackup. | 1814 `-----------*/ 1815 yybackup: 1816 1817 /* Do appropriate processing given the current state. Read a 1818 lookahead token if we need one and don't already have one. */ 1819 1820 /* First try to decide what to do without reference to lookahead token. */ 1821 yyn = yypact[yystate]; 1822 if (yypact_value_is_default (yyn)) 1823 goto yydefault; 1824 1825 /* Not known => get a lookahead token if don't already have one. */ 1826 1827 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1828 if (yychar == YYEMPTY) 1829 { 1830 YYDPRINTF ((stderr, "Reading a token: ")); 1831 yychar = yylex (); 1832 } 1833 1834 if (yychar <= YYEOF) 1835 { 1836 yychar = yytoken = YYEOF; 1837 YYDPRINTF ((stderr, "Now at end of input.\n")); 1838 } 1839 else 1840 { 1841 yytoken = YYTRANSLATE (yychar); 1842 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1843 } 1844 1845 /* If the proper action on seeing token YYTOKEN is to reduce or to 1846 detect an error, take that action. */ 1847 yyn += yytoken; 1848 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1849 goto yydefault; 1850 yyn = yytable[yyn]; 1851 if (yyn <= 0) 1852 { 1853 if (yytable_value_is_error (yyn)) 1854 goto yyerrlab; 1855 yyn = -yyn; 1856 goto yyreduce; 1857 } 1858 1859 /* Count tokens shifted since error; after three, turn off error 1860 status. */ 1861 if (yyerrstatus) 1862 yyerrstatus--; 1863 1864 /* Shift the lookahead token. */ 1865 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1866 1867 /* Discard the shifted token. */ 1868 yychar = YYEMPTY; 1869 1870 yystate = yyn; 1871 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1872 *++yyvsp = yylval; 1873 YY_IGNORE_MAYBE_UNINITIALIZED_END 1874 1875 goto yynewstate; 1876 1877 1878 /*-----------------------------------------------------------. 1879 | yydefault -- do the default action for the current state. | 1880 `-----------------------------------------------------------*/ 1881 yydefault: 1882 yyn = yydefact[yystate]; 1883 if (yyn == 0) 1884 goto yyerrlab; 1885 goto yyreduce; 1886 1887 1888 /*-----------------------------. 1889 | yyreduce -- Do a reduction. | 1890 `-----------------------------*/ 1891 yyreduce: 1892 /* yyn is the number of a rule to reduce with. */ 1893 yylen = yyr2[yyn]; 1894 1895 /* If YYLEN is nonzero, implement the default value of the action: 1896 '$$ = $1'. 1897 1898 Otherwise, the following line sets YYVAL to garbage. 1899 This behavior is undocumented and Bison 1900 users should not rely upon it. Assigning to YYVAL 1901 unconditionally makes the parser a bit smaller, and it avoids a 1902 GCC warning that YYVAL may be used uninitialized. */ 1903 yyval = yyvsp[1-yylen]; 1904 1905 1906 YY_REDUCE_PRINT (yyn); 1907 switch (yyn) 1908 { 1909 case 6: 1910 #line 98 "zparser.y" /* yacc.c:1646 */ 1911 {} 1912 #line 1913 "zparser.c" /* yacc.c:1646 */ 1913 break; 1914 1915 case 7: 1916 #line 100 "zparser.y" /* yacc.c:1646 */ 1917 { 1918 region_free_all(parser->rr_region); 1919 parser->current_rr.type = 0; 1920 parser->current_rr.rdata_count = 0; 1921 parser->current_rr.rdatas = parser->temporary_rdatas; 1922 parser->error_occurred = 0; 1923 } 1924 #line 1925 "zparser.c" /* yacc.c:1646 */ 1925 break; 1926 1927 case 8: 1928 #line 108 "zparser.y" /* yacc.c:1646 */ 1929 { 1930 region_free_all(parser->rr_region); 1931 parser->current_rr.type = 0; 1932 parser->current_rr.rdata_count = 0; 1933 parser->current_rr.rdatas = parser->temporary_rdatas; 1934 parser->error_occurred = 0; 1935 } 1936 #line 1937 "zparser.c" /* yacc.c:1646 */ 1937 break; 1938 1939 case 9: 1940 #line 116 "zparser.y" /* yacc.c:1646 */ 1941 { /* rr should be fully parsed */ 1942 if (!parser->error_occurred) { 1943 parser->current_rr.rdatas 1944 =(rdata_atom_type *)region_alloc_array_init( 1945 parser->region, 1946 parser->current_rr.rdatas, 1947 parser->current_rr.rdata_count, 1948 sizeof(rdata_atom_type)); 1949 1950 process_rr(); 1951 } 1952 1953 region_free_all(parser->rr_region); 1954 1955 parser->current_rr.type = 0; 1956 parser->current_rr.rdata_count = 0; 1957 parser->current_rr.rdatas = parser->temporary_rdatas; 1958 parser->error_occurred = 0; 1959 } 1960 #line 1961 "zparser.c" /* yacc.c:1646 */ 1961 break; 1962 1963 case 15: 1964 #line 148 "zparser.y" /* yacc.c:1646 */ 1965 { 1966 parser->default_ttl = zparser_ttl2int((yyvsp[-1].data).str, &(parser->error_occurred)); 1967 if (parser->error_occurred == 1) { 1968 parser->default_ttl = DEFAULT_TTL; 1969 parser->error_occurred = 0; 1970 } 1971 } 1972 #line 1973 "zparser.c" /* yacc.c:1646 */ 1973 break; 1974 1975 case 16: 1976 #line 158 "zparser.y" /* yacc.c:1646 */ 1977 { 1978 /* if previous origin is unused, remove it, do not leak it */ 1979 if(parser->origin != error_domain && parser->origin != (yyvsp[-1].domain)) { 1980 /* protect $3 from deletion, because deldomain walks up */ 1981 (yyvsp[-1].domain)->usage ++; 1982 domain_table_deldomain(parser->db, parser->origin); 1983 (yyvsp[-1].domain)->usage --; 1984 } 1985 parser->origin = (yyvsp[-1].domain); 1986 } 1987 #line 1988 "zparser.c" /* yacc.c:1646 */ 1988 break; 1989 1990 case 17: 1991 #line 169 "zparser.y" /* yacc.c:1646 */ 1992 { 1993 zc_error_prev_line("$ORIGIN directive requires absolute domain name"); 1994 } 1995 #line 1996 "zparser.c" /* yacc.c:1646 */ 1996 break; 1997 1998 case 18: 1999 #line 175 "zparser.y" /* yacc.c:1646 */ 2000 { 2001 parser->current_rr.owner = (yyvsp[-2].domain); 2002 parser->current_rr.type = (yyvsp[0].type); 2003 } 2004 #line 2005 "zparser.c" /* yacc.c:1646 */ 2005 break; 2006 2007 case 19: 2008 #line 182 "zparser.y" /* yacc.c:1646 */ 2009 { 2010 parser->prev_dname = (yyvsp[-1].domain); 2011 (yyval.domain) = (yyvsp[-1].domain); 2012 } 2013 #line 2014 "zparser.c" /* yacc.c:1646 */ 2014 break; 2015 2016 case 20: 2017 #line 187 "zparser.y" /* yacc.c:1646 */ 2018 { 2019 (yyval.domain) = parser->prev_dname; 2020 } 2021 #line 2022 "zparser.c" /* yacc.c:1646 */ 2022 break; 2023 2024 case 21: 2025 #line 193 "zparser.y" /* yacc.c:1646 */ 2026 { 2027 parser->current_rr.ttl = parser->default_ttl; 2028 parser->current_rr.klass = parser->default_class; 2029 } 2030 #line 2031 "zparser.c" /* yacc.c:1646 */ 2031 break; 2032 2033 case 22: 2034 #line 198 "zparser.y" /* yacc.c:1646 */ 2035 { 2036 parser->current_rr.ttl = parser->default_ttl; 2037 parser->current_rr.klass = (yyvsp[-1].klass); 2038 } 2039 #line 2040 "zparser.c" /* yacc.c:1646 */ 2040 break; 2041 2042 case 23: 2043 #line 203 "zparser.y" /* yacc.c:1646 */ 2044 { 2045 parser->current_rr.ttl = (yyvsp[-1].ttl); 2046 parser->current_rr.klass = parser->default_class; 2047 } 2048 #line 2049 "zparser.c" /* yacc.c:1646 */ 2049 break; 2050 2051 case 24: 2052 #line 208 "zparser.y" /* yacc.c:1646 */ 2053 { 2054 parser->current_rr.ttl = (yyvsp[-3].ttl); 2055 parser->current_rr.klass = (yyvsp[-1].klass); 2056 } 2057 #line 2058 "zparser.c" /* yacc.c:1646 */ 2058 break; 2059 2060 case 25: 2061 #line 213 "zparser.y" /* yacc.c:1646 */ 2062 { 2063 parser->current_rr.ttl = (yyvsp[-1].ttl); 2064 parser->current_rr.klass = (yyvsp[-3].klass); 2065 } 2066 #line 2067 "zparser.c" /* yacc.c:1646 */ 2067 break; 2068 2069 case 27: 2070 #line 221 "zparser.y" /* yacc.c:1646 */ 2071 { 2072 if ((yyvsp[0].dname) == error_dname) { 2073 (yyval.domain) = error_domain; 2074 } else if(parser->origin == error_domain) { 2075 zc_error("cannot concatenate origin to domain name, because origin failed to parse"); 2076 (yyval.domain) = error_domain; 2077 } else if ((yyvsp[0].dname)->name_size + domain_dname(parser->origin)->name_size - 1 > MAXDOMAINLEN) { 2078 zc_error("domain name exceeds %d character limit", MAXDOMAINLEN); 2079 (yyval.domain) = error_domain; 2080 } else { 2081 (yyval.domain) = domain_table_insert( 2082 parser->db->domains, 2083 dname_concatenate( 2084 parser->rr_region, 2085 (yyvsp[0].dname), 2086 domain_dname(parser->origin))); 2087 } 2088 } 2089 #line 2090 "zparser.c" /* yacc.c:1646 */ 2090 break; 2091 2092 case 28: 2093 #line 242 "zparser.y" /* yacc.c:1646 */ 2094 { 2095 (yyval.domain) = parser->db->domains->root; 2096 } 2097 #line 2098 "zparser.c" /* yacc.c:1646 */ 2098 break; 2099 2100 case 29: 2101 #line 246 "zparser.y" /* yacc.c:1646 */ 2102 { 2103 (yyval.domain) = parser->origin; 2104 } 2105 #line 2106 "zparser.c" /* yacc.c:1646 */ 2106 break; 2107 2108 case 30: 2109 #line 250 "zparser.y" /* yacc.c:1646 */ 2110 { 2111 if ((yyvsp[-1].dname) != error_dname) { 2112 (yyval.domain) = domain_table_insert(parser->db->domains, (yyvsp[-1].dname)); 2113 } else { 2114 (yyval.domain) = error_domain; 2115 } 2116 } 2117 #line 2118 "zparser.c" /* yacc.c:1646 */ 2118 break; 2119 2120 case 31: 2121 #line 260 "zparser.y" /* yacc.c:1646 */ 2122 { 2123 if ((yyvsp[0].data).len > MAXLABELLEN) { 2124 zc_error("label exceeds %d character limit", MAXLABELLEN); 2125 (yyval.dname) = error_dname; 2126 } else if ((yyvsp[0].data).len <= 0) { 2127 zc_error("zero label length"); 2128 (yyval.dname) = error_dname; 2129 } else { 2130 (yyval.dname) = dname_make_from_label(parser->rr_region, 2131 (uint8_t *) (yyvsp[0].data).str, 2132 (yyvsp[0].data).len); 2133 } 2134 } 2135 #line 2136 "zparser.c" /* yacc.c:1646 */ 2136 break; 2137 2138 case 32: 2139 #line 274 "zparser.y" /* yacc.c:1646 */ 2140 { 2141 zc_error("bitlabels are now deprecated. RFC2673 is obsoleted."); 2142 (yyval.dname) = error_dname; 2143 } 2144 #line 2145 "zparser.c" /* yacc.c:1646 */ 2145 break; 2146 2147 case 34: 2148 #line 282 "zparser.y" /* yacc.c:1646 */ 2149 { 2150 if ((yyvsp[-2].dname) == error_dname || (yyvsp[0].dname) == error_dname) { 2151 (yyval.dname) = error_dname; 2152 } else if ((yyvsp[-2].dname)->name_size + (yyvsp[0].dname)->name_size - 1 > MAXDOMAINLEN) { 2153 zc_error("domain name exceeds %d character limit", 2154 MAXDOMAINLEN); 2155 (yyval.dname) = error_dname; 2156 } else { 2157 (yyval.dname) = dname_concatenate(parser->rr_region, (yyvsp[-2].dname), (yyvsp[0].dname)); 2158 } 2159 } 2160 #line 2161 "zparser.c" /* yacc.c:1646 */ 2161 break; 2162 2163 case 37: 2164 #line 304 "zparser.y" /* yacc.c:1646 */ 2165 { 2166 char *result = (char *) region_alloc(parser->rr_region, 2); 2167 result[0] = 0; 2168 result[1] = '\0'; 2169 (yyval.data).str = result; 2170 (yyval.data).len = 1; 2171 } 2172 #line 2173 "zparser.c" /* yacc.c:1646 */ 2173 break; 2174 2175 case 38: 2176 #line 312 "zparser.y" /* yacc.c:1646 */ 2177 { 2178 char *result = (char *) region_alloc(parser->rr_region, 2179 (yyvsp[-1].data).len + 2); 2180 memcpy(result, (yyvsp[-1].data).str, (yyvsp[-1].data).len); 2181 result[(yyvsp[-1].data).len] = 0; 2182 result[(yyvsp[-1].data).len+1] = '\0'; 2183 (yyval.data).str = result; 2184 (yyval.data).len = (yyvsp[-1].data).len + 1; 2185 } 2186 #line 2187 "zparser.c" /* yacc.c:1646 */ 2187 break; 2188 2189 case 39: 2190 #line 324 "zparser.y" /* yacc.c:1646 */ 2191 { 2192 char *result = (char *) region_alloc(parser->rr_region, 2193 (yyvsp[0].data).len + 1); 2194 2195 if ((yyvsp[0].data).len > MAXLABELLEN) 2196 zc_error("label exceeds %d character limit", MAXLABELLEN); 2197 2198 /* make label anyway */ 2199 result[0] = (yyvsp[0].data).len; 2200 memcpy(result+1, (yyvsp[0].data).str, (yyvsp[0].data).len); 2201 2202 (yyval.data).str = result; 2203 (yyval.data).len = (yyvsp[0].data).len + 1; 2204 } 2205 #line 2206 "zparser.c" /* yacc.c:1646 */ 2206 break; 2207 2208 case 41: 2209 #line 342 "zparser.y" /* yacc.c:1646 */ 2210 { 2211 if ((yyvsp[-2].data).len + (yyvsp[0].data).len - 3 > MAXDOMAINLEN) 2212 zc_error("domain name exceeds %d character limit", 2213 MAXDOMAINLEN); 2214 2215 /* make dname anyway */ 2216 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; 2217 (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); 2218 memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2219 memcpy((yyval.data).str + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); 2220 (yyval.data).str[(yyval.data).len] = '\0'; 2221 } 2222 #line 2223 "zparser.c" /* yacc.c:1646 */ 2223 break; 2224 2225 case 42: 2226 #line 357 "zparser.y" /* yacc.c:1646 */ 2227 { 2228 zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, (yyvsp[0].data).str, (yyvsp[0].data).len), 1); 2229 } 2230 #line 2231 "zparser.c" /* yacc.c:1646 */ 2231 break; 2232 2233 case 43: 2234 #line 361 "zparser.y" /* yacc.c:1646 */ 2235 { 2236 zadd_rdata_txt_wireformat(zparser_conv_text(parser->rr_region, (yyvsp[0].data).str, (yyvsp[0].data).len), 0); 2237 } 2238 #line 2239 "zparser.c" /* yacc.c:1646 */ 2239 break; 2240 2241 case 45: 2242 #line 372 "zparser.y" /* yacc.c:1646 */ 2243 { 2244 (yyval.data).len = 1; 2245 (yyval.data).str = region_strdup(parser->rr_region, "."); 2246 } 2247 #line 2248 "zparser.c" /* yacc.c:1646 */ 2248 break; 2249 2250 case 46: 2251 #line 377 "zparser.y" /* yacc.c:1646 */ 2252 { 2253 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; 2254 (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); 2255 memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2256 memcpy((yyval.data).str + (yyvsp[-2].data).len, " ", 1); 2257 memcpy((yyval.data).str + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); 2258 (yyval.data).str[(yyval.data).len] = '\0'; 2259 } 2260 #line 2261 "zparser.c" /* yacc.c:1646 */ 2261 break; 2262 2263 case 47: 2264 #line 386 "zparser.y" /* yacc.c:1646 */ 2265 { 2266 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; 2267 (yyval.data).str = (char *) region_alloc(parser->rr_region, (yyval.data).len + 1); 2268 memcpy((yyval.data).str, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2269 memcpy((yyval.data).str + (yyvsp[-2].data).len, ".", 1); 2270 memcpy((yyval.data).str + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); 2271 (yyval.data).str[(yyval.data).len] = '\0'; 2272 } 2273 #line 2274 "zparser.c" /* yacc.c:1646 */ 2274 break; 2275 2276 case 48: 2277 #line 398 "zparser.y" /* yacc.c:1646 */ 2278 { 2279 uint16_t type = rrtype_from_string((yyvsp[0].data).str); 2280 if (type != 0 && type < 128) { 2281 set_bit(nxtbits, type); 2282 } else { 2283 zc_error("bad type %d in NXT record", (int) type); 2284 } 2285 } 2286 #line 2287 "zparser.c" /* yacc.c:1646 */ 2287 break; 2288 2289 case 49: 2290 #line 407 "zparser.y" /* yacc.c:1646 */ 2291 { 2292 uint16_t type = rrtype_from_string((yyvsp[0].data).str); 2293 if (type != 0 && type < 128) { 2294 set_bit(nxtbits, type); 2295 } else { 2296 zc_error("bad type %d in NXT record", (int) type); 2297 } 2298 } 2299 #line 2300 "zparser.c" /* yacc.c:1646 */ 2300 break; 2301 2302 case 50: 2303 #line 418 "zparser.y" /* yacc.c:1646 */ 2304 { 2305 } 2306 #line 2307 "zparser.c" /* yacc.c:1646 */ 2307 break; 2308 2309 case 51: 2310 #line 421 "zparser.y" /* yacc.c:1646 */ 2311 { 2312 } 2313 #line 2314 "zparser.c" /* yacc.c:1646 */ 2314 break; 2315 2316 case 52: 2317 #line 424 "zparser.y" /* yacc.c:1646 */ 2318 { 2319 uint16_t type = rrtype_from_string((yyvsp[-1].data).str); 2320 if (type != 0) { 2321 if (type > nsec_highest_rcode) { 2322 nsec_highest_rcode = type; 2323 } 2324 set_bitnsec(nsecbits, type); 2325 } else { 2326 zc_error("bad type %d in NSEC record", (int) type); 2327 } 2328 } 2329 #line 2330 "zparser.c" /* yacc.c:1646 */ 2330 break; 2331 2332 case 56: 2333 #line 447 "zparser.y" /* yacc.c:1646 */ 2334 { 2335 char *result = (char *) region_alloc(parser->rr_region, 2336 (yyvsp[-2].data).len + (yyvsp[0].data).len + 1); 2337 memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2338 memcpy(result + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); 2339 (yyval.data).str = result; 2340 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; 2341 (yyval.data).str[(yyval.data).len] = '\0'; 2342 } 2343 #line 2344 "zparser.c" /* yacc.c:1646 */ 2344 break; 2345 2346 case 58: 2347 #line 464 "zparser.y" /* yacc.c:1646 */ 2348 { 2349 char *result = (char *) region_alloc(parser->rr_region, 2350 (yyvsp[-2].data).len + (yyvsp[0].data).len + 1); 2351 memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2352 memcpy(result + (yyvsp[-2].data).len, (yyvsp[0].data).str, (yyvsp[0].data).len); 2353 (yyval.data).str = result; 2354 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len; 2355 (yyval.data).str[(yyval.data).len] = '\0'; 2356 } 2357 #line 2358 "zparser.c" /* yacc.c:1646 */ 2358 break; 2359 2360 case 60: 2361 #line 480 "zparser.y" /* yacc.c:1646 */ 2362 { 2363 (yyval.data).str = "."; 2364 (yyval.data).len = 1; 2365 } 2366 #line 2367 "zparser.c" /* yacc.c:1646 */ 2367 break; 2368 2369 case 61: 2370 #line 485 "zparser.y" /* yacc.c:1646 */ 2371 { 2372 char *result = (char *) region_alloc(parser->rr_region, 2373 (yyvsp[-1].data).len + 2); 2374 memcpy(result, (yyvsp[-1].data).str, (yyvsp[-1].data).len); 2375 result[(yyvsp[-1].data).len] = '.'; 2376 (yyval.data).str = result; 2377 (yyval.data).len = (yyvsp[-1].data).len + 1; 2378 (yyval.data).str[(yyval.data).len] = '\0'; 2379 } 2380 #line 2381 "zparser.c" /* yacc.c:1646 */ 2381 break; 2382 2383 case 62: 2384 #line 495 "zparser.y" /* yacc.c:1646 */ 2385 { 2386 char *result = (char *) region_alloc(parser->rr_region, 2387 (yyvsp[-2].data).len + (yyvsp[0].data).len + 2); 2388 memcpy(result, (yyvsp[-2].data).str, (yyvsp[-2].data).len); 2389 result[(yyvsp[-2].data).len] = '.'; 2390 memcpy(result + (yyvsp[-2].data).len + 1, (yyvsp[0].data).str, (yyvsp[0].data).len); 2391 (yyval.data).str = result; 2392 (yyval.data).len = (yyvsp[-2].data).len + (yyvsp[0].data).len + 1; 2393 (yyval.data).str[(yyval.data).len] = '\0'; 2394 } 2395 #line 2396 "zparser.c" /* yacc.c:1646 */ 2396 break; 2397 2398 case 64: 2399 #line 513 "zparser.y" /* yacc.c:1646 */ 2400 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2401 #line 2402 "zparser.c" /* yacc.c:1646 */ 2402 break; 2403 2404 case 66: 2405 #line 515 "zparser.y" /* yacc.c:1646 */ 2406 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2407 #line 2408 "zparser.c" /* yacc.c:1646 */ 2408 break; 2409 2410 case 67: 2411 #line 516 "zparser.y" /* yacc.c:1646 */ 2412 { zc_warning_prev_line("MD is obsolete"); } 2413 #line 2414 "zparser.c" /* yacc.c:1646 */ 2414 break; 2415 2416 case 68: 2417 #line 518 "zparser.y" /* yacc.c:1646 */ 2418 { 2419 zc_warning_prev_line("MD is obsolete"); 2420 (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); 2421 } 2422 #line 2423 "zparser.c" /* yacc.c:1646 */ 2423 break; 2424 2425 case 69: 2426 #line 522 "zparser.y" /* yacc.c:1646 */ 2427 { zc_warning_prev_line("MF is obsolete"); } 2428 #line 2429 "zparser.c" /* yacc.c:1646 */ 2429 break; 2430 2431 case 70: 2432 #line 524 "zparser.y" /* yacc.c:1646 */ 2433 { 2434 zc_warning_prev_line("MF is obsolete"); 2435 (yyval.type) = (yyvsp[-2].type); 2436 parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); 2437 } 2438 #line 2439 "zparser.c" /* yacc.c:1646 */ 2439 break; 2440 2441 case 72: 2442 #line 530 "zparser.y" /* yacc.c:1646 */ 2443 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2444 #line 2445 "zparser.c" /* yacc.c:1646 */ 2445 break; 2446 2447 case 74: 2448 #line 532 "zparser.y" /* yacc.c:1646 */ 2449 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2450 #line 2451 "zparser.c" /* yacc.c:1646 */ 2451 break; 2452 2453 case 75: 2454 #line 533 "zparser.y" /* yacc.c:1646 */ 2455 { zc_warning_prev_line("MB is obsolete"); } 2456 #line 2457 "zparser.c" /* yacc.c:1646 */ 2457 break; 2458 2459 case 76: 2460 #line 535 "zparser.y" /* yacc.c:1646 */ 2461 { 2462 zc_warning_prev_line("MB is obsolete"); 2463 (yyval.type) = (yyvsp[-2].type); 2464 parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); 2465 } 2466 #line 2467 "zparser.c" /* yacc.c:1646 */ 2467 break; 2468 2469 case 78: 2470 #line 541 "zparser.y" /* yacc.c:1646 */ 2471 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2472 #line 2473 "zparser.c" /* yacc.c:1646 */ 2473 break; 2474 2475 case 80: 2476 #line 543 "zparser.y" /* yacc.c:1646 */ 2477 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2478 #line 2479 "zparser.c" /* yacc.c:1646 */ 2479 break; 2480 2481 case 82: 2482 #line 546 "zparser.y" /* yacc.c:1646 */ 2483 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2484 #line 2485 "zparser.c" /* yacc.c:1646 */ 2485 break; 2486 2487 case 84: 2488 #line 548 "zparser.y" /* yacc.c:1646 */ 2489 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2490 #line 2491 "zparser.c" /* yacc.c:1646 */ 2491 break; 2492 2493 case 86: 2494 #line 550 "zparser.y" /* yacc.c:1646 */ 2495 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2496 #line 2497 "zparser.c" /* yacc.c:1646 */ 2497 break; 2498 2499 case 88: 2500 #line 552 "zparser.y" /* yacc.c:1646 */ 2501 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2502 #line 2503 "zparser.c" /* yacc.c:1646 */ 2503 break; 2504 2505 case 90: 2506 #line 554 "zparser.y" /* yacc.c:1646 */ 2507 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2508 #line 2509 "zparser.c" /* yacc.c:1646 */ 2509 break; 2510 2511 case 92: 2512 #line 556 "zparser.y" /* yacc.c:1646 */ 2513 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2514 #line 2515 "zparser.c" /* yacc.c:1646 */ 2515 break; 2516 2517 case 94: 2518 #line 558 "zparser.y" /* yacc.c:1646 */ 2519 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2520 #line 2521 "zparser.c" /* yacc.c:1646 */ 2521 break; 2522 2523 case 96: 2524 #line 560 "zparser.y" /* yacc.c:1646 */ 2525 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2526 #line 2527 "zparser.c" /* yacc.c:1646 */ 2527 break; 2528 2529 case 98: 2530 #line 562 "zparser.y" /* yacc.c:1646 */ 2531 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2532 #line 2533 "zparser.c" /* yacc.c:1646 */ 2533 break; 2534 2535 case 100: 2536 #line 564 "zparser.y" /* yacc.c:1646 */ 2537 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2538 #line 2539 "zparser.c" /* yacc.c:1646 */ 2539 break; 2540 2541 case 102: 2542 #line 566 "zparser.y" /* yacc.c:1646 */ 2543 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2544 #line 2545 "zparser.c" /* yacc.c:1646 */ 2545 break; 2546 2547 case 104: 2548 #line 568 "zparser.y" /* yacc.c:1646 */ 2549 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2550 #line 2551 "zparser.c" /* yacc.c:1646 */ 2551 break; 2552 2553 case 106: 2554 #line 570 "zparser.y" /* yacc.c:1646 */ 2555 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2556 #line 2557 "zparser.c" /* yacc.c:1646 */ 2557 break; 2558 2559 case 108: 2560 #line 572 "zparser.y" /* yacc.c:1646 */ 2561 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2562 #line 2563 "zparser.c" /* yacc.c:1646 */ 2563 break; 2564 2565 case 110: 2566 #line 574 "zparser.y" /* yacc.c:1646 */ 2567 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2568 #line 2569 "zparser.c" /* yacc.c:1646 */ 2569 break; 2570 2571 case 112: 2572 #line 576 "zparser.y" /* yacc.c:1646 */ 2573 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2574 #line 2575 "zparser.c" /* yacc.c:1646 */ 2575 break; 2576 2577 case 114: 2578 #line 578 "zparser.y" /* yacc.c:1646 */ 2579 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2580 #line 2581 "zparser.c" /* yacc.c:1646 */ 2581 break; 2582 2583 case 116: 2584 #line 580 "zparser.y" /* yacc.c:1646 */ 2585 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2586 #line 2587 "zparser.c" /* yacc.c:1646 */ 2587 break; 2588 2589 case 118: 2590 #line 582 "zparser.y" /* yacc.c:1646 */ 2591 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2592 #line 2593 "zparser.c" /* yacc.c:1646 */ 2593 break; 2594 2595 case 120: 2596 #line 584 "zparser.y" /* yacc.c:1646 */ 2597 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2598 #line 2599 "zparser.c" /* yacc.c:1646 */ 2599 break; 2600 2601 case 122: 2602 #line 586 "zparser.y" /* yacc.c:1646 */ 2603 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2604 #line 2605 "zparser.c" /* yacc.c:1646 */ 2605 break; 2606 2607 case 124: 2608 #line 588 "zparser.y" /* yacc.c:1646 */ 2609 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2610 #line 2611 "zparser.c" /* yacc.c:1646 */ 2611 break; 2612 2613 case 126: 2614 #line 590 "zparser.y" /* yacc.c:1646 */ 2615 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2616 #line 2617 "zparser.c" /* yacc.c:1646 */ 2617 break; 2618 2619 case 128: 2620 #line 592 "zparser.y" /* yacc.c:1646 */ 2621 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2622 #line 2623 "zparser.c" /* yacc.c:1646 */ 2623 break; 2624 2625 case 130: 2626 #line 594 "zparser.y" /* yacc.c:1646 */ 2627 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2628 #line 2629 "zparser.c" /* yacc.c:1646 */ 2629 break; 2630 2631 case 132: 2632 #line 596 "zparser.y" /* yacc.c:1646 */ 2633 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2634 #line 2635 "zparser.c" /* yacc.c:1646 */ 2635 break; 2636 2637 case 134: 2638 #line 598 "zparser.y" /* yacc.c:1646 */ 2639 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2640 #line 2641 "zparser.c" /* yacc.c:1646 */ 2641 break; 2642 2643 case 137: 2644 #line 601 "zparser.y" /* yacc.c:1646 */ 2645 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2646 #line 2647 "zparser.c" /* yacc.c:1646 */ 2647 break; 2648 2649 case 139: 2650 #line 603 "zparser.y" /* yacc.c:1646 */ 2651 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2652 #line 2653 "zparser.c" /* yacc.c:1646 */ 2653 break; 2654 2655 case 140: 2656 #line 604 "zparser.y" /* yacc.c:1646 */ 2657 { if (dlv_warn) { dlv_warn = 0; zc_warning_prev_line("DLV is experimental"); } } 2658 #line 2659 "zparser.c" /* yacc.c:1646 */ 2659 break; 2660 2661 case 141: 2662 #line 605 "zparser.y" /* yacc.c:1646 */ 2663 { if (dlv_warn) { dlv_warn = 0; zc_warning_prev_line("DLV is experimental"); } (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2664 #line 2665 "zparser.c" /* yacc.c:1646 */ 2665 break; 2666 2667 case 143: 2668 #line 607 "zparser.y" /* yacc.c:1646 */ 2669 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2670 #line 2671 "zparser.c" /* yacc.c:1646 */ 2671 break; 2672 2673 case 145: 2674 #line 609 "zparser.y" /* yacc.c:1646 */ 2675 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2676 #line 2677 "zparser.c" /* yacc.c:1646 */ 2677 break; 2678 2679 case 147: 2680 #line 611 "zparser.y" /* yacc.c:1646 */ 2681 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2682 #line 2683 "zparser.c" /* yacc.c:1646 */ 2683 break; 2684 2685 case 149: 2686 #line 613 "zparser.y" /* yacc.c:1646 */ 2687 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2688 #line 2689 "zparser.c" /* yacc.c:1646 */ 2689 break; 2690 2691 case 151: 2692 #line 615 "zparser.y" /* yacc.c:1646 */ 2693 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2694 #line 2695 "zparser.c" /* yacc.c:1646 */ 2695 break; 2696 2697 case 153: 2698 #line 617 "zparser.y" /* yacc.c:1646 */ 2699 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2700 #line 2701 "zparser.c" /* yacc.c:1646 */ 2701 break; 2702 2703 case 155: 2704 #line 619 "zparser.y" /* yacc.c:1646 */ 2705 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2706 #line 2707 "zparser.c" /* yacc.c:1646 */ 2707 break; 2708 2709 case 157: 2710 #line 621 "zparser.y" /* yacc.c:1646 */ 2711 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2712 #line 2713 "zparser.c" /* yacc.c:1646 */ 2713 break; 2714 2715 case 159: 2716 #line 623 "zparser.y" /* yacc.c:1646 */ 2717 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2718 #line 2719 "zparser.c" /* yacc.c:1646 */ 2719 break; 2720 2721 case 161: 2722 #line 625 "zparser.y" /* yacc.c:1646 */ 2723 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2724 #line 2725 "zparser.c" /* yacc.c:1646 */ 2725 break; 2726 2727 case 163: 2728 #line 627 "zparser.y" /* yacc.c:1646 */ 2729 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2730 #line 2731 "zparser.c" /* yacc.c:1646 */ 2731 break; 2732 2733 case 165: 2734 #line 629 "zparser.y" /* yacc.c:1646 */ 2735 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2736 #line 2737 "zparser.c" /* yacc.c:1646 */ 2737 break; 2738 2739 case 167: 2740 #line 631 "zparser.y" /* yacc.c:1646 */ 2741 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2742 #line 2743 "zparser.c" /* yacc.c:1646 */ 2743 break; 2744 2745 case 169: 2746 #line 633 "zparser.y" /* yacc.c:1646 */ 2747 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2748 #line 2749 "zparser.c" /* yacc.c:1646 */ 2749 break; 2750 2751 case 171: 2752 #line 635 "zparser.y" /* yacc.c:1646 */ 2753 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2754 #line 2755 "zparser.c" /* yacc.c:1646 */ 2755 break; 2756 2757 case 173: 2758 #line 637 "zparser.y" /* yacc.c:1646 */ 2759 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2760 #line 2761 "zparser.c" /* yacc.c:1646 */ 2761 break; 2762 2763 case 175: 2764 #line 639 "zparser.y" /* yacc.c:1646 */ 2765 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2766 #line 2767 "zparser.c" /* yacc.c:1646 */ 2767 break; 2768 2769 case 177: 2770 #line 641 "zparser.y" /* yacc.c:1646 */ 2771 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2772 #line 2773 "zparser.c" /* yacc.c:1646 */ 2773 break; 2774 2775 case 179: 2776 #line 643 "zparser.y" /* yacc.c:1646 */ 2777 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2778 #line 2779 "zparser.c" /* yacc.c:1646 */ 2779 break; 2780 2781 case 180: 2782 #line 644 "zparser.y" /* yacc.c:1646 */ 2783 { (yyval.type) = (yyvsp[-2].type); parse_unknown_rdata((yyvsp[-2].type), (yyvsp[0].unknown)); } 2784 #line 2785 "zparser.c" /* yacc.c:1646 */ 2785 break; 2786 2787 case 181: 2788 #line 646 "zparser.y" /* yacc.c:1646 */ 2789 { 2790 zc_error_prev_line("unrecognized RR type '%s'", (yyvsp[-2].data).str); 2791 } 2792 #line 2793 "zparser.c" /* yacc.c:1646 */ 2793 break; 2794 2795 case 182: 2796 #line 658 "zparser.y" /* yacc.c:1646 */ 2797 { 2798 zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-1].data).str)); 2799 } 2800 #line 2801 "zparser.c" /* yacc.c:1646 */ 2801 break; 2802 2803 case 183: 2804 #line 664 "zparser.y" /* yacc.c:1646 */ 2805 { 2806 /* convert a single dname record */ 2807 zadd_rdata_domain((yyvsp[-1].domain)); 2808 } 2809 #line 2810 "zparser.c" /* yacc.c:1646 */ 2810 break; 2811 2812 case 184: 2813 #line 671 "zparser.y" /* yacc.c:1646 */ 2814 { 2815 /* convert the soa data */ 2816 zadd_rdata_domain((yyvsp[-13].domain)); /* prim. ns */ 2817 zadd_rdata_domain((yyvsp[-11].domain)); /* email */ 2818 zadd_rdata_wireformat(zparser_conv_serial(parser->region, (yyvsp[-9].data).str)); /* serial */ 2819 zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-7].data).str)); /* refresh */ 2820 zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-5].data).str)); /* retry */ 2821 zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-3].data).str)); /* expire */ 2822 zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-1].data).str)); /* minimum */ 2823 } 2824 #line 2825 "zparser.c" /* yacc.c:1646 */ 2825 break; 2826 2827 case 185: 2828 #line 684 "zparser.y" /* yacc.c:1646 */ 2829 { 2830 zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-5].data).str)); /* address */ 2831 zadd_rdata_wireformat(zparser_conv_services(parser->region, (yyvsp[-3].data).str, (yyvsp[-1].data).str)); /* protocol and services */ 2832 } 2833 #line 2834 "zparser.c" /* yacc.c:1646 */ 2834 break; 2835 2836 case 186: 2837 #line 691 "zparser.y" /* yacc.c:1646 */ 2838 { 2839 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* CPU */ 2840 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* OS*/ 2841 } 2842 #line 2843 "zparser.c" /* yacc.c:1646 */ 2843 break; 2844 2845 case 187: 2846 #line 698 "zparser.y" /* yacc.c:1646 */ 2847 { 2848 /* convert a single dname record */ 2849 zadd_rdata_domain((yyvsp[-3].domain)); 2850 zadd_rdata_domain((yyvsp[-1].domain)); 2851 } 2852 #line 2853 "zparser.c" /* yacc.c:1646 */ 2853 break; 2854 2855 case 188: 2856 #line 706 "zparser.y" /* yacc.c:1646 */ 2857 { 2858 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* priority */ 2859 zadd_rdata_domain((yyvsp[-1].domain)); /* MX host */ 2860 } 2861 #line 2862 "zparser.c" /* yacc.c:1646 */ 2862 break; 2863 2864 case 189: 2865 #line 713 "zparser.y" /* yacc.c:1646 */ 2866 { 2867 zadd_rdata_txt_clean_wireformat(); 2868 } 2869 #line 2870 "zparser.c" /* yacc.c:1646 */ 2870 break; 2871 2872 case 190: 2873 #line 720 "zparser.y" /* yacc.c:1646 */ 2874 { 2875 zadd_rdata_domain((yyvsp[-3].domain)); /* mbox d-name */ 2876 zadd_rdata_domain((yyvsp[-1].domain)); /* txt d-name */ 2877 } 2878 #line 2879 "zparser.c" /* yacc.c:1646 */ 2879 break; 2880 2881 case 191: 2882 #line 728 "zparser.y" /* yacc.c:1646 */ 2883 { 2884 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* subtype */ 2885 zadd_rdata_domain((yyvsp[-1].domain)); /* domain name */ 2886 } 2887 #line 2888 "zparser.c" /* yacc.c:1646 */ 2888 break; 2889 2890 case 192: 2891 #line 736 "zparser.y" /* yacc.c:1646 */ 2892 { 2893 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* X.25 address. */ 2894 } 2895 #line 2896 "zparser.c" /* yacc.c:1646 */ 2896 break; 2897 2898 case 193: 2899 #line 743 "zparser.y" /* yacc.c:1646 */ 2900 { 2901 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* address */ 2902 } 2903 #line 2904 "zparser.c" /* yacc.c:1646 */ 2904 break; 2905 2906 case 194: 2907 #line 747 "zparser.y" /* yacc.c:1646 */ 2908 { 2909 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* address */ 2910 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* sub-address */ 2911 } 2912 #line 2913 "zparser.c" /* yacc.c:1646 */ 2913 break; 2914 2915 case 195: 2916 #line 755 "zparser.y" /* yacc.c:1646 */ 2917 { 2918 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 2919 zadd_rdata_domain((yyvsp[-1].domain)); /* intermediate host */ 2920 } 2921 #line 2922 "zparser.c" /* yacc.c:1646 */ 2922 break; 2923 2924 case 196: 2925 #line 763 "zparser.y" /* yacc.c:1646 */ 2926 { 2927 /* String must start with "0x" or "0X". */ 2928 if (strncasecmp((yyvsp[-1].data).str, "0x", 2) != 0) { 2929 zc_error_prev_line("NSAP rdata must start with '0x'"); 2930 } else { 2931 zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str + 2, (yyvsp[-1].data).len - 2)); /* NSAP */ 2932 } 2933 } 2934 #line 2935 "zparser.c" /* yacc.c:1646 */ 2935 break; 2936 2937 case 197: 2938 #line 775 "zparser.y" /* yacc.c:1646 */ 2939 { 2940 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* preference */ 2941 zadd_rdata_domain((yyvsp[-3].domain)); /* MAP822 */ 2942 zadd_rdata_domain((yyvsp[-1].domain)); /* MAPX400 */ 2943 } 2944 #line 2945 "zparser.c" /* yacc.c:1646 */ 2945 break; 2946 2947 case 198: 2948 #line 783 "zparser.y" /* yacc.c:1646 */ 2949 { 2950 zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, (yyvsp[-1].data).str)); /* IPv6 address */ 2951 } 2952 #line 2953 "zparser.c" /* yacc.c:1646 */ 2953 break; 2954 2955 case 199: 2956 #line 789 "zparser.y" /* yacc.c:1646 */ 2957 { 2958 zadd_rdata_wireformat(zparser_conv_loc(parser->region, (yyvsp[-1].data).str)); /* Location */ 2959 } 2960 #line 2961 "zparser.c" /* yacc.c:1646 */ 2961 break; 2962 2963 case 200: 2964 #line 795 "zparser.y" /* yacc.c:1646 */ 2965 { 2966 zadd_rdata_domain((yyvsp[-3].domain)); /* nxt name */ 2967 zadd_rdata_wireformat(zparser_conv_nxt(parser->region, nxtbits)); /* nxt bitlist */ 2968 memset(nxtbits, 0, sizeof(nxtbits)); 2969 } 2970 #line 2971 "zparser.c" /* yacc.c:1646 */ 2971 break; 2972 2973 case 201: 2974 #line 803 "zparser.y" /* yacc.c:1646 */ 2975 { 2976 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* prio */ 2977 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* weight */ 2978 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* port */ 2979 zadd_rdata_domain((yyvsp[-1].domain)); /* target name */ 2980 } 2981 #line 2982 "zparser.c" /* yacc.c:1646 */ 2982 break; 2983 2984 case 202: 2985 #line 813 "zparser.y" /* yacc.c:1646 */ 2986 { 2987 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-11].data).str)); /* order */ 2988 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-9].data).str)); /* preference */ 2989 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-7].data).str, (yyvsp[-7].data).len)); /* flags */ 2990 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-5].data).str, (yyvsp[-5].data).len)); /* service */ 2991 zadd_rdata_wireformat(zparser_conv_text(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* regexp */ 2992 zadd_rdata_domain((yyvsp[-1].domain)); /* target name */ 2993 } 2994 #line 2995 "zparser.c" /* yacc.c:1646 */ 2995 break; 2996 2997 case 203: 2998 #line 825 "zparser.y" /* yacc.c:1646 */ 2999 { 3000 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 3001 zadd_rdata_domain((yyvsp[-1].domain)); /* exchanger */ 3002 } 3003 #line 3004 "zparser.c" /* yacc.c:1646 */ 3004 break; 3005 3006 case 204: 3007 #line 833 "zparser.y" /* yacc.c:1646 */ 3008 { 3009 zadd_rdata_wireformat(zparser_conv_certificate_type(parser->region, (yyvsp[-7].data).str)); /* type */ 3010 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* key tag */ 3011 zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-3].data).str)); /* algorithm */ 3012 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* certificate or CRL */ 3013 } 3014 #line 3015 "zparser.c" /* yacc.c:1646 */ 3015 break; 3016 3017 case 206: 3018 #line 846 "zparser.y" /* yacc.c:1646 */ 3019 { 3020 zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, (yyvsp[0].data).str)); 3021 } 3022 #line 3023 "zparser.c" /* yacc.c:1646 */ 3023 break; 3024 3025 case 207: 3026 #line 850 "zparser.y" /* yacc.c:1646 */ 3027 { 3028 zadd_rdata_wireformat(zparser_conv_apl_rdata(parser->region, (yyvsp[0].data).str)); 3029 } 3030 #line 3031 "zparser.c" /* yacc.c:1646 */ 3031 break; 3032 3033 case 208: 3034 #line 856 "zparser.y" /* yacc.c:1646 */ 3035 { 3036 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* keytag */ 3037 zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-5].data).str)); /* alg */ 3038 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* type */ 3039 zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ 3040 } 3041 #line 3042 "zparser.c" /* yacc.c:1646 */ 3042 break; 3043 3044 case 209: 3045 #line 865 "zparser.y" /* yacc.c:1646 */ 3046 { 3047 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* keytag */ 3048 zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-5].data).str)); /* alg */ 3049 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* type */ 3050 zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ 3051 } 3052 #line 3053 "zparser.c" /* yacc.c:1646 */ 3053 break; 3054 3055 case 210: 3056 #line 874 "zparser.y" /* yacc.c:1646 */ 3057 { 3058 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* alg */ 3059 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* fp type */ 3060 zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* hash */ 3061 } 3062 #line 3063 "zparser.c" /* yacc.c:1646 */ 3063 break; 3064 3065 case 211: 3066 #line 882 "zparser.y" /* yacc.c:1646 */ 3067 { 3068 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* data blob */ 3069 } 3070 #line 3071 "zparser.c" /* yacc.c:1646 */ 3071 break; 3072 3073 case 212: 3074 #line 888 "zparser.y" /* yacc.c:1646 */ 3075 { 3076 zadd_rdata_wireformat(zparser_conv_rrtype(parser->region, (yyvsp[-17].data).str)); /* rr covered */ 3077 zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-15].data).str)); /* alg */ 3078 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-13].data).str)); /* # labels */ 3079 zadd_rdata_wireformat(zparser_conv_period(parser->region, (yyvsp[-11].data).str)); /* # orig TTL */ 3080 zadd_rdata_wireformat(zparser_conv_time(parser->region, (yyvsp[-9].data).str)); /* sig exp */ 3081 zadd_rdata_wireformat(zparser_conv_time(parser->region, (yyvsp[-7].data).str)); /* sig inc */ 3082 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* key id */ 3083 zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, 3084 (const uint8_t*) (yyvsp[-3].data).str,(yyvsp[-3].data).len)); /* sig name */ 3085 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* sig data */ 3086 } 3087 #line 3088 "zparser.c" /* yacc.c:1646 */ 3088 break; 3089 3090 case 213: 3091 #line 903 "zparser.y" /* yacc.c:1646 */ 3092 { 3093 zadd_rdata_wireformat(zparser_conv_dns_name(parser->region, 3094 (const uint8_t*) (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* nsec name */ 3095 zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ 3096 memset(nsecbits, 0, sizeof(nsecbits)); 3097 nsec_highest_rcode = 0; 3098 } 3099 #line 3100 "zparser.c" /* yacc.c:1646 */ 3100 break; 3101 3102 case 214: 3103 #line 913 "zparser.y" /* yacc.c:1646 */ 3104 { 3105 #ifdef NSEC3 3106 nsec3_add_params((yyvsp[-9].data).str, (yyvsp[-7].data).str, (yyvsp[-5].data).str, (yyvsp[-3].data).str, (yyvsp[-3].data).len); 3107 3108 zadd_rdata_wireformat(zparser_conv_b32(parser->region, (yyvsp[-1].data).str)); /* next hashed name */ 3109 zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ 3110 memset(nsecbits, 0, sizeof(nsecbits)); 3111 nsec_highest_rcode = 0; 3112 #else 3113 zc_error_prev_line("nsec3 not supported"); 3114 #endif /* NSEC3 */ 3115 } 3116 #line 3117 "zparser.c" /* yacc.c:1646 */ 3117 break; 3118 3119 case 215: 3120 #line 928 "zparser.y" /* yacc.c:1646 */ 3121 { 3122 #ifdef NSEC3 3123 nsec3_add_params((yyvsp[-7].data).str, (yyvsp[-5].data).str, (yyvsp[-3].data).str, (yyvsp[-1].data).str, (yyvsp[-1].data).len); 3124 #else 3125 zc_error_prev_line("nsec3 not supported"); 3126 #endif /* NSEC3 */ 3127 } 3128 #line 3129 "zparser.c" /* yacc.c:1646 */ 3129 break; 3130 3131 case 216: 3132 #line 938 "zparser.y" /* yacc.c:1646 */ 3133 { 3134 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-7].data).str)); /* usage */ 3135 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* selector */ 3136 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-3].data).str)); /* matching type */ 3137 zadd_rdata_wireformat(zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* ca data */ 3138 } 3139 #line 3140 "zparser.c" /* yacc.c:1646 */ 3140 break; 3141 3142 case 217: 3143 #line 947 "zparser.y" /* yacc.c:1646 */ 3144 { 3145 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-7].data).str)); /* flags */ 3146 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* proto */ 3147 zadd_rdata_wireformat(zparser_conv_algorithm(parser->region, (yyvsp[-3].data).str)); /* alg */ 3148 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* hash */ 3149 } 3150 #line 3151 "zparser.c" /* yacc.c:1646 */ 3151 break; 3152 3153 case 218: 3154 #line 956 "zparser.y" /* yacc.c:1646 */ 3155 { 3156 const dname_type* name = 0; 3157 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-6].data).str)); /* precedence */ 3158 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-4].data).str)); /* gateway type */ 3159 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-2].data).str)); /* algorithm */ 3160 switch(atoi((yyvsp[-4].data).str)) { 3161 case IPSECKEY_NOGATEWAY: 3162 zadd_rdata_wireformat(alloc_rdata_init(parser->region, "", 0)); 3163 break; 3164 case IPSECKEY_IP4: 3165 zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[0].data).str)); 3166 break; 3167 case IPSECKEY_IP6: 3168 zadd_rdata_wireformat(zparser_conv_aaaa(parser->region, (yyvsp[0].data).str)); 3169 break; 3170 case IPSECKEY_DNAME: 3171 /* convert and insert the dname */ 3172 if(strlen((yyvsp[0].data).str) == 0) 3173 zc_error_prev_line("IPSECKEY must specify gateway name"); 3174 if(!(name = dname_parse(parser->region, (yyvsp[0].data).str))) 3175 zc_error_prev_line("IPSECKEY bad gateway dname %s", (yyvsp[0].data).str); 3176 if((yyvsp[0].data).str[strlen((yyvsp[0].data).str)-1] != '.') { 3177 if(parser->origin == error_domain) { 3178 zc_error("cannot concatenate origin to domain name, because origin failed to parse"); 3179 break; 3180 } 3181 name = dname_concatenate(parser->rr_region, name, 3182 domain_dname(parser->origin)); 3183 } 3184 zadd_rdata_wireformat(alloc_rdata_init(parser->region, 3185 dname_name(name), name->name_size)); 3186 break; 3187 default: 3188 zc_error_prev_line("unknown IPSECKEY gateway type"); 3189 } 3190 } 3191 #line 3192 "zparser.c" /* yacc.c:1646 */ 3192 break; 3193 3194 case 219: 3195 #line 995 "zparser.y" /* yacc.c:1646 */ 3196 { 3197 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); /* public key */ 3198 } 3199 #line 3200 "zparser.c" /* yacc.c:1646 */ 3200 break; 3201 3202 case 221: 3203 #line 1003 "zparser.y" /* yacc.c:1646 */ 3204 { 3205 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 3206 zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, (yyvsp[-1].data).str)); /* NodeID */ 3207 } 3208 #line 3209 "zparser.c" /* yacc.c:1646 */ 3209 break; 3210 3211 case 222: 3212 #line 1010 "zparser.y" /* yacc.c:1646 */ 3213 { 3214 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 3215 zadd_rdata_wireformat(zparser_conv_a(parser->region, (yyvsp[-1].data).str)); /* Locator32 */ 3216 } 3217 #line 3218 "zparser.c" /* yacc.c:1646 */ 3218 break; 3219 3220 case 223: 3221 #line 1017 "zparser.y" /* yacc.c:1646 */ 3222 { 3223 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 3224 zadd_rdata_wireformat(zparser_conv_ilnp64(parser->region, (yyvsp[-1].data).str)); /* Locator64 */ 3225 } 3226 #line 3227 "zparser.c" /* yacc.c:1646 */ 3227 break; 3228 3229 case 224: 3230 #line 1024 "zparser.y" /* yacc.c:1646 */ 3231 { 3232 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* preference */ 3233 zadd_rdata_domain((yyvsp[-1].domain)); /* FQDN */ 3234 } 3235 #line 3236 "zparser.c" /* yacc.c:1646 */ 3236 break; 3237 3238 case 225: 3239 #line 1031 "zparser.y" /* yacc.c:1646 */ 3240 { 3241 zadd_rdata_wireformat(zparser_conv_eui(parser->region, (yyvsp[-1].data).str, 48)); 3242 } 3243 #line 3244 "zparser.c" /* yacc.c:1646 */ 3244 break; 3245 3246 case 226: 3247 #line 1037 "zparser.y" /* yacc.c:1646 */ 3248 { 3249 zadd_rdata_wireformat(zparser_conv_eui(parser->region, (yyvsp[-1].data).str, 64)); 3250 } 3251 #line 3252 "zparser.c" /* yacc.c:1646 */ 3252 break; 3253 3254 case 227: 3255 #line 1044 "zparser.y" /* yacc.c:1646 */ 3256 { 3257 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-5].data).str)); /* priority */ 3258 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-3].data).str)); /* weight */ 3259 zadd_rdata_wireformat(zparser_conv_long_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* target */ 3260 } 3261 #line 3262 "zparser.c" /* yacc.c:1646 */ 3262 break; 3263 3264 case 228: 3265 #line 1053 "zparser.y" /* yacc.c:1646 */ 3266 { 3267 zadd_rdata_wireformat(zparser_conv_byte(parser->region, (yyvsp[-5].data).str)); /* Flags */ 3268 zadd_rdata_wireformat(zparser_conv_tag(parser->region, (yyvsp[-3].data).str, (yyvsp[-3].data).len)); /* Tag */ 3269 zadd_rdata_wireformat(zparser_conv_long_text(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len)); /* Value */ 3270 } 3271 #line 3272 "zparser.c" /* yacc.c:1646 */ 3272 break; 3273 3274 case 229: 3275 #line 1062 "zparser.y" /* yacc.c:1646 */ 3276 { 3277 zadd_rdata_wireformat(zparser_conv_b64(parser->region, (yyvsp[-1].data).str)); 3278 } 3279 #line 3280 "zparser.c" /* yacc.c:1646 */ 3280 break; 3281 3282 case 230: 3283 #line 1069 "zparser.y" /* yacc.c:1646 */ 3284 { 3285 zadd_rdata_wireformat(zparser_conv_serial(parser->region, (yyvsp[-3].data).str)); 3286 zadd_rdata_wireformat(zparser_conv_short(parser->region, (yyvsp[-1].data).str)); 3287 zadd_rdata_wireformat(zparser_conv_nsec(parser->region, nsecbits)); /* nsec bitlist */ 3288 memset(nsecbits, 0, sizeof(nsecbits)); 3289 nsec_highest_rcode = 0; 3290 } 3291 #line 3292 "zparser.c" /* yacc.c:1646 */ 3292 break; 3293 3294 case 231: 3295 #line 1079 "zparser.y" /* yacc.c:1646 */ 3296 { 3297 /* $2 is the number of octets, currently ignored */ 3298 (yyval.unknown) = zparser_conv_hex(parser->region, (yyvsp[-1].data).str, (yyvsp[-1].data).len); 3299 3300 } 3301 #line 3302 "zparser.c" /* yacc.c:1646 */ 3302 break; 3303 3304 case 232: 3305 #line 1085 "zparser.y" /* yacc.c:1646 */ 3306 { 3307 (yyval.unknown) = zparser_conv_hex(parser->region, "", 0); 3308 } 3309 #line 3310 "zparser.c" /* yacc.c:1646 */ 3310 break; 3311 3312 case 233: 3313 #line 1089 "zparser.y" /* yacc.c:1646 */ 3314 { 3315 (yyval.unknown) = zparser_conv_hex(parser->region, "", 0); 3316 } 3317 #line 3318 "zparser.c" /* yacc.c:1646 */ 3318 break; 3319 3320 3321 #line 3322 "zparser.c" /* yacc.c:1646 */ 3322 default: break; 3323 } 3324 /* User semantic actions sometimes alter yychar, and that requires 3325 that yytoken be updated with the new translation. We take the 3326 approach of translating immediately before every use of yytoken. 3327 One alternative is translating here after every semantic action, 3328 but that translation would be missed if the semantic action invokes 3329 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 3330 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 3331 incorrect destructor might then be invoked immediately. In the 3332 case of YYERROR or YYBACKUP, subsequent parser actions might lead 3333 to an incorrect destructor call or verbose syntax error message 3334 before the lookahead is translated. */ 3335 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3336 3337 YYPOPSTACK (yylen); 3338 yylen = 0; 3339 YY_STACK_PRINT (yyss, yyssp); 3340 3341 *++yyvsp = yyval; 3342 3343 /* Now 'shift' the result of the reduction. Determine what state 3344 that goes to, based on the state we popped back to and the rule 3345 number reduced by. */ 3346 3347 yyn = yyr1[yyn]; 3348 3349 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3350 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3351 yystate = yytable[yystate]; 3352 else 3353 yystate = yydefgoto[yyn - YYNTOKENS]; 3354 3355 goto yynewstate; 3356 3357 3358 /*--------------------------------------. 3359 | yyerrlab -- here on detecting error. | 3360 `--------------------------------------*/ 3361 yyerrlab: 3362 /* Make sure we have latest lookahead translation. See comments at 3363 user semantic actions for why this is necessary. */ 3364 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 3365 3366 /* If not already recovering from an error, report this error. */ 3367 if (!yyerrstatus) 3368 { 3369 ++yynerrs; 3370 #if ! YYERROR_VERBOSE 3371 yyerror (YY_("syntax error")); 3372 #else 3373 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 3374 yyssp, yytoken) 3375 { 3376 char const *yymsgp = YY_("syntax error"); 3377 int yysyntax_error_status; 3378 yysyntax_error_status = YYSYNTAX_ERROR; 3379 if (yysyntax_error_status == 0) 3380 yymsgp = yymsg; 3381 else if (yysyntax_error_status == 1) 3382 { 3383 if (yymsg != yymsgbuf) 3384 YYSTACK_FREE (yymsg); 3385 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 3386 if (!yymsg) 3387 { 3388 yymsg = yymsgbuf; 3389 yymsg_alloc = sizeof yymsgbuf; 3390 yysyntax_error_status = 2; 3391 } 3392 else 3393 { 3394 yysyntax_error_status = YYSYNTAX_ERROR; 3395 yymsgp = yymsg; 3396 } 3397 } 3398 yyerror (yymsgp); 3399 if (yysyntax_error_status == 2) 3400 goto yyexhaustedlab; 3401 } 3402 # undef YYSYNTAX_ERROR 3403 #endif 3404 } 3405 3406 3407 3408 if (yyerrstatus == 3) 3409 { 3410 /* If just tried and failed to reuse lookahead token after an 3411 error, discard it. */ 3412 3413 if (yychar <= YYEOF) 3414 { 3415 /* Return failure if at end of input. */ 3416 if (yychar == YYEOF) 3417 YYABORT; 3418 } 3419 else 3420 { 3421 yydestruct ("Error: discarding", 3422 yytoken, &yylval); 3423 yychar = YYEMPTY; 3424 } 3425 } 3426 3427 /* Else will try to reuse lookahead token after shifting the error 3428 token. */ 3429 goto yyerrlab1; 3430 3431 3432 /*---------------------------------------------------. 3433 | yyerrorlab -- error raised explicitly by YYERROR. | 3434 `---------------------------------------------------*/ 3435 yyerrorlab: 3436 3437 /* Pacify compilers like GCC when the user code never invokes 3438 YYERROR and the label yyerrorlab therefore never appears in user 3439 code. */ 3440 if (/*CONSTCOND*/ 0) 3441 goto yyerrorlab; 3442 3443 /* Do not reclaim the symbols of the rule whose action triggered 3444 this YYERROR. */ 3445 YYPOPSTACK (yylen); 3446 yylen = 0; 3447 YY_STACK_PRINT (yyss, yyssp); 3448 yystate = *yyssp; 3449 goto yyerrlab1; 3450 3451 3452 /*-------------------------------------------------------------. 3453 | yyerrlab1 -- common code for both syntax error and YYERROR. | 3454 `-------------------------------------------------------------*/ 3455 yyerrlab1: 3456 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3457 3458 for (;;) 3459 { 3460 yyn = yypact[yystate]; 3461 if (!yypact_value_is_default (yyn)) 3462 { 3463 yyn += YYTERROR; 3464 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3465 { 3466 yyn = yytable[yyn]; 3467 if (0 < yyn) 3468 break; 3469 } 3470 } 3471 3472 /* Pop the current state because it cannot handle the error token. */ 3473 if (yyssp == yyss) 3474 YYABORT; 3475 3476 3477 yydestruct ("Error: popping", 3478 yystos[yystate], yyvsp); 3479 YYPOPSTACK (1); 3480 yystate = *yyssp; 3481 YY_STACK_PRINT (yyss, yyssp); 3482 } 3483 3484 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 3485 *++yyvsp = yylval; 3486 YY_IGNORE_MAYBE_UNINITIALIZED_END 3487 3488 3489 /* Shift the error token. */ 3490 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3491 3492 yystate = yyn; 3493 goto yynewstate; 3494 3495 3496 /*-------------------------------------. 3497 | yyacceptlab -- YYACCEPT comes here. | 3498 `-------------------------------------*/ 3499 yyacceptlab: 3500 yyresult = 0; 3501 goto yyreturn; 3502 3503 /*-----------------------------------. 3504 | yyabortlab -- YYABORT comes here. | 3505 `-----------------------------------*/ 3506 yyabortlab: 3507 yyresult = 1; 3508 goto yyreturn; 3509 3510 #if !defined yyoverflow || YYERROR_VERBOSE 3511 /*-------------------------------------------------. 3512 | yyexhaustedlab -- memory exhaustion comes here. | 3513 `-------------------------------------------------*/ 3514 yyexhaustedlab: 3515 yyerror (YY_("memory exhausted")); 3516 yyresult = 2; 3517 /* Fall through. */ 3518 #endif 3519 3520 yyreturn: 3521 if (yychar != YYEMPTY) 3522 { 3523 /* Make sure we have latest lookahead translation. See comments at 3524 user semantic actions for why this is necessary. */ 3525 yytoken = YYTRANSLATE (yychar); 3526 yydestruct ("Cleanup: discarding lookahead", 3527 yytoken, &yylval); 3528 } 3529 /* Do not reclaim the symbols of the rule whose action triggered 3530 this YYABORT or YYACCEPT. */ 3531 YYPOPSTACK (yylen); 3532 YY_STACK_PRINT (yyss, yyssp); 3533 while (yyssp != yyss) 3534 { 3535 yydestruct ("Cleanup: popping", 3536 yystos[*yyssp], yyvsp); 3537 YYPOPSTACK (1); 3538 } 3539 #ifndef yyoverflow 3540 if (yyss != yyssa) 3541 YYSTACK_FREE (yyss); 3542 #endif 3543 #if YYERROR_VERBOSE 3544 if (yymsg != yymsgbuf) 3545 YYSTACK_FREE (yymsg); 3546 #endif 3547 return yyresult; 3548 } 3549 #line 1093 "zparser.y" /* yacc.c:1906 */ 3550 3551 3552 int 3553 yywrap(void) 3554 { 3555 return 1; 3556 } 3557 3558 /* 3559 * Create the parser. 3560 */ 3561 zparser_type * 3562 zparser_create(region_type *region, region_type *rr_region, namedb_type *db) 3563 { 3564 zparser_type *result; 3565 3566 result = (zparser_type *) region_alloc(region, sizeof(zparser_type)); 3567 result->region = region; 3568 result->rr_region = rr_region; 3569 result->db = db; 3570 3571 result->filename = NULL; 3572 result->current_zone = NULL; 3573 result->origin = NULL; 3574 result->prev_dname = NULL; 3575 result->default_apex = NULL; 3576 3577 result->temporary_rdatas = (rdata_atom_type *) region_alloc_array( 3578 result->region, MAXRDATALEN, sizeof(rdata_atom_type)); 3579 3580 return result; 3581 } 3582 3583 /* 3584 * Initialize the parser for a new zone file. 3585 */ 3586 void 3587 zparser_init(const char *filename, uint32_t ttl, uint16_t klass, 3588 const dname_type *origin) 3589 { 3590 memset(nxtbits, 0, sizeof(nxtbits)); 3591 memset(nsecbits, 0, sizeof(nsecbits)); 3592 nsec_highest_rcode = 0; 3593 3594 parser->default_ttl = ttl; 3595 parser->default_class = klass; 3596 parser->current_zone = NULL; 3597 parser->origin = domain_table_insert(parser->db->domains, origin); 3598 parser->prev_dname = parser->origin; 3599 parser->default_apex = parser->origin; 3600 parser->error_occurred = 0; 3601 parser->errors = 0; 3602 parser->line = 1; 3603 parser->filename = filename; 3604 parser->current_rr.rdata_count = 0; 3605 parser->current_rr.rdatas = parser->temporary_rdatas; 3606 } 3607 3608 void 3609 yyerror(const char *message) 3610 { 3611 zc_error("%s", message); 3612 } 3613 3614 static void 3615 error_va_list(unsigned line, const char *fmt, va_list args) 3616 { 3617 if (parser->filename) { 3618 char message[MAXSYSLOGMSGLEN]; 3619 vsnprintf(message, sizeof(message), fmt, args); 3620 log_msg(LOG_ERR, "%s:%u: %s", parser->filename, line, message); 3621 } 3622 else log_vmsg(LOG_ERR, fmt, args); 3623 3624 ++parser->errors; 3625 parser->error_occurred = 1; 3626 } 3627 3628 /* the line counting sux, to say the least 3629 * with this grose hack we try do give sane 3630 * numbers back */ 3631 void 3632 zc_error_prev_line(const char *fmt, ...) 3633 { 3634 va_list args; 3635 va_start(args, fmt); 3636 error_va_list(parser->line - 1, fmt, args); 3637 va_end(args); 3638 } 3639 3640 void 3641 zc_error(const char *fmt, ...) 3642 { 3643 /* send an error message to stderr */ 3644 va_list args; 3645 va_start(args, fmt); 3646 error_va_list(parser->line, fmt, args); 3647 va_end(args); 3648 } 3649 3650 static void 3651 warning_va_list(unsigned line, const char *fmt, va_list args) 3652 { 3653 if (parser->filename) { 3654 char m[MAXSYSLOGMSGLEN]; 3655 vsnprintf(m, sizeof(m), fmt, args); 3656 log_msg(LOG_WARNING, "%s:%u: %s", parser->filename, line, m); 3657 } 3658 else log_vmsg(LOG_WARNING, fmt, args); 3659 } 3660 3661 void 3662 zc_warning_prev_line(const char *fmt, ...) 3663 { 3664 va_list args; 3665 va_start(args, fmt); 3666 warning_va_list(parser->line - 1, fmt, args); 3667 va_end(args); 3668 } 3669 3670 void 3671 zc_warning(const char *fmt, ... ) 3672 { 3673 va_list args; 3674 va_start(args, fmt); 3675 warning_va_list(parser->line, fmt, args); 3676 va_end(args); 3677 } 3678 3679 #ifdef NSEC3 3680 static void 3681 nsec3_add_params(const char* hashalgo_str, const char* flag_str, 3682 const char* iter_str, const char* salt_str, int salt_len) 3683 { 3684 zadd_rdata_wireformat(zparser_conv_byte(parser->region, hashalgo_str)); 3685 zadd_rdata_wireformat(zparser_conv_byte(parser->region, flag_str)); 3686 zadd_rdata_wireformat(zparser_conv_short(parser->region, iter_str)); 3687 3688 /* salt */ 3689 if(strcmp(salt_str, "-") != 0) 3690 zadd_rdata_wireformat(zparser_conv_hex_length(parser->region, 3691 salt_str, salt_len)); 3692 else 3693 zadd_rdata_wireformat(alloc_rdata_init(parser->region, "", 1)); 3694 } 3695 #endif /* NSEC3 */ 3696