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