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