configparser.c revision 1.1.1.2.4.1 1 1.1.1.2.4.1 christos /* A Bison parser, made by GNU Bison 3.0.5. */
2 1.1 christos
3 1.1 christos /* Bison implementation for Yacc-like parsers in C
4 1.1 christos
5 1.1.1.2.4.1 christos Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6 1.1 christos
7 1.1 christos This program is free software: you can redistribute it and/or modify
8 1.1 christos it under the terms of the GNU General Public License as published by
9 1.1 christos the Free Software Foundation, either version 3 of the License, or
10 1.1 christos (at your option) any later version.
11 1.1 christos
12 1.1 christos This program is distributed in the hope that it will be useful,
13 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
14 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 1.1 christos GNU General Public License for more details.
16 1.1 christos
17 1.1 christos You should have received a copy of the GNU General Public License
18 1.1 christos along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 1.1 christos
20 1.1 christos /* As a special exception, you may create a larger work that contains
21 1.1 christos part or all of the Bison parser skeleton and distribute that work
22 1.1 christos under terms of your choice, so long as that work isn't itself a
23 1.1 christos parser generator using the skeleton or a modified version thereof
24 1.1 christos as a parser skeleton. Alternatively, if you modify or redistribute
25 1.1 christos the parser skeleton itself, you may (at your option) remove this
26 1.1 christos special exception, which will cause the skeleton and the resulting
27 1.1 christos Bison output files to be licensed under the GNU General Public
28 1.1 christos License without this special exception.
29 1.1 christos
30 1.1 christos This special exception was added by the Free Software Foundation in
31 1.1 christos version 2.2 of Bison. */
32 1.1 christos
33 1.1 christos /* C LALR(1) parser skeleton written by Richard Stallman, by
34 1.1 christos simplifying the original so-called "semantic" parser. */
35 1.1 christos
36 1.1 christos /* All symbols defined below should begin with yy or YY, to avoid
37 1.1 christos infringing on user name space. This should be done even for local
38 1.1 christos variables, as they might otherwise be expanded by user macros.
39 1.1 christos There are some unavoidable exceptions within include files to
40 1.1 christos define necessary library symbols; they are noted "INFRINGES ON
41 1.1 christos USER NAME SPACE" below. */
42 1.1 christos
43 1.1 christos /* Identify Bison output. */
44 1.1 christos #define YYBISON 1
45 1.1 christos
46 1.1 christos /* Bison version. */
47 1.1.1.2.4.1 christos #define YYBISON_VERSION "3.0.5"
48 1.1 christos
49 1.1 christos /* Skeleton name. */
50 1.1 christos #define YYSKELETON_NAME "yacc.c"
51 1.1 christos
52 1.1 christos /* Pure parsers. */
53 1.1 christos #define YYPURE 0
54 1.1 christos
55 1.1 christos /* Push parsers. */
56 1.1 christos #define YYPUSH 0
57 1.1 christos
58 1.1 christos /* Pull parsers. */
59 1.1 christos #define YYPULL 1
60 1.1 christos
61 1.1 christos
62 1.1 christos
63 1.1 christos
64 1.1 christos /* Copy the first part of user declarations. */
65 1.1 christos #line 10 "configparser.y" /* yacc.c:339 */
66 1.1 christos
67 1.1 christos #include "config.h"
68 1.1 christos
69 1.1 christos #include <stdarg.h>
70 1.1 christos #include <stdio.h>
71 1.1 christos #include <string.h>
72 1.1 christos #include <stdlib.h>
73 1.1 christos #include <assert.h>
74 1.1 christos
75 1.1 christos #include "options.h"
76 1.1 christos #include "util.h"
77 1.1 christos #include "dname.h"
78 1.1 christos #include "tsig.h"
79 1.1 christos #include "rrl.h"
80 1.1 christos #include "configyyrename.h"
81 1.1 christos int c_lex(void);
82 1.1 christos void c_error(const char *message);
83 1.1 christos
84 1.1 christos #ifdef __cplusplus
85 1.1 christos extern "C"
86 1.1 christos #endif /* __cplusplus */
87 1.1 christos
88 1.1 christos /* these need to be global, otherwise they cannot be used inside yacc */
89 1.1.1.2 christos extern config_parser_state_type* cfg_parser;
90 1.1 christos
91 1.1 christos #if 0
92 1.1 christos #define OUTYY(s) printf s /* used ONLY when debugging */
93 1.1 christos #else
94 1.1 christos #define OUTYY(s)
95 1.1 christos #endif
96 1.1 christos
97 1.1 christos
98 1.1 christos #line 99 "configparser.c" /* yacc.c:339 */
99 1.1 christos
100 1.1 christos # ifndef YY_NULLPTR
101 1.1 christos # if defined __cplusplus && 201103L <= __cplusplus
102 1.1 christos # define YY_NULLPTR nullptr
103 1.1 christos # else
104 1.1 christos # define YY_NULLPTR 0
105 1.1 christos # endif
106 1.1 christos # endif
107 1.1 christos
108 1.1 christos /* Enabling verbose error messages. */
109 1.1 christos #ifdef YYERROR_VERBOSE
110 1.1 christos # undef YYERROR_VERBOSE
111 1.1 christos # define YYERROR_VERBOSE 1
112 1.1 christos #else
113 1.1 christos # define YYERROR_VERBOSE 0
114 1.1 christos #endif
115 1.1 christos
116 1.1 christos /* In a future release of Bison, this section will be replaced
117 1.1 christos by #include "configparser.h". */
118 1.1 christos #ifndef YY_YY_CONFIGPARSER_H_INCLUDED
119 1.1 christos # define YY_YY_CONFIGPARSER_H_INCLUDED
120 1.1 christos /* Debug traces. */
121 1.1 christos #ifndef YYDEBUG
122 1.1 christos # define YYDEBUG 0
123 1.1 christos #endif
124 1.1 christos #if YYDEBUG
125 1.1 christos extern int yydebug;
126 1.1 christos #endif
127 1.1 christos
128 1.1 christos /* Token type. */
129 1.1 christos #ifndef YYTOKENTYPE
130 1.1 christos # define YYTOKENTYPE
131 1.1 christos enum yytokentype
132 1.1 christos {
133 1.1 christos SPACE = 258,
134 1.1 christos LETTER = 259,
135 1.1 christos NEWLINE = 260,
136 1.1 christos COMMENT = 261,
137 1.1 christos COLON = 262,
138 1.1 christos ANY = 263,
139 1.1 christos ZONESTR = 264,
140 1.1 christos STRING = 265,
141 1.1 christos VAR_SERVER = 266,
142 1.1 christos VAR_NAME = 267,
143 1.1 christos VAR_IP_ADDRESS = 268,
144 1.1 christos VAR_IP_TRANSPARENT = 269,
145 1.1 christos VAR_DEBUG_MODE = 270,
146 1.1 christos VAR_IP4_ONLY = 271,
147 1.1 christos VAR_IP6_ONLY = 272,
148 1.1 christos VAR_DATABASE = 273,
149 1.1 christos VAR_IDENTITY = 274,
150 1.1 christos VAR_NSID = 275,
151 1.1 christos VAR_LOGFILE = 276,
152 1.1 christos VAR_SERVER_COUNT = 277,
153 1.1 christos VAR_TCP_COUNT = 278,
154 1.1 christos VAR_PIDFILE = 279,
155 1.1 christos VAR_PORT = 280,
156 1.1 christos VAR_STATISTICS = 281,
157 1.1 christos VAR_CHROOT = 282,
158 1.1 christos VAR_USERNAME = 283,
159 1.1 christos VAR_ZONESDIR = 284,
160 1.1 christos VAR_XFRDFILE = 285,
161 1.1 christos VAR_DIFFFILE = 286,
162 1.1 christos VAR_XFRD_RELOAD_TIMEOUT = 287,
163 1.1 christos VAR_TCP_QUERY_COUNT = 288,
164 1.1 christos VAR_TCP_TIMEOUT = 289,
165 1.1 christos VAR_IPV4_EDNS_SIZE = 290,
166 1.1 christos VAR_IPV6_EDNS_SIZE = 291,
167 1.1 christos VAR_DO_IP4 = 292,
168 1.1 christos VAR_DO_IP6 = 293,
169 1.1 christos VAR_TCP_MSS = 294,
170 1.1 christos VAR_OUTGOING_TCP_MSS = 295,
171 1.1 christos VAR_IP_FREEBIND = 296,
172 1.1 christos VAR_ZONEFILE = 297,
173 1.1 christos VAR_ZONE = 298,
174 1.1 christos VAR_ALLOW_NOTIFY = 299,
175 1.1 christos VAR_REQUEST_XFR = 300,
176 1.1 christos VAR_NOTIFY = 301,
177 1.1 christos VAR_PROVIDE_XFR = 302,
178 1.1 christos VAR_SIZE_LIMIT_XFR = 303,
179 1.1 christos VAR_NOTIFY_RETRY = 304,
180 1.1 christos VAR_OUTGOING_INTERFACE = 305,
181 1.1 christos VAR_ALLOW_AXFR_FALLBACK = 306,
182 1.1 christos VAR_KEY = 307,
183 1.1 christos VAR_ALGORITHM = 308,
184 1.1 christos VAR_SECRET = 309,
185 1.1 christos VAR_AXFR = 310,
186 1.1 christos VAR_UDP = 311,
187 1.1 christos VAR_VERBOSITY = 312,
188 1.1 christos VAR_HIDE_VERSION = 313,
189 1.1 christos VAR_PATTERN = 314,
190 1.1 christos VAR_INCLUDEPATTERN = 315,
191 1.1 christos VAR_ZONELISTFILE = 316,
192 1.1 christos VAR_REMOTE_CONTROL = 317,
193 1.1 christos VAR_CONTROL_ENABLE = 318,
194 1.1 christos VAR_CONTROL_INTERFACE = 319,
195 1.1 christos VAR_CONTROL_PORT = 320,
196 1.1 christos VAR_SERVER_KEY_FILE = 321,
197 1.1 christos VAR_SERVER_CERT_FILE = 322,
198 1.1 christos VAR_CONTROL_KEY_FILE = 323,
199 1.1 christos VAR_CONTROL_CERT_FILE = 324,
200 1.1 christos VAR_XFRDIR = 325,
201 1.1 christos VAR_RRL_SIZE = 326,
202 1.1 christos VAR_RRL_RATELIMIT = 327,
203 1.1 christos VAR_RRL_SLIP = 328,
204 1.1 christos VAR_RRL_IPV4_PREFIX_LENGTH = 329,
205 1.1 christos VAR_RRL_IPV6_PREFIX_LENGTH = 330,
206 1.1 christos VAR_RRL_WHITELIST_RATELIMIT = 331,
207 1.1 christos VAR_RRL_WHITELIST = 332,
208 1.1 christos VAR_ZONEFILES_CHECK = 333,
209 1.1 christos VAR_ZONEFILES_WRITE = 334,
210 1.1 christos VAR_LOG_TIME_ASCII = 335,
211 1.1 christos VAR_ROUND_ROBIN = 336,
212 1.1 christos VAR_ZONESTATS = 337,
213 1.1 christos VAR_REUSEPORT = 338,
214 1.1 christos VAR_VERSION = 339,
215 1.1 christos VAR_MAX_REFRESH_TIME = 340,
216 1.1 christos VAR_MIN_REFRESH_TIME = 341,
217 1.1 christos VAR_MAX_RETRY_TIME = 342,
218 1.1 christos VAR_MIN_RETRY_TIME = 343,
219 1.1.1.2 christos VAR_MULTI_MASTER_CHECK = 344,
220 1.1.1.2.4.1 christos VAR_MINIMAL_RESPONSES = 345,
221 1.1.1.2.4.1 christos VAR_REFUSE_ANY = 346,
222 1.1.1.2.4.1 christos VAR_USE_SYSTEMD = 347,
223 1.1.1.2.4.1 christos VAR_DNSTAP = 348,
224 1.1.1.2.4.1 christos VAR_DNSTAP_ENABLE = 349,
225 1.1.1.2.4.1 christos VAR_DNSTAP_SOCKET_PATH = 350,
226 1.1.1.2.4.1 christos VAR_DNSTAP_SEND_IDENTITY = 351,
227 1.1.1.2.4.1 christos VAR_DNSTAP_SEND_VERSION = 352,
228 1.1.1.2.4.1 christos VAR_DNSTAP_IDENTITY = 353,
229 1.1.1.2.4.1 christos VAR_DNSTAP_VERSION = 354,
230 1.1.1.2.4.1 christos VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES = 355,
231 1.1.1.2.4.1 christos VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES = 356
232 1.1 christos };
233 1.1 christos #endif
234 1.1 christos /* Tokens. */
235 1.1 christos #define SPACE 258
236 1.1 christos #define LETTER 259
237 1.1 christos #define NEWLINE 260
238 1.1 christos #define COMMENT 261
239 1.1 christos #define COLON 262
240 1.1 christos #define ANY 263
241 1.1 christos #define ZONESTR 264
242 1.1 christos #define STRING 265
243 1.1 christos #define VAR_SERVER 266
244 1.1 christos #define VAR_NAME 267
245 1.1 christos #define VAR_IP_ADDRESS 268
246 1.1 christos #define VAR_IP_TRANSPARENT 269
247 1.1 christos #define VAR_DEBUG_MODE 270
248 1.1 christos #define VAR_IP4_ONLY 271
249 1.1 christos #define VAR_IP6_ONLY 272
250 1.1 christos #define VAR_DATABASE 273
251 1.1 christos #define VAR_IDENTITY 274
252 1.1 christos #define VAR_NSID 275
253 1.1 christos #define VAR_LOGFILE 276
254 1.1 christos #define VAR_SERVER_COUNT 277
255 1.1 christos #define VAR_TCP_COUNT 278
256 1.1 christos #define VAR_PIDFILE 279
257 1.1 christos #define VAR_PORT 280
258 1.1 christos #define VAR_STATISTICS 281
259 1.1 christos #define VAR_CHROOT 282
260 1.1 christos #define VAR_USERNAME 283
261 1.1 christos #define VAR_ZONESDIR 284
262 1.1 christos #define VAR_XFRDFILE 285
263 1.1 christos #define VAR_DIFFFILE 286
264 1.1 christos #define VAR_XFRD_RELOAD_TIMEOUT 287
265 1.1 christos #define VAR_TCP_QUERY_COUNT 288
266 1.1 christos #define VAR_TCP_TIMEOUT 289
267 1.1 christos #define VAR_IPV4_EDNS_SIZE 290
268 1.1 christos #define VAR_IPV6_EDNS_SIZE 291
269 1.1 christos #define VAR_DO_IP4 292
270 1.1 christos #define VAR_DO_IP6 293
271 1.1 christos #define VAR_TCP_MSS 294
272 1.1 christos #define VAR_OUTGOING_TCP_MSS 295
273 1.1 christos #define VAR_IP_FREEBIND 296
274 1.1 christos #define VAR_ZONEFILE 297
275 1.1 christos #define VAR_ZONE 298
276 1.1 christos #define VAR_ALLOW_NOTIFY 299
277 1.1 christos #define VAR_REQUEST_XFR 300
278 1.1 christos #define VAR_NOTIFY 301
279 1.1 christos #define VAR_PROVIDE_XFR 302
280 1.1 christos #define VAR_SIZE_LIMIT_XFR 303
281 1.1 christos #define VAR_NOTIFY_RETRY 304
282 1.1 christos #define VAR_OUTGOING_INTERFACE 305
283 1.1 christos #define VAR_ALLOW_AXFR_FALLBACK 306
284 1.1 christos #define VAR_KEY 307
285 1.1 christos #define VAR_ALGORITHM 308
286 1.1 christos #define VAR_SECRET 309
287 1.1 christos #define VAR_AXFR 310
288 1.1 christos #define VAR_UDP 311
289 1.1 christos #define VAR_VERBOSITY 312
290 1.1 christos #define VAR_HIDE_VERSION 313
291 1.1 christos #define VAR_PATTERN 314
292 1.1 christos #define VAR_INCLUDEPATTERN 315
293 1.1 christos #define VAR_ZONELISTFILE 316
294 1.1 christos #define VAR_REMOTE_CONTROL 317
295 1.1 christos #define VAR_CONTROL_ENABLE 318
296 1.1 christos #define VAR_CONTROL_INTERFACE 319
297 1.1 christos #define VAR_CONTROL_PORT 320
298 1.1 christos #define VAR_SERVER_KEY_FILE 321
299 1.1 christos #define VAR_SERVER_CERT_FILE 322
300 1.1 christos #define VAR_CONTROL_KEY_FILE 323
301 1.1 christos #define VAR_CONTROL_CERT_FILE 324
302 1.1 christos #define VAR_XFRDIR 325
303 1.1 christos #define VAR_RRL_SIZE 326
304 1.1 christos #define VAR_RRL_RATELIMIT 327
305 1.1 christos #define VAR_RRL_SLIP 328
306 1.1 christos #define VAR_RRL_IPV4_PREFIX_LENGTH 329
307 1.1 christos #define VAR_RRL_IPV6_PREFIX_LENGTH 330
308 1.1 christos #define VAR_RRL_WHITELIST_RATELIMIT 331
309 1.1 christos #define VAR_RRL_WHITELIST 332
310 1.1 christos #define VAR_ZONEFILES_CHECK 333
311 1.1 christos #define VAR_ZONEFILES_WRITE 334
312 1.1 christos #define VAR_LOG_TIME_ASCII 335
313 1.1 christos #define VAR_ROUND_ROBIN 336
314 1.1 christos #define VAR_ZONESTATS 337
315 1.1 christos #define VAR_REUSEPORT 338
316 1.1 christos #define VAR_VERSION 339
317 1.1 christos #define VAR_MAX_REFRESH_TIME 340
318 1.1 christos #define VAR_MIN_REFRESH_TIME 341
319 1.1 christos #define VAR_MAX_RETRY_TIME 342
320 1.1 christos #define VAR_MIN_RETRY_TIME 343
321 1.1 christos #define VAR_MULTI_MASTER_CHECK 344
322 1.1.1.2 christos #define VAR_MINIMAL_RESPONSES 345
323 1.1.1.2.4.1 christos #define VAR_REFUSE_ANY 346
324 1.1.1.2.4.1 christos #define VAR_USE_SYSTEMD 347
325 1.1.1.2.4.1 christos #define VAR_DNSTAP 348
326 1.1.1.2.4.1 christos #define VAR_DNSTAP_ENABLE 349
327 1.1.1.2.4.1 christos #define VAR_DNSTAP_SOCKET_PATH 350
328 1.1.1.2.4.1 christos #define VAR_DNSTAP_SEND_IDENTITY 351
329 1.1.1.2.4.1 christos #define VAR_DNSTAP_SEND_VERSION 352
330 1.1.1.2.4.1 christos #define VAR_DNSTAP_IDENTITY 353
331 1.1.1.2.4.1 christos #define VAR_DNSTAP_VERSION 354
332 1.1.1.2.4.1 christos #define VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES 355
333 1.1.1.2.4.1 christos #define VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES 356
334 1.1 christos
335 1.1 christos /* Value type. */
336 1.1 christos #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
337 1.1 christos
338 1.1 christos union YYSTYPE
339 1.1 christos {
340 1.1 christos #line 42 "configparser.y" /* yacc.c:355 */
341 1.1 christos
342 1.1 christos char* str;
343 1.1 christos
344 1.1.1.2.4.1 christos #line 345 "configparser.c" /* yacc.c:355 */
345 1.1 christos };
346 1.1 christos
347 1.1 christos typedef union YYSTYPE YYSTYPE;
348 1.1 christos # define YYSTYPE_IS_TRIVIAL 1
349 1.1 christos # define YYSTYPE_IS_DECLARED 1
350 1.1 christos #endif
351 1.1 christos
352 1.1 christos
353 1.1 christos extern YYSTYPE yylval;
354 1.1 christos
355 1.1 christos int yyparse (void);
356 1.1 christos
357 1.1 christos #endif /* !YY_YY_CONFIGPARSER_H_INCLUDED */
358 1.1 christos
359 1.1 christos /* Copy the second part of user declarations. */
360 1.1 christos
361 1.1.1.2.4.1 christos #line 362 "configparser.c" /* yacc.c:358 */
362 1.1 christos
363 1.1 christos #ifdef short
364 1.1 christos # undef short
365 1.1 christos #endif
366 1.1 christos
367 1.1 christos #ifdef YYTYPE_UINT8
368 1.1 christos typedef YYTYPE_UINT8 yytype_uint8;
369 1.1 christos #else
370 1.1 christos typedef unsigned char yytype_uint8;
371 1.1 christos #endif
372 1.1 christos
373 1.1 christos #ifdef YYTYPE_INT8
374 1.1 christos typedef YYTYPE_INT8 yytype_int8;
375 1.1 christos #else
376 1.1 christos typedef signed char yytype_int8;
377 1.1 christos #endif
378 1.1 christos
379 1.1 christos #ifdef YYTYPE_UINT16
380 1.1 christos typedef YYTYPE_UINT16 yytype_uint16;
381 1.1 christos #else
382 1.1 christos typedef unsigned short int yytype_uint16;
383 1.1 christos #endif
384 1.1 christos
385 1.1 christos #ifdef YYTYPE_INT16
386 1.1 christos typedef YYTYPE_INT16 yytype_int16;
387 1.1 christos #else
388 1.1 christos typedef short int yytype_int16;
389 1.1 christos #endif
390 1.1 christos
391 1.1 christos #ifndef YYSIZE_T
392 1.1 christos # ifdef __SIZE_TYPE__
393 1.1 christos # define YYSIZE_T __SIZE_TYPE__
394 1.1 christos # elif defined size_t
395 1.1 christos # define YYSIZE_T size_t
396 1.1 christos # elif ! defined YYSIZE_T
397 1.1 christos # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
398 1.1 christos # define YYSIZE_T size_t
399 1.1 christos # else
400 1.1 christos # define YYSIZE_T unsigned int
401 1.1 christos # endif
402 1.1 christos #endif
403 1.1 christos
404 1.1 christos #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
405 1.1 christos
406 1.1 christos #ifndef YY_
407 1.1 christos # if defined YYENABLE_NLS && YYENABLE_NLS
408 1.1 christos # if ENABLE_NLS
409 1.1 christos # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
410 1.1 christos # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
411 1.1 christos # endif
412 1.1 christos # endif
413 1.1 christos # ifndef YY_
414 1.1 christos # define YY_(Msgid) Msgid
415 1.1 christos # endif
416 1.1 christos #endif
417 1.1 christos
418 1.1 christos #ifndef YY_ATTRIBUTE
419 1.1 christos # if (defined __GNUC__ \
420 1.1 christos && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
421 1.1 christos || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
422 1.1 christos # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
423 1.1 christos # else
424 1.1 christos # define YY_ATTRIBUTE(Spec) /* empty */
425 1.1 christos # endif
426 1.1 christos #endif
427 1.1 christos
428 1.1 christos #ifndef YY_ATTRIBUTE_PURE
429 1.1 christos # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
430 1.1 christos #endif
431 1.1 christos
432 1.1 christos #ifndef YY_ATTRIBUTE_UNUSED
433 1.1 christos # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
434 1.1 christos #endif
435 1.1 christos
436 1.1 christos #if !defined _Noreturn \
437 1.1 christos && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
438 1.1 christos # if defined _MSC_VER && 1200 <= _MSC_VER
439 1.1 christos # define _Noreturn __declspec (noreturn)
440 1.1 christos # else
441 1.1 christos # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
442 1.1 christos # endif
443 1.1 christos #endif
444 1.1 christos
445 1.1 christos /* Suppress unused-variable warnings by "using" E. */
446 1.1 christos #if ! defined lint || defined __GNUC__
447 1.1 christos # define YYUSE(E) ((void) (E))
448 1.1 christos #else
449 1.1 christos # define YYUSE(E) /* empty */
450 1.1 christos #endif
451 1.1 christos
452 1.1 christos #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
453 1.1 christos /* Suppress an incorrect diagnostic about yylval being uninitialized. */
454 1.1 christos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
455 1.1 christos _Pragma ("GCC diagnostic push") \
456 1.1 christos _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
457 1.1 christos _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
458 1.1 christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
459 1.1 christos _Pragma ("GCC diagnostic pop")
460 1.1 christos #else
461 1.1 christos # define YY_INITIAL_VALUE(Value) Value
462 1.1 christos #endif
463 1.1 christos #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
464 1.1 christos # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
465 1.1 christos # define YY_IGNORE_MAYBE_UNINITIALIZED_END
466 1.1 christos #endif
467 1.1 christos #ifndef YY_INITIAL_VALUE
468 1.1 christos # define YY_INITIAL_VALUE(Value) /* Nothing. */
469 1.1 christos #endif
470 1.1 christos
471 1.1 christos
472 1.1 christos #if ! defined yyoverflow || YYERROR_VERBOSE
473 1.1 christos
474 1.1 christos /* The parser invokes alloca or malloc; define the necessary symbols. */
475 1.1 christos
476 1.1 christos # ifdef YYSTACK_USE_ALLOCA
477 1.1 christos # if YYSTACK_USE_ALLOCA
478 1.1 christos # ifdef __GNUC__
479 1.1 christos # define YYSTACK_ALLOC __builtin_alloca
480 1.1 christos # elif defined __BUILTIN_VA_ARG_INCR
481 1.1 christos # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
482 1.1 christos # elif defined _AIX
483 1.1 christos # define YYSTACK_ALLOC __alloca
484 1.1 christos # elif defined _MSC_VER
485 1.1 christos # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
486 1.1 christos # define alloca _alloca
487 1.1 christos # else
488 1.1 christos # define YYSTACK_ALLOC alloca
489 1.1 christos # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
490 1.1 christos # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
491 1.1 christos /* Use EXIT_SUCCESS as a witness for stdlib.h. */
492 1.1 christos # ifndef EXIT_SUCCESS
493 1.1 christos # define EXIT_SUCCESS 0
494 1.1 christos # endif
495 1.1 christos # endif
496 1.1 christos # endif
497 1.1 christos # endif
498 1.1 christos # endif
499 1.1 christos
500 1.1 christos # ifdef YYSTACK_ALLOC
501 1.1 christos /* Pacify GCC's 'empty if-body' warning. */
502 1.1 christos # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
503 1.1 christos # ifndef YYSTACK_ALLOC_MAXIMUM
504 1.1 christos /* The OS might guarantee only one guard page at the bottom of the stack,
505 1.1 christos and a page size can be as small as 4096 bytes. So we cannot safely
506 1.1 christos invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
507 1.1 christos to allow for a few compiler-allocated temporary stack slots. */
508 1.1 christos # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
509 1.1 christos # endif
510 1.1 christos # else
511 1.1 christos # define YYSTACK_ALLOC YYMALLOC
512 1.1 christos # define YYSTACK_FREE YYFREE
513 1.1 christos # ifndef YYSTACK_ALLOC_MAXIMUM
514 1.1 christos # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
515 1.1 christos # endif
516 1.1 christos # if (defined __cplusplus && ! defined EXIT_SUCCESS \
517 1.1 christos && ! ((defined YYMALLOC || defined malloc) \
518 1.1 christos && (defined YYFREE || defined free)))
519 1.1 christos # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
520 1.1 christos # ifndef EXIT_SUCCESS
521 1.1 christos # define EXIT_SUCCESS 0
522 1.1 christos # endif
523 1.1 christos # endif
524 1.1 christos # ifndef YYMALLOC
525 1.1 christos # define YYMALLOC malloc
526 1.1 christos # if ! defined malloc && ! defined EXIT_SUCCESS
527 1.1 christos void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
528 1.1 christos # endif
529 1.1 christos # endif
530 1.1 christos # ifndef YYFREE
531 1.1 christos # define YYFREE free
532 1.1 christos # if ! defined free && ! defined EXIT_SUCCESS
533 1.1 christos void free (void *); /* INFRINGES ON USER NAME SPACE */
534 1.1 christos # endif
535 1.1 christos # endif
536 1.1 christos # endif
537 1.1 christos #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
538 1.1 christos
539 1.1 christos
540 1.1 christos #if (! defined yyoverflow \
541 1.1 christos && (! defined __cplusplus \
542 1.1 christos || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
543 1.1 christos
544 1.1 christos /* A type that is properly aligned for any stack member. */
545 1.1 christos union yyalloc
546 1.1 christos {
547 1.1 christos yytype_int16 yyss_alloc;
548 1.1 christos YYSTYPE yyvs_alloc;
549 1.1 christos };
550 1.1 christos
551 1.1 christos /* The size of the maximum gap between one aligned stack and the next. */
552 1.1 christos # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
553 1.1 christos
554 1.1 christos /* The size of an array large to enough to hold all stacks, each with
555 1.1 christos N elements. */
556 1.1 christos # define YYSTACK_BYTES(N) \
557 1.1 christos ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
558 1.1 christos + YYSTACK_GAP_MAXIMUM)
559 1.1 christos
560 1.1 christos # define YYCOPY_NEEDED 1
561 1.1 christos
562 1.1 christos /* Relocate STACK from its old location to the new one. The
563 1.1 christos local variables YYSIZE and YYSTACKSIZE give the old and new number of
564 1.1 christos elements in the stack, and YYPTR gives the new location of the
565 1.1 christos stack. Advance YYPTR to a properly aligned location for the next
566 1.1 christos stack. */
567 1.1 christos # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
568 1.1 christos do \
569 1.1 christos { \
570 1.1 christos YYSIZE_T yynewbytes; \
571 1.1 christos YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
572 1.1 christos Stack = &yyptr->Stack_alloc; \
573 1.1 christos yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
574 1.1 christos yyptr += yynewbytes / sizeof (*yyptr); \
575 1.1 christos } \
576 1.1 christos while (0)
577 1.1 christos
578 1.1 christos #endif
579 1.1 christos
580 1.1 christos #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
581 1.1 christos /* Copy COUNT objects from SRC to DST. The source and destination do
582 1.1 christos not overlap. */
583 1.1 christos # ifndef YYCOPY
584 1.1 christos # if defined __GNUC__ && 1 < __GNUC__
585 1.1 christos # define YYCOPY(Dst, Src, Count) \
586 1.1 christos __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
587 1.1 christos # else
588 1.1 christos # define YYCOPY(Dst, Src, Count) \
589 1.1 christos do \
590 1.1 christos { \
591 1.1 christos YYSIZE_T yyi; \
592 1.1 christos for (yyi = 0; yyi < (Count); yyi++) \
593 1.1 christos (Dst)[yyi] = (Src)[yyi]; \
594 1.1 christos } \
595 1.1 christos while (0)
596 1.1 christos # endif
597 1.1 christos # endif
598 1.1 christos #endif /* !YYCOPY_NEEDED */
599 1.1 christos
600 1.1 christos /* YYFINAL -- State number of the termination state. */
601 1.1 christos #define YYFINAL 2
602 1.1 christos /* YYLAST -- Last index in YYTABLE. */
603 1.1.1.2.4.1 christos #define YYLAST 208
604 1.1 christos
605 1.1 christos /* YYNTOKENS -- Number of terminals. */
606 1.1.1.2.4.1 christos #define YYNTOKENS 102
607 1.1 christos /* YYNNTS -- Number of nonterminals. */
608 1.1.1.2.4.1 christos #define YYNNTS 108
609 1.1 christos /* YYNRULES -- Number of rules. */
610 1.1.1.2.4.1 christos #define YYNRULES 202
611 1.1 christos /* YYNSTATES -- Number of states. */
612 1.1.1.2.4.1 christos #define YYNSTATES 299
613 1.1 christos
614 1.1 christos /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
615 1.1 christos by yylex, with out-of-bounds checking. */
616 1.1 christos #define YYUNDEFTOK 2
617 1.1.1.2.4.1 christos #define YYMAXUTOK 356
618 1.1 christos
619 1.1 christos #define YYTRANSLATE(YYX) \
620 1.1 christos ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
621 1.1 christos
622 1.1 christos /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
623 1.1 christos as returned by yylex, without out-of-bounds checking. */
624 1.1 christos static const yytype_uint8 yytranslate[] =
625 1.1 christos {
626 1.1 christos 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
645 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651 1.1 christos 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
652 1.1 christos 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
653 1.1 christos 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
654 1.1 christos 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
655 1.1 christos 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
656 1.1 christos 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
657 1.1 christos 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
658 1.1 christos 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
659 1.1 christos 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
660 1.1.1.2.4.1 christos 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
661 1.1.1.2.4.1 christos 95, 96, 97, 98, 99, 100, 101
662 1.1 christos };
663 1.1 christos
664 1.1 christos #if YYDEBUG
665 1.1 christos /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
666 1.1 christos static const yytype_uint16 yyrline[] =
667 1.1 christos {
668 1.1.1.2.4.1 christos 0, 81, 81, 81, 82, 82, 83, 83, 84, 84,
669 1.1.1.2.4.1 christos 87, 95, 95, 96, 96, 96, 96, 97, 97, 97,
670 1.1.1.2.4.1 christos 97, 97, 98, 98, 98, 98, 99, 99, 99, 99,
671 1.1.1.2.4.1 christos 100, 100, 100, 101, 101, 101, 102, 102, 102, 103,
672 1.1.1.2.4.1 christos 103, 104, 104, 105, 105, 105, 106, 106, 106, 107,
673 1.1.1.2.4.1 christos 107, 107, 108, 108, 108, 109, 109, 109, 110, 110,
674 1.1.1.2.4.1 christos 110, 111, 133, 141, 149, 157, 162, 170, 178, 190,
675 1.1.1.2.4.1 christos 202, 210, 218, 226, 235, 241, 247, 277, 283, 294,
676 1.1.1.2.4.1 christos 305, 316, 326, 334, 342, 348, 354, 362, 368, 374,
677 1.1.1.2.4.1 christos 380, 386, 392, 398, 404, 412, 420, 428, 436, 444,
678 1.1.1.2.4.1 christos 452, 460, 470, 478, 488, 498, 508, 516, 524, 533,
679 1.1.1.2.4.1 christos 538, 539, 540, 540, 540, 541, 541, 541, 542, 544,
680 1.1.1.2.4.1 christos 552, 560, 577, 583, 589, 595, 603, 608, 609, 610,
681 1.1.1.2.4.1 christos 610, 611, 611, 612, 612, 613, 614, 616, 624, 630,
682 1.1.1.2.4.1 christos 638, 646, 652, 658, 666, 676, 710, 710, 711, 711,
683 1.1.1.2.4.1 christos 712, 712, 712, 713, 713, 713, 714, 714, 714, 715,
684 1.1.1.2.4.1 christos 715, 715, 716, 716, 716, 717, 717, 718, 730, 741,
685 1.1.1.2.4.1 christos 778, 778, 779, 779, 780, 800, 809, 818, 829, 833,
686 1.1.1.2.4.1 christos 841, 853, 866, 880, 893, 904, 915, 927, 938, 946,
687 1.1.1.2.4.1 christos 956, 966, 976, 986, 995, 1008, 1008, 1009, 1009, 1009,
688 1.1.1.2.4.1 christos 1010, 1024, 1037
689 1.1 christos };
690 1.1 christos #endif
691 1.1 christos
692 1.1 christos #if YYDEBUG || YYERROR_VERBOSE || 0
693 1.1 christos /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
694 1.1 christos First, the terminals, then, starting at YYNTOKENS, nonterminals. */
695 1.1 christos static const char *const yytname[] =
696 1.1 christos {
697 1.1 christos "$end", "error", "$undefined", "SPACE", "LETTER", "NEWLINE", "COMMENT",
698 1.1 christos "COLON", "ANY", "ZONESTR", "STRING", "VAR_SERVER", "VAR_NAME",
699 1.1 christos "VAR_IP_ADDRESS", "VAR_IP_TRANSPARENT", "VAR_DEBUG_MODE", "VAR_IP4_ONLY",
700 1.1 christos "VAR_IP6_ONLY", "VAR_DATABASE", "VAR_IDENTITY", "VAR_NSID",
701 1.1 christos "VAR_LOGFILE", "VAR_SERVER_COUNT", "VAR_TCP_COUNT", "VAR_PIDFILE",
702 1.1 christos "VAR_PORT", "VAR_STATISTICS", "VAR_CHROOT", "VAR_USERNAME",
703 1.1 christos "VAR_ZONESDIR", "VAR_XFRDFILE", "VAR_DIFFFILE",
704 1.1 christos "VAR_XFRD_RELOAD_TIMEOUT", "VAR_TCP_QUERY_COUNT", "VAR_TCP_TIMEOUT",
705 1.1 christos "VAR_IPV4_EDNS_SIZE", "VAR_IPV6_EDNS_SIZE", "VAR_DO_IP4", "VAR_DO_IP6",
706 1.1 christos "VAR_TCP_MSS", "VAR_OUTGOING_TCP_MSS", "VAR_IP_FREEBIND", "VAR_ZONEFILE",
707 1.1 christos "VAR_ZONE", "VAR_ALLOW_NOTIFY", "VAR_REQUEST_XFR", "VAR_NOTIFY",
708 1.1 christos "VAR_PROVIDE_XFR", "VAR_SIZE_LIMIT_XFR", "VAR_NOTIFY_RETRY",
709 1.1 christos "VAR_OUTGOING_INTERFACE", "VAR_ALLOW_AXFR_FALLBACK", "VAR_KEY",
710 1.1 christos "VAR_ALGORITHM", "VAR_SECRET", "VAR_AXFR", "VAR_UDP", "VAR_VERBOSITY",
711 1.1 christos "VAR_HIDE_VERSION", "VAR_PATTERN", "VAR_INCLUDEPATTERN",
712 1.1 christos "VAR_ZONELISTFILE", "VAR_REMOTE_CONTROL", "VAR_CONTROL_ENABLE",
713 1.1 christos "VAR_CONTROL_INTERFACE", "VAR_CONTROL_PORT", "VAR_SERVER_KEY_FILE",
714 1.1 christos "VAR_SERVER_CERT_FILE", "VAR_CONTROL_KEY_FILE", "VAR_CONTROL_CERT_FILE",
715 1.1 christos "VAR_XFRDIR", "VAR_RRL_SIZE", "VAR_RRL_RATELIMIT", "VAR_RRL_SLIP",
716 1.1 christos "VAR_RRL_IPV4_PREFIX_LENGTH", "VAR_RRL_IPV6_PREFIX_LENGTH",
717 1.1 christos "VAR_RRL_WHITELIST_RATELIMIT", "VAR_RRL_WHITELIST",
718 1.1 christos "VAR_ZONEFILES_CHECK", "VAR_ZONEFILES_WRITE", "VAR_LOG_TIME_ASCII",
719 1.1 christos "VAR_ROUND_ROBIN", "VAR_ZONESTATS", "VAR_REUSEPORT", "VAR_VERSION",
720 1.1 christos "VAR_MAX_REFRESH_TIME", "VAR_MIN_REFRESH_TIME", "VAR_MAX_RETRY_TIME",
721 1.1.1.2 christos "VAR_MIN_RETRY_TIME", "VAR_MULTI_MASTER_CHECK", "VAR_MINIMAL_RESPONSES",
722 1.1.1.2.4.1 christos "VAR_REFUSE_ANY", "VAR_USE_SYSTEMD", "VAR_DNSTAP", "VAR_DNSTAP_ENABLE",
723 1.1.1.2.4.1 christos "VAR_DNSTAP_SOCKET_PATH", "VAR_DNSTAP_SEND_IDENTITY",
724 1.1.1.2.4.1 christos "VAR_DNSTAP_SEND_VERSION", "VAR_DNSTAP_IDENTITY", "VAR_DNSTAP_VERSION",
725 1.1.1.2.4.1 christos "VAR_DNSTAP_LOG_AUTH_QUERY_MESSAGES",
726 1.1.1.2.4.1 christos "VAR_DNSTAP_LOG_AUTH_RESPONSE_MESSAGES", "$accept", "toplevelvars",
727 1.1.1.2.4.1 christos "toplevelvar", "serverstart", "contents_server", "content_server",
728 1.1.1.2.4.1 christos "server_ip_address", "server_ip_transparent", "server_ip_freebind",
729 1.1.1.2.4.1 christos "server_debug_mode", "server_use_systemd", "server_verbosity",
730 1.1.1.2.4.1 christos "server_hide_version", "server_ip4_only", "server_ip6_only",
731 1.1.1.2.4.1 christos "server_do_ip4", "server_do_ip6", "server_reuseport", "server_database",
732 1.1.1.2.4.1 christos "server_identity", "server_version", "server_nsid", "server_logfile",
733 1.1.1.2.4.1 christos "server_log_time_ascii", "server_round_robin",
734 1.1.1.2.4.1 christos "server_minimal_responses", "server_refuse_any", "server_server_count",
735 1.1.1.2.4.1 christos "server_tcp_count", "server_pidfile", "server_port", "server_statistics",
736 1.1.1.2.4.1 christos "server_chroot", "server_username", "server_zonesdir",
737 1.1.1.2.4.1 christos "server_zonelistfile", "server_xfrdir", "server_difffile",
738 1.1.1.2.4.1 christos "server_xfrdfile", "server_xfrd_reload_timeout",
739 1.1.1.2.4.1 christos "server_tcp_query_count", "server_tcp_timeout", "server_tcp_mss",
740 1.1.1.2.4.1 christos "server_outgoing_tcp_mss", "server_ipv4_edns_size",
741 1.1.1.2.4.1 christos "server_ipv6_edns_size", "server_rrl_size", "server_rrl_ratelimit",
742 1.1.1.2.4.1 christos "server_rrl_slip", "server_rrl_ipv4_prefix_length",
743 1.1.1.2.4.1 christos "server_rrl_ipv6_prefix_length", "server_rrl_whitelist_ratelimit",
744 1.1.1.2.4.1 christos "server_zonefiles_check", "server_zonefiles_write", "rcstart",
745 1.1.1.2.4.1 christos "contents_rc", "content_rc", "rc_control_enable", "rc_control_port",
746 1.1.1.2.4.1 christos "rc_control_interface", "rc_server_key_file", "rc_server_cert_file",
747 1.1.1.2.4.1 christos "rc_control_key_file", "rc_control_cert_file", "dtstart", "contents_dt",
748 1.1.1.2.4.1 christos "content_dt", "dt_dnstap_enable", "dt_dnstap_socket_path",
749 1.1.1.2.4.1 christos "dt_dnstap_send_identity", "dt_dnstap_send_version",
750 1.1.1.2.4.1 christos "dt_dnstap_identity", "dt_dnstap_version",
751 1.1.1.2.4.1 christos "dt_dnstap_log_auth_query_messages",
752 1.1.1.2.4.1 christos "dt_dnstap_log_auth_response_messages", "patternstart",
753 1.1.1.2.4.1 christos "contents_pattern", "content_pattern", "zone_config_item",
754 1.1.1.2.4.1 christos "pattern_name", "include_pattern", "zonestart", "contents_zone",
755 1.1.1.2.4.1 christos "content_zone", "zone_name", "zone_zonefile", "zone_zonestats",
756 1.1.1.2.4.1 christos "zone_allow_notify", "zone_request_xfr", "zone_size_limit_xfr",
757 1.1.1.2.4.1 christos "zone_request_xfr_data", "zone_notify", "zone_notify_retry",
758 1.1.1.2.4.1 christos "zone_provide_xfr", "zone_outgoing_interface",
759 1.1.1.2.4.1 christos "zone_allow_axfr_fallback", "zone_rrl_whitelist",
760 1.1.1.2.4.1 christos "zone_max_refresh_time", "zone_min_refresh_time", "zone_max_retry_time",
761 1.1.1.2.4.1 christos "zone_min_retry_time", "zone_multi_master_check", "keystart",
762 1.1.1.2.4.1 christos "contents_key", "content_key", "key_name", "key_algorithm", "key_secret", YY_NULLPTR
763 1.1 christos };
764 1.1 christos #endif
765 1.1 christos
766 1.1 christos # ifdef YYPRINT
767 1.1 christos /* YYTOKNUM[NUM] -- (External) token number corresponding to the
768 1.1 christos (internal) symbol number NUM (which must be that of a token). */
769 1.1 christos static const yytype_uint16 yytoknum[] =
770 1.1 christos {
771 1.1 christos 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
772 1.1 christos 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
773 1.1 christos 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
774 1.1 christos 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
775 1.1 christos 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
776 1.1 christos 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
777 1.1 christos 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
778 1.1 christos 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
779 1.1.1.2 christos 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
780 1.1.1.2.4.1 christos 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
781 1.1.1.2.4.1 christos 355, 356
782 1.1 christos };
783 1.1 christos # endif
784 1.1 christos
785 1.1.1.2.4.1 christos #define YYPACT_NINF -57
786 1.1 christos
787 1.1 christos #define yypact_value_is_default(Yystate) \
788 1.1.1.2.4.1 christos (!!((Yystate) == (-57)))
789 1.1 christos
790 1.1 christos #define YYTABLE_NINF -1
791 1.1 christos
792 1.1 christos #define yytable_value_is_error(Yytable_value) \
793 1.1 christos 0
794 1.1 christos
795 1.1 christos /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
796 1.1 christos STATE-NUM. */
797 1.1 christos static const yytype_int16 yypact[] =
798 1.1 christos {
799 1.1.1.2.4.1 christos -57, 0, -57, -57, -57, -57, -57, -57, -57, -57,
800 1.1.1.2.4.1 christos -57, -57, -57, 52, 72, -4, -1, 79, 10, -7,
801 1.1.1.2.4.1 christos -6, -5, -9, -3, 31, 32, 34, 35, 41, 43,
802 1.1.1.2.4.1 christos 44, 45, 48, 51, 53, 55, 56, 52, -57, -57,
803 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
804 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, 57, -57,
805 1.1.1.2.4.1 christos 72, -57, -57, 58, 66, 71, -4, -57, -57, -57,
806 1.1.1.2.4.1 christos -57, 75, 76, 77, 78, 82, 85, 103, 105, 114,
807 1.1.1.2.4.1 christos 115, 116, 117, 118, 120, 121, 123, 125, 126, 140,
808 1.1.1.2.4.1 christos 141, 142, 143, 145, 146, 152, 153, 154, 155, 156,
809 1.1.1.2.4.1 christos 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
810 1.1.1.2.4.1 christos 167, 168, 169, 170, 171, 172, 173, 174, 175, -57,
811 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
812 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
813 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
814 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
815 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, 176, 177,
816 1.1.1.2.4.1 christos 178, 179, 180, 181, 182, -57, -57, -57, -57, -57,
817 1.1.1.2.4.1 christos -57, -57, -57, 183, 184, 185, 186, 187, 188, 189,
818 1.1.1.2.4.1 christos 190, -57, -57, -57, -57, -57, -57, -57, -57, -57,
819 1.1.1.2.4.1 christos -57, -57, 191, 192, 193, 194, -57, 195, 196, -57,
820 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
821 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
822 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
823 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
824 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
825 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
826 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
827 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
828 1.1.1.2.4.1 christos -57, -57, -57, 197, 198, -57, -57, -57, -57
829 1.1 christos };
830 1.1 christos
831 1.1 christos /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
832 1.1 christos Performed when YYTABLE does not specify something else to do. Zero
833 1.1 christos means the default is an error. */
834 1.1 christos static const yytype_uint8 yydefact[] =
835 1.1 christos {
836 1.1.1.2.4.1 christos 2, 0, 1, 10, 169, 194, 145, 109, 126, 3,
837 1.1.1.2.4.1 christos 12, 111, 128, 0, 0, 0, 4, 8, 9, 0,
838 1.1 christos 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
839 1.1.1.2.4.1 christos 0, 0, 0, 0, 0, 0, 0, 7, 147, 149,
840 1.1.1.2.4.1 christos 148, 158, 150, 160, 151, 152, 165, 153, 154, 155,
841 1.1.1.2.4.1 christos 156, 157, 159, 161, 162, 163, 164, 166, 0, 173,
842 1.1.1.2.4.1 christos 5, 171, 172, 0, 0, 0, 6, 196, 197, 198,
843 1.1.1.2.4.1 christos 199, 0, 0, 0, 0, 0, 0, 0, 0, 0,
844 1.1 christos 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
845 1.1 christos 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
846 1.1 christos 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
847 1.1.1.2.4.1 christos 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
848 1.1.1.2.4.1 christos 13, 14, 57, 15, 60, 37, 38, 16, 17, 50,
849 1.1.1.2.4.1 christos 51, 55, 18, 19, 56, 20, 21, 53, 54, 58,
850 1.1.1.2.4.1 christos 59, 22, 23, 24, 25, 26, 27, 28, 29, 39,
851 1.1.1.2.4.1 christos 40, 30, 31, 32, 33, 34, 41, 42, 35, 36,
852 1.1.1.2.4.1 christos 43, 44, 45, 46, 47, 48, 49, 52, 0, 0,
853 1.1.1.2.4.1 christos 0, 0, 0, 0, 0, 110, 112, 114, 113, 115,
854 1.1.1.2.4.1 christos 116, 117, 118, 0, 0, 0, 0, 0, 0, 0,
855 1.1.1.2.4.1 christos 0, 127, 129, 130, 131, 132, 133, 134, 135, 136,
856 1.1.1.2.4.1 christos 167, 175, 0, 0, 0, 0, 178, 0, 0, 179,
857 1.1.1.2.4.1 christos 184, 186, 187, 168, 188, 176, 189, 190, 191, 192,
858 1.1.1.2.4.1 christos 193, 146, 174, 170, 200, 201, 202, 195, 61, 62,
859 1.1.1.2.4.1 christos 64, 68, 69, 73, 74, 76, 77, 82, 83, 84,
860 1.1.1.2.4.1 christos 85, 86, 87, 88, 89, 93, 92, 94, 95, 96,
861 1.1.1.2.4.1 christos 99, 100, 70, 71, 97, 98, 63, 66, 67, 90,
862 1.1.1.2.4.1 christos 91, 101, 102, 103, 104, 105, 106, 107, 108, 78,
863 1.1.1.2.4.1 christos 79, 72, 75, 80, 81, 65, 119, 121, 120, 122,
864 1.1.1.2.4.1 christos 123, 124, 125, 137, 138, 139, 140, 141, 142, 143,
865 1.1.1.2.4.1 christos 144, 177, 180, 0, 0, 183, 185, 181, 182
866 1.1 christos };
867 1.1 christos
868 1.1 christos /* YYPGOTO[NTERM-NUM]. */
869 1.1.1.2 christos static const yytype_int8 yypgoto[] =
870 1.1 christos {
871 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
872 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
873 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
874 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
875 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
876 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
877 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
878 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -31, -12, -57,
879 1.1.1.2.4.1 christos -57, -57, -57, -51, -57, -57, -57, -57, -57, -57,
880 1.1.1.2.4.1 christos -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
881 1.1.1.2.4.1 christos -57, -57, -57, -57, -56, -57, -57, -57
882 1.1 christos };
883 1.1 christos
884 1.1 christos /* YYDEFGOTO[NTERM-NUM]. */
885 1.1 christos static const yytype_int16 yydefgoto[] =
886 1.1 christos {
887 1.1.1.2.4.1 christos -1, 1, 9, 10, 16, 119, 120, 121, 122, 123,
888 1.1.1.2.4.1 christos 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
889 1.1.1.2.4.1 christos 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
890 1.1.1.2.4.1 christos 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
891 1.1.1.2.4.1 christos 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
892 1.1.1.2.4.1 christos 164, 165, 166, 167, 11, 17, 175, 176, 177, 178,
893 1.1.1.2.4.1 christos 179, 180, 181, 182, 12, 18, 191, 192, 193, 194,
894 1.1.1.2.4.1 christos 195, 196, 197, 198, 199, 13, 37, 38, 39, 40,
895 1.1.1.2.4.1 christos 41, 14, 60, 61, 62, 42, 43, 44, 45, 46,
896 1.1.1.2.4.1 christos 206, 47, 48, 49, 50, 51, 52, 53, 54, 55,
897 1.1.1.2.4.1 christos 56, 57, 15, 66, 67, 68, 69, 70
898 1.1 christos };
899 1.1 christos
900 1.1 christos /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
901 1.1 christos positive, shift that token. If negative, reduce the rule whose
902 1.1 christos number is the opposite. If YYTABLE_NINF, syntax error. */
903 1.1 christos static const yytype_uint16 yytable[] =
904 1.1 christos {
905 1.1.1.2.4.1 christos 2, 203, 59, 200, 201, 202, 221, 207, 63, 223,
906 1.1.1.2.4.1 christos 227, 3, 71, 72, 73, 74, 75, 76, 77, 78,
907 1.1.1.2.4.1 christos 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
908 1.1.1.2.4.1 christos 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
909 1.1.1.2.4.1 christos 99, 208, 209, 4, 210, 211, 204, 205, 59, 64,
910 1.1.1.2.4.1 christos 65, 212, 5, 213, 214, 215, 100, 101, 216, 6,
911 1.1.1.2.4.1 christos 102, 217, 7, 218, 19, 219, 220, 222, 224, 103,
912 1.1.1.2.4.1 christos 104, 105, 106, 107, 108, 109, 225, 110, 111, 112,
913 1.1.1.2.4.1 christos 113, 226, 114, 115, 58, 228, 229, 230, 231, 116,
914 1.1.1.2.4.1 christos 117, 118, 232, 8, 20, 233, 21, 22, 23, 24,
915 1.1.1.2.4.1 christos 25, 26, 27, 28, 183, 184, 185, 186, 187, 188,
916 1.1.1.2.4.1 christos 189, 190, 29, 234, 20, 235, 21, 22, 23, 24,
917 1.1.1.2.4.1 christos 25, 26, 27, 28, 236, 237, 238, 239, 240, 30,
918 1.1.1.2.4.1 christos 241, 242, 29, 243, 31, 244, 245, 32, 33, 34,
919 1.1.1.2.4.1 christos 35, 36, 168, 169, 170, 171, 172, 173, 174, 30,
920 1.1.1.2.4.1 christos 246, 247, 248, 249, 31, 250, 251, 32, 33, 34,
921 1.1.1.2.4.1 christos 35, 36, 252, 253, 254, 255, 256, 257, 258, 259,
922 1.1.1.2.4.1 christos 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
923 1.1.1.2.4.1 christos 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
924 1.1.1.2.4.1 christos 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
925 1.1.1.2.4.1 christos 290, 291, 292, 293, 294, 295, 296, 297, 298
926 1.1 christos };
927 1.1 christos
928 1.1.1.2 christos static const yytype_uint8 yycheck[] =
929 1.1 christos {
930 1.1.1.2.4.1 christos 0, 10, 14, 10, 10, 10, 37, 10, 12, 60,
931 1.1.1.2.4.1 christos 66, 11, 13, 14, 15, 16, 17, 18, 19, 20,
932 1.1.1.2.4.1 christos 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
933 1.1.1.2.4.1 christos 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
934 1.1.1.2.4.1 christos 41, 10, 10, 43, 10, 10, 55, 56, 60, 53,
935 1.1.1.2.4.1 christos 54, 10, 52, 10, 10, 10, 57, 58, 10, 59,
936 1.1.1.2.4.1 christos 61, 10, 62, 10, 12, 10, 10, 10, 10, 70,
937 1.1.1.2.4.1 christos 71, 72, 73, 74, 75, 76, 10, 78, 79, 80,
938 1.1.1.2.4.1 christos 81, 10, 83, 84, 12, 10, 10, 10, 10, 90,
939 1.1.1.2.4.1 christos 91, 92, 10, 93, 42, 10, 44, 45, 46, 47,
940 1.1.1.2.4.1 christos 48, 49, 50, 51, 94, 95, 96, 97, 98, 99,
941 1.1.1.2.4.1 christos 100, 101, 60, 10, 42, 10, 44, 45, 46, 47,
942 1.1.1.2.4.1 christos 48, 49, 50, 51, 10, 10, 10, 10, 10, 77,
943 1.1.1.2.4.1 christos 10, 10, 60, 10, 82, 10, 10, 85, 86, 87,
944 1.1.1.2.4.1 christos 88, 89, 63, 64, 65, 66, 67, 68, 69, 77,
945 1.1.1.2.4.1 christos 10, 10, 10, 10, 82, 10, 10, 85, 86, 87,
946 1.1.1.2.4.1 christos 88, 89, 10, 10, 10, 10, 10, 10, 10, 10,
947 1.1.1.2.4.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
948 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
949 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
950 1.1.1.2.4.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10
951 1.1 christos };
952 1.1 christos
953 1.1 christos /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
954 1.1 christos symbol of state STATE-NUM. */
955 1.1 christos static const yytype_uint8 yystos[] =
956 1.1 christos {
957 1.1.1.2.4.1 christos 0, 103, 0, 11, 43, 52, 59, 62, 93, 104,
958 1.1.1.2.4.1 christos 105, 156, 166, 177, 183, 204, 106, 157, 167, 12,
959 1.1.1.2.4.1 christos 42, 44, 45, 46, 47, 48, 49, 50, 51, 60,
960 1.1.1.2.4.1 christos 77, 82, 85, 86, 87, 88, 89, 178, 179, 180,
961 1.1.1.2.4.1 christos 181, 182, 187, 188, 189, 190, 191, 193, 194, 195,
962 1.1.1.2.4.1 christos 196, 197, 198, 199, 200, 201, 202, 203, 12, 180,
963 1.1.1.2.4.1 christos 184, 185, 186, 12, 53, 54, 205, 206, 207, 208,
964 1.1.1.2.4.1 christos 209, 13, 14, 15, 16, 17, 18, 19, 20, 21,
965 1.1.1.2.4.1 christos 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
966 1.1.1.2.4.1 christos 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
967 1.1.1.2.4.1 christos 57, 58, 61, 70, 71, 72, 73, 74, 75, 76,
968 1.1.1.2.4.1 christos 78, 79, 80, 81, 83, 84, 90, 91, 92, 107,
969 1.1.1.2.4.1 christos 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
970 1.1.1.2.4.1 christos 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
971 1.1.1.2.4.1 christos 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
972 1.1.1.2.4.1 christos 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
973 1.1.1.2.4.1 christos 148, 149, 150, 151, 152, 153, 154, 155, 63, 64,
974 1.1.1.2.4.1 christos 65, 66, 67, 68, 69, 158, 159, 160, 161, 162,
975 1.1.1.2.4.1 christos 163, 164, 165, 94, 95, 96, 97, 98, 99, 100,
976 1.1.1.2.4.1 christos 101, 168, 169, 170, 171, 172, 173, 174, 175, 176,
977 1.1.1.2.4.1 christos 10, 10, 10, 10, 55, 56, 192, 10, 10, 10,
978 1.1.1.2.4.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
979 1.1.1.2.4.1 christos 10, 179, 10, 185, 10, 10, 10, 206, 10, 10,
980 1.1.1.2.4.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
981 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
982 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
983 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
984 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
985 1.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
986 1.1.1.2.4.1 christos 10, 10, 10, 10, 10, 10, 10, 10, 10
987 1.1 christos };
988 1.1 christos
989 1.1 christos /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
990 1.1 christos static const yytype_uint8 yyr1[] =
991 1.1 christos {
992 1.1.1.2.4.1 christos 0, 102, 103, 103, 104, 104, 104, 104, 104, 104,
993 1.1.1.2.4.1 christos 105, 106, 106, 107, 107, 107, 107, 107, 107, 107,
994 1.1.1.2.4.1 christos 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
995 1.1.1.2.4.1 christos 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
996 1.1.1.2.4.1 christos 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
997 1.1.1.2.4.1 christos 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
998 1.1.1.2.4.1 christos 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
999 1.1.1.2.4.1 christos 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
1000 1.1.1.2.4.1 christos 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1001 1.1.1.2.4.1 christos 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1002 1.1.1.2.4.1 christos 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
1003 1.1.1.2.4.1 christos 157, 157, 158, 158, 158, 158, 158, 158, 158, 159,
1004 1.1.1.2.4.1 christos 160, 161, 162, 163, 164, 165, 166, 167, 167, 168,
1005 1.1.1.2.4.1 christos 168, 168, 168, 168, 168, 168, 168, 169, 170, 171,
1006 1.1.1.2.4.1 christos 172, 173, 174, 175, 176, 177, 178, 178, 179, 179,
1007 1.1.1.2.4.1 christos 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
1008 1.1.1.2.4.1 christos 180, 180, 180, 180, 180, 180, 180, 181, 182, 183,
1009 1.1.1.2.4.1 christos 184, 184, 185, 185, 186, 187, 188, 189, 190, 191,
1010 1.1.1.2.4.1 christos 192, 192, 192, 193, 194, 195, 196, 197, 198, 199,
1011 1.1.1.2.4.1 christos 200, 201, 202, 203, 204, 205, 205, 206, 206, 206,
1012 1.1.1.2.4.1 christos 207, 208, 209
1013 1.1 christos };
1014 1.1 christos
1015 1.1 christos /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1016 1.1 christos static const yytype_uint8 yyr2[] =
1017 1.1 christos {
1018 1.1.1.2.4.1 christos 0, 2, 0, 2, 2, 2, 2, 2, 2, 2,
1019 1.1.1.2.4.1 christos 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1020 1.1 christos 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1021 1.1 christos 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1022 1.1 christos 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1023 1.1.1.2.4.1 christos 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1024 1.1.1.2.4.1 christos 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1025 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1026 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1027 1.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1028 1.1.1.2.4.1 christos 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1029 1.1.1.2.4.1 christos 2, 0, 1, 1, 1, 1, 1, 1, 1, 2,
1030 1.1.1.2.4.1 christos 2, 2, 2, 2, 2, 2, 1, 2, 0, 1,
1031 1.1.1.2.4.1 christos 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
1032 1.1.1.2.4.1 christos 2, 2, 2, 2, 2, 1, 2, 1, 1, 1,
1033 1.1 christos 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1034 1.1.1.2.4.1 christos 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
1035 1.1.1.2.4.1 christos 2, 1, 1, 1, 2, 2, 2, 3, 2, 2,
1036 1.1.1.2.4.1 christos 2, 3, 3, 3, 2, 3, 2, 2, 2, 2,
1037 1.1.1.2.4.1 christos 2, 2, 2, 2, 1, 2, 1, 1, 1, 1,
1038 1.1.1.2.4.1 christos 2, 2, 2
1039 1.1 christos };
1040 1.1 christos
1041 1.1 christos
1042 1.1 christos #define yyerrok (yyerrstatus = 0)
1043 1.1 christos #define yyclearin (yychar = YYEMPTY)
1044 1.1 christos #define YYEMPTY (-2)
1045 1.1 christos #define YYEOF 0
1046 1.1 christos
1047 1.1 christos #define YYACCEPT goto yyacceptlab
1048 1.1 christos #define YYABORT goto yyabortlab
1049 1.1 christos #define YYERROR goto yyerrorlab
1050 1.1 christos
1051 1.1 christos
1052 1.1 christos #define YYRECOVERING() (!!yyerrstatus)
1053 1.1 christos
1054 1.1 christos #define YYBACKUP(Token, Value) \
1055 1.1 christos do \
1056 1.1 christos if (yychar == YYEMPTY) \
1057 1.1 christos { \
1058 1.1 christos yychar = (Token); \
1059 1.1 christos yylval = (Value); \
1060 1.1 christos YYPOPSTACK (yylen); \
1061 1.1 christos yystate = *yyssp; \
1062 1.1 christos goto yybackup; \
1063 1.1 christos } \
1064 1.1 christos else \
1065 1.1 christos { \
1066 1.1 christos yyerror (YY_("syntax error: cannot back up")); \
1067 1.1 christos YYERROR; \
1068 1.1 christos } \
1069 1.1 christos while (0)
1070 1.1 christos
1071 1.1 christos /* Error token number */
1072 1.1 christos #define YYTERROR 1
1073 1.1 christos #define YYERRCODE 256
1074 1.1 christos
1075 1.1 christos
1076 1.1 christos
1077 1.1 christos /* Enable debugging if requested. */
1078 1.1 christos #if YYDEBUG
1079 1.1 christos
1080 1.1 christos # ifndef YYFPRINTF
1081 1.1 christos # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1082 1.1 christos # define YYFPRINTF fprintf
1083 1.1 christos # endif
1084 1.1 christos
1085 1.1 christos # define YYDPRINTF(Args) \
1086 1.1 christos do { \
1087 1.1 christos if (yydebug) \
1088 1.1 christos YYFPRINTF Args; \
1089 1.1 christos } while (0)
1090 1.1 christos
1091 1.1 christos /* This macro is provided for backward compatibility. */
1092 1.1 christos #ifndef YY_LOCATION_PRINT
1093 1.1 christos # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1094 1.1 christos #endif
1095 1.1 christos
1096 1.1 christos
1097 1.1 christos # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1098 1.1 christos do { \
1099 1.1 christos if (yydebug) \
1100 1.1 christos { \
1101 1.1 christos YYFPRINTF (stderr, "%s ", Title); \
1102 1.1 christos yy_symbol_print (stderr, \
1103 1.1 christos Type, Value); \
1104 1.1 christos YYFPRINTF (stderr, "\n"); \
1105 1.1 christos } \
1106 1.1 christos } while (0)
1107 1.1 christos
1108 1.1 christos
1109 1.1 christos /*----------------------------------------.
1110 1.1 christos | Print this symbol's value on YYOUTPUT. |
1111 1.1 christos `----------------------------------------*/
1112 1.1 christos
1113 1.1 christos static void
1114 1.1 christos yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1115 1.1 christos {
1116 1.1 christos FILE *yyo = yyoutput;
1117 1.1 christos YYUSE (yyo);
1118 1.1 christos if (!yyvaluep)
1119 1.1 christos return;
1120 1.1 christos # ifdef YYPRINT
1121 1.1 christos if (yytype < YYNTOKENS)
1122 1.1 christos YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1123 1.1 christos # endif
1124 1.1 christos YYUSE (yytype);
1125 1.1 christos }
1126 1.1 christos
1127 1.1 christos
1128 1.1 christos /*--------------------------------.
1129 1.1 christos | Print this symbol on YYOUTPUT. |
1130 1.1 christos `--------------------------------*/
1131 1.1 christos
1132 1.1 christos static void
1133 1.1 christos yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1134 1.1 christos {
1135 1.1 christos YYFPRINTF (yyoutput, "%s %s (",
1136 1.1 christos yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1137 1.1 christos
1138 1.1 christos yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1139 1.1 christos YYFPRINTF (yyoutput, ")");
1140 1.1 christos }
1141 1.1 christos
1142 1.1 christos /*------------------------------------------------------------------.
1143 1.1 christos | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1144 1.1 christos | TOP (included). |
1145 1.1 christos `------------------------------------------------------------------*/
1146 1.1 christos
1147 1.1 christos static void
1148 1.1 christos yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1149 1.1 christos {
1150 1.1 christos YYFPRINTF (stderr, "Stack now");
1151 1.1 christos for (; yybottom <= yytop; yybottom++)
1152 1.1 christos {
1153 1.1 christos int yybot = *yybottom;
1154 1.1 christos YYFPRINTF (stderr, " %d", yybot);
1155 1.1 christos }
1156 1.1 christos YYFPRINTF (stderr, "\n");
1157 1.1 christos }
1158 1.1 christos
1159 1.1 christos # define YY_STACK_PRINT(Bottom, Top) \
1160 1.1 christos do { \
1161 1.1 christos if (yydebug) \
1162 1.1 christos yy_stack_print ((Bottom), (Top)); \
1163 1.1 christos } while (0)
1164 1.1 christos
1165 1.1 christos
1166 1.1 christos /*------------------------------------------------.
1167 1.1 christos | Report that the YYRULE is going to be reduced. |
1168 1.1 christos `------------------------------------------------*/
1169 1.1 christos
1170 1.1 christos static void
1171 1.1 christos yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1172 1.1 christos {
1173 1.1 christos unsigned long int yylno = yyrline[yyrule];
1174 1.1 christos int yynrhs = yyr2[yyrule];
1175 1.1 christos int yyi;
1176 1.1 christos YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1177 1.1 christos yyrule - 1, yylno);
1178 1.1 christos /* The symbols being reduced. */
1179 1.1 christos for (yyi = 0; yyi < yynrhs; yyi++)
1180 1.1 christos {
1181 1.1 christos YYFPRINTF (stderr, " $%d = ", yyi + 1);
1182 1.1 christos yy_symbol_print (stderr,
1183 1.1 christos yystos[yyssp[yyi + 1 - yynrhs]],
1184 1.1 christos &(yyvsp[(yyi + 1) - (yynrhs)])
1185 1.1 christos );
1186 1.1 christos YYFPRINTF (stderr, "\n");
1187 1.1 christos }
1188 1.1 christos }
1189 1.1 christos
1190 1.1 christos # define YY_REDUCE_PRINT(Rule) \
1191 1.1 christos do { \
1192 1.1 christos if (yydebug) \
1193 1.1 christos yy_reduce_print (yyssp, yyvsp, Rule); \
1194 1.1 christos } while (0)
1195 1.1 christos
1196 1.1 christos /* Nonzero means print parse trace. It is left uninitialized so that
1197 1.1 christos multiple parsers can coexist. */
1198 1.1 christos int yydebug;
1199 1.1 christos #else /* !YYDEBUG */
1200 1.1 christos # define YYDPRINTF(Args)
1201 1.1 christos # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1202 1.1 christos # define YY_STACK_PRINT(Bottom, Top)
1203 1.1 christos # define YY_REDUCE_PRINT(Rule)
1204 1.1 christos #endif /* !YYDEBUG */
1205 1.1 christos
1206 1.1 christos
1207 1.1 christos /* YYINITDEPTH -- initial size of the parser's stacks. */
1208 1.1 christos #ifndef YYINITDEPTH
1209 1.1 christos # define YYINITDEPTH 200
1210 1.1 christos #endif
1211 1.1 christos
1212 1.1 christos /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1213 1.1 christos if the built-in stack extension method is used).
1214 1.1 christos
1215 1.1 christos Do not make this value too large; the results are undefined if
1216 1.1 christos YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1217 1.1 christos evaluated with infinite-precision integer arithmetic. */
1218 1.1 christos
1219 1.1 christos #ifndef YYMAXDEPTH
1220 1.1 christos # define YYMAXDEPTH 10000
1221 1.1 christos #endif
1222 1.1 christos
1223 1.1 christos
1224 1.1 christos #if YYERROR_VERBOSE
1225 1.1 christos
1226 1.1 christos # ifndef yystrlen
1227 1.1 christos # if defined __GLIBC__ && defined _STRING_H
1228 1.1 christos # define yystrlen strlen
1229 1.1 christos # else
1230 1.1 christos /* Return the length of YYSTR. */
1231 1.1 christos static YYSIZE_T
1232 1.1 christos yystrlen (const char *yystr)
1233 1.1 christos {
1234 1.1 christos YYSIZE_T yylen;
1235 1.1 christos for (yylen = 0; yystr[yylen]; yylen++)
1236 1.1 christos continue;
1237 1.1 christos return yylen;
1238 1.1 christos }
1239 1.1 christos # endif
1240 1.1 christos # endif
1241 1.1 christos
1242 1.1 christos # ifndef yystpcpy
1243 1.1 christos # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1244 1.1 christos # define yystpcpy stpcpy
1245 1.1 christos # else
1246 1.1 christos /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1247 1.1 christos YYDEST. */
1248 1.1 christos static char *
1249 1.1 christos yystpcpy (char *yydest, const char *yysrc)
1250 1.1 christos {
1251 1.1 christos char *yyd = yydest;
1252 1.1 christos const char *yys = yysrc;
1253 1.1 christos
1254 1.1 christos while ((*yyd++ = *yys++) != '\0')
1255 1.1 christos continue;
1256 1.1 christos
1257 1.1 christos return yyd - 1;
1258 1.1 christos }
1259 1.1 christos # endif
1260 1.1 christos # endif
1261 1.1 christos
1262 1.1 christos # ifndef yytnamerr
1263 1.1 christos /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1264 1.1 christos quotes and backslashes, so that it's suitable for yyerror. The
1265 1.1 christos heuristic is that double-quoting is unnecessary unless the string
1266 1.1 christos contains an apostrophe, a comma, or backslash (other than
1267 1.1 christos backslash-backslash). YYSTR is taken from yytname. If YYRES is
1268 1.1 christos null, do not copy; instead, return the length of what the result
1269 1.1 christos would have been. */
1270 1.1 christos static YYSIZE_T
1271 1.1 christos yytnamerr (char *yyres, const char *yystr)
1272 1.1 christos {
1273 1.1 christos if (*yystr == '"')
1274 1.1 christos {
1275 1.1 christos YYSIZE_T yyn = 0;
1276 1.1 christos char const *yyp = yystr;
1277 1.1 christos
1278 1.1 christos for (;;)
1279 1.1 christos switch (*++yyp)
1280 1.1 christos {
1281 1.1 christos case '\'':
1282 1.1 christos case ',':
1283 1.1 christos goto do_not_strip_quotes;
1284 1.1 christos
1285 1.1 christos case '\\':
1286 1.1 christos if (*++yyp != '\\')
1287 1.1 christos goto do_not_strip_quotes;
1288 1.1 christos /* Fall through. */
1289 1.1 christos default:
1290 1.1 christos if (yyres)
1291 1.1 christos yyres[yyn] = *yyp;
1292 1.1 christos yyn++;
1293 1.1 christos break;
1294 1.1 christos
1295 1.1 christos case '"':
1296 1.1 christos if (yyres)
1297 1.1 christos yyres[yyn] = '\0';
1298 1.1 christos return yyn;
1299 1.1 christos }
1300 1.1 christos do_not_strip_quotes: ;
1301 1.1 christos }
1302 1.1 christos
1303 1.1 christos if (! yyres)
1304 1.1 christos return yystrlen (yystr);
1305 1.1 christos
1306 1.1 christos return yystpcpy (yyres, yystr) - yyres;
1307 1.1 christos }
1308 1.1 christos # endif
1309 1.1 christos
1310 1.1 christos /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1311 1.1 christos about the unexpected token YYTOKEN for the state stack whose top is
1312 1.1 christos YYSSP.
1313 1.1 christos
1314 1.1 christos Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1315 1.1 christos not large enough to hold the message. In that case, also set
1316 1.1 christos *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1317 1.1 christos required number of bytes is too large to store. */
1318 1.1 christos static int
1319 1.1 christos yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1320 1.1 christos yytype_int16 *yyssp, int yytoken)
1321 1.1 christos {
1322 1.1 christos YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1323 1.1 christos YYSIZE_T yysize = yysize0;
1324 1.1 christos enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1325 1.1 christos /* Internationalized format string. */
1326 1.1 christos const char *yyformat = YY_NULLPTR;
1327 1.1 christos /* Arguments of yyformat. */
1328 1.1 christos char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1329 1.1 christos /* Number of reported tokens (one for the "unexpected", one per
1330 1.1 christos "expected"). */
1331 1.1 christos int yycount = 0;
1332 1.1 christos
1333 1.1 christos /* There are many possibilities here to consider:
1334 1.1 christos - If this state is a consistent state with a default action, then
1335 1.1 christos the only way this function was invoked is if the default action
1336 1.1 christos is an error action. In that case, don't check for expected
1337 1.1 christos tokens because there are none.
1338 1.1 christos - The only way there can be no lookahead present (in yychar) is if
1339 1.1 christos this state is a consistent state with a default action. Thus,
1340 1.1 christos detecting the absence of a lookahead is sufficient to determine
1341 1.1 christos that there is no unexpected or expected token to report. In that
1342 1.1 christos case, just report a simple "syntax error".
1343 1.1 christos - Don't assume there isn't a lookahead just because this state is a
1344 1.1 christos consistent state with a default action. There might have been a
1345 1.1 christos previous inconsistent state, consistent state with a non-default
1346 1.1 christos action, or user semantic action that manipulated yychar.
1347 1.1 christos - Of course, the expected token list depends on states to have
1348 1.1 christos correct lookahead information, and it depends on the parser not
1349 1.1 christos to perform extra reductions after fetching a lookahead from the
1350 1.1 christos scanner and before detecting a syntax error. Thus, state merging
1351 1.1 christos (from LALR or IELR) and default reductions corrupt the expected
1352 1.1 christos token list. However, the list is correct for canonical LR with
1353 1.1 christos one exception: it will still contain any token that will not be
1354 1.1 christos accepted due to an error action in a later state.
1355 1.1 christos */
1356 1.1 christos if (yytoken != YYEMPTY)
1357 1.1 christos {
1358 1.1 christos int yyn = yypact[*yyssp];
1359 1.1 christos yyarg[yycount++] = yytname[yytoken];
1360 1.1 christos if (!yypact_value_is_default (yyn))
1361 1.1 christos {
1362 1.1 christos /* Start YYX at -YYN if negative to avoid negative indexes in
1363 1.1 christos YYCHECK. In other words, skip the first -YYN actions for
1364 1.1 christos this state because they are default actions. */
1365 1.1 christos int yyxbegin = yyn < 0 ? -yyn : 0;
1366 1.1 christos /* Stay within bounds of both yycheck and yytname. */
1367 1.1 christos int yychecklim = YYLAST - yyn + 1;
1368 1.1 christos int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1369 1.1 christos int yyx;
1370 1.1 christos
1371 1.1 christos for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1372 1.1 christos if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1373 1.1 christos && !yytable_value_is_error (yytable[yyx + yyn]))
1374 1.1 christos {
1375 1.1 christos if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1376 1.1 christos {
1377 1.1 christos yycount = 1;
1378 1.1 christos yysize = yysize0;
1379 1.1 christos break;
1380 1.1 christos }
1381 1.1 christos yyarg[yycount++] = yytname[yyx];
1382 1.1 christos {
1383 1.1 christos YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1384 1.1 christos if (! (yysize <= yysize1
1385 1.1 christos && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1386 1.1 christos return 2;
1387 1.1 christos yysize = yysize1;
1388 1.1 christos }
1389 1.1 christos }
1390 1.1 christos }
1391 1.1 christos }
1392 1.1 christos
1393 1.1 christos switch (yycount)
1394 1.1 christos {
1395 1.1 christos # define YYCASE_(N, S) \
1396 1.1 christos case N: \
1397 1.1 christos yyformat = S; \
1398 1.1 christos break
1399 1.1.1.2.4.1 christos default: /* Avoid compiler warnings. */
1400 1.1 christos YYCASE_(0, YY_("syntax error"));
1401 1.1 christos YYCASE_(1, YY_("syntax error, unexpected %s"));
1402 1.1 christos YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1403 1.1 christos YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1404 1.1 christos YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1405 1.1 christos YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1406 1.1 christos # undef YYCASE_
1407 1.1 christos }
1408 1.1 christos
1409 1.1 christos {
1410 1.1 christos YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1411 1.1 christos if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1412 1.1 christos return 2;
1413 1.1 christos yysize = yysize1;
1414 1.1 christos }
1415 1.1 christos
1416 1.1 christos if (*yymsg_alloc < yysize)
1417 1.1 christos {
1418 1.1 christos *yymsg_alloc = 2 * yysize;
1419 1.1 christos if (! (yysize <= *yymsg_alloc
1420 1.1 christos && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1421 1.1 christos *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1422 1.1 christos return 1;
1423 1.1 christos }
1424 1.1 christos
1425 1.1 christos /* Avoid sprintf, as that infringes on the user's name space.
1426 1.1 christos Don't have undefined behavior even if the translation
1427 1.1 christos produced a string with the wrong number of "%s"s. */
1428 1.1 christos {
1429 1.1 christos char *yyp = *yymsg;
1430 1.1 christos int yyi = 0;
1431 1.1 christos while ((*yyp = *yyformat) != '\0')
1432 1.1 christos if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1433 1.1 christos {
1434 1.1 christos yyp += yytnamerr (yyp, yyarg[yyi++]);
1435 1.1 christos yyformat += 2;
1436 1.1 christos }
1437 1.1 christos else
1438 1.1 christos {
1439 1.1 christos yyp++;
1440 1.1 christos yyformat++;
1441 1.1 christos }
1442 1.1 christos }
1443 1.1 christos return 0;
1444 1.1 christos }
1445 1.1 christos #endif /* YYERROR_VERBOSE */
1446 1.1 christos
1447 1.1 christos /*-----------------------------------------------.
1448 1.1 christos | Release the memory associated to this symbol. |
1449 1.1 christos `-----------------------------------------------*/
1450 1.1 christos
1451 1.1 christos static void
1452 1.1 christos yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1453 1.1 christos {
1454 1.1 christos YYUSE (yyvaluep);
1455 1.1 christos if (!yymsg)
1456 1.1 christos yymsg = "Deleting";
1457 1.1 christos YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1458 1.1 christos
1459 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1460 1.1 christos YYUSE (yytype);
1461 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_END
1462 1.1 christos }
1463 1.1 christos
1464 1.1 christos
1465 1.1 christos
1466 1.1 christos
1467 1.1 christos /* The lookahead symbol. */
1468 1.1 christos int yychar;
1469 1.1 christos
1470 1.1 christos /* The semantic value of the lookahead symbol. */
1471 1.1 christos YYSTYPE yylval;
1472 1.1 christos /* Number of syntax errors so far. */
1473 1.1 christos int yynerrs;
1474 1.1 christos
1475 1.1 christos
1476 1.1 christos /*----------.
1477 1.1 christos | yyparse. |
1478 1.1 christos `----------*/
1479 1.1 christos
1480 1.1 christos int
1481 1.1 christos yyparse (void)
1482 1.1 christos {
1483 1.1 christos int yystate;
1484 1.1 christos /* Number of tokens to shift before error messages enabled. */
1485 1.1 christos int yyerrstatus;
1486 1.1 christos
1487 1.1 christos /* The stacks and their tools:
1488 1.1 christos 'yyss': related to states.
1489 1.1 christos 'yyvs': related to semantic values.
1490 1.1 christos
1491 1.1 christos Refer to the stacks through separate pointers, to allow yyoverflow
1492 1.1 christos to reallocate them elsewhere. */
1493 1.1 christos
1494 1.1 christos /* The state stack. */
1495 1.1 christos yytype_int16 yyssa[YYINITDEPTH];
1496 1.1 christos yytype_int16 *yyss;
1497 1.1 christos yytype_int16 *yyssp;
1498 1.1 christos
1499 1.1 christos /* The semantic value stack. */
1500 1.1 christos YYSTYPE yyvsa[YYINITDEPTH];
1501 1.1 christos YYSTYPE *yyvs;
1502 1.1 christos YYSTYPE *yyvsp;
1503 1.1 christos
1504 1.1 christos YYSIZE_T yystacksize;
1505 1.1 christos
1506 1.1 christos int yyn;
1507 1.1 christos int yyresult;
1508 1.1 christos /* Lookahead token as an internal (translated) token number. */
1509 1.1 christos int yytoken = 0;
1510 1.1 christos /* The variables used to return semantic value and location from the
1511 1.1 christos action routines. */
1512 1.1 christos YYSTYPE yyval;
1513 1.1 christos
1514 1.1 christos #if YYERROR_VERBOSE
1515 1.1 christos /* Buffer for error messages, and its allocated size. */
1516 1.1 christos char yymsgbuf[128];
1517 1.1 christos char *yymsg = yymsgbuf;
1518 1.1 christos YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1519 1.1 christos #endif
1520 1.1 christos
1521 1.1 christos #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1522 1.1 christos
1523 1.1 christos /* The number of symbols on the RHS of the reduced rule.
1524 1.1 christos Keep to zero when no symbol should be popped. */
1525 1.1 christos int yylen = 0;
1526 1.1 christos
1527 1.1 christos yyssp = yyss = yyssa;
1528 1.1 christos yyvsp = yyvs = yyvsa;
1529 1.1 christos yystacksize = YYINITDEPTH;
1530 1.1 christos
1531 1.1 christos YYDPRINTF ((stderr, "Starting parse\n"));
1532 1.1 christos
1533 1.1 christos yystate = 0;
1534 1.1 christos yyerrstatus = 0;
1535 1.1 christos yynerrs = 0;
1536 1.1 christos yychar = YYEMPTY; /* Cause a token to be read. */
1537 1.1 christos goto yysetstate;
1538 1.1 christos
1539 1.1 christos /*------------------------------------------------------------.
1540 1.1 christos | yynewstate -- Push a new state, which is found in yystate. |
1541 1.1 christos `------------------------------------------------------------*/
1542 1.1 christos yynewstate:
1543 1.1 christos /* In all cases, when you get here, the value and location stacks
1544 1.1 christos have just been pushed. So pushing a state here evens the stacks. */
1545 1.1 christos yyssp++;
1546 1.1 christos
1547 1.1 christos yysetstate:
1548 1.1 christos *yyssp = yystate;
1549 1.1 christos
1550 1.1 christos if (yyss + yystacksize - 1 <= yyssp)
1551 1.1 christos {
1552 1.1 christos /* Get the current used size of the three stacks, in elements. */
1553 1.1 christos YYSIZE_T yysize = yyssp - yyss + 1;
1554 1.1 christos
1555 1.1 christos #ifdef yyoverflow
1556 1.1 christos {
1557 1.1 christos /* Give user a chance to reallocate the stack. Use copies of
1558 1.1 christos these so that the &'s don't force the real ones into
1559 1.1 christos memory. */
1560 1.1 christos YYSTYPE *yyvs1 = yyvs;
1561 1.1 christos yytype_int16 *yyss1 = yyss;
1562 1.1 christos
1563 1.1 christos /* Each stack pointer address is followed by the size of the
1564 1.1 christos data in use in that stack, in bytes. This used to be a
1565 1.1 christos conditional around just the two extra args, but that might
1566 1.1 christos be undefined if yyoverflow is a macro. */
1567 1.1 christos yyoverflow (YY_("memory exhausted"),
1568 1.1 christos &yyss1, yysize * sizeof (*yyssp),
1569 1.1 christos &yyvs1, yysize * sizeof (*yyvsp),
1570 1.1 christos &yystacksize);
1571 1.1 christos
1572 1.1 christos yyss = yyss1;
1573 1.1 christos yyvs = yyvs1;
1574 1.1 christos }
1575 1.1 christos #else /* no yyoverflow */
1576 1.1 christos # ifndef YYSTACK_RELOCATE
1577 1.1 christos goto yyexhaustedlab;
1578 1.1 christos # else
1579 1.1 christos /* Extend the stack our own way. */
1580 1.1 christos if (YYMAXDEPTH <= yystacksize)
1581 1.1 christos goto yyexhaustedlab;
1582 1.1 christos yystacksize *= 2;
1583 1.1 christos if (YYMAXDEPTH < yystacksize)
1584 1.1 christos yystacksize = YYMAXDEPTH;
1585 1.1 christos
1586 1.1 christos {
1587 1.1 christos yytype_int16 *yyss1 = yyss;
1588 1.1 christos union yyalloc *yyptr =
1589 1.1 christos (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1590 1.1 christos if (! yyptr)
1591 1.1 christos goto yyexhaustedlab;
1592 1.1 christos YYSTACK_RELOCATE (yyss_alloc, yyss);
1593 1.1 christos YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1594 1.1 christos # undef YYSTACK_RELOCATE
1595 1.1 christos if (yyss1 != yyssa)
1596 1.1 christos YYSTACK_FREE (yyss1);
1597 1.1 christos }
1598 1.1 christos # endif
1599 1.1 christos #endif /* no yyoverflow */
1600 1.1 christos
1601 1.1 christos yyssp = yyss + yysize - 1;
1602 1.1 christos yyvsp = yyvs + yysize - 1;
1603 1.1 christos
1604 1.1 christos YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1605 1.1 christos (unsigned long int) yystacksize));
1606 1.1 christos
1607 1.1 christos if (yyss + yystacksize - 1 <= yyssp)
1608 1.1 christos YYABORT;
1609 1.1 christos }
1610 1.1 christos
1611 1.1 christos YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1612 1.1 christos
1613 1.1 christos if (yystate == YYFINAL)
1614 1.1 christos YYACCEPT;
1615 1.1 christos
1616 1.1 christos goto yybackup;
1617 1.1 christos
1618 1.1 christos /*-----------.
1619 1.1 christos | yybackup. |
1620 1.1 christos `-----------*/
1621 1.1 christos yybackup:
1622 1.1 christos
1623 1.1 christos /* Do appropriate processing given the current state. Read a
1624 1.1 christos lookahead token if we need one and don't already have one. */
1625 1.1 christos
1626 1.1 christos /* First try to decide what to do without reference to lookahead token. */
1627 1.1 christos yyn = yypact[yystate];
1628 1.1 christos if (yypact_value_is_default (yyn))
1629 1.1 christos goto yydefault;
1630 1.1 christos
1631 1.1 christos /* Not known => get a lookahead token if don't already have one. */
1632 1.1 christos
1633 1.1 christos /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1634 1.1 christos if (yychar == YYEMPTY)
1635 1.1 christos {
1636 1.1 christos YYDPRINTF ((stderr, "Reading a token: "));
1637 1.1 christos yychar = yylex ();
1638 1.1 christos }
1639 1.1 christos
1640 1.1 christos if (yychar <= YYEOF)
1641 1.1 christos {
1642 1.1 christos yychar = yytoken = YYEOF;
1643 1.1 christos YYDPRINTF ((stderr, "Now at end of input.\n"));
1644 1.1 christos }
1645 1.1 christos else
1646 1.1 christos {
1647 1.1 christos yytoken = YYTRANSLATE (yychar);
1648 1.1 christos YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1649 1.1 christos }
1650 1.1 christos
1651 1.1 christos /* If the proper action on seeing token YYTOKEN is to reduce or to
1652 1.1 christos detect an error, take that action. */
1653 1.1 christos yyn += yytoken;
1654 1.1 christos if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1655 1.1 christos goto yydefault;
1656 1.1 christos yyn = yytable[yyn];
1657 1.1 christos if (yyn <= 0)
1658 1.1 christos {
1659 1.1 christos if (yytable_value_is_error (yyn))
1660 1.1 christos goto yyerrlab;
1661 1.1 christos yyn = -yyn;
1662 1.1 christos goto yyreduce;
1663 1.1 christos }
1664 1.1 christos
1665 1.1 christos /* Count tokens shifted since error; after three, turn off error
1666 1.1 christos status. */
1667 1.1 christos if (yyerrstatus)
1668 1.1 christos yyerrstatus--;
1669 1.1 christos
1670 1.1 christos /* Shift the lookahead token. */
1671 1.1 christos YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1672 1.1 christos
1673 1.1 christos /* Discard the shifted token. */
1674 1.1 christos yychar = YYEMPTY;
1675 1.1 christos
1676 1.1 christos yystate = yyn;
1677 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1678 1.1 christos *++yyvsp = yylval;
1679 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_END
1680 1.1 christos
1681 1.1 christos goto yynewstate;
1682 1.1 christos
1683 1.1 christos
1684 1.1 christos /*-----------------------------------------------------------.
1685 1.1 christos | yydefault -- do the default action for the current state. |
1686 1.1 christos `-----------------------------------------------------------*/
1687 1.1 christos yydefault:
1688 1.1 christos yyn = yydefact[yystate];
1689 1.1 christos if (yyn == 0)
1690 1.1 christos goto yyerrlab;
1691 1.1 christos goto yyreduce;
1692 1.1 christos
1693 1.1 christos
1694 1.1 christos /*-----------------------------.
1695 1.1 christos | yyreduce -- Do a reduction. |
1696 1.1 christos `-----------------------------*/
1697 1.1 christos yyreduce:
1698 1.1 christos /* yyn is the number of a rule to reduce with. */
1699 1.1 christos yylen = yyr2[yyn];
1700 1.1 christos
1701 1.1 christos /* If YYLEN is nonzero, implement the default value of the action:
1702 1.1 christos '$$ = $1'.
1703 1.1 christos
1704 1.1 christos Otherwise, the following line sets YYVAL to garbage.
1705 1.1 christos This behavior is undocumented and Bison
1706 1.1 christos users should not rely upon it. Assigning to YYVAL
1707 1.1 christos unconditionally makes the parser a bit smaller, and it avoids a
1708 1.1 christos GCC warning that YYVAL may be used uninitialized. */
1709 1.1 christos yyval = yyvsp[1-yylen];
1710 1.1 christos
1711 1.1 christos
1712 1.1 christos YY_REDUCE_PRINT (yyn);
1713 1.1 christos switch (yyn)
1714 1.1 christos {
1715 1.1.1.2.4.1 christos case 10:
1716 1.1.1.2.4.1 christos #line 88 "configparser.y" /* yacc.c:1648 */
1717 1.1 christos { OUTYY(("\nP(server:)\n"));
1718 1.1 christos if(cfg_parser->server_settings_seen) {
1719 1.1 christos yyerror("duplicate server: element.");
1720 1.1 christos }
1721 1.1 christos cfg_parser->server_settings_seen = 1;
1722 1.1 christos }
1723 1.1.1.2.4.1 christos #line 1724 "configparser.c" /* yacc.c:1648 */
1724 1.1 christos break;
1725 1.1 christos
1726 1.1.1.2.4.1 christos case 61:
1727 1.1.1.2.4.1 christos #line 112 "configparser.y" /* yacc.c:1648 */
1728 1.1 christos {
1729 1.1 christos OUTYY(("P(server_ip_address:%s)\n", (yyvsp[0].str)));
1730 1.1 christos if(cfg_parser->current_ip_address_option) {
1731 1.1 christos cfg_parser->current_ip_address_option->next =
1732 1.1.1.2 christos (ip_address_option_type*)region_alloc(
1733 1.1.1.2 christos cfg_parser->opt->region, sizeof(ip_address_option_type));
1734 1.1 christos cfg_parser->current_ip_address_option =
1735 1.1 christos cfg_parser->current_ip_address_option->next;
1736 1.1 christos cfg_parser->current_ip_address_option->next=0;
1737 1.1 christos } else {
1738 1.1 christos cfg_parser->current_ip_address_option =
1739 1.1.1.2 christos (ip_address_option_type*)region_alloc(
1740 1.1.1.2 christos cfg_parser->opt->region, sizeof(ip_address_option_type));
1741 1.1 christos cfg_parser->current_ip_address_option->next=0;
1742 1.1 christos cfg_parser->opt->ip_addresses = cfg_parser->current_ip_address_option;
1743 1.1 christos }
1744 1.1 christos
1745 1.1 christos cfg_parser->current_ip_address_option->address =
1746 1.1 christos region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1747 1.1 christos }
1748 1.1.1.2.4.1 christos #line 1749 "configparser.c" /* yacc.c:1648 */
1749 1.1 christos break;
1750 1.1 christos
1751 1.1.1.2.4.1 christos case 62:
1752 1.1.1.2.4.1 christos #line 134 "configparser.y" /* yacc.c:1648 */
1753 1.1 christos {
1754 1.1 christos OUTYY(("P(server_ip_transparent:%s)\n", (yyvsp[0].str)));
1755 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1756 1.1 christos yyerror("expected yes or no.");
1757 1.1 christos else cfg_parser->opt->ip_transparent = (strcmp((yyvsp[0].str), "yes")==0);
1758 1.1 christos }
1759 1.1.1.2.4.1 christos #line 1760 "configparser.c" /* yacc.c:1648 */
1760 1.1 christos break;
1761 1.1 christos
1762 1.1.1.2.4.1 christos case 63:
1763 1.1.1.2.4.1 christos #line 142 "configparser.y" /* yacc.c:1648 */
1764 1.1 christos {
1765 1.1 christos OUTYY(("P(server_ip_freebind:%s)\n", (yyvsp[0].str)));
1766 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1767 1.1 christos yyerror("expected yes or no.");
1768 1.1 christos else cfg_parser->opt->ip_freebind = (strcmp((yyvsp[0].str), "yes")==0);
1769 1.1 christos }
1770 1.1.1.2.4.1 christos #line 1771 "configparser.c" /* yacc.c:1648 */
1771 1.1 christos break;
1772 1.1 christos
1773 1.1.1.2.4.1 christos case 64:
1774 1.1.1.2.4.1 christos #line 150 "configparser.y" /* yacc.c:1648 */
1775 1.1 christos {
1776 1.1 christos OUTYY(("P(server_debug_mode:%s)\n", (yyvsp[0].str)));
1777 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1778 1.1 christos yyerror("expected yes or no.");
1779 1.1 christos else cfg_parser->opt->debug_mode = (strcmp((yyvsp[0].str), "yes")==0);
1780 1.1 christos }
1781 1.1.1.2.4.1 christos #line 1782 "configparser.c" /* yacc.c:1648 */
1782 1.1 christos break;
1783 1.1 christos
1784 1.1.1.2.4.1 christos case 65:
1785 1.1.1.2.4.1 christos #line 158 "configparser.y" /* yacc.c:1648 */
1786 1.1.1.2.4.1 christos {
1787 1.1.1.2.4.1 christos OUTYY(("P(server_use_systemd:%s)\n", (yyvsp[0].str)));
1788 1.1.1.2.4.1 christos }
1789 1.1.1.2.4.1 christos #line 1790 "configparser.c" /* yacc.c:1648 */
1790 1.1.1.2.4.1 christos break;
1791 1.1.1.2.4.1 christos
1792 1.1.1.2.4.1 christos case 66:
1793 1.1.1.2.4.1 christos #line 163 "configparser.y" /* yacc.c:1648 */
1794 1.1 christos {
1795 1.1 christos OUTYY(("P(server_verbosity:%s)\n", (yyvsp[0].str)));
1796 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
1797 1.1 christos yyerror("number expected");
1798 1.1 christos else cfg_parser->opt->verbosity = atoi((yyvsp[0].str));
1799 1.1 christos }
1800 1.1.1.2.4.1 christos #line 1801 "configparser.c" /* yacc.c:1648 */
1801 1.1 christos break;
1802 1.1 christos
1803 1.1.1.2.4.1 christos case 67:
1804 1.1.1.2.4.1 christos #line 171 "configparser.y" /* yacc.c:1648 */
1805 1.1 christos {
1806 1.1 christos OUTYY(("P(server_hide_version:%s)\n", (yyvsp[0].str)));
1807 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1808 1.1 christos yyerror("expected yes or no.");
1809 1.1 christos else cfg_parser->opt->hide_version = (strcmp((yyvsp[0].str), "yes")==0);
1810 1.1 christos }
1811 1.1.1.2.4.1 christos #line 1812 "configparser.c" /* yacc.c:1648 */
1812 1.1 christos break;
1813 1.1 christos
1814 1.1.1.2.4.1 christos case 68:
1815 1.1.1.2.4.1 christos #line 179 "configparser.y" /* yacc.c:1648 */
1816 1.1 christos {
1817 1.1 christos /* for backwards compatibility in config file with NSD3 */
1818 1.1 christos OUTYY(("P(server_ip4_only:%s)\n", (yyvsp[0].str)));
1819 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1820 1.1 christos yyerror("expected yes or no.");
1821 1.1 christos else if(strcmp((yyvsp[0].str), "yes")==0) {
1822 1.1 christos cfg_parser->opt->do_ip4 = 1;
1823 1.1 christos cfg_parser->opt->do_ip6 = 0;
1824 1.1 christos }
1825 1.1 christos }
1826 1.1.1.2.4.1 christos #line 1827 "configparser.c" /* yacc.c:1648 */
1827 1.1 christos break;
1828 1.1 christos
1829 1.1.1.2.4.1 christos case 69:
1830 1.1.1.2.4.1 christos #line 191 "configparser.y" /* yacc.c:1648 */
1831 1.1 christos {
1832 1.1 christos /* for backwards compatibility in config file with NSD3 */
1833 1.1 christos OUTYY(("P(server_ip6_only:%s)\n", (yyvsp[0].str)));
1834 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1835 1.1 christos yyerror("expected yes or no.");
1836 1.1 christos else if(strcmp((yyvsp[0].str), "yes")==0) {
1837 1.1 christos cfg_parser->opt->do_ip6 = 1;
1838 1.1 christos cfg_parser->opt->do_ip4 = 0;
1839 1.1 christos }
1840 1.1 christos }
1841 1.1.1.2.4.1 christos #line 1842 "configparser.c" /* yacc.c:1648 */
1842 1.1 christos break;
1843 1.1 christos
1844 1.1.1.2.4.1 christos case 70:
1845 1.1.1.2.4.1 christos #line 203 "configparser.y" /* yacc.c:1648 */
1846 1.1 christos {
1847 1.1 christos OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[0].str)));
1848 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1849 1.1 christos yyerror("expected yes or no.");
1850 1.1 christos else cfg_parser->opt->do_ip4 = (strcmp((yyvsp[0].str), "yes")==0);
1851 1.1 christos }
1852 1.1.1.2.4.1 christos #line 1853 "configparser.c" /* yacc.c:1648 */
1853 1.1 christos break;
1854 1.1 christos
1855 1.1.1.2.4.1 christos case 71:
1856 1.1.1.2.4.1 christos #line 211 "configparser.y" /* yacc.c:1648 */
1857 1.1 christos {
1858 1.1 christos OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[0].str)));
1859 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1860 1.1 christos yyerror("expected yes or no.");
1861 1.1 christos else cfg_parser->opt->do_ip6 = (strcmp((yyvsp[0].str), "yes")==0);
1862 1.1 christos }
1863 1.1.1.2.4.1 christos #line 1864 "configparser.c" /* yacc.c:1648 */
1864 1.1 christos break;
1865 1.1 christos
1866 1.1.1.2.4.1 christos case 72:
1867 1.1.1.2.4.1 christos #line 219 "configparser.y" /* yacc.c:1648 */
1868 1.1 christos {
1869 1.1 christos OUTYY(("P(server_reuseport:%s)\n", (yyvsp[0].str)));
1870 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1871 1.1 christos yyerror("expected yes or no.");
1872 1.1 christos else cfg_parser->opt->reuseport = (strcmp((yyvsp[0].str), "yes")==0);
1873 1.1 christos }
1874 1.1.1.2.4.1 christos #line 1875 "configparser.c" /* yacc.c:1648 */
1875 1.1 christos break;
1876 1.1 christos
1877 1.1.1.2.4.1 christos case 73:
1878 1.1.1.2.4.1 christos #line 227 "configparser.y" /* yacc.c:1648 */
1879 1.1 christos {
1880 1.1 christos OUTYY(("P(server_database:%s)\n", (yyvsp[0].str)));
1881 1.1 christos cfg_parser->opt->database = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1882 1.1 christos if(cfg_parser->opt->database[0] == 0 &&
1883 1.1 christos cfg_parser->opt->zonefiles_write == 0)
1884 1.1 christos cfg_parser->opt->zonefiles_write = ZONEFILES_WRITE_INTERVAL;
1885 1.1 christos }
1886 1.1.1.2.4.1 christos #line 1887 "configparser.c" /* yacc.c:1648 */
1887 1.1 christos break;
1888 1.1 christos
1889 1.1.1.2.4.1 christos case 74:
1890 1.1.1.2.4.1 christos #line 236 "configparser.y" /* yacc.c:1648 */
1891 1.1 christos {
1892 1.1 christos OUTYY(("P(server_identity:%s)\n", (yyvsp[0].str)));
1893 1.1 christos cfg_parser->opt->identity = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1894 1.1 christos }
1895 1.1.1.2.4.1 christos #line 1896 "configparser.c" /* yacc.c:1648 */
1896 1.1 christos break;
1897 1.1 christos
1898 1.1.1.2.4.1 christos case 75:
1899 1.1.1.2.4.1 christos #line 242 "configparser.y" /* yacc.c:1648 */
1900 1.1 christos {
1901 1.1 christos OUTYY(("P(server_version:%s)\n", (yyvsp[0].str)));
1902 1.1 christos cfg_parser->opt->version = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1903 1.1 christos }
1904 1.1.1.2.4.1 christos #line 1905 "configparser.c" /* yacc.c:1648 */
1905 1.1 christos break;
1906 1.1 christos
1907 1.1.1.2.4.1 christos case 76:
1908 1.1.1.2.4.1 christos #line 248 "configparser.y" /* yacc.c:1648 */
1909 1.1 christos {
1910 1.1 christos unsigned char* nsid = 0;
1911 1.1 christos size_t nsid_len = 0;
1912 1.1 christos
1913 1.1 christos OUTYY(("P(server_nsid:%s)\n", (yyvsp[0].str)));
1914 1.1 christos
1915 1.1 christos if (strncasecmp((yyvsp[0].str), "ascii_", 6) == 0) {
1916 1.1 christos nsid_len = strlen((yyvsp[0].str)+6);
1917 1.1 christos if(nsid_len < 65535) {
1918 1.1 christos cfg_parser->opt->nsid = region_alloc(cfg_parser->opt->region, nsid_len*2+1);
1919 1.1 christos hex_ntop((uint8_t*)(yyvsp[0].str)+6, nsid_len, (char*)cfg_parser->opt->nsid, nsid_len*2+1);
1920 1.1 christos } else
1921 1.1 christos yyerror("NSID too long");
1922 1.1 christos } else if (strlen((yyvsp[0].str)) % 2 != 0) {
1923 1.1 christos yyerror("the NSID must be a hex string of an even length.");
1924 1.1 christos } else {
1925 1.1 christos nsid_len = strlen((yyvsp[0].str)) / 2;
1926 1.1 christos if(nsid_len < 65535) {
1927 1.1 christos nsid = xalloc(nsid_len);
1928 1.1 christos if (hex_pton((yyvsp[0].str), nsid, nsid_len) == -1)
1929 1.1 christos yyerror("hex string cannot be parsed in NSID.");
1930 1.1 christos else
1931 1.1 christos cfg_parser->opt->nsid = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1932 1.1 christos free(nsid);
1933 1.1 christos } else
1934 1.1 christos yyerror("NSID too long");
1935 1.1 christos }
1936 1.1 christos }
1937 1.1.1.2.4.1 christos #line 1938 "configparser.c" /* yacc.c:1648 */
1938 1.1 christos break;
1939 1.1 christos
1940 1.1.1.2.4.1 christos case 77:
1941 1.1.1.2.4.1 christos #line 278 "configparser.y" /* yacc.c:1648 */
1942 1.1 christos {
1943 1.1 christos OUTYY(("P(server_logfile:%s)\n", (yyvsp[0].str)));
1944 1.1 christos cfg_parser->opt->logfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
1945 1.1 christos }
1946 1.1.1.2.4.1 christos #line 1947 "configparser.c" /* yacc.c:1648 */
1947 1.1 christos break;
1948 1.1 christos
1949 1.1.1.2.4.1 christos case 78:
1950 1.1.1.2.4.1 christos #line 284 "configparser.y" /* yacc.c:1648 */
1951 1.1 christos {
1952 1.1 christos OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[0].str)));
1953 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1954 1.1 christos yyerror("expected yes or no.");
1955 1.1 christos else {
1956 1.1 christos cfg_parser->opt->log_time_ascii = (strcmp((yyvsp[0].str), "yes")==0);
1957 1.1 christos log_time_asc = cfg_parser->opt->log_time_ascii;
1958 1.1 christos }
1959 1.1 christos }
1960 1.1.1.2.4.1 christos #line 1961 "configparser.c" /* yacc.c:1648 */
1961 1.1 christos break;
1962 1.1 christos
1963 1.1.1.2.4.1 christos case 79:
1964 1.1.1.2.4.1 christos #line 295 "configparser.y" /* yacc.c:1648 */
1965 1.1 christos {
1966 1.1 christos OUTYY(("P(server_round_robin:%s)\n", (yyvsp[0].str)));
1967 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1968 1.1 christos yyerror("expected yes or no.");
1969 1.1 christos else {
1970 1.1 christos cfg_parser->opt->round_robin = (strcmp((yyvsp[0].str), "yes")==0);
1971 1.1 christos round_robin = cfg_parser->opt->round_robin;
1972 1.1 christos }
1973 1.1 christos }
1974 1.1.1.2.4.1 christos #line 1975 "configparser.c" /* yacc.c:1648 */
1975 1.1 christos break;
1976 1.1 christos
1977 1.1.1.2.4.1 christos case 80:
1978 1.1.1.2.4.1 christos #line 306 "configparser.y" /* yacc.c:1648 */
1979 1.1.1.2 christos {
1980 1.1.1.2 christos OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[0].str)));
1981 1.1.1.2 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1982 1.1.1.2 christos yyerror("expected yes or no.");
1983 1.1.1.2 christos else {
1984 1.1.1.2 christos cfg_parser->opt->minimal_responses = (strcmp((yyvsp[0].str), "yes")==0);
1985 1.1.1.2 christos minimal_responses = cfg_parser->opt->minimal_responses;
1986 1.1.1.2 christos }
1987 1.1.1.2 christos }
1988 1.1.1.2.4.1 christos #line 1989 "configparser.c" /* yacc.c:1648 */
1989 1.1.1.2 christos break;
1990 1.1.1.2 christos
1991 1.1.1.2.4.1 christos case 81:
1992 1.1.1.2.4.1 christos #line 317 "configparser.y" /* yacc.c:1648 */
1993 1.1.1.2.4.1 christos {
1994 1.1.1.2.4.1 christos OUTYY(("P(server_refuse_any:%s)\n", (yyvsp[0].str)));
1995 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
1996 1.1.1.2.4.1 christos yyerror("expected yes or no.");
1997 1.1.1.2.4.1 christos else {
1998 1.1.1.2.4.1 christos cfg_parser->opt->refuse_any = (strcmp((yyvsp[0].str), "yes")==0);
1999 1.1.1.2.4.1 christos }
2000 1.1.1.2.4.1 christos }
2001 1.1.1.2.4.1 christos #line 2002 "configparser.c" /* yacc.c:1648 */
2002 1.1.1.2.4.1 christos break;
2003 1.1.1.2.4.1 christos
2004 1.1.1.2.4.1 christos case 82:
2005 1.1.1.2.4.1 christos #line 327 "configparser.y" /* yacc.c:1648 */
2006 1.1 christos {
2007 1.1 christos OUTYY(("P(server_server_count:%s)\n", (yyvsp[0].str)));
2008 1.1 christos if(atoi((yyvsp[0].str)) <= 0)
2009 1.1 christos yyerror("number greater than zero expected");
2010 1.1 christos else cfg_parser->opt->server_count = atoi((yyvsp[0].str));
2011 1.1 christos }
2012 1.1.1.2.4.1 christos #line 2013 "configparser.c" /* yacc.c:1648 */
2013 1.1 christos break;
2014 1.1 christos
2015 1.1.1.2.4.1 christos case 83:
2016 1.1.1.2.4.1 christos #line 335 "configparser.y" /* yacc.c:1648 */
2017 1.1 christos {
2018 1.1 christos OUTYY(("P(server_tcp_count:%s)\n", (yyvsp[0].str)));
2019 1.1 christos if(atoi((yyvsp[0].str)) <= 0)
2020 1.1 christos yyerror("number greater than zero expected");
2021 1.1 christos else cfg_parser->opt->tcp_count = atoi((yyvsp[0].str));
2022 1.1 christos }
2023 1.1.1.2.4.1 christos #line 2024 "configparser.c" /* yacc.c:1648 */
2024 1.1 christos break;
2025 1.1 christos
2026 1.1.1.2.4.1 christos case 84:
2027 1.1.1.2.4.1 christos #line 343 "configparser.y" /* yacc.c:1648 */
2028 1.1 christos {
2029 1.1 christos OUTYY(("P(server_pidfile:%s)\n", (yyvsp[0].str)));
2030 1.1 christos cfg_parser->opt->pidfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2031 1.1 christos }
2032 1.1.1.2.4.1 christos #line 2033 "configparser.c" /* yacc.c:1648 */
2033 1.1 christos break;
2034 1.1 christos
2035 1.1.1.2.4.1 christos case 85:
2036 1.1.1.2.4.1 christos #line 349 "configparser.y" /* yacc.c:1648 */
2037 1.1 christos {
2038 1.1 christos OUTYY(("P(server_port:%s)\n", (yyvsp[0].str)));
2039 1.1 christos cfg_parser->opt->port = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2040 1.1 christos }
2041 1.1.1.2.4.1 christos #line 2042 "configparser.c" /* yacc.c:1648 */
2042 1.1 christos break;
2043 1.1 christos
2044 1.1.1.2.4.1 christos case 86:
2045 1.1.1.2.4.1 christos #line 355 "configparser.y" /* yacc.c:1648 */
2046 1.1 christos {
2047 1.1 christos OUTYY(("P(server_statistics:%s)\n", (yyvsp[0].str)));
2048 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2049 1.1 christos yyerror("number expected");
2050 1.1 christos else cfg_parser->opt->statistics = atoi((yyvsp[0].str));
2051 1.1 christos }
2052 1.1.1.2.4.1 christos #line 2053 "configparser.c" /* yacc.c:1648 */
2053 1.1 christos break;
2054 1.1 christos
2055 1.1.1.2.4.1 christos case 87:
2056 1.1.1.2.4.1 christos #line 363 "configparser.y" /* yacc.c:1648 */
2057 1.1 christos {
2058 1.1 christos OUTYY(("P(server_chroot:%s)\n", (yyvsp[0].str)));
2059 1.1 christos cfg_parser->opt->chroot = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2060 1.1 christos }
2061 1.1.1.2.4.1 christos #line 2062 "configparser.c" /* yacc.c:1648 */
2062 1.1 christos break;
2063 1.1 christos
2064 1.1.1.2.4.1 christos case 88:
2065 1.1.1.2.4.1 christos #line 369 "configparser.y" /* yacc.c:1648 */
2066 1.1 christos {
2067 1.1 christos OUTYY(("P(server_username:%s)\n", (yyvsp[0].str)));
2068 1.1 christos cfg_parser->opt->username = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2069 1.1 christos }
2070 1.1.1.2.4.1 christos #line 2071 "configparser.c" /* yacc.c:1648 */
2071 1.1 christos break;
2072 1.1 christos
2073 1.1.1.2.4.1 christos case 89:
2074 1.1.1.2.4.1 christos #line 375 "configparser.y" /* yacc.c:1648 */
2075 1.1 christos {
2076 1.1 christos OUTYY(("P(server_zonesdir:%s)\n", (yyvsp[0].str)));
2077 1.1 christos cfg_parser->opt->zonesdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2078 1.1 christos }
2079 1.1.1.2.4.1 christos #line 2080 "configparser.c" /* yacc.c:1648 */
2080 1.1 christos break;
2081 1.1 christos
2082 1.1.1.2.4.1 christos case 90:
2083 1.1.1.2.4.1 christos #line 381 "configparser.y" /* yacc.c:1648 */
2084 1.1 christos {
2085 1.1 christos OUTYY(("P(server_zonelistfile:%s)\n", (yyvsp[0].str)));
2086 1.1 christos cfg_parser->opt->zonelistfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2087 1.1 christos }
2088 1.1.1.2.4.1 christos #line 2089 "configparser.c" /* yacc.c:1648 */
2089 1.1 christos break;
2090 1.1 christos
2091 1.1.1.2.4.1 christos case 91:
2092 1.1.1.2.4.1 christos #line 387 "configparser.y" /* yacc.c:1648 */
2093 1.1 christos {
2094 1.1 christos OUTYY(("P(server_xfrdir:%s)\n", (yyvsp[0].str)));
2095 1.1 christos cfg_parser->opt->xfrdir = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2096 1.1 christos }
2097 1.1.1.2.4.1 christos #line 2098 "configparser.c" /* yacc.c:1648 */
2098 1.1 christos break;
2099 1.1 christos
2100 1.1.1.2.4.1 christos case 92:
2101 1.1.1.2.4.1 christos #line 393 "configparser.y" /* yacc.c:1648 */
2102 1.1 christos {
2103 1.1 christos OUTYY(("P(server_difffile:%s)\n", (yyvsp[0].str)));
2104 1.1 christos /* ignore the value for backwards compatibility in config file*/
2105 1.1 christos }
2106 1.1.1.2.4.1 christos #line 2107 "configparser.c" /* yacc.c:1648 */
2107 1.1 christos break;
2108 1.1 christos
2109 1.1.1.2.4.1 christos case 93:
2110 1.1.1.2.4.1 christos #line 399 "configparser.y" /* yacc.c:1648 */
2111 1.1 christos {
2112 1.1 christos OUTYY(("P(server_xfrdfile:%s)\n", (yyvsp[0].str)));
2113 1.1 christos cfg_parser->opt->xfrdfile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2114 1.1 christos }
2115 1.1.1.2.4.1 christos #line 2116 "configparser.c" /* yacc.c:1648 */
2116 1.1 christos break;
2117 1.1 christos
2118 1.1.1.2.4.1 christos case 94:
2119 1.1.1.2.4.1 christos #line 405 "configparser.y" /* yacc.c:1648 */
2120 1.1 christos {
2121 1.1 christos OUTYY(("P(server_xfrd_reload_timeout:%s)\n", (yyvsp[0].str)));
2122 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2123 1.1 christos yyerror("number expected");
2124 1.1 christos cfg_parser->opt->xfrd_reload_timeout = atoi((yyvsp[0].str));
2125 1.1 christos }
2126 1.1.1.2.4.1 christos #line 2127 "configparser.c" /* yacc.c:1648 */
2127 1.1 christos break;
2128 1.1 christos
2129 1.1.1.2.4.1 christos case 95:
2130 1.1.1.2.4.1 christos #line 413 "configparser.y" /* yacc.c:1648 */
2131 1.1 christos {
2132 1.1 christos OUTYY(("P(server_tcp_query_count:%s)\n", (yyvsp[0].str)));
2133 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2134 1.1 christos yyerror("number expected");
2135 1.1 christos cfg_parser->opt->tcp_query_count = atoi((yyvsp[0].str));
2136 1.1 christos }
2137 1.1.1.2.4.1 christos #line 2138 "configparser.c" /* yacc.c:1648 */
2138 1.1 christos break;
2139 1.1 christos
2140 1.1.1.2.4.1 christos case 96:
2141 1.1.1.2.4.1 christos #line 421 "configparser.y" /* yacc.c:1648 */
2142 1.1 christos {
2143 1.1 christos OUTYY(("P(server_tcp_timeout:%s)\n", (yyvsp[0].str)));
2144 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2145 1.1 christos yyerror("number expected");
2146 1.1 christos cfg_parser->opt->tcp_timeout = atoi((yyvsp[0].str));
2147 1.1 christos }
2148 1.1.1.2.4.1 christos #line 2149 "configparser.c" /* yacc.c:1648 */
2149 1.1 christos break;
2150 1.1 christos
2151 1.1.1.2.4.1 christos case 97:
2152 1.1.1.2.4.1 christos #line 429 "configparser.y" /* yacc.c:1648 */
2153 1.1 christos {
2154 1.1 christos OUTYY(("P(server_tcp_mss:%s)\n", (yyvsp[0].str)));
2155 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2156 1.1 christos yyerror("number expected");
2157 1.1 christos cfg_parser->opt->tcp_mss = atoi((yyvsp[0].str));
2158 1.1 christos }
2159 1.1.1.2.4.1 christos #line 2160 "configparser.c" /* yacc.c:1648 */
2160 1.1 christos break;
2161 1.1 christos
2162 1.1.1.2.4.1 christos case 98:
2163 1.1.1.2.4.1 christos #line 437 "configparser.y" /* yacc.c:1648 */
2164 1.1 christos {
2165 1.1 christos OUTYY(("P(server_outgoing_tcp_mss:%s)\n", (yyvsp[0].str)));
2166 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2167 1.1 christos yyerror("number expected");
2168 1.1 christos cfg_parser->opt->outgoing_tcp_mss = atoi((yyvsp[0].str));
2169 1.1 christos }
2170 1.1.1.2.4.1 christos #line 2171 "configparser.c" /* yacc.c:1648 */
2171 1.1 christos break;
2172 1.1 christos
2173 1.1.1.2.4.1 christos case 99:
2174 1.1.1.2.4.1 christos #line 445 "configparser.y" /* yacc.c:1648 */
2175 1.1 christos {
2176 1.1 christos OUTYY(("P(server_ipv4_edns_size:%s)\n", (yyvsp[0].str)));
2177 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2178 1.1 christos yyerror("number expected");
2179 1.1 christos cfg_parser->opt->ipv4_edns_size = atoi((yyvsp[0].str));
2180 1.1 christos }
2181 1.1.1.2.4.1 christos #line 2182 "configparser.c" /* yacc.c:1648 */
2182 1.1 christos break;
2183 1.1 christos
2184 1.1.1.2.4.1 christos case 100:
2185 1.1.1.2.4.1 christos #line 453 "configparser.y" /* yacc.c:1648 */
2186 1.1 christos {
2187 1.1 christos OUTYY(("P(server_ipv6_edns_size:%s)\n", (yyvsp[0].str)));
2188 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2189 1.1 christos yyerror("number expected");
2190 1.1 christos cfg_parser->opt->ipv6_edns_size = atoi((yyvsp[0].str));
2191 1.1 christos }
2192 1.1.1.2.4.1 christos #line 2193 "configparser.c" /* yacc.c:1648 */
2193 1.1 christos break;
2194 1.1 christos
2195 1.1.1.2.4.1 christos case 101:
2196 1.1.1.2.4.1 christos #line 461 "configparser.y" /* yacc.c:1648 */
2197 1.1 christos {
2198 1.1 christos OUTYY(("P(server_rrl_size:%s)\n", (yyvsp[0].str)));
2199 1.1 christos #ifdef RATELIMIT
2200 1.1 christos if(atoi((yyvsp[0].str)) <= 0)
2201 1.1 christos yyerror("number greater than zero expected");
2202 1.1 christos cfg_parser->opt->rrl_size = atoi((yyvsp[0].str));
2203 1.1 christos #endif
2204 1.1 christos }
2205 1.1.1.2.4.1 christos #line 2206 "configparser.c" /* yacc.c:1648 */
2206 1.1 christos break;
2207 1.1 christos
2208 1.1.1.2.4.1 christos case 102:
2209 1.1.1.2.4.1 christos #line 471 "configparser.y" /* yacc.c:1648 */
2210 1.1 christos {
2211 1.1 christos OUTYY(("P(server_rrl_ratelimit:%s)\n", (yyvsp[0].str)));
2212 1.1 christos #ifdef RATELIMIT
2213 1.1 christos cfg_parser->opt->rrl_ratelimit = atoi((yyvsp[0].str));
2214 1.1 christos #endif
2215 1.1 christos }
2216 1.1.1.2.4.1 christos #line 2217 "configparser.c" /* yacc.c:1648 */
2217 1.1 christos break;
2218 1.1 christos
2219 1.1.1.2.4.1 christos case 103:
2220 1.1.1.2.4.1 christos #line 479 "configparser.y" /* yacc.c:1648 */
2221 1.1 christos {
2222 1.1 christos OUTYY(("P(server_rrl_slip:%s)\n", (yyvsp[0].str)));
2223 1.1 christos #ifdef RATELIMIT
2224 1.1 christos if(atoi((yyvsp[0].str)) < 0)
2225 1.1 christos yyerror("number equal or greater than zero expected");
2226 1.1 christos cfg_parser->opt->rrl_slip = atoi((yyvsp[0].str));
2227 1.1 christos #endif
2228 1.1 christos }
2229 1.1.1.2.4.1 christos #line 2230 "configparser.c" /* yacc.c:1648 */
2230 1.1 christos break;
2231 1.1 christos
2232 1.1.1.2.4.1 christos case 104:
2233 1.1.1.2.4.1 christos #line 489 "configparser.y" /* yacc.c:1648 */
2234 1.1 christos {
2235 1.1 christos OUTYY(("P(server_rrl_ipv4_prefix_length:%s)\n", (yyvsp[0].str)));
2236 1.1 christos #ifdef RATELIMIT
2237 1.1 christos if(atoi((yyvsp[0].str)) < 0 || atoi((yyvsp[0].str)) > 32)
2238 1.1 christos yyerror("invalid IPv4 prefix length");
2239 1.1 christos cfg_parser->opt->rrl_ipv4_prefix_length = atoi((yyvsp[0].str));
2240 1.1 christos #endif
2241 1.1 christos }
2242 1.1.1.2.4.1 christos #line 2243 "configparser.c" /* yacc.c:1648 */
2243 1.1 christos break;
2244 1.1 christos
2245 1.1.1.2.4.1 christos case 105:
2246 1.1.1.2.4.1 christos #line 499 "configparser.y" /* yacc.c:1648 */
2247 1.1 christos {
2248 1.1 christos OUTYY(("P(server_rrl_ipv6_prefix_length:%s)\n", (yyvsp[0].str)));
2249 1.1 christos #ifdef RATELIMIT
2250 1.1 christos if(atoi((yyvsp[0].str)) < 0 || atoi((yyvsp[0].str)) > 64)
2251 1.1 christos yyerror("invalid IPv6 prefix length");
2252 1.1 christos cfg_parser->opt->rrl_ipv6_prefix_length = atoi((yyvsp[0].str));
2253 1.1 christos #endif
2254 1.1 christos }
2255 1.1.1.2.4.1 christos #line 2256 "configparser.c" /* yacc.c:1648 */
2256 1.1 christos break;
2257 1.1 christos
2258 1.1.1.2.4.1 christos case 106:
2259 1.1.1.2.4.1 christos #line 509 "configparser.y" /* yacc.c:1648 */
2260 1.1 christos {
2261 1.1 christos OUTYY(("P(server_rrl_whitelist_ratelimit:%s)\n", (yyvsp[0].str)));
2262 1.1 christos #ifdef RATELIMIT
2263 1.1 christos cfg_parser->opt->rrl_whitelist_ratelimit = atoi((yyvsp[0].str));
2264 1.1 christos #endif
2265 1.1 christos }
2266 1.1.1.2.4.1 christos #line 2267 "configparser.c" /* yacc.c:1648 */
2267 1.1 christos break;
2268 1.1 christos
2269 1.1.1.2.4.1 christos case 107:
2270 1.1.1.2.4.1 christos #line 517 "configparser.y" /* yacc.c:1648 */
2271 1.1 christos {
2272 1.1 christos OUTYY(("P(server_zonefiles_check:%s)\n", (yyvsp[0].str)));
2273 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2274 1.1 christos yyerror("expected yes or no.");
2275 1.1 christos else cfg_parser->opt->zonefiles_check = (strcmp((yyvsp[0].str), "yes")==0);
2276 1.1 christos }
2277 1.1.1.2.4.1 christos #line 2278 "configparser.c" /* yacc.c:1648 */
2278 1.1 christos break;
2279 1.1 christos
2280 1.1.1.2.4.1 christos case 108:
2281 1.1.1.2.4.1 christos #line 525 "configparser.y" /* yacc.c:1648 */
2282 1.1 christos {
2283 1.1 christos OUTYY(("P(server_zonefiles_write:%s)\n", (yyvsp[0].str)));
2284 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2285 1.1 christos yyerror("number expected");
2286 1.1 christos else cfg_parser->opt->zonefiles_write = atoi((yyvsp[0].str));
2287 1.1 christos }
2288 1.1.1.2.4.1 christos #line 2289 "configparser.c" /* yacc.c:1648 */
2289 1.1 christos break;
2290 1.1 christos
2291 1.1.1.2.4.1 christos case 109:
2292 1.1.1.2.4.1 christos #line 534 "configparser.y" /* yacc.c:1648 */
2293 1.1 christos {
2294 1.1 christos OUTYY(("\nP(remote-control:)\n"));
2295 1.1 christos }
2296 1.1.1.2.4.1 christos #line 2297 "configparser.c" /* yacc.c:1648 */
2297 1.1 christos break;
2298 1.1 christos
2299 1.1.1.2.4.1 christos case 119:
2300 1.1.1.2.4.1 christos #line 545 "configparser.y" /* yacc.c:1648 */
2301 1.1 christos {
2302 1.1 christos OUTYY(("P(control_enable:%s)\n", (yyvsp[0].str)));
2303 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2304 1.1 christos yyerror("expected yes or no.");
2305 1.1 christos else cfg_parser->opt->control_enable = (strcmp((yyvsp[0].str), "yes")==0);
2306 1.1 christos }
2307 1.1.1.2.4.1 christos #line 2308 "configparser.c" /* yacc.c:1648 */
2308 1.1 christos break;
2309 1.1 christos
2310 1.1.1.2.4.1 christos case 120:
2311 1.1.1.2.4.1 christos #line 553 "configparser.y" /* yacc.c:1648 */
2312 1.1 christos {
2313 1.1 christos OUTYY(("P(control_port:%s)\n", (yyvsp[0].str)));
2314 1.1 christos if(atoi((yyvsp[0].str)) == 0)
2315 1.1 christos yyerror("control port number expected");
2316 1.1 christos else cfg_parser->opt->control_port = atoi((yyvsp[0].str));
2317 1.1 christos }
2318 1.1.1.2.4.1 christos #line 2319 "configparser.c" /* yacc.c:1648 */
2319 1.1 christos break;
2320 1.1 christos
2321 1.1.1.2.4.1 christos case 121:
2322 1.1.1.2.4.1 christos #line 561 "configparser.y" /* yacc.c:1648 */
2323 1.1 christos {
2324 1.1.1.2.4.1 christos ip_address_option_type* last = NULL;
2325 1.1.1.2 christos ip_address_option_type* o = (ip_address_option_type*)region_alloc(
2326 1.1.1.2 christos cfg_parser->opt->region, sizeof(ip_address_option_type));
2327 1.1 christos OUTYY(("P(control_interface:%s)\n", (yyvsp[0].str)));
2328 1.1.1.2.4.1 christos /* append at end */
2329 1.1.1.2.4.1 christos last = cfg_parser->opt->control_interface;
2330 1.1.1.2.4.1 christos while(last && last->next)
2331 1.1.1.2.4.1 christos last = last->next;
2332 1.1.1.2.4.1 christos if(last == NULL)
2333 1.1.1.2.4.1 christos cfg_parser->opt->control_interface = o;
2334 1.1.1.2.4.1 christos else last->next = o;
2335 1.1.1.2.4.1 christos o->next = NULL;
2336 1.1 christos o->address = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2337 1.1 christos }
2338 1.1.1.2.4.1 christos #line 2339 "configparser.c" /* yacc.c:1648 */
2339 1.1 christos break;
2340 1.1 christos
2341 1.1.1.2.4.1 christos case 122:
2342 1.1.1.2.4.1 christos #line 578 "configparser.y" /* yacc.c:1648 */
2343 1.1 christos {
2344 1.1 christos OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[0].str)));
2345 1.1 christos cfg_parser->opt->server_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2346 1.1 christos }
2347 1.1.1.2.4.1 christos #line 2348 "configparser.c" /* yacc.c:1648 */
2348 1.1 christos break;
2349 1.1 christos
2350 1.1.1.2.4.1 christos case 123:
2351 1.1.1.2.4.1 christos #line 584 "configparser.y" /* yacc.c:1648 */
2352 1.1 christos {
2353 1.1 christos OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[0].str)));
2354 1.1 christos cfg_parser->opt->server_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2355 1.1 christos }
2356 1.1.1.2.4.1 christos #line 2357 "configparser.c" /* yacc.c:1648 */
2357 1.1 christos break;
2358 1.1 christos
2359 1.1.1.2.4.1 christos case 124:
2360 1.1.1.2.4.1 christos #line 590 "configparser.y" /* yacc.c:1648 */
2361 1.1 christos {
2362 1.1 christos OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[0].str)));
2363 1.1 christos cfg_parser->opt->control_key_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2364 1.1 christos }
2365 1.1.1.2.4.1 christos #line 2366 "configparser.c" /* yacc.c:1648 */
2366 1.1 christos break;
2367 1.1 christos
2368 1.1.1.2.4.1 christos case 125:
2369 1.1.1.2.4.1 christos #line 596 "configparser.y" /* yacc.c:1648 */
2370 1.1 christos {
2371 1.1 christos OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[0].str)));
2372 1.1 christos cfg_parser->opt->control_cert_file = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2373 1.1 christos }
2374 1.1.1.2.4.1 christos #line 2375 "configparser.c" /* yacc.c:1648 */
2375 1.1 christos break;
2376 1.1 christos
2377 1.1.1.2.4.1 christos case 126:
2378 1.1.1.2.4.1 christos #line 604 "configparser.y" /* yacc.c:1648 */
2379 1.1.1.2.4.1 christos {
2380 1.1.1.2.4.1 christos OUTYY(("\nP(dnstap:)\n"));
2381 1.1.1.2.4.1 christos }
2382 1.1.1.2.4.1 christos #line 2383 "configparser.c" /* yacc.c:1648 */
2383 1.1.1.2.4.1 christos break;
2384 1.1.1.2.4.1 christos
2385 1.1.1.2.4.1 christos case 137:
2386 1.1.1.2.4.1 christos #line 617 "configparser.y" /* yacc.c:1648 */
2387 1.1.1.2.4.1 christos {
2388 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_enable:%s)\n", (yyvsp[0].str)));
2389 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2390 1.1.1.2.4.1 christos yyerror("expected yes or no.");
2391 1.1.1.2.4.1 christos else cfg_parser->opt->dnstap_enable = (strcmp((yyvsp[0].str), "yes")==0);
2392 1.1.1.2.4.1 christos }
2393 1.1.1.2.4.1 christos #line 2394 "configparser.c" /* yacc.c:1648 */
2394 1.1.1.2.4.1 christos break;
2395 1.1.1.2.4.1 christos
2396 1.1.1.2.4.1 christos case 138:
2397 1.1.1.2.4.1 christos #line 625 "configparser.y" /* yacc.c:1648 */
2398 1.1.1.2.4.1 christos {
2399 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_socket_path:%s)\n", (yyvsp[0].str)));
2400 1.1.1.2.4.1 christos cfg_parser->opt->dnstap_socket_path = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2401 1.1.1.2.4.1 christos }
2402 1.1.1.2.4.1 christos #line 2403 "configparser.c" /* yacc.c:1648 */
2403 1.1.1.2.4.1 christos break;
2404 1.1.1.2.4.1 christos
2405 1.1.1.2.4.1 christos case 139:
2406 1.1.1.2.4.1 christos #line 631 "configparser.y" /* yacc.c:1648 */
2407 1.1.1.2.4.1 christos {
2408 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_send_identity:%s)\n", (yyvsp[0].str)));
2409 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2410 1.1.1.2.4.1 christos yyerror("expected yes or no.");
2411 1.1.1.2.4.1 christos else cfg_parser->opt->dnstap_send_identity = (strcmp((yyvsp[0].str), "yes")==0);
2412 1.1.1.2.4.1 christos }
2413 1.1.1.2.4.1 christos #line 2414 "configparser.c" /* yacc.c:1648 */
2414 1.1.1.2.4.1 christos break;
2415 1.1.1.2.4.1 christos
2416 1.1.1.2.4.1 christos case 140:
2417 1.1.1.2.4.1 christos #line 639 "configparser.y" /* yacc.c:1648 */
2418 1.1.1.2.4.1 christos {
2419 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_send_version:%s)\n", (yyvsp[0].str)));
2420 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2421 1.1.1.2.4.1 christos yyerror("expected yes or no.");
2422 1.1.1.2.4.1 christos else cfg_parser->opt->dnstap_send_version = (strcmp((yyvsp[0].str), "yes")==0);
2423 1.1.1.2.4.1 christos }
2424 1.1.1.2.4.1 christos #line 2425 "configparser.c" /* yacc.c:1648 */
2425 1.1.1.2.4.1 christos break;
2426 1.1.1.2.4.1 christos
2427 1.1.1.2.4.1 christos case 141:
2428 1.1.1.2.4.1 christos #line 647 "configparser.y" /* yacc.c:1648 */
2429 1.1.1.2.4.1 christos {
2430 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_identity:%s)\n", (yyvsp[0].str)));
2431 1.1.1.2.4.1 christos cfg_parser->opt->dnstap_identity = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2432 1.1.1.2.4.1 christos }
2433 1.1.1.2.4.1 christos #line 2434 "configparser.c" /* yacc.c:1648 */
2434 1.1.1.2.4.1 christos break;
2435 1.1.1.2.4.1 christos
2436 1.1.1.2.4.1 christos case 142:
2437 1.1.1.2.4.1 christos #line 653 "configparser.y" /* yacc.c:1648 */
2438 1.1.1.2.4.1 christos {
2439 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_version:%s)\n", (yyvsp[0].str)));
2440 1.1.1.2.4.1 christos cfg_parser->opt->dnstap_version = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2441 1.1.1.2.4.1 christos }
2442 1.1.1.2.4.1 christos #line 2443 "configparser.c" /* yacc.c:1648 */
2443 1.1.1.2.4.1 christos break;
2444 1.1.1.2.4.1 christos
2445 1.1.1.2.4.1 christos case 143:
2446 1.1.1.2.4.1 christos #line 659 "configparser.y" /* yacc.c:1648 */
2447 1.1.1.2.4.1 christos {
2448 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_log_auth_query_messages:%s)\n", (yyvsp[0].str)));
2449 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2450 1.1.1.2.4.1 christos yyerror("expected yes or no.");
2451 1.1.1.2.4.1 christos else cfg_parser->opt->dnstap_log_auth_query_messages = (strcmp((yyvsp[0].str), "yes")==0);
2452 1.1.1.2.4.1 christos }
2453 1.1.1.2.4.1 christos #line 2454 "configparser.c" /* yacc.c:1648 */
2454 1.1.1.2.4.1 christos break;
2455 1.1.1.2.4.1 christos
2456 1.1.1.2.4.1 christos case 144:
2457 1.1.1.2.4.1 christos #line 667 "configparser.y" /* yacc.c:1648 */
2458 1.1.1.2.4.1 christos {
2459 1.1.1.2.4.1 christos OUTYY(("P(dt_dnstap_log_auth_response_messages:%s)\n", (yyvsp[0].str)));
2460 1.1.1.2.4.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2461 1.1.1.2.4.1 christos yyerror("expected yes or no.");
2462 1.1.1.2.4.1 christos else cfg_parser->opt->dnstap_log_auth_response_messages = (strcmp((yyvsp[0].str), "yes")==0);
2463 1.1.1.2.4.1 christos }
2464 1.1.1.2.4.1 christos #line 2465 "configparser.c" /* yacc.c:1648 */
2465 1.1.1.2.4.1 christos break;
2466 1.1.1.2.4.1 christos
2467 1.1.1.2.4.1 christos case 145:
2468 1.1.1.2.4.1 christos #line 677 "configparser.y" /* yacc.c:1648 */
2469 1.1 christos {
2470 1.1 christos OUTYY(("\nP(pattern:)\n"));
2471 1.1 christos if(cfg_parser->current_zone) {
2472 1.1 christos if(!cfg_parser->current_zone->name)
2473 1.1 christos c_error("previous zone has no name");
2474 1.1 christos else {
2475 1.1 christos if(!nsd_options_insert_zone(cfg_parser->opt,
2476 1.1 christos cfg_parser->current_zone))
2477 1.1 christos c_error("duplicate zone");
2478 1.1 christos }
2479 1.1 christos if(!cfg_parser->current_zone->pattern)
2480 1.1 christos c_error("previous zone has no pattern");
2481 1.1 christos cfg_parser->current_zone = NULL;
2482 1.1 christos }
2483 1.1 christos if(cfg_parser->current_pattern) {
2484 1.1 christos if(!cfg_parser->current_pattern->pname)
2485 1.1 christos c_error("previous pattern has no name");
2486 1.1 christos else {
2487 1.1 christos if(!nsd_options_insert_pattern(cfg_parser->opt,
2488 1.1 christos cfg_parser->current_pattern))
2489 1.1 christos c_error_msg("duplicate pattern %s",
2490 1.1 christos cfg_parser->current_pattern->pname);
2491 1.1 christos }
2492 1.1 christos }
2493 1.1 christos cfg_parser->current_pattern = pattern_options_create(
2494 1.1 christos cfg_parser->opt->region);
2495 1.1 christos cfg_parser->current_allow_notify = 0;
2496 1.1 christos cfg_parser->current_request_xfr = 0;
2497 1.1 christos cfg_parser->current_notify = 0;
2498 1.1 christos cfg_parser->current_provide_xfr = 0;
2499 1.1 christos cfg_parser->current_outgoing_interface = 0;
2500 1.1 christos }
2501 1.1.1.2.4.1 christos #line 2502 "configparser.c" /* yacc.c:1648 */
2502 1.1 christos break;
2503 1.1 christos
2504 1.1.1.2.4.1 christos case 167:
2505 1.1.1.2.4.1 christos #line 719 "configparser.y" /* yacc.c:1648 */
2506 1.1 christos {
2507 1.1 christos OUTYY(("P(pattern_name:%s)\n", (yyvsp[0].str)));
2508 1.1 christos #ifndef NDEBUG
2509 1.1 christos assert(cfg_parser->current_pattern);
2510 1.1 christos #endif
2511 1.1 christos if(strchr((yyvsp[0].str), ' '))
2512 1.1 christos c_error_msg("space is not allowed in pattern name: "
2513 1.1 christos "'%s'", (yyvsp[0].str));
2514 1.1 christos cfg_parser->current_pattern->pname = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2515 1.1 christos }
2516 1.1.1.2.4.1 christos #line 2517 "configparser.c" /* yacc.c:1648 */
2517 1.1 christos break;
2518 1.1 christos
2519 1.1.1.2.4.1 christos case 168:
2520 1.1.1.2.4.1 christos #line 731 "configparser.y" /* yacc.c:1648 */
2521 1.1 christos {
2522 1.1 christos OUTYY(("P(include-pattern:%s)\n", (yyvsp[0].str)));
2523 1.1 christos #ifndef NDEBUG
2524 1.1 christos assert(cfg_parser->current_pattern);
2525 1.1 christos #endif
2526 1.1 christos config_apply_pattern((yyvsp[0].str));
2527 1.1 christos }
2528 1.1.1.2.4.1 christos #line 2529 "configparser.c" /* yacc.c:1648 */
2529 1.1 christos break;
2530 1.1 christos
2531 1.1.1.2.4.1 christos case 169:
2532 1.1.1.2.4.1 christos #line 742 "configparser.y" /* yacc.c:1648 */
2533 1.1 christos {
2534 1.1 christos OUTYY(("\nP(zone:)\n"));
2535 1.1 christos if(cfg_parser->current_zone) {
2536 1.1 christos if(!cfg_parser->current_zone->name)
2537 1.1 christos c_error("previous zone has no name");
2538 1.1 christos else {
2539 1.1 christos if(!nsd_options_insert_zone(cfg_parser->opt,
2540 1.1 christos cfg_parser->current_zone))
2541 1.1 christos c_error("duplicate zone");
2542 1.1 christos }
2543 1.1 christos if(!cfg_parser->current_zone->pattern)
2544 1.1 christos c_error("previous zone has no pattern");
2545 1.1 christos }
2546 1.1 christos if(cfg_parser->current_pattern) {
2547 1.1 christos if(!cfg_parser->current_pattern->pname)
2548 1.1 christos c_error("previous pattern has no name");
2549 1.1 christos else {
2550 1.1 christos if(!nsd_options_insert_pattern(cfg_parser->opt,
2551 1.1 christos cfg_parser->current_pattern))
2552 1.1 christos c_error_msg("duplicate pattern %s",
2553 1.1 christos cfg_parser->current_pattern->pname);
2554 1.1 christos }
2555 1.1 christos }
2556 1.1 christos cfg_parser->current_zone = zone_options_create(cfg_parser->opt->region);
2557 1.1 christos cfg_parser->current_zone->part_of_config = 1;
2558 1.1 christos cfg_parser->current_pattern = pattern_options_create(
2559 1.1 christos cfg_parser->opt->region);
2560 1.1 christos cfg_parser->current_pattern->implicit = 1;
2561 1.1 christos cfg_parser->current_zone->pattern = cfg_parser->current_pattern;
2562 1.1 christos cfg_parser->current_allow_notify = 0;
2563 1.1 christos cfg_parser->current_request_xfr = 0;
2564 1.1 christos cfg_parser->current_notify = 0;
2565 1.1 christos cfg_parser->current_provide_xfr = 0;
2566 1.1 christos cfg_parser->current_outgoing_interface = 0;
2567 1.1 christos }
2568 1.1.1.2.4.1 christos #line 2569 "configparser.c" /* yacc.c:1648 */
2569 1.1 christos break;
2570 1.1 christos
2571 1.1.1.2.4.1 christos case 174:
2572 1.1.1.2.4.1 christos #line 781 "configparser.y" /* yacc.c:1648 */
2573 1.1 christos {
2574 1.1 christos char* s;
2575 1.1 christos OUTYY(("P(zone_name:%s)\n", (yyvsp[0].str)));
2576 1.1 christos #ifndef NDEBUG
2577 1.1 christos assert(cfg_parser->current_zone);
2578 1.1 christos assert(cfg_parser->current_pattern);
2579 1.1 christos #endif
2580 1.1 christos cfg_parser->current_zone->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2581 1.1 christos s = (char*)region_alloc(cfg_parser->opt->region,
2582 1.1 christos strlen((yyvsp[0].str))+strlen(PATTERN_IMPLICIT_MARKER)+1);
2583 1.1 christos memmove(s, PATTERN_IMPLICIT_MARKER,
2584 1.1 christos strlen(PATTERN_IMPLICIT_MARKER));
2585 1.1 christos memmove(s+strlen(PATTERN_IMPLICIT_MARKER), (yyvsp[0].str), strlen((yyvsp[0].str))+1);
2586 1.1 christos if(pattern_options_find(cfg_parser->opt, s))
2587 1.1 christos c_error_msg("zone %s cannot be created because "
2588 1.1 christos "implicit pattern %s already exists", (yyvsp[0].str), s);
2589 1.1 christos cfg_parser->current_pattern->pname = s;
2590 1.1 christos }
2591 1.1.1.2.4.1 christos #line 2592 "configparser.c" /* yacc.c:1648 */
2592 1.1 christos break;
2593 1.1 christos
2594 1.1.1.2.4.1 christos case 175:
2595 1.1.1.2.4.1 christos #line 801 "configparser.y" /* yacc.c:1648 */
2596 1.1 christos {
2597 1.1 christos OUTYY(("P(zonefile:%s)\n", (yyvsp[0].str)));
2598 1.1 christos #ifndef NDEBUG
2599 1.1 christos assert(cfg_parser->current_pattern);
2600 1.1 christos #endif
2601 1.1 christos cfg_parser->current_pattern->zonefile = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2602 1.1 christos }
2603 1.1.1.2.4.1 christos #line 2604 "configparser.c" /* yacc.c:1648 */
2604 1.1 christos break;
2605 1.1 christos
2606 1.1.1.2.4.1 christos case 176:
2607 1.1.1.2.4.1 christos #line 810 "configparser.y" /* yacc.c:1648 */
2608 1.1 christos {
2609 1.1 christos OUTYY(("P(zonestats:%s)\n", (yyvsp[0].str)));
2610 1.1 christos #ifndef NDEBUG
2611 1.1 christos assert(cfg_parser->current_pattern);
2612 1.1 christos #endif
2613 1.1 christos cfg_parser->current_pattern->zonestats = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2614 1.1 christos }
2615 1.1.1.2.4.1 christos #line 2616 "configparser.c" /* yacc.c:1648 */
2616 1.1 christos break;
2617 1.1 christos
2618 1.1.1.2.4.1 christos case 177:
2619 1.1.1.2.4.1 christos #line 819 "configparser.y" /* yacc.c:1648 */
2620 1.1 christos {
2621 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2622 1.1 christos OUTYY(("P(allow_notify:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2623 1.1 christos if(cfg_parser->current_allow_notify)
2624 1.1 christos cfg_parser->current_allow_notify->next = acl;
2625 1.1 christos else
2626 1.1 christos cfg_parser->current_pattern->allow_notify = acl;
2627 1.1 christos cfg_parser->current_allow_notify = acl;
2628 1.1 christos }
2629 1.1.1.2.4.1 christos #line 2630 "configparser.c" /* yacc.c:1648 */
2630 1.1 christos break;
2631 1.1 christos
2632 1.1.1.2.4.1 christos case 178:
2633 1.1.1.2.4.1 christos #line 830 "configparser.y" /* yacc.c:1648 */
2634 1.1 christos {
2635 1.1 christos }
2636 1.1.1.2.4.1 christos #line 2637 "configparser.c" /* yacc.c:1648 */
2637 1.1 christos break;
2638 1.1 christos
2639 1.1.1.2.4.1 christos case 179:
2640 1.1.1.2.4.1 christos #line 834 "configparser.y" /* yacc.c:1648 */
2641 1.1 christos {
2642 1.1 christos OUTYY(("P(size_limit_xfr:%s)\n", (yyvsp[0].str)));
2643 1.1 christos if(atoll((yyvsp[0].str)) < 0)
2644 1.1 christos yyerror("number >= 0 expected");
2645 1.1 christos else cfg_parser->current_pattern->size_limit_xfr = atoll((yyvsp[0].str));
2646 1.1 christos }
2647 1.1.1.2.4.1 christos #line 2648 "configparser.c" /* yacc.c:1648 */
2648 1.1 christos break;
2649 1.1 christos
2650 1.1.1.2.4.1 christos case 180:
2651 1.1.1.2.4.1 christos #line 842 "configparser.y" /* yacc.c:1648 */
2652 1.1 christos {
2653 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2654 1.1 christos OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2655 1.1 christos if(acl->blocked) c_error("blocked address used for request-xfr");
2656 1.1 christos if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr");
2657 1.1 christos if(cfg_parser->current_request_xfr)
2658 1.1 christos cfg_parser->current_request_xfr->next = acl;
2659 1.1 christos else
2660 1.1 christos cfg_parser->current_pattern->request_xfr = acl;
2661 1.1 christos cfg_parser->current_request_xfr = acl;
2662 1.1 christos }
2663 1.1.1.2.4.1 christos #line 2664 "configparser.c" /* yacc.c:1648 */
2664 1.1 christos break;
2665 1.1 christos
2666 1.1.1.2.4.1 christos case 181:
2667 1.1.1.2.4.1 christos #line 854 "configparser.y" /* yacc.c:1648 */
2668 1.1 christos {
2669 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2670 1.1 christos acl->use_axfr_only = 1;
2671 1.1 christos OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2672 1.1 christos if(acl->blocked) c_error("blocked address used for request-xfr");
2673 1.1 christos if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr");
2674 1.1 christos if(cfg_parser->current_request_xfr)
2675 1.1 christos cfg_parser->current_request_xfr->next = acl;
2676 1.1 christos else
2677 1.1 christos cfg_parser->current_pattern->request_xfr = acl;
2678 1.1 christos cfg_parser->current_request_xfr = acl;
2679 1.1 christos }
2680 1.1.1.2.4.1 christos #line 2681 "configparser.c" /* yacc.c:1648 */
2681 1.1 christos break;
2682 1.1 christos
2683 1.1.1.2.4.1 christos case 182:
2684 1.1.1.2.4.1 christos #line 867 "configparser.y" /* yacc.c:1648 */
2685 1.1 christos {
2686 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2687 1.1 christos acl->allow_udp = 1;
2688 1.1 christos OUTYY(("P(request_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2689 1.1 christos if(acl->blocked) c_error("blocked address used for request-xfr");
2690 1.1 christos if(acl->rangetype!=acl_range_single) c_error("address range used for request-xfr");
2691 1.1 christos if(cfg_parser->current_request_xfr)
2692 1.1 christos cfg_parser->current_request_xfr->next = acl;
2693 1.1 christos else
2694 1.1 christos cfg_parser->current_pattern->request_xfr = acl;
2695 1.1 christos cfg_parser->current_request_xfr = acl;
2696 1.1 christos }
2697 1.1.1.2.4.1 christos #line 2698 "configparser.c" /* yacc.c:1648 */
2698 1.1 christos break;
2699 1.1 christos
2700 1.1.1.2.4.1 christos case 183:
2701 1.1.1.2.4.1 christos #line 881 "configparser.y" /* yacc.c:1648 */
2702 1.1 christos {
2703 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2704 1.1 christos OUTYY(("P(notify:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2705 1.1 christos if(acl->blocked) c_error("blocked address used for notify");
2706 1.1 christos if(acl->rangetype!=acl_range_single) c_error("address range used for notify");
2707 1.1 christos if(cfg_parser->current_notify)
2708 1.1 christos cfg_parser->current_notify->next = acl;
2709 1.1 christos else
2710 1.1 christos cfg_parser->current_pattern->notify = acl;
2711 1.1 christos cfg_parser->current_notify = acl;
2712 1.1 christos }
2713 1.1.1.2.4.1 christos #line 2714 "configparser.c" /* yacc.c:1648 */
2714 1.1 christos break;
2715 1.1 christos
2716 1.1.1.2.4.1 christos case 184:
2717 1.1.1.2.4.1 christos #line 894 "configparser.y" /* yacc.c:1648 */
2718 1.1 christos {
2719 1.1 christos OUTYY(("P(notify_retry:%s)\n", (yyvsp[0].str)));
2720 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2721 1.1 christos yyerror("number expected");
2722 1.1 christos else {
2723 1.1 christos cfg_parser->current_pattern->notify_retry = atoi((yyvsp[0].str));
2724 1.1 christos cfg_parser->current_pattern->notify_retry_is_default=0;
2725 1.1 christos }
2726 1.1 christos }
2727 1.1.1.2.4.1 christos #line 2728 "configparser.c" /* yacc.c:1648 */
2728 1.1 christos break;
2729 1.1 christos
2730 1.1.1.2.4.1 christos case 185:
2731 1.1.1.2.4.1 christos #line 905 "configparser.y" /* yacc.c:1648 */
2732 1.1 christos {
2733 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[-1].str), (yyvsp[0].str));
2734 1.1 christos OUTYY(("P(provide_xfr:%s %s)\n", (yyvsp[-1].str), (yyvsp[0].str)));
2735 1.1 christos if(cfg_parser->current_provide_xfr)
2736 1.1 christos cfg_parser->current_provide_xfr->next = acl;
2737 1.1 christos else
2738 1.1 christos cfg_parser->current_pattern->provide_xfr = acl;
2739 1.1 christos cfg_parser->current_provide_xfr = acl;
2740 1.1 christos }
2741 1.1.1.2.4.1 christos #line 2742 "configparser.c" /* yacc.c:1648 */
2742 1.1 christos break;
2743 1.1 christos
2744 1.1.1.2.4.1 christos case 186:
2745 1.1.1.2.4.1 christos #line 916 "configparser.y" /* yacc.c:1648 */
2746 1.1 christos {
2747 1.1.1.2 christos acl_options_type* acl = parse_acl_info(cfg_parser->opt->region, (yyvsp[0].str), "NOKEY");
2748 1.1 christos OUTYY(("P(outgoing_interface:%s)\n", (yyvsp[0].str)));
2749 1.1 christos if(acl->rangetype!=acl_range_single) c_error("address range used for outgoing interface");
2750 1.1 christos if(cfg_parser->current_outgoing_interface)
2751 1.1 christos cfg_parser->current_outgoing_interface->next = acl;
2752 1.1 christos else
2753 1.1 christos cfg_parser->current_pattern->outgoing_interface = acl;
2754 1.1 christos cfg_parser->current_outgoing_interface = acl;
2755 1.1 christos }
2756 1.1.1.2.4.1 christos #line 2757 "configparser.c" /* yacc.c:1648 */
2757 1.1 christos break;
2758 1.1 christos
2759 1.1.1.2.4.1 christos case 187:
2760 1.1.1.2.4.1 christos #line 928 "configparser.y" /* yacc.c:1648 */
2761 1.1 christos {
2762 1.1 christos OUTYY(("P(allow_axfr_fallback:%s)\n", (yyvsp[0].str)));
2763 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2764 1.1 christos yyerror("expected yes or no.");
2765 1.1 christos else {
2766 1.1 christos cfg_parser->current_pattern->allow_axfr_fallback = (strcmp((yyvsp[0].str), "yes")==0);
2767 1.1 christos cfg_parser->current_pattern->allow_axfr_fallback_is_default = 0;
2768 1.1 christos }
2769 1.1 christos }
2770 1.1.1.2.4.1 christos #line 2771 "configparser.c" /* yacc.c:1648 */
2771 1.1 christos break;
2772 1.1 christos
2773 1.1.1.2.4.1 christos case 188:
2774 1.1.1.2.4.1 christos #line 939 "configparser.y" /* yacc.c:1648 */
2775 1.1 christos {
2776 1.1 christos OUTYY(("P(zone_rrl_whitelist:%s)\n", (yyvsp[0].str)));
2777 1.1 christos #ifdef RATELIMIT
2778 1.1 christos cfg_parser->current_pattern->rrl_whitelist |= rrlstr2type((yyvsp[0].str));
2779 1.1 christos #endif
2780 1.1 christos }
2781 1.1.1.2.4.1 christos #line 2782 "configparser.c" /* yacc.c:1648 */
2782 1.1 christos break;
2783 1.1 christos
2784 1.1.1.2.4.1 christos case 189:
2785 1.1.1.2.4.1 christos #line 947 "configparser.y" /* yacc.c:1648 */
2786 1.1 christos {
2787 1.1 christos OUTYY(("P(zone_max_refresh_time:%s)\n", (yyvsp[0].str)));
2788 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2789 1.1 christos yyerror("number expected");
2790 1.1 christos else {
2791 1.1 christos cfg_parser->current_pattern->max_refresh_time = atoi((yyvsp[0].str));
2792 1.1 christos cfg_parser->current_pattern->max_refresh_time_is_default = 0;
2793 1.1 christos }
2794 1.1 christos }
2795 1.1.1.2.4.1 christos #line 2796 "configparser.c" /* yacc.c:1648 */
2796 1.1 christos break;
2797 1.1 christos
2798 1.1.1.2.4.1 christos case 190:
2799 1.1.1.2.4.1 christos #line 957 "configparser.y" /* yacc.c:1648 */
2800 1.1 christos {
2801 1.1 christos OUTYY(("P(zone_min_refresh_time:%s)\n", (yyvsp[0].str)));
2802 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2803 1.1 christos yyerror("number expected");
2804 1.1 christos else {
2805 1.1 christos cfg_parser->current_pattern->min_refresh_time = atoi((yyvsp[0].str));
2806 1.1 christos cfg_parser->current_pattern->min_refresh_time_is_default = 0;
2807 1.1 christos }
2808 1.1 christos }
2809 1.1.1.2.4.1 christos #line 2810 "configparser.c" /* yacc.c:1648 */
2810 1.1 christos break;
2811 1.1 christos
2812 1.1.1.2.4.1 christos case 191:
2813 1.1.1.2.4.1 christos #line 967 "configparser.y" /* yacc.c:1648 */
2814 1.1 christos {
2815 1.1 christos OUTYY(("P(zone_max_retry_time:%s)\n", (yyvsp[0].str)));
2816 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2817 1.1 christos yyerror("number expected");
2818 1.1 christos else {
2819 1.1 christos cfg_parser->current_pattern->max_retry_time = atoi((yyvsp[0].str));
2820 1.1 christos cfg_parser->current_pattern->max_retry_time_is_default = 0;
2821 1.1 christos }
2822 1.1 christos }
2823 1.1.1.2.4.1 christos #line 2824 "configparser.c" /* yacc.c:1648 */
2824 1.1 christos break;
2825 1.1 christos
2826 1.1.1.2.4.1 christos case 192:
2827 1.1.1.2.4.1 christos #line 977 "configparser.y" /* yacc.c:1648 */
2828 1.1 christos {
2829 1.1 christos OUTYY(("P(zone_min_retry_time:%s)\n", (yyvsp[0].str)));
2830 1.1 christos if(atoi((yyvsp[0].str)) == 0 && strcmp((yyvsp[0].str), "0") != 0)
2831 1.1 christos yyerror("number expected");
2832 1.1 christos else {
2833 1.1 christos cfg_parser->current_pattern->min_retry_time = atoi((yyvsp[0].str));
2834 1.1 christos cfg_parser->current_pattern->min_retry_time_is_default = 0;
2835 1.1 christos }
2836 1.1 christos }
2837 1.1.1.2.4.1 christos #line 2838 "configparser.c" /* yacc.c:1648 */
2838 1.1 christos break;
2839 1.1 christos
2840 1.1.1.2.4.1 christos case 193:
2841 1.1.1.2.4.1 christos #line 987 "configparser.y" /* yacc.c:1648 */
2842 1.1 christos {
2843 1.1 christos OUTYY(("P(zone_multi_master_check:%s)\n", (yyvsp[0].str)));
2844 1.1 christos if(strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
2845 1.1 christos yyerror("expected yes or no.");
2846 1.1 christos else cfg_parser->current_pattern->multi_master_check = (strcmp((yyvsp[0].str), "yes")==0);
2847 1.1 christos }
2848 1.1.1.2.4.1 christos #line 2849 "configparser.c" /* yacc.c:1648 */
2849 1.1 christos break;
2850 1.1 christos
2851 1.1.1.2.4.1 christos case 194:
2852 1.1.1.2.4.1 christos #line 996 "configparser.y" /* yacc.c:1648 */
2853 1.1 christos {
2854 1.1 christos OUTYY(("\nP(key:)\n"));
2855 1.1 christos if(cfg_parser->current_key) {
2856 1.1 christos if(!cfg_parser->current_key->name) c_error("previous key has no name");
2857 1.1 christos if(!cfg_parser->current_key->algorithm) c_error("previous key has no algorithm");
2858 1.1 christos if(!cfg_parser->current_key->secret) c_error("previous key has no secret blob");
2859 1.1 christos key_options_insert(cfg_parser->opt, cfg_parser->current_key);
2860 1.1 christos }
2861 1.1 christos cfg_parser->current_key = key_options_create(cfg_parser->opt->region);
2862 1.1 christos cfg_parser->current_key->algorithm = region_strdup(cfg_parser->opt->region, "sha256");
2863 1.1 christos }
2864 1.1.1.2.4.1 christos #line 2865 "configparser.c" /* yacc.c:1648 */
2865 1.1 christos break;
2866 1.1 christos
2867 1.1.1.2.4.1 christos case 200:
2868 1.1.1.2.4.1 christos #line 1011 "configparser.y" /* yacc.c:1648 */
2869 1.1 christos {
2870 1.1 christos const dname_type* d;
2871 1.1 christos OUTYY(("P(key_name:%s)\n", (yyvsp[0].str)));
2872 1.1 christos #ifndef NDEBUG
2873 1.1 christos assert(cfg_parser->current_key);
2874 1.1 christos #endif
2875 1.1 christos cfg_parser->current_key->name = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2876 1.1 christos d = dname_parse(cfg_parser->opt->region, (yyvsp[0].str));
2877 1.1 christos if(!d) c_error_msg("Failed to parse tsig key name %s", (yyvsp[0].str));
2878 1.1 christos else region_recycle(cfg_parser->opt->region, (void*)d,
2879 1.1 christos dname_total_size(d));
2880 1.1 christos }
2881 1.1.1.2.4.1 christos #line 2882 "configparser.c" /* yacc.c:1648 */
2882 1.1 christos break;
2883 1.1 christos
2884 1.1.1.2.4.1 christos case 201:
2885 1.1.1.2.4.1 christos #line 1025 "configparser.y" /* yacc.c:1648 */
2886 1.1 christos {
2887 1.1 christos OUTYY(("P(key_algorithm:%s)\n", (yyvsp[0].str)));
2888 1.1 christos #ifndef NDEBUG
2889 1.1 christos assert(cfg_parser->current_key);
2890 1.1 christos #endif
2891 1.1 christos if(cfg_parser->current_key->algorithm)
2892 1.1 christos region_recycle(cfg_parser->opt->region, cfg_parser->current_key->algorithm, strlen(cfg_parser->current_key->algorithm)+1);
2893 1.1 christos cfg_parser->current_key->algorithm = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2894 1.1 christos if(tsig_get_algorithm_by_name((yyvsp[0].str)) == NULL)
2895 1.1 christos c_error_msg("Bad tsig algorithm %s", (yyvsp[0].str));
2896 1.1 christos }
2897 1.1.1.2.4.1 christos #line 2898 "configparser.c" /* yacc.c:1648 */
2898 1.1 christos break;
2899 1.1 christos
2900 1.1.1.2.4.1 christos case 202:
2901 1.1.1.2.4.1 christos #line 1038 "configparser.y" /* yacc.c:1648 */
2902 1.1 christos {
2903 1.1 christos uint8_t data[16384];
2904 1.1 christos int size;
2905 1.1 christos OUTYY(("key_secret:%s)\n", (yyvsp[0].str)));
2906 1.1 christos #ifndef NDEBUG
2907 1.1 christos assert(cfg_parser->current_key);
2908 1.1 christos #endif
2909 1.1 christos cfg_parser->current_key->secret = region_strdup(cfg_parser->opt->region, (yyvsp[0].str));
2910 1.1 christos size = b64_pton((yyvsp[0].str), data, sizeof(data));
2911 1.1 christos if(size == -1) {
2912 1.1 christos c_error_msg("Cannot base64 decode tsig secret %s",
2913 1.1 christos cfg_parser->current_key->name?
2914 1.1 christos cfg_parser->current_key->name:"");
2915 1.1 christos } else if(size != 0) {
2916 1.1 christos memset(data, 0xdd, size); /* wipe secret */
2917 1.1 christos }
2918 1.1 christos }
2919 1.1.1.2.4.1 christos #line 2920 "configparser.c" /* yacc.c:1648 */
2920 1.1 christos break;
2921 1.1 christos
2922 1.1 christos
2923 1.1.1.2.4.1 christos #line 2924 "configparser.c" /* yacc.c:1648 */
2924 1.1 christos default: break;
2925 1.1 christos }
2926 1.1 christos /* User semantic actions sometimes alter yychar, and that requires
2927 1.1 christos that yytoken be updated with the new translation. We take the
2928 1.1 christos approach of translating immediately before every use of yytoken.
2929 1.1 christos One alternative is translating here after every semantic action,
2930 1.1 christos but that translation would be missed if the semantic action invokes
2931 1.1 christos YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2932 1.1 christos if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2933 1.1 christos incorrect destructor might then be invoked immediately. In the
2934 1.1 christos case of YYERROR or YYBACKUP, subsequent parser actions might lead
2935 1.1 christos to an incorrect destructor call or verbose syntax error message
2936 1.1 christos before the lookahead is translated. */
2937 1.1 christos YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2938 1.1 christos
2939 1.1 christos YYPOPSTACK (yylen);
2940 1.1 christos yylen = 0;
2941 1.1 christos YY_STACK_PRINT (yyss, yyssp);
2942 1.1 christos
2943 1.1 christos *++yyvsp = yyval;
2944 1.1 christos
2945 1.1 christos /* Now 'shift' the result of the reduction. Determine what state
2946 1.1 christos that goes to, based on the state we popped back to and the rule
2947 1.1 christos number reduced by. */
2948 1.1 christos
2949 1.1 christos yyn = yyr1[yyn];
2950 1.1 christos
2951 1.1 christos yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2952 1.1 christos if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2953 1.1 christos yystate = yytable[yystate];
2954 1.1 christos else
2955 1.1 christos yystate = yydefgoto[yyn - YYNTOKENS];
2956 1.1 christos
2957 1.1 christos goto yynewstate;
2958 1.1 christos
2959 1.1 christos
2960 1.1 christos /*--------------------------------------.
2961 1.1 christos | yyerrlab -- here on detecting error. |
2962 1.1 christos `--------------------------------------*/
2963 1.1 christos yyerrlab:
2964 1.1 christos /* Make sure we have latest lookahead translation. See comments at
2965 1.1 christos user semantic actions for why this is necessary. */
2966 1.1 christos yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2967 1.1 christos
2968 1.1 christos /* If not already recovering from an error, report this error. */
2969 1.1 christos if (!yyerrstatus)
2970 1.1 christos {
2971 1.1 christos ++yynerrs;
2972 1.1 christos #if ! YYERROR_VERBOSE
2973 1.1 christos yyerror (YY_("syntax error"));
2974 1.1 christos #else
2975 1.1 christos # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2976 1.1 christos yyssp, yytoken)
2977 1.1 christos {
2978 1.1 christos char const *yymsgp = YY_("syntax error");
2979 1.1 christos int yysyntax_error_status;
2980 1.1 christos yysyntax_error_status = YYSYNTAX_ERROR;
2981 1.1 christos if (yysyntax_error_status == 0)
2982 1.1 christos yymsgp = yymsg;
2983 1.1 christos else if (yysyntax_error_status == 1)
2984 1.1 christos {
2985 1.1 christos if (yymsg != yymsgbuf)
2986 1.1 christos YYSTACK_FREE (yymsg);
2987 1.1 christos yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2988 1.1 christos if (!yymsg)
2989 1.1 christos {
2990 1.1 christos yymsg = yymsgbuf;
2991 1.1 christos yymsg_alloc = sizeof yymsgbuf;
2992 1.1 christos yysyntax_error_status = 2;
2993 1.1 christos }
2994 1.1 christos else
2995 1.1 christos {
2996 1.1 christos yysyntax_error_status = YYSYNTAX_ERROR;
2997 1.1 christos yymsgp = yymsg;
2998 1.1 christos }
2999 1.1 christos }
3000 1.1 christos yyerror (yymsgp);
3001 1.1 christos if (yysyntax_error_status == 2)
3002 1.1 christos goto yyexhaustedlab;
3003 1.1 christos }
3004 1.1 christos # undef YYSYNTAX_ERROR
3005 1.1 christos #endif
3006 1.1 christos }
3007 1.1 christos
3008 1.1 christos
3009 1.1 christos
3010 1.1 christos if (yyerrstatus == 3)
3011 1.1 christos {
3012 1.1 christos /* If just tried and failed to reuse lookahead token after an
3013 1.1 christos error, discard it. */
3014 1.1 christos
3015 1.1 christos if (yychar <= YYEOF)
3016 1.1 christos {
3017 1.1 christos /* Return failure if at end of input. */
3018 1.1 christos if (yychar == YYEOF)
3019 1.1 christos YYABORT;
3020 1.1 christos }
3021 1.1 christos else
3022 1.1 christos {
3023 1.1 christos yydestruct ("Error: discarding",
3024 1.1 christos yytoken, &yylval);
3025 1.1 christos yychar = YYEMPTY;
3026 1.1 christos }
3027 1.1 christos }
3028 1.1 christos
3029 1.1 christos /* Else will try to reuse lookahead token after shifting the error
3030 1.1 christos token. */
3031 1.1 christos goto yyerrlab1;
3032 1.1 christos
3033 1.1 christos
3034 1.1 christos /*---------------------------------------------------.
3035 1.1 christos | yyerrorlab -- error raised explicitly by YYERROR. |
3036 1.1 christos `---------------------------------------------------*/
3037 1.1 christos yyerrorlab:
3038 1.1 christos
3039 1.1 christos /* Pacify compilers like GCC when the user code never invokes
3040 1.1 christos YYERROR and the label yyerrorlab therefore never appears in user
3041 1.1 christos code. */
3042 1.1 christos if (/*CONSTCOND*/ 0)
3043 1.1 christos goto yyerrorlab;
3044 1.1 christos
3045 1.1 christos /* Do not reclaim the symbols of the rule whose action triggered
3046 1.1 christos this YYERROR. */
3047 1.1 christos YYPOPSTACK (yylen);
3048 1.1 christos yylen = 0;
3049 1.1 christos YY_STACK_PRINT (yyss, yyssp);
3050 1.1 christos yystate = *yyssp;
3051 1.1 christos goto yyerrlab1;
3052 1.1 christos
3053 1.1 christos
3054 1.1 christos /*-------------------------------------------------------------.
3055 1.1 christos | yyerrlab1 -- common code for both syntax error and YYERROR. |
3056 1.1 christos `-------------------------------------------------------------*/
3057 1.1 christos yyerrlab1:
3058 1.1 christos yyerrstatus = 3; /* Each real token shifted decrements this. */
3059 1.1 christos
3060 1.1 christos for (;;)
3061 1.1 christos {
3062 1.1 christos yyn = yypact[yystate];
3063 1.1 christos if (!yypact_value_is_default (yyn))
3064 1.1 christos {
3065 1.1 christos yyn += YYTERROR;
3066 1.1 christos if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3067 1.1 christos {
3068 1.1 christos yyn = yytable[yyn];
3069 1.1 christos if (0 < yyn)
3070 1.1 christos break;
3071 1.1 christos }
3072 1.1 christos }
3073 1.1 christos
3074 1.1 christos /* Pop the current state because it cannot handle the error token. */
3075 1.1 christos if (yyssp == yyss)
3076 1.1 christos YYABORT;
3077 1.1 christos
3078 1.1 christos
3079 1.1 christos yydestruct ("Error: popping",
3080 1.1 christos yystos[yystate], yyvsp);
3081 1.1 christos YYPOPSTACK (1);
3082 1.1 christos yystate = *yyssp;
3083 1.1 christos YY_STACK_PRINT (yyss, yyssp);
3084 1.1 christos }
3085 1.1 christos
3086 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3087 1.1 christos *++yyvsp = yylval;
3088 1.1 christos YY_IGNORE_MAYBE_UNINITIALIZED_END
3089 1.1 christos
3090 1.1 christos
3091 1.1 christos /* Shift the error token. */
3092 1.1 christos YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3093 1.1 christos
3094 1.1 christos yystate = yyn;
3095 1.1 christos goto yynewstate;
3096 1.1 christos
3097 1.1 christos
3098 1.1 christos /*-------------------------------------.
3099 1.1 christos | yyacceptlab -- YYACCEPT comes here. |
3100 1.1 christos `-------------------------------------*/
3101 1.1 christos yyacceptlab:
3102 1.1 christos yyresult = 0;
3103 1.1 christos goto yyreturn;
3104 1.1 christos
3105 1.1 christos /*-----------------------------------.
3106 1.1 christos | yyabortlab -- YYABORT comes here. |
3107 1.1 christos `-----------------------------------*/
3108 1.1 christos yyabortlab:
3109 1.1 christos yyresult = 1;
3110 1.1 christos goto yyreturn;
3111 1.1 christos
3112 1.1 christos #if !defined yyoverflow || YYERROR_VERBOSE
3113 1.1 christos /*-------------------------------------------------.
3114 1.1 christos | yyexhaustedlab -- memory exhaustion comes here. |
3115 1.1 christos `-------------------------------------------------*/
3116 1.1 christos yyexhaustedlab:
3117 1.1 christos yyerror (YY_("memory exhausted"));
3118 1.1 christos yyresult = 2;
3119 1.1 christos /* Fall through. */
3120 1.1 christos #endif
3121 1.1 christos
3122 1.1 christos yyreturn:
3123 1.1 christos if (yychar != YYEMPTY)
3124 1.1 christos {
3125 1.1 christos /* Make sure we have latest lookahead translation. See comments at
3126 1.1 christos user semantic actions for why this is necessary. */
3127 1.1 christos yytoken = YYTRANSLATE (yychar);
3128 1.1 christos yydestruct ("Cleanup: discarding lookahead",
3129 1.1 christos yytoken, &yylval);
3130 1.1 christos }
3131 1.1 christos /* Do not reclaim the symbols of the rule whose action triggered
3132 1.1 christos this YYABORT or YYACCEPT. */
3133 1.1 christos YYPOPSTACK (yylen);
3134 1.1 christos YY_STACK_PRINT (yyss, yyssp);
3135 1.1 christos while (yyssp != yyss)
3136 1.1 christos {
3137 1.1 christos yydestruct ("Cleanup: popping",
3138 1.1 christos yystos[*yyssp], yyvsp);
3139 1.1 christos YYPOPSTACK (1);
3140 1.1 christos }
3141 1.1 christos #ifndef yyoverflow
3142 1.1 christos if (yyss != yyssa)
3143 1.1 christos YYSTACK_FREE (yyss);
3144 1.1 christos #endif
3145 1.1 christos #if YYERROR_VERBOSE
3146 1.1 christos if (yymsg != yymsgbuf)
3147 1.1 christos YYSTACK_FREE (yymsg);
3148 1.1 christos #endif
3149 1.1 christos return yyresult;
3150 1.1 christos }
3151 1.1.1.2.4.1 christos #line 1057 "configparser.y" /* yacc.c:1907 */
3152 1.1 christos
3153 1.1 christos
3154 1.1 christos /* parse helper routines could be here */
3155