"Fossies" - the Fresh Open Source Software Archive 
Member "hitch-1.7.2/src/cfg_parser.c" (29 Nov 2021, 85991 Bytes) of package /linux/www/hitch-1.7.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "cfg_parser.c" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
1.7.0_vs_1.7.2.
1 /* A Bison parser, made by GNU Bison 3.3.2. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
44 /* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
47 /* Identify Bison output. */
48 #define YYBISON 1
49
50 /* Bison version. */
51 #define YYBISON_VERSION "3.3.2"
52
53 /* Skeleton name. */
54 #define YYSKELETON_NAME "yacc.c"
55
56 /* Pure parsers. */
57 #define YYPURE 0
58
59 /* Push parsers. */
60 #define YYPUSH 0
61
62 /* Pull parsers. */
63 #define YYPULL 1
64
65
66
67
68 /* First part of user prologue. */
69 #line 1 "cfg_parser.y" /* yacc.c:337 */
70
71 #include "config.h"
72
73 #include <stdio.h>
74 #include <stdlib.h>
75
76 #include "configuration.h"
77 #include "foreign/vas.h"
78 #include "foreign/miniobj.h"
79 #include "foreign/uthash.h"
80
81 extern int yylex (void);
82 extern int yyparse(hitch_config *);
83 extern FILE *yyin;
84 int yyget_lineno(void);
85
86 void config_error_set(char *, ...);
87 int config_param_validate(char *k, char *v, hitch_config *cfg,
88 char *file, int line);
89 int front_arg_add(hitch_config *cfg, struct front_arg *fa);
90 struct front_arg *front_arg_new(void);
91 void front_arg_destroy(struct front_arg *fa);
92 struct cfg_cert_file *
93 cfg_cert_file_new(void);
94 void cfg_cert_file_free(struct cfg_cert_file **cfptr);
95 int cfg_cert_vfy(struct cfg_cert_file *cf);
96 void yyerror(hitch_config *, const char *);
97 void cfg_cert_add(struct cfg_cert_file *cf, struct cfg_cert_file **dst);
98
99 static struct front_arg *cur_fa;
100 static struct cfg_cert_file *cur_pem;
101 extern char input_line[512];
102
103
104 #line 105 "cfg_parser.c" /* yacc.c:337 */
105 # ifndef YY_NULLPTR
106 # if defined __cplusplus
107 # if 201103L <= __cplusplus
108 # define YY_NULLPTR nullptr
109 # else
110 # define YY_NULLPTR 0
111 # endif
112 # else
113 # define YY_NULLPTR ((void*)0)
114 # endif
115 # endif
116
117 /* Enabling verbose error messages. */
118 #ifdef YYERROR_VERBOSE
119 # undef YYERROR_VERBOSE
120 # define YYERROR_VERBOSE 1
121 #else
122 # define YYERROR_VERBOSE 0
123 #endif
124
125 /* In a future release of Bison, this section will be replaced
126 by #include "y.tab.h". */
127 #ifndef YY_YY_CFG_PARSER_H_INCLUDED
128 # define YY_YY_CFG_PARSER_H_INCLUDED
129 /* Debug traces. */
130 #ifndef YYDEBUG
131 # define YYDEBUG 1
132 #endif
133 #if YYDEBUG
134 extern int yydebug;
135 #endif
136
137 /* Token type. */
138 #ifndef YYTOKENTYPE
139 # define YYTOKENTYPE
140 enum yytokentype
141 {
142 INT = 258,
143 UINT = 259,
144 BOOL = 260,
145 STRING = 261,
146 TOK_CIPHERS = 262,
147 TOK_SSL_ENGINE = 263,
148 TOK_PREFER_SERVER_CIPHERS = 264,
149 TOK_BACKEND = 265,
150 TOK_FRONTEND = 266,
151 TOK_WORKERS = 267,
152 TOK_BACKLOG = 268,
153 TOK_KEEPALIVE = 269,
154 TOK_CHROOT = 270,
155 TOK_USER = 271,
156 TOK_GROUP = 272,
157 TOK_QUIET = 273,
158 TOK_SYSLOG = 274,
159 TOK_SYSLOG_FACILITY = 275,
160 TOK_PARAM_SYSLOG_FACILITY = 276,
161 TOK_DAEMON = 277,
162 TOK_WRITE_IP = 278,
163 TOK_WRITE_PROXY = 279,
164 TOK_WRITE_PROXY_V1 = 280,
165 TOK_WRITE_PROXY_V2 = 281,
166 TOK_PEM_FILE = 282,
167 TOK_PROXY_PROXY = 283,
168 TOK_BACKEND_CONNECT_TIMEOUT = 284,
169 TOK_SSL_HANDSHAKE_TIMEOUT = 285,
170 TOK_RECV_BUFSIZE = 286,
171 TOK_SEND_BUFSIZE = 287,
172 TOK_LOG_FILENAME = 288,
173 TOK_RING_SLOTS = 289,
174 TOK_RING_DATA_LEN = 290,
175 TOK_PIDFILE = 291,
176 TOK_SNI_NOMATCH_ABORT = 292,
177 TOK_SSL = 293,
178 TOK_TLS = 294,
179 TOK_HOST = 295,
180 TOK_PORT = 296,
181 TOK_MATCH_GLOBAL = 297,
182 TOK_PB_CERT = 298,
183 TOK_PB_OCSP_FILE = 299,
184 TOK_OCSP_VERIFY = 300,
185 TOK_OCSP_DIR = 301,
186 TOK_OCSP_RESP_TMO = 302,
187 TOK_OCSP_CONN_TMO = 303,
188 TOK_ALPN_PROTOS = 304,
189 TOK_TLS_PROTOS = 305,
190 TOK_SSLv3 = 306,
191 TOK_TLSv1_0 = 307,
192 TOK_TLSv1_1 = 308,
193 TOK_TLSv1_2 = 309,
194 TOK_TLSv1_3 = 310,
195 TOK_CIPHERSUITES = 311,
196 TOK_ECDH_CURVE = 312,
197 TOK_SESSION_CACHE = 313,
198 TOK_SHARED_CACHE_LISTEN = 314,
199 TOK_SHARED_CACHE_PEER = 315,
200 TOK_SHARED_CACHE_IF = 316,
201 TOK_PRIVATE_KEY = 317,
202 TOK_BACKEND_REFRESH = 318,
203 TOK_OCSP_REFRESH_INTERVAL = 319,
204 TOK_PEM_DIR = 320,
205 TOK_PEM_DIR_GLOB = 321,
206 TOK_LOG_LEVEL = 322,
207 TOK_PROXY_TLV = 323,
208 TOK_PROXY_AUTHORITY = 324,
209 TOK_TFO = 325,
210 TOK_CLIENT_VERIFY = 326,
211 TOK_VERIFY_NONE = 327,
212 TOK_VERIFY_OPT = 328,
213 TOK_VERIFY_REQ = 329,
214 TOK_CLIENT_VERIFY_CA = 330,
215 TOK_PROXY_CCERT = 331
216 };
217 #endif
218 /* Tokens. */
219 #define INT 258
220 #define UINT 259
221 #define BOOL 260
222 #define STRING 261
223 #define TOK_CIPHERS 262
224 #define TOK_SSL_ENGINE 263
225 #define TOK_PREFER_SERVER_CIPHERS 264
226 #define TOK_BACKEND 265
227 #define TOK_FRONTEND 266
228 #define TOK_WORKERS 267
229 #define TOK_BACKLOG 268
230 #define TOK_KEEPALIVE 269
231 #define TOK_CHROOT 270
232 #define TOK_USER 271
233 #define TOK_GROUP 272
234 #define TOK_QUIET 273
235 #define TOK_SYSLOG 274
236 #define TOK_SYSLOG_FACILITY 275
237 #define TOK_PARAM_SYSLOG_FACILITY 276
238 #define TOK_DAEMON 277
239 #define TOK_WRITE_IP 278
240 #define TOK_WRITE_PROXY 279
241 #define TOK_WRITE_PROXY_V1 280
242 #define TOK_WRITE_PROXY_V2 281
243 #define TOK_PEM_FILE 282
244 #define TOK_PROXY_PROXY 283
245 #define TOK_BACKEND_CONNECT_TIMEOUT 284
246 #define TOK_SSL_HANDSHAKE_TIMEOUT 285
247 #define TOK_RECV_BUFSIZE 286
248 #define TOK_SEND_BUFSIZE 287
249 #define TOK_LOG_FILENAME 288
250 #define TOK_RING_SLOTS 289
251 #define TOK_RING_DATA_LEN 290
252 #define TOK_PIDFILE 291
253 #define TOK_SNI_NOMATCH_ABORT 292
254 #define TOK_SSL 293
255 #define TOK_TLS 294
256 #define TOK_HOST 295
257 #define TOK_PORT 296
258 #define TOK_MATCH_GLOBAL 297
259 #define TOK_PB_CERT 298
260 #define TOK_PB_OCSP_FILE 299
261 #define TOK_OCSP_VERIFY 300
262 #define TOK_OCSP_DIR 301
263 #define TOK_OCSP_RESP_TMO 302
264 #define TOK_OCSP_CONN_TMO 303
265 #define TOK_ALPN_PROTOS 304
266 #define TOK_TLS_PROTOS 305
267 #define TOK_SSLv3 306
268 #define TOK_TLSv1_0 307
269 #define TOK_TLSv1_1 308
270 #define TOK_TLSv1_2 309
271 #define TOK_TLSv1_3 310
272 #define TOK_CIPHERSUITES 311
273 #define TOK_ECDH_CURVE 312
274 #define TOK_SESSION_CACHE 313
275 #define TOK_SHARED_CACHE_LISTEN 314
276 #define TOK_SHARED_CACHE_PEER 315
277 #define TOK_SHARED_CACHE_IF 316
278 #define TOK_PRIVATE_KEY 317
279 #define TOK_BACKEND_REFRESH 318
280 #define TOK_OCSP_REFRESH_INTERVAL 319
281 #define TOK_PEM_DIR 320
282 #define TOK_PEM_DIR_GLOB 321
283 #define TOK_LOG_LEVEL 322
284 #define TOK_PROXY_TLV 323
285 #define TOK_PROXY_AUTHORITY 324
286 #define TOK_TFO 325
287 #define TOK_CLIENT_VERIFY 326
288 #define TOK_VERIFY_NONE 327
289 #define TOK_VERIFY_OPT 328
290 #define TOK_VERIFY_REQ 329
291 #define TOK_CLIENT_VERIFY_CA 330
292 #define TOK_PROXY_CCERT 331
293
294 /* Value type. */
295 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
296
297 union YYSTYPE
298 {
299 #line 36 "cfg_parser.y" /* yacc.c:352 */
300
301 int i;
302 char *s;
303
304 #line 305 "cfg_parser.c" /* yacc.c:352 */
305 };
306
307 typedef union YYSTYPE YYSTYPE;
308 # define YYSTYPE_IS_TRIVIAL 1
309 # define YYSTYPE_IS_DECLARED 1
310 #endif
311
312
313 extern YYSTYPE yylval;
314
315 int yyparse (hitch_config *cfg);
316
317 #endif /* !YY_YY_CFG_PARSER_H_INCLUDED */
318
319
320
321 #ifdef short
322 # undef short
323 #endif
324
325 #ifdef YYTYPE_UINT8
326 typedef YYTYPE_UINT8 yytype_uint8;
327 #else
328 typedef unsigned char yytype_uint8;
329 #endif
330
331 #ifdef YYTYPE_INT8
332 typedef YYTYPE_INT8 yytype_int8;
333 #else
334 typedef signed char yytype_int8;
335 #endif
336
337 #ifdef YYTYPE_UINT16
338 typedef YYTYPE_UINT16 yytype_uint16;
339 #else
340 typedef unsigned short yytype_uint16;
341 #endif
342
343 #ifdef YYTYPE_INT16
344 typedef YYTYPE_INT16 yytype_int16;
345 #else
346 typedef short yytype_int16;
347 #endif
348
349 #ifndef YYSIZE_T
350 # ifdef __SIZE_TYPE__
351 # define YYSIZE_T __SIZE_TYPE__
352 # elif defined size_t
353 # define YYSIZE_T size_t
354 # elif ! defined YYSIZE_T
355 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
356 # define YYSIZE_T size_t
357 # else
358 # define YYSIZE_T unsigned
359 # endif
360 #endif
361
362 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
363
364 #ifndef YY_
365 # if defined YYENABLE_NLS && YYENABLE_NLS
366 # if ENABLE_NLS
367 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
368 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
369 # endif
370 # endif
371 # ifndef YY_
372 # define YY_(Msgid) Msgid
373 # endif
374 #endif
375
376 #ifndef YY_ATTRIBUTE
377 # if (defined __GNUC__ \
378 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
379 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
380 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
381 # else
382 # define YY_ATTRIBUTE(Spec) /* empty */
383 # endif
384 #endif
385
386 #ifndef YY_ATTRIBUTE_PURE
387 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
388 #endif
389
390 #ifndef YY_ATTRIBUTE_UNUSED
391 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
392 #endif
393
394 /* Suppress unused-variable warnings by "using" E. */
395 #if ! defined lint || defined __GNUC__
396 # define YYUSE(E) ((void) (E))
397 #else
398 # define YYUSE(E) /* empty */
399 #endif
400
401 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
402 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
403 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
404 _Pragma ("GCC diagnostic push") \
405 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
406 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
407 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
408 _Pragma ("GCC diagnostic pop")
409 #else
410 # define YY_INITIAL_VALUE(Value) Value
411 #endif
412 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
413 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
414 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
415 #endif
416 #ifndef YY_INITIAL_VALUE
417 # define YY_INITIAL_VALUE(Value) /* Nothing. */
418 #endif
419
420
421 #if ! defined yyoverflow || YYERROR_VERBOSE
422
423 /* The parser invokes alloca or malloc; define the necessary symbols. */
424
425 # ifdef YYSTACK_USE_ALLOCA
426 # if YYSTACK_USE_ALLOCA
427 # ifdef __GNUC__
428 # define YYSTACK_ALLOC __builtin_alloca
429 # elif defined __BUILTIN_VA_ARG_INCR
430 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
431 # elif defined _AIX
432 # define YYSTACK_ALLOC __alloca
433 # elif defined _MSC_VER
434 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
435 # define alloca _alloca
436 # else
437 # define YYSTACK_ALLOC alloca
438 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
439 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
440 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
441 # ifndef EXIT_SUCCESS
442 # define EXIT_SUCCESS 0
443 # endif
444 # endif
445 # endif
446 # endif
447 # endif
448
449 # ifdef YYSTACK_ALLOC
450 /* Pacify GCC's 'empty if-body' warning. */
451 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
452 # ifndef YYSTACK_ALLOC_MAXIMUM
453 /* The OS might guarantee only one guard page at the bottom of the stack,
454 and a page size can be as small as 4096 bytes. So we cannot safely
455 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
456 to allow for a few compiler-allocated temporary stack slots. */
457 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
458 # endif
459 # else
460 # define YYSTACK_ALLOC YYMALLOC
461 # define YYSTACK_FREE YYFREE
462 # ifndef YYSTACK_ALLOC_MAXIMUM
463 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
464 # endif
465 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
466 && ! ((defined YYMALLOC || defined malloc) \
467 && (defined YYFREE || defined free)))
468 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
469 # ifndef EXIT_SUCCESS
470 # define EXIT_SUCCESS 0
471 # endif
472 # endif
473 # ifndef YYMALLOC
474 # define YYMALLOC malloc
475 # if ! defined malloc && ! defined EXIT_SUCCESS
476 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
477 # endif
478 # endif
479 # ifndef YYFREE
480 # define YYFREE free
481 # if ! defined free && ! defined EXIT_SUCCESS
482 void free (void *); /* INFRINGES ON USER NAME SPACE */
483 # endif
484 # endif
485 # endif
486 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
487
488
489 #if (! defined yyoverflow \
490 && (! defined __cplusplus \
491 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
492
493 /* A type that is properly aligned for any stack member. */
494 union yyalloc
495 {
496 yytype_int16 yyss_alloc;
497 YYSTYPE yyvs_alloc;
498 };
499
500 /* The size of the maximum gap between one aligned stack and the next. */
501 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
502
503 /* The size of an array large to enough to hold all stacks, each with
504 N elements. */
505 # define YYSTACK_BYTES(N) \
506 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
507 + YYSTACK_GAP_MAXIMUM)
508
509 # define YYCOPY_NEEDED 1
510
511 /* Relocate STACK from its old location to the new one. The
512 local variables YYSIZE and YYSTACKSIZE give the old and new number of
513 elements in the stack, and YYPTR gives the new location of the
514 stack. Advance YYPTR to a properly aligned location for the next
515 stack. */
516 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
517 do \
518 { \
519 YYSIZE_T yynewbytes; \
520 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
521 Stack = &yyptr->Stack_alloc; \
522 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
523 yyptr += yynewbytes / sizeof (*yyptr); \
524 } \
525 while (0)
526
527 #endif
528
529 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
530 /* Copy COUNT objects from SRC to DST. The source and destination do
531 not overlap. */
532 # ifndef YYCOPY
533 # if defined __GNUC__ && 1 < __GNUC__
534 # define YYCOPY(Dst, Src, Count) \
535 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
536 # else
537 # define YYCOPY(Dst, Src, Count) \
538 do \
539 { \
540 YYSIZE_T yyi; \
541 for (yyi = 0; yyi < (Count); yyi++) \
542 (Dst)[yyi] = (Src)[yyi]; \
543 } \
544 while (0)
545 # endif
546 # endif
547 #endif /* !YYCOPY_NEEDED */
548
549 /* YYFINAL -- State number of the termination state. */
550 #define YYFINAL 153
551 /* YYLAST -- Last index in YYTABLE. */
552 #define YYLAST 224
553
554 /* YYNTOKENS -- Number of terminals. */
555 #define YYNTOKENS 80
556 /* YYNNTS -- Number of nonterminals. */
557 #define YYNNTS 85
558 /* YYNRULES -- Number of rules. */
559 #define YYNRULES 167
560 /* YYNSTATES -- Number of states. */
561 #define YYNSTATES 307
562
563 #define YYUNDEFTOK 2
564 #define YYMAXUTOK 331
565
566 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
567 as returned by yylex, with out-of-bounds checking. */
568 #define YYTRANSLATE(YYX) \
569 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
570
571 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
572 as returned by yylex. */
573 static const yytype_uint8 yytranslate[] =
574 {
575 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581 2, 77, 2, 2, 2, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 78, 2, 79, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
601 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
602 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
603 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
604 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
605 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
606 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
607 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
608 75, 76
609 };
610
611 #if YYDEBUG
612 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
613 static const yytype_uint16 yyrline[] =
614 {
615 0, 69, 69, 73, 74, 78, 79, 80, 81, 82,
616 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
617 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
618 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
619 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
620 123, 124, 125, 126, 130, 136, 136, 147, 149, 150,
621 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
622 164, 165, 166, 169, 178, 180, 183, 184, 188, 189,
623 190, 191, 194, 196, 201, 208, 212, 225, 233, 241,
624 245, 249, 254, 268, 268, 283, 285, 290, 292, 297,
625 314, 331, 331, 343, 343, 345, 346, 347, 348, 349,
626 351, 355, 362, 366, 373, 375, 377, 379, 394, 409,
627 409, 419, 419, 421, 422, 423, 424, 425, 427, 429,
628 433, 440, 448, 454, 454, 473, 474, 475, 479, 486,
629 494, 501, 508, 510, 512, 516, 520, 522, 524, 526,
630 528, 535, 543, 545, 547, 555, 557, 567, 580, 593,
631 606, 616, 620, 627, 630, 636, 642, 651
632 };
633 #endif
634
635 #if YYDEBUG || YYERROR_VERBOSE || 0
636 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
637 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
638 static const char *const yytname[] =
639 {
640 "$end", "error", "$undefined", "INT", "UINT", "BOOL", "STRING",
641 "TOK_CIPHERS", "TOK_SSL_ENGINE", "TOK_PREFER_SERVER_CIPHERS",
642 "TOK_BACKEND", "TOK_FRONTEND", "TOK_WORKERS", "TOK_BACKLOG",
643 "TOK_KEEPALIVE", "TOK_CHROOT", "TOK_USER", "TOK_GROUP", "TOK_QUIET",
644 "TOK_SYSLOG", "TOK_SYSLOG_FACILITY", "TOK_PARAM_SYSLOG_FACILITY",
645 "TOK_DAEMON", "TOK_WRITE_IP", "TOK_WRITE_PROXY", "TOK_WRITE_PROXY_V1",
646 "TOK_WRITE_PROXY_V2", "TOK_PEM_FILE", "TOK_PROXY_PROXY",
647 "TOK_BACKEND_CONNECT_TIMEOUT", "TOK_SSL_HANDSHAKE_TIMEOUT",
648 "TOK_RECV_BUFSIZE", "TOK_SEND_BUFSIZE", "TOK_LOG_FILENAME",
649 "TOK_RING_SLOTS", "TOK_RING_DATA_LEN", "TOK_PIDFILE",
650 "TOK_SNI_NOMATCH_ABORT", "TOK_SSL", "TOK_TLS", "TOK_HOST", "TOK_PORT",
651 "TOK_MATCH_GLOBAL", "TOK_PB_CERT", "TOK_PB_OCSP_FILE", "TOK_OCSP_VERIFY",
652 "TOK_OCSP_DIR", "TOK_OCSP_RESP_TMO", "TOK_OCSP_CONN_TMO",
653 "TOK_ALPN_PROTOS", "TOK_TLS_PROTOS", "TOK_SSLv3", "TOK_TLSv1_0",
654 "TOK_TLSv1_1", "TOK_TLSv1_2", "TOK_TLSv1_3", "TOK_CIPHERSUITES",
655 "TOK_ECDH_CURVE", "TOK_SESSION_CACHE", "TOK_SHARED_CACHE_LISTEN",
656 "TOK_SHARED_CACHE_PEER", "TOK_SHARED_CACHE_IF", "TOK_PRIVATE_KEY",
657 "TOK_BACKEND_REFRESH", "TOK_OCSP_REFRESH_INTERVAL", "TOK_PEM_DIR",
658 "TOK_PEM_DIR_GLOB", "TOK_LOG_LEVEL", "TOK_PROXY_TLV",
659 "TOK_PROXY_AUTHORITY", "TOK_TFO", "TOK_CLIENT_VERIFY", "TOK_VERIFY_NONE",
660 "TOK_VERIFY_OPT", "TOK_VERIFY_REQ", "TOK_CLIENT_VERIFY_CA",
661 "TOK_PROXY_CCERT", "'='", "'{'", "'}'", "$accept", "CFG", "CFG_RECORDS",
662 "CFG_RECORD", "FRONTEND_REC", "$@1", "FRONTEND_BLK", "FB_RECS", "FB_REC",
663 "FB_HOST", "FB_PORT", "PEM_BLK", "PB_RECS", "PB_REC", "PB_CERT",
664 "PB_OCSP_RESP_FILE", "OCSP_VERIFY", "PRIVATE_KEY", "PEM_DIR",
665 "PEM_DIR_GLOB", "OCSP_DIR", "OCSP_RESP_TMO", "OCSP_CONN_TMO",
666 "OCSP_REFRESH_INTERVAL", "FB_CERT", "$@2", "FB_CLIENT_VERIFY",
667 "FB_CLIENT_VERIFY_CA", "FB_MATCH_GLOBAL", "FB_SNI_NOMATCH_ABORT",
668 "FB_TLS", "FB_SSL", "FB_TLS_PROTOS", "$@3", "FB_TLS_PROTOS_LIST",
669 "FB_TLS_PROTO", "FB_CIPHERS", "FB_CIPHERSUITES", "FB_PREF_SRV_CIPH",
670 "QUIET_REC", "WORKERS_REC", "BACKLOG_REC", "KEEPALIVE_REC", "TLS_REC",
671 "SSL_REC", "TLS_PROTOS_REC", "$@4", "TLS_PROTOS_LIST", "TLS_PROTO",
672 "SSL_ENGINE_REC", "PREFER_SERVER_CIPHERS_REC", "CHROOT_REC",
673 "BACKEND_REC", "PEM_FILE_REC", "$@5", "SYSLOG_REC", "DAEMON_REC",
674 "SNI_NOMATCH_ABORT_REC", "CIPHERS_REC", "CIPHERSUITES_REC", "USER_REC",
675 "GROUP_REC", "WRITE_IP_REC", "WRITE_PROXY_REC", "WRITE_PROXY_V1_REC",
676 "WRITE_PROXY_V2_REC", "PROXY_TLV_REC", "PROXY_CCRT_REC",
677 "PROXY_PROXY_REC", "ALPN_PROTOS_REC", "SYSLOG_FACILITY_REC",
678 "SEND_BUFSIZE_REC", "RECV_BUFSIZE_REC", "LOG_FILENAME_REC",
679 "LOG_LEVEL_REC", "SESSION_CACHE_REC", "SHARED_CACHE_LISTEN_REC",
680 "SHARED_CACHE_PEER_REC", "SHARED_CACHE_IF_REC", "TFO",
681 "BACKEND_REFRESH_REC", "ECDH_CURVE_REC", "CLIENT_VERIFY_REC",
682 "CLIENT_VERIFY_OPT", "CLIENT_VERIFY_CA_REC", YY_NULLPTR
683 };
684 #endif
685
686 # ifdef YYPRINT
687 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
688 (internal) symbol number NUM (which must be that of a token). */
689 static const yytype_uint16 yytoknum[] =
690 {
691 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
692 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
693 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
694 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
695 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
696 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
697 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
698 325, 326, 327, 328, 329, 330, 331, 61, 123, 125
699 };
700 # endif
701
702 #define YYPACT_NINF -82
703
704 #define yypact_value_is_default(Yystate) \
705 (!!((Yystate) == (-82)))
706
707 #define YYTABLE_NINF -1
708
709 #define yytable_value_is_error(Yytable_value) \
710 0
711
712 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
713 STATE-NUM. */
714 static const yytype_int16 yypact[] =
715 {
716 0, -56, -48, -47, -26, -25, -23, -15, 1, 8,
717 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
718 19, 21, 22, 23, 24, 25, 26, 27, 28, 36,
719 37, 38, 39, -82, 40, 41, 42, 44, 45, 46,
720 47, 48, 50, 51, 52, 53, 54, 55, 56, 57,
721 58, 106, 0, -82, -82, -82, -82, -82, -82, -82,
722 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
723 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
724 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
725 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
726 -82, -82, -82, 130, 131, 133, 134, -6, 135, 138,
727 139, 140, 141, 142, 144, 145, 146, 148, 149, 150,
728 151, 152, -5, 153, 147, 155, 154, 156, 157, 158,
729 159, 160, 161, 163, 162, 67, 164, 165, 168, 167,
730 169, 170, 173, 174, 175, 176, 179, 180, 181, 182,
731 -68, 178, 183, -82, -82, -82, -82, -82, -82, -82,
732 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
733 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
734 -82, -82, -82, -82, -82, -82, -82, -82, -82, -11,
735 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
736 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
737 70, -9, -82, -82, -82, -82, -82, -11, -82, 92,
738 97, 102, 103, 112, 113, 114, 115, 116, -82, 117,
739 118, 119, 120, 70, -82, -82, -82, -82, -82, -82,
740 -82, -82, -82, -82, -82, -82, -82, -82, 121, 123,
741 124, 125, -9, -82, -82, -82, -82, -82, -82, 191,
742 197, -4, 198, 200, 201, 202, 203, 205, 136, 206,
743 -68, 208, -82, -82, 209, 210, 211, -82, -82, -82,
744 -82, -82, -82, -82, -82, -82, -82, -82, -82, 29,
745 -82, -82, -82, -82, -82, -82, -9, -82, -82, -82,
746 -82, -82, 29, -82, 128, -82, -82
747 };
748
749 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
750 Performed when YYTABLE does not specify something else to do. Zero
751 means the default is an error. */
752 static const yytype_uint8 yydefact[] =
753 {
754 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
755 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
757 0, 0, 0, 119, 0, 0, 0, 0, 0, 0,
758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
759 0, 0, 2, 3, 5, 34, 39, 40, 38, 35,
760 36, 37, 21, 15, 16, 17, 10, 11, 12, 14,
761 13, 18, 6, 7, 22, 24, 33, 8, 9, 19,
762 20, 25, 26, 27, 28, 31, 32, 29, 30, 23,
763 47, 48, 45, 46, 41, 42, 43, 44, 50, 49,
764 51, 52, 53, 0, 0, 0, 0, 0, 0, 0,
765 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
766 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
769 0, 0, 0, 1, 4, 138, 128, 129, 131, 54,
770 55, 114, 115, 116, 130, 140, 141, 113, 135, 151,
771 136, 142, 143, 144, 145, 132, 133, 149, 153, 152,
772 154, 137, 118, 117, 84, 88, 89, 90, 150, 0,
773 139, 162, 156, 157, 158, 159, 161, 91, 86, 87,
774 155, 146, 147, 160, 164, 165, 166, 163, 167, 148,
775 0, 0, 123, 124, 125, 126, 127, 120, 121, 0,
776 0, 0, 0, 0, 0, 0, 0, 0, 101, 0,
777 0, 0, 0, 57, 58, 60, 61, 62, 63, 64,
778 65, 66, 67, 68, 69, 70, 71, 72, 0, 0,
779 0, 0, 75, 76, 78, 79, 80, 81, 122, 0,
780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
781 0, 0, 56, 59, 0, 0, 0, 134, 77, 110,
782 112, 92, 93, 98, 100, 99, 73, 74, 97, 0,
783 111, 95, 96, 82, 83, 85, 0, 105, 106, 107,
784 108, 109, 102, 103, 0, 104, 94
785 };
786
787 /* YYPGOTO[NTERM-NUM]. */
788 static const yytype_int16 yypgoto[] =
789 {
790 -82, -82, -82, 166, -82, -82, -82, -82, -22, -82,
791 -82, -77, -82, -32, -82, -82, 3, -82, -82, -82,
792 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
793 -82, -82, -82, -82, -82, -81, -82, -82, -82, -82,
794 -82, -82, -82, -82, -82, -82, -82, -82, 5, -82,
795 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
796 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
797 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
798 -82, -82, -82, -46, -82
799 };
800
801 /* YYDEFGOTO[NTERM-NUM]. */
802 static const yytype_int16 yydefgoto[] =
803 {
804 -1, 51, 52, 53, 54, 210, 232, 233, 234, 235,
805 236, 251, 252, 253, 254, 255, 256, 257, 56, 57,
806 58, 59, 60, 61, 237, 296, 238, 239, 240, 241,
807 242, 243, 244, 268, 302, 303, 245, 246, 247, 62,
808 63, 64, 65, 66, 67, 68, 135, 217, 218, 69,
809 70, 71, 72, 73, 211, 74, 75, 76, 77, 78,
810 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
811 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
812 99, 100, 101, 207, 102
813 };
814
815 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
816 positive, shift that token. If negative, reduce the rule whose
817 number is the opposite. If YYTABLE_NINF, syntax error. */
818 static const yytype_uint16 yytable[] =
819 {
820 159, 175, 281, 55, 204, 205, 206, 1, 2, 3,
821 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
822 14, 103, 15, 16, 17, 18, 19, 20, 21, 104,
823 105, 22, 23, 24, 248, 249, 28, 25, 26, 27,
824 212, 213, 214, 215, 216, 28, 29, 30, 31, 32,
825 33, 106, 107, 250, 108, 55, 34, 35, 36, 37,
826 38, 39, 109, 40, 41, 42, 43, 44, 45, 46,
827 47, 48, 160, 176, 282, 49, 50, 219, 110, 220,
828 297, 298, 299, 300, 301, 111, 112, 113, 114, 115,
829 116, 117, 118, 119, 120, 121, 122, 221, 123, 124,
830 125, 126, 127, 128, 129, 130, 153, 222, 223, 224,
831 225, 226, 227, 131, 132, 133, 134, 136, 137, 138,
832 228, 139, 140, 141, 142, 143, 229, 144, 145, 146,
833 147, 148, 149, 150, 151, 152, 155, 156, 157, 161,
834 158, 230, 162, 163, 189, 231, 164, 165, 166, 167,
835 168, 178, 169, 170, 171, 172, 173, 174, 177, 179,
836 180, 181, 182, 183, 184, 186, 185, 187, 188, 259,
837 190, 191, 192, 193, 260, 194, 195, 196, 197, 261,
838 262, 198, 199, 200, 208, 201, 202, 203, 209, 263,
839 264, 265, 266, 267, 269, 270, 271, 279, 274, 272,
840 275, 276, 280, 283, 277, 284, 285, 306, 286, 287,
841 288, 273, 290, 289, 292, 293, 294, 295, 154, 304,
842 278, 305, 258, 0, 291
843 };
844
845 static const yytype_int16 yycheck[] =
846 {
847 6, 6, 6, 0, 72, 73, 74, 7, 8, 9,
848 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
849 20, 77, 22, 23, 24, 25, 26, 27, 28, 77,
850 77, 31, 32, 33, 43, 44, 45, 37, 38, 39,
851 51, 52, 53, 54, 55, 45, 46, 47, 48, 49,
852 50, 77, 77, 62, 77, 52, 56, 57, 58, 59,
853 60, 61, 77, 63, 64, 65, 66, 67, 68, 69,
854 70, 71, 78, 78, 78, 75, 76, 7, 77, 9,
855 51, 52, 53, 54, 55, 77, 77, 77, 77, 77,
856 77, 77, 77, 77, 77, 77, 77, 27, 77, 77,
857 77, 77, 77, 77, 77, 77, 0, 37, 38, 39,
858 40, 41, 42, 77, 77, 77, 77, 77, 77, 77,
859 50, 77, 77, 77, 77, 77, 56, 77, 77, 77,
860 77, 77, 77, 77, 77, 77, 6, 6, 5, 4,
861 6, 71, 4, 4, 77, 75, 6, 6, 6, 5,
862 5, 4, 6, 5, 5, 5, 5, 5, 5, 4,
863 6, 5, 5, 5, 5, 4, 6, 4, 6, 77,
864 6, 6, 4, 6, 77, 6, 6, 4, 4, 77,
865 77, 6, 6, 4, 6, 5, 5, 5, 5, 77,
866 77, 77, 77, 77, 77, 77, 77, 6, 77, 79,
867 77, 77, 5, 5, 79, 5, 5, 79, 6, 6,
868 5, 233, 6, 77, 6, 6, 6, 6, 52, 296,
869 252, 302, 217, -1, 270
870 };
871
872 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
873 symbol of state STATE-NUM. */
874 static const yytype_uint8 yystos[] =
875 {
876 0, 7, 8, 9, 10, 11, 12, 13, 14, 15,
877 16, 17, 18, 19, 20, 22, 23, 24, 25, 26,
878 27, 28, 31, 32, 33, 37, 38, 39, 45, 46,
879 47, 48, 49, 50, 56, 57, 58, 59, 60, 61,
880 63, 64, 65, 66, 67, 68, 69, 70, 71, 75,
881 76, 81, 82, 83, 84, 96, 98, 99, 100, 101,
882 102, 103, 119, 120, 121, 122, 123, 124, 125, 129,
883 130, 131, 132, 133, 135, 136, 137, 138, 139, 140,
884 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
885 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
886 161, 162, 164, 77, 77, 77, 77, 77, 77, 77,
887 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
888 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
889 77, 77, 77, 77, 77, 126, 77, 77, 77, 77,
890 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
891 77, 77, 77, 0, 83, 6, 6, 5, 6, 6,
892 78, 4, 4, 4, 6, 6, 6, 5, 5, 6,
893 5, 5, 5, 5, 5, 6, 78, 5, 4, 4,
894 6, 5, 5, 5, 5, 6, 4, 4, 6, 77,
895 6, 6, 4, 6, 6, 6, 4, 4, 6, 6,
896 4, 5, 5, 5, 72, 73, 74, 163, 6, 5,
897 85, 134, 51, 52, 53, 54, 55, 127, 128, 7,
898 9, 27, 37, 38, 39, 40, 41, 42, 50, 56,
899 71, 75, 86, 87, 88, 89, 90, 104, 106, 107,
900 108, 109, 110, 111, 112, 116, 117, 118, 43, 44,
901 62, 91, 92, 93, 94, 95, 96, 97, 128, 77,
902 77, 77, 77, 77, 77, 77, 77, 77, 113, 77,
903 77, 77, 79, 88, 77, 77, 77, 79, 93, 6,
904 5, 6, 78, 5, 5, 5, 6, 6, 5, 77,
905 6, 163, 6, 6, 6, 6, 105, 51, 52, 53,
906 54, 55, 114, 115, 91, 115, 79
907 };
908
909 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
910 static const yytype_uint8 yyr1[] =
911 {
912 0, 80, 81, 82, 82, 83, 83, 83, 83, 83,
913 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
914 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
915 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
916 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
917 83, 83, 83, 83, 84, 85, 84, 86, 87, 87,
918 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
919 88, 88, 88, 89, 90, 91, 92, 92, 93, 93,
920 93, 93, 94, 95, 96, 97, 98, 99, 100, 101,
921 102, 103, 104, 105, 104, 106, 107, 108, 109, 110,
922 111, 113, 112, 114, 114, 115, 115, 115, 115, 115,
923 116, 117, 118, 119, 120, 121, 122, 123, 124, 126,
924 125, 127, 127, 128, 128, 128, 128, 128, 129, 130,
925 131, 132, 133, 134, 133, 135, 136, 137, 138, 139,
926 140, 141, 142, 143, 144, 145, 146, 146, 147, 148,
927 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
928 159, 160, 161, 162, 163, 163, 163, 164
929 };
930
931 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
932 static const yytype_uint8 yyr2[] =
933 {
934 0, 2, 1, 1, 2, 1, 1, 1, 1, 1,
935 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
936 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
937 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
938 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
939 1, 1, 1, 1, 3, 0, 6, 1, 1, 2,
940 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
941 1, 1, 1, 3, 3, 1, 1, 2, 1, 1,
942 1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
943 3, 3, 3, 0, 6, 3, 3, 3, 3, 3,
944 3, 0, 4, 1, 2, 1, 1, 1, 1, 1,
945 3, 3, 3, 3, 3, 3, 3, 3, 3, 0,
946 4, 1, 2, 1, 1, 1, 1, 1, 3, 3,
947 3, 3, 3, 0, 6, 3, 3, 3, 3, 3,
948 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
949 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
950 3, 3, 3, 3, 1, 1, 1, 3
951 };
952
953
954 #define yyerrok (yyerrstatus = 0)
955 #define yyclearin (yychar = YYEMPTY)
956 #define YYEMPTY (-2)
957 #define YYEOF 0
958
959 #define YYACCEPT goto yyacceptlab
960 #define YYABORT goto yyabortlab
961 #define YYERROR goto yyerrorlab
962
963
964 #define YYRECOVERING() (!!yyerrstatus)
965
966 #define YYBACKUP(Token, Value) \
967 do \
968 if (yychar == YYEMPTY) \
969 { \
970 yychar = (Token); \
971 yylval = (Value); \
972 YYPOPSTACK (yylen); \
973 yystate = *yyssp; \
974 goto yybackup; \
975 } \
976 else \
977 { \
978 yyerror (cfg, YY_("syntax error: cannot back up")); \
979 YYERROR; \
980 } \
981 while (0)
982
983 /* Error token number */
984 #define YYTERROR 1
985 #define YYERRCODE 256
986
987
988
989 /* Enable debugging if requested. */
990 #if YYDEBUG
991
992 # ifndef YYFPRINTF
993 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
994 # define YYFPRINTF fprintf
995 # endif
996
997 # define YYDPRINTF(Args) \
998 do { \
999 if (yydebug) \
1000 YYFPRINTF Args; \
1001 } while (0)
1002
1003 /* This macro is provided for backward compatibility. */
1004 #ifndef YY_LOCATION_PRINT
1005 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1006 #endif
1007
1008
1009 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1010 do { \
1011 if (yydebug) \
1012 { \
1013 YYFPRINTF (stderr, "%s ", Title); \
1014 yy_symbol_print (stderr, \
1015 Type, Value, cfg); \
1016 YYFPRINTF (stderr, "\n"); \
1017 } \
1018 } while (0)
1019
1020
1021 /*-----------------------------------.
1022 | Print this symbol's value on YYO. |
1023 `-----------------------------------*/
1024
1025 static void
1026 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, hitch_config *cfg)
1027 {
1028 FILE *yyoutput = yyo;
1029 YYUSE (yyoutput);
1030 YYUSE (cfg);
1031 if (!yyvaluep)
1032 return;
1033 # ifdef YYPRINT
1034 if (yytype < YYNTOKENS)
1035 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1036 # endif
1037 YYUSE (yytype);
1038 }
1039
1040
1041 /*---------------------------.
1042 | Print this symbol on YYO. |
1043 `---------------------------*/
1044
1045 static void
1046 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, hitch_config *cfg)
1047 {
1048 YYFPRINTF (yyo, "%s %s (",
1049 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1050
1051 yy_symbol_value_print (yyo, yytype, yyvaluep, cfg);
1052 YYFPRINTF (yyo, ")");
1053 }
1054
1055 /*------------------------------------------------------------------.
1056 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1057 | TOP (included). |
1058 `------------------------------------------------------------------*/
1059
1060 static void
1061 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1062 {
1063 YYFPRINTF (stderr, "Stack now");
1064 for (; yybottom <= yytop; yybottom++)
1065 {
1066 int yybot = *yybottom;
1067 YYFPRINTF (stderr, " %d", yybot);
1068 }
1069 YYFPRINTF (stderr, "\n");
1070 }
1071
1072 # define YY_STACK_PRINT(Bottom, Top) \
1073 do { \
1074 if (yydebug) \
1075 yy_stack_print ((Bottom), (Top)); \
1076 } while (0)
1077
1078
1079 /*------------------------------------------------.
1080 | Report that the YYRULE is going to be reduced. |
1081 `------------------------------------------------*/
1082
1083 static void
1084 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, hitch_config *cfg)
1085 {
1086 unsigned long yylno = yyrline[yyrule];
1087 int yynrhs = yyr2[yyrule];
1088 int yyi;
1089 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1090 yyrule - 1, yylno);
1091 /* The symbols being reduced. */
1092 for (yyi = 0; yyi < yynrhs; yyi++)
1093 {
1094 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1095 yy_symbol_print (stderr,
1096 yystos[yyssp[yyi + 1 - yynrhs]],
1097 &yyvsp[(yyi + 1) - (yynrhs)]
1098 , cfg);
1099 YYFPRINTF (stderr, "\n");
1100 }
1101 }
1102
1103 # define YY_REDUCE_PRINT(Rule) \
1104 do { \
1105 if (yydebug) \
1106 yy_reduce_print (yyssp, yyvsp, Rule, cfg); \
1107 } while (0)
1108
1109 /* Nonzero means print parse trace. It is left uninitialized so that
1110 multiple parsers can coexist. */
1111 int yydebug;
1112 #else /* !YYDEBUG */
1113 # define YYDPRINTF(Args)
1114 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1115 # define YY_STACK_PRINT(Bottom, Top)
1116 # define YY_REDUCE_PRINT(Rule)
1117 #endif /* !YYDEBUG */
1118
1119
1120 /* YYINITDEPTH -- initial size of the parser's stacks. */
1121 #ifndef YYINITDEPTH
1122 # define YYINITDEPTH 200
1123 #endif
1124
1125 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1126 if the built-in stack extension method is used).
1127
1128 Do not make this value too large; the results are undefined if
1129 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1130 evaluated with infinite-precision integer arithmetic. */
1131
1132 #ifndef YYMAXDEPTH
1133 # define YYMAXDEPTH 10000
1134 #endif
1135
1136
1137 #if YYERROR_VERBOSE
1138
1139 # ifndef yystrlen
1140 # if defined __GLIBC__ && defined _STRING_H
1141 # define yystrlen strlen
1142 # else
1143 /* Return the length of YYSTR. */
1144 static YYSIZE_T
1145 yystrlen (const char *yystr)
1146 {
1147 YYSIZE_T yylen;
1148 for (yylen = 0; yystr[yylen]; yylen++)
1149 continue;
1150 return yylen;
1151 }
1152 # endif
1153 # endif
1154
1155 # ifndef yystpcpy
1156 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1157 # define yystpcpy stpcpy
1158 # else
1159 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1160 YYDEST. */
1161 static char *
1162 yystpcpy (char *yydest, const char *yysrc)
1163 {
1164 char *yyd = yydest;
1165 const char *yys = yysrc;
1166
1167 while ((*yyd++ = *yys++) != '\0')
1168 continue;
1169
1170 return yyd - 1;
1171 }
1172 # endif
1173 # endif
1174
1175 # ifndef yytnamerr
1176 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1177 quotes and backslashes, so that it's suitable for yyerror. The
1178 heuristic is that double-quoting is unnecessary unless the string
1179 contains an apostrophe, a comma, or backslash (other than
1180 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1181 null, do not copy; instead, return the length of what the result
1182 would have been. */
1183 static YYSIZE_T
1184 yytnamerr (char *yyres, const char *yystr)
1185 {
1186 if (*yystr == '"')
1187 {
1188 YYSIZE_T yyn = 0;
1189 char const *yyp = yystr;
1190
1191 for (;;)
1192 switch (*++yyp)
1193 {
1194 case '\'':
1195 case ',':
1196 goto do_not_strip_quotes;
1197
1198 case '\\':
1199 if (*++yyp != '\\')
1200 goto do_not_strip_quotes;
1201 else
1202 goto append;
1203
1204 append:
1205 default:
1206 if (yyres)
1207 yyres[yyn] = *yyp;
1208 yyn++;
1209 break;
1210
1211 case '"':
1212 if (yyres)
1213 yyres[yyn] = '\0';
1214 return yyn;
1215 }
1216 do_not_strip_quotes: ;
1217 }
1218
1219 if (! yyres)
1220 return yystrlen (yystr);
1221
1222 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1223 }
1224 # endif
1225
1226 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1227 about the unexpected token YYTOKEN for the state stack whose top is
1228 YYSSP.
1229
1230 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1231 not large enough to hold the message. In that case, also set
1232 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1233 required number of bytes is too large to store. */
1234 static int
1235 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1236 yytype_int16 *yyssp, int yytoken)
1237 {
1238 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1239 YYSIZE_T yysize = yysize0;
1240 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1241 /* Internationalized format string. */
1242 const char *yyformat = YY_NULLPTR;
1243 /* Arguments of yyformat. */
1244 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1245 /* Number of reported tokens (one for the "unexpected", one per
1246 "expected"). */
1247 int yycount = 0;
1248
1249 /* There are many possibilities here to consider:
1250 - If this state is a consistent state with a default action, then
1251 the only way this function was invoked is if the default action
1252 is an error action. In that case, don't check for expected
1253 tokens because there are none.
1254 - The only way there can be no lookahead present (in yychar) is if
1255 this state is a consistent state with a default action. Thus,
1256 detecting the absence of a lookahead is sufficient to determine
1257 that there is no unexpected or expected token to report. In that
1258 case, just report a simple "syntax error".
1259 - Don't assume there isn't a lookahead just because this state is a
1260 consistent state with a default action. There might have been a
1261 previous inconsistent state, consistent state with a non-default
1262 action, or user semantic action that manipulated yychar.
1263 - Of course, the expected token list depends on states to have
1264 correct lookahead information, and it depends on the parser not
1265 to perform extra reductions after fetching a lookahead from the
1266 scanner and before detecting a syntax error. Thus, state merging
1267 (from LALR or IELR) and default reductions corrupt the expected
1268 token list. However, the list is correct for canonical LR with
1269 one exception: it will still contain any token that will not be
1270 accepted due to an error action in a later state.
1271 */
1272 if (yytoken != YYEMPTY)
1273 {
1274 int yyn = yypact[*yyssp];
1275 yyarg[yycount++] = yytname[yytoken];
1276 if (!yypact_value_is_default (yyn))
1277 {
1278 /* Start YYX at -YYN if negative to avoid negative indexes in
1279 YYCHECK. In other words, skip the first -YYN actions for
1280 this state because they are default actions. */
1281 int yyxbegin = yyn < 0 ? -yyn : 0;
1282 /* Stay within bounds of both yycheck and yytname. */
1283 int yychecklim = YYLAST - yyn + 1;
1284 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1285 int yyx;
1286
1287 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1288 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1289 && !yytable_value_is_error (yytable[yyx + yyn]))
1290 {
1291 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1292 {
1293 yycount = 1;
1294 yysize = yysize0;
1295 break;
1296 }
1297 yyarg[yycount++] = yytname[yyx];
1298 {
1299 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1300 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1301 yysize = yysize1;
1302 else
1303 return 2;
1304 }
1305 }
1306 }
1307 }
1308
1309 switch (yycount)
1310 {
1311 # define YYCASE_(N, S) \
1312 case N: \
1313 yyformat = S; \
1314 break
1315 default: /* Avoid compiler warnings. */
1316 YYCASE_(0, YY_("syntax error"));
1317 YYCASE_(1, YY_("syntax error, unexpected %s"));
1318 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1319 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1320 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1321 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1322 # undef YYCASE_
1323 }
1324
1325 {
1326 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1327 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1328 yysize = yysize1;
1329 else
1330 return 2;
1331 }
1332
1333 if (*yymsg_alloc < yysize)
1334 {
1335 *yymsg_alloc = 2 * yysize;
1336 if (! (yysize <= *yymsg_alloc
1337 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1338 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1339 return 1;
1340 }
1341
1342 /* Avoid sprintf, as that infringes on the user's name space.
1343 Don't have undefined behavior even if the translation
1344 produced a string with the wrong number of "%s"s. */
1345 {
1346 char *yyp = *yymsg;
1347 int yyi = 0;
1348 while ((*yyp = *yyformat) != '\0')
1349 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1350 {
1351 yyp += yytnamerr (yyp, yyarg[yyi++]);
1352 yyformat += 2;
1353 }
1354 else
1355 {
1356 yyp++;
1357 yyformat++;
1358 }
1359 }
1360 return 0;
1361 }
1362 #endif /* YYERROR_VERBOSE */
1363
1364 /*-----------------------------------------------.
1365 | Release the memory associated to this symbol. |
1366 `-----------------------------------------------*/
1367
1368 static void
1369 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, hitch_config *cfg)
1370 {
1371 YYUSE (yyvaluep);
1372 YYUSE (cfg);
1373 if (!yymsg)
1374 yymsg = "Deleting";
1375 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1376
1377 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1378 YYUSE (yytype);
1379 YY_IGNORE_MAYBE_UNINITIALIZED_END
1380 }
1381
1382
1383
1384
1385 /* The lookahead symbol. */
1386 int yychar;
1387
1388 /* The semantic value of the lookahead symbol. */
1389 YYSTYPE yylval;
1390 /* Number of syntax errors so far. */
1391 int yynerrs;
1392
1393
1394 /*----------.
1395 | yyparse. |
1396 `----------*/
1397
1398 int
1399 yyparse (hitch_config *cfg)
1400 {
1401 int yystate;
1402 /* Number of tokens to shift before error messages enabled. */
1403 int yyerrstatus;
1404
1405 /* The stacks and their tools:
1406 'yyss': related to states.
1407 'yyvs': related to semantic values.
1408
1409 Refer to the stacks through separate pointers, to allow yyoverflow
1410 to reallocate them elsewhere. */
1411
1412 /* The state stack. */
1413 yytype_int16 yyssa[YYINITDEPTH];
1414 yytype_int16 *yyss;
1415 yytype_int16 *yyssp;
1416
1417 /* The semantic value stack. */
1418 YYSTYPE yyvsa[YYINITDEPTH];
1419 YYSTYPE *yyvs;
1420 YYSTYPE *yyvsp;
1421
1422 YYSIZE_T yystacksize;
1423
1424 int yyn;
1425 int yyresult;
1426 /* Lookahead token as an internal (translated) token number. */
1427 int yytoken = 0;
1428 /* The variables used to return semantic value and location from the
1429 action routines. */
1430 YYSTYPE yyval;
1431
1432 #if YYERROR_VERBOSE
1433 /* Buffer for error messages, and its allocated size. */
1434 char yymsgbuf[128];
1435 char *yymsg = yymsgbuf;
1436 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1437 #endif
1438
1439 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1440
1441 /* The number of symbols on the RHS of the reduced rule.
1442 Keep to zero when no symbol should be popped. */
1443 int yylen = 0;
1444
1445 yyssp = yyss = yyssa;
1446 yyvsp = yyvs = yyvsa;
1447 yystacksize = YYINITDEPTH;
1448
1449 YYDPRINTF ((stderr, "Starting parse\n"));
1450
1451 yystate = 0;
1452 yyerrstatus = 0;
1453 yynerrs = 0;
1454 yychar = YYEMPTY; /* Cause a token to be read. */
1455 goto yysetstate;
1456
1457
1458 /*------------------------------------------------------------.
1459 | yynewstate -- push a new state, which is found in yystate. |
1460 `------------------------------------------------------------*/
1461 yynewstate:
1462 /* In all cases, when you get here, the value and location stacks
1463 have just been pushed. So pushing a state here evens the stacks. */
1464 yyssp++;
1465
1466
1467 /*--------------------------------------------------------------------.
1468 | yynewstate -- set current state (the top of the stack) to yystate. |
1469 `--------------------------------------------------------------------*/
1470 yysetstate:
1471 *yyssp = (yytype_int16) yystate;
1472
1473 if (yyss + yystacksize - 1 <= yyssp)
1474 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1475 goto yyexhaustedlab;
1476 #else
1477 {
1478 /* Get the current used size of the three stacks, in elements. */
1479 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1480
1481 # if defined yyoverflow
1482 {
1483 /* Give user a chance to reallocate the stack. Use copies of
1484 these so that the &'s don't force the real ones into
1485 memory. */
1486 YYSTYPE *yyvs1 = yyvs;
1487 yytype_int16 *yyss1 = yyss;
1488
1489 /* Each stack pointer address is followed by the size of the
1490 data in use in that stack, in bytes. This used to be a
1491 conditional around just the two extra args, but that might
1492 be undefined if yyoverflow is a macro. */
1493 yyoverflow (YY_("memory exhausted"),
1494 &yyss1, yysize * sizeof (*yyssp),
1495 &yyvs1, yysize * sizeof (*yyvsp),
1496 &yystacksize);
1497 yyss = yyss1;
1498 yyvs = yyvs1;
1499 }
1500 # else /* defined YYSTACK_RELOCATE */
1501 /* Extend the stack our own way. */
1502 if (YYMAXDEPTH <= yystacksize)
1503 goto yyexhaustedlab;
1504 yystacksize *= 2;
1505 if (YYMAXDEPTH < yystacksize)
1506 yystacksize = YYMAXDEPTH;
1507
1508 {
1509 yytype_int16 *yyss1 = yyss;
1510 union yyalloc *yyptr =
1511 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1512 if (! yyptr)
1513 goto yyexhaustedlab;
1514 YYSTACK_RELOCATE (yyss_alloc, yyss);
1515 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1516 # undef YYSTACK_RELOCATE
1517 if (yyss1 != yyssa)
1518 YYSTACK_FREE (yyss1);
1519 }
1520 # endif
1521
1522 yyssp = yyss + yysize - 1;
1523 yyvsp = yyvs + yysize - 1;
1524
1525 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1526 (unsigned long) yystacksize));
1527
1528 if (yyss + yystacksize - 1 <= yyssp)
1529 YYABORT;
1530 }
1531 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1532
1533 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1534
1535 if (yystate == YYFINAL)
1536 YYACCEPT;
1537
1538 goto yybackup;
1539
1540
1541 /*-----------.
1542 | yybackup. |
1543 `-----------*/
1544 yybackup:
1545 /* Do appropriate processing given the current state. Read a
1546 lookahead token if we need one and don't already have one. */
1547
1548 /* First try to decide what to do without reference to lookahead token. */
1549 yyn = yypact[yystate];
1550 if (yypact_value_is_default (yyn))
1551 goto yydefault;
1552
1553 /* Not known => get a lookahead token if don't already have one. */
1554
1555 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1556 if (yychar == YYEMPTY)
1557 {
1558 YYDPRINTF ((stderr, "Reading a token: "));
1559 yychar = yylex ();
1560 }
1561
1562 if (yychar <= YYEOF)
1563 {
1564 yychar = yytoken = YYEOF;
1565 YYDPRINTF ((stderr, "Now at end of input.\n"));
1566 }
1567 else
1568 {
1569 yytoken = YYTRANSLATE (yychar);
1570 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1571 }
1572
1573 /* If the proper action on seeing token YYTOKEN is to reduce or to
1574 detect an error, take that action. */
1575 yyn += yytoken;
1576 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1577 goto yydefault;
1578 yyn = yytable[yyn];
1579 if (yyn <= 0)
1580 {
1581 if (yytable_value_is_error (yyn))
1582 goto yyerrlab;
1583 yyn = -yyn;
1584 goto yyreduce;
1585 }
1586
1587 /* Count tokens shifted since error; after three, turn off error
1588 status. */
1589 if (yyerrstatus)
1590 yyerrstatus--;
1591
1592 /* Shift the lookahead token. */
1593 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1594
1595 /* Discard the shifted token. */
1596 yychar = YYEMPTY;
1597
1598 yystate = yyn;
1599 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1600 *++yyvsp = yylval;
1601 YY_IGNORE_MAYBE_UNINITIALIZED_END
1602
1603 goto yynewstate;
1604
1605
1606 /*-----------------------------------------------------------.
1607 | yydefault -- do the default action for the current state. |
1608 `-----------------------------------------------------------*/
1609 yydefault:
1610 yyn = yydefact[yystate];
1611 if (yyn == 0)
1612 goto yyerrlab;
1613 goto yyreduce;
1614
1615
1616 /*-----------------------------.
1617 | yyreduce -- do a reduction. |
1618 `-----------------------------*/
1619 yyreduce:
1620 /* yyn is the number of a rule to reduce with. */
1621 yylen = yyr2[yyn];
1622
1623 /* If YYLEN is nonzero, implement the default value of the action:
1624 '$$ = $1'.
1625
1626 Otherwise, the following line sets YYVAL to garbage.
1627 This behavior is undocumented and Bison
1628 users should not rely upon it. Assigning to YYVAL
1629 unconditionally makes the parser a bit smaller, and it avoids a
1630 GCC warning that YYVAL may be used uninitialized. */
1631 yyval = yyvsp[1-yylen];
1632
1633
1634 YY_REDUCE_PRINT (yyn);
1635 switch (yyn)
1636 {
1637 case 54:
1638 #line 130 "cfg_parser.y" /* yacc.c:1652 */
1639 {
1640 /* XXX: passing an empty string for file */
1641 if ((yyvsp[0].s) && config_param_validate("frontend", (yyvsp[0].s), cfg, "",
1642 yyget_lineno()) != 0)
1643 YYABORT;
1644 }
1645 #line 1646 "cfg_parser.c" /* yacc.c:1652 */
1646 break;
1647
1648 case 55:
1649 #line 136 "cfg_parser.y" /* yacc.c:1652 */
1650 {
1651 /* NB: Mid-rule action */
1652 AZ(cur_fa);
1653 cur_fa = front_arg_new();
1654 }
1655 #line 1656 "cfg_parser.c" /* yacc.c:1652 */
1656 break;
1657
1658 case 56:
1659 #line 141 "cfg_parser.y" /* yacc.c:1652 */
1660 {
1661 if (front_arg_add(cfg, cur_fa) != 1)
1662 YYABORT;
1663 cur_fa = NULL;
1664 }
1665 #line 1666 "cfg_parser.c" /* yacc.c:1652 */
1666 break;
1667
1668 case 73:
1669 #line 169 "cfg_parser.y" /* yacc.c:1652 */
1670 {
1671 if ((yyvsp[0].s)) {
1672 if (strcmp((yyvsp[0].s), "*") == 0)
1673 cur_fa->ip = NULL;
1674 else
1675 cur_fa->ip = strdup((yyvsp[0].s));
1676 }
1677 }
1678 #line 1679 "cfg_parser.c" /* yacc.c:1652 */
1679 break;
1680
1681 case 74:
1682 #line 178 "cfg_parser.y" /* yacc.c:1652 */
1683 { if ((yyvsp[0].s)) cur_fa->port = strdup((yyvsp[0].s)); }
1684 #line 1685 "cfg_parser.c" /* yacc.c:1652 */
1685 break;
1686
1687 case 82:
1688 #line 194 "cfg_parser.y" /* yacc.c:1652 */
1689 { if ((yyvsp[0].s)) cur_pem->filename = strdup((yyvsp[0].s)); }
1690 #line 1691 "cfg_parser.c" /* yacc.c:1652 */
1691 break;
1692
1693 case 83:
1694 #line 196 "cfg_parser.y" /* yacc.c:1652 */
1695 {
1696 if ((yyvsp[0].s))
1697 cur_pem->ocspfn = strdup((yyvsp[0].s));
1698 }
1699 #line 1700 "cfg_parser.c" /* yacc.c:1652 */
1700 break;
1701
1702 case 84:
1703 #line 201 "cfg_parser.y" /* yacc.c:1652 */
1704 {
1705 if (cur_pem != NULL)
1706 cur_pem->ocsp_vfy = (yyvsp[0].i);
1707 else
1708 cfg->OCSP_VFY = (yyvsp[0].i);
1709 }
1710 #line 1711 "cfg_parser.c" /* yacc.c:1652 */
1711 break;
1712
1713 case 85:
1714 #line 208 "cfg_parser.y" /* yacc.c:1652 */
1715 {
1716 if ((yyvsp[0].s)) cur_pem->priv_key_filename = strdup((yyvsp[0].s));
1717 }
1718 #line 1719 "cfg_parser.c" /* yacc.c:1652 */
1719 break;
1720
1721 case 86:
1722 #line 212 "cfg_parser.y" /* yacc.c:1652 */
1723 {
1724 if ((yyvsp[0].s)) {
1725 size_t l;
1726 l = strlen((yyvsp[0].s));
1727 cfg->PEM_DIR = malloc(l + 2);
1728 strcpy(cfg->PEM_DIR, (yyvsp[0].s));
1729 if (cfg->PEM_DIR[l-1] != '/')
1730 strcat(cfg->PEM_DIR, "/");
1731 }
1732 else
1733 cfg->PEM_DIR = NULL;
1734 }
1735 #line 1736 "cfg_parser.c" /* yacc.c:1652 */
1736 break;
1737
1738 case 87:
1739 #line 225 "cfg_parser.y" /* yacc.c:1652 */
1740 {
1741 if ((yyvsp[0].s))
1742 cfg->PEM_DIR_GLOB = strdup((yyvsp[0].s));
1743 else
1744 cfg->PEM_DIR_GLOB = NULL;
1745
1746 }
1747 #line 1748 "cfg_parser.c" /* yacc.c:1652 */
1748 break;
1749
1750 case 88:
1751 #line 233 "cfg_parser.y" /* yacc.c:1652 */
1752 {
1753 free(cfg->OCSP_DIR);
1754 if ((yyvsp[0].s))
1755 cfg->OCSP_DIR = strdup((yyvsp[0].s));
1756 else
1757 cfg->OCSP_DIR = NULL;
1758 }
1759 #line 1760 "cfg_parser.c" /* yacc.c:1652 */
1760 break;
1761
1762 case 89:
1763 #line 241 "cfg_parser.y" /* yacc.c:1652 */
1764 {
1765 cfg->OCSP_RESP_TMO = (yyvsp[0].i);
1766 }
1767 #line 1768 "cfg_parser.c" /* yacc.c:1652 */
1768 break;
1769
1770 case 90:
1771 #line 245 "cfg_parser.y" /* yacc.c:1652 */
1772 {
1773 cfg->OCSP_CONN_TMO = (yyvsp[0].i);
1774 }
1775 #line 1776 "cfg_parser.c" /* yacc.c:1652 */
1776 break;
1777
1778 case 91:
1779 #line 249 "cfg_parser.y" /* yacc.c:1652 */
1780 {
1781 cfg->OCSP_REFRESH_INTERVAL = (yyvsp[0].i);
1782 }
1783 #line 1784 "cfg_parser.c" /* yacc.c:1652 */
1784 break;
1785
1786 case 92:
1787 #line 254 "cfg_parser.y" /* yacc.c:1652 */
1788 {
1789 if ((yyvsp[0].s) != NULL) {
1790 int r;
1791 struct cfg_cert_file *cert;
1792 cert = cfg_cert_file_new();
1793 cert->filename = strdup((yyvsp[0].s));
1794 r = cfg_cert_vfy(cert);
1795 if (r == 0) {
1796 cfg_cert_file_free(&cert);
1797 YYABORT;
1798 }
1799 cfg_cert_add(cert, &cur_fa->certs);
1800 }
1801 }
1802 #line 1803 "cfg_parser.c" /* yacc.c:1652 */
1803 break;
1804
1805 case 93:
1806 #line 268 "cfg_parser.y" /* yacc.c:1652 */
1807 {
1808 /* NB: Mid-rule action */
1809 AZ(cur_pem);
1810 cur_pem = cfg_cert_file_new();
1811 }
1812 #line 1813 "cfg_parser.c" /* yacc.c:1652 */
1813 break;
1814
1815 case 94:
1816 #line 273 "cfg_parser.y" /* yacc.c:1652 */
1817 {
1818 if (cfg_cert_vfy(cur_pem) != 0)
1819 cfg_cert_add(cur_pem, &cur_fa->certs);
1820 else {
1821 cfg_cert_file_free(&cur_pem);
1822 YYABORT;
1823 }
1824 cur_pem = NULL;
1825 }
1826 #line 1827 "cfg_parser.c" /* yacc.c:1652 */
1827 break;
1828
1829 case 96:
1830 #line 285 "cfg_parser.y" /* yacc.c:1652 */
1831 {
1832 cur_fa->client_verify_ca = strdup((yyvsp[0].s));
1833 }
1834 #line 1835 "cfg_parser.c" /* yacc.c:1652 */
1835 break;
1836
1837 case 97:
1838 #line 290 "cfg_parser.y" /* yacc.c:1652 */
1839 { cur_fa->match_global_certs = (yyvsp[0].i); }
1840 #line 1841 "cfg_parser.c" /* yacc.c:1652 */
1841 break;
1842
1843 case 98:
1844 #line 292 "cfg_parser.y" /* yacc.c:1652 */
1845 {
1846 cur_fa->sni_nomatch_abort = (yyvsp[0].i);
1847 }
1848 #line 1849 "cfg_parser.c" /* yacc.c:1652 */
1849 break;
1850
1851 case 99:
1852 #line 297 "cfg_parser.y" /* yacc.c:1652 */
1853 {
1854 if (cur_fa->selected_protos != 0) {
1855 fprintf(stderr, "%s (%s, line %d):"
1856 " It is illegal to specify tls after ssl,"
1857 " tls or tls-protos.\n",
1858 __func__, __FILE__, __LINE__);
1859 front_arg_destroy(cur_fa);
1860 cur_fa = NULL;
1861 YYABORT;
1862 }
1863 if ((yyvsp[0].i))
1864 cur_fa->selected_protos = TLS_OPTION_PROTOS;
1865 else
1866 fprintf(stderr,
1867 "Warning: tls = off is deprecated and has no effect.\n");
1868 }
1869 #line 1870 "cfg_parser.c" /* yacc.c:1652 */
1870 break;
1871
1872 case 100:
1873 #line 314 "cfg_parser.y" /* yacc.c:1652 */
1874 {
1875 if (cur_fa->selected_protos != 0) {
1876 fprintf(stderr, "%s (%s, line %d):"
1877 " It is illegal to specify ssl after ssl,"
1878 " tls or tls-protos.\n",
1879 __func__, __FILE__, __LINE__);
1880 front_arg_destroy(cur_fa);
1881 cur_fa = NULL;
1882 YYABORT;
1883 }
1884 if ((yyvsp[0].i))
1885 cur_fa->selected_protos = SSL_OPTION_PROTOS;
1886 else
1887 fprintf(stderr,
1888 "Warning: ssl = off is deprecated and has no effect.\n");
1889 }
1890 #line 1891 "cfg_parser.c" /* yacc.c:1652 */
1891 break;
1892
1893 case 101:
1894 #line 331 "cfg_parser.y" /* yacc.c:1652 */
1895 {
1896 if (cur_fa->selected_protos != 0) {
1897 fprintf(stderr, "%s (%s, line %d):"
1898 " It is illegal to specify tls-protos after"
1899 " ssl, tls or tls-protos\nSelected before was %d\n",
1900 __func__, __FILE__, __LINE__, cur_fa->selected_protos);
1901 front_arg_destroy(cur_fa);
1902 cur_fa = NULL;
1903 YYABORT;
1904 }
1905 }
1906 #line 1907 "cfg_parser.c" /* yacc.c:1652 */
1907 break;
1908
1909 case 105:
1910 #line 345 "cfg_parser.y" /* yacc.c:1652 */
1911 { cur_fa->selected_protos |= SSLv3_PROTO; }
1912 #line 1913 "cfg_parser.c" /* yacc.c:1652 */
1913 break;
1914
1915 case 106:
1916 #line 346 "cfg_parser.y" /* yacc.c:1652 */
1917 { cur_fa->selected_protos |= TLSv1_0_PROTO; }
1918 #line 1919 "cfg_parser.c" /* yacc.c:1652 */
1919 break;
1920
1921 case 107:
1922 #line 347 "cfg_parser.y" /* yacc.c:1652 */
1923 { cur_fa->selected_protos |= TLSv1_1_PROTO; }
1924 #line 1925 "cfg_parser.c" /* yacc.c:1652 */
1925 break;
1926
1927 case 108:
1928 #line 348 "cfg_parser.y" /* yacc.c:1652 */
1929 { cur_fa->selected_protos |= TLSv1_2_PROTO; }
1930 #line 1931 "cfg_parser.c" /* yacc.c:1652 */
1931 break;
1932
1933 case 109:
1934 #line 349 "cfg_parser.y" /* yacc.c:1652 */
1935 { cur_fa->selected_protos |= TLSv1_3_PROTO; }
1936 #line 1937 "cfg_parser.c" /* yacc.c:1652 */
1937 break;
1938
1939 case 110:
1940 #line 351 "cfg_parser.y" /* yacc.c:1652 */
1941 {
1942 if ((yyvsp[0].s)) cur_fa->ciphers_tlsv12 = strdup((yyvsp[0].s));
1943 }
1944 #line 1945 "cfg_parser.c" /* yacc.c:1652 */
1945 break;
1946
1947 case 111:
1948 #line 355 "cfg_parser.y" /* yacc.c:1652 */
1949 {
1950 if ((yyvsp[0].s)) {
1951 CHECK_OBJ_NOTNULL(cur_fa, FRONT_ARG_MAGIC);
1952 cur_fa->ciphersuites_tlsv13 = strdup((yyvsp[0].s));
1953 }
1954 }
1955 #line 1956 "cfg_parser.c" /* yacc.c:1652 */
1956 break;
1957
1958 case 112:
1959 #line 362 "cfg_parser.y" /* yacc.c:1652 */
1960 {
1961 cur_fa->prefer_server_ciphers = (yyvsp[0].i);
1962 }
1963 #line 1964 "cfg_parser.c" /* yacc.c:1652 */
1964 break;
1965
1966 case 113:
1967 #line 366 "cfg_parser.y" /* yacc.c:1652 */
1968 {
1969 if ((yyvsp[0].i))
1970 cfg->LOG_LEVEL = 0;
1971 else
1972 cfg->LOG_LEVEL = 1;
1973 }
1974 #line 1975 "cfg_parser.c" /* yacc.c:1652 */
1975 break;
1976
1977 case 114:
1978 #line 373 "cfg_parser.y" /* yacc.c:1652 */
1979 { cfg->NCORES = (yyvsp[0].i); }
1980 #line 1981 "cfg_parser.c" /* yacc.c:1652 */
1981 break;
1982
1983 case 115:
1984 #line 375 "cfg_parser.y" /* yacc.c:1652 */
1985 { cfg->BACKLOG = (yyvsp[0].i); }
1986 #line 1987 "cfg_parser.c" /* yacc.c:1652 */
1987 break;
1988
1989 case 116:
1990 #line 377 "cfg_parser.y" /* yacc.c:1652 */
1991 { cfg->TCP_KEEPALIVE_TIME = (yyvsp[0].i); }
1992 #line 1993 "cfg_parser.c" /* yacc.c:1652 */
1993 break;
1994
1995 case 117:
1996 #line 379 "cfg_parser.y" /* yacc.c:1652 */
1997 {
1998 if (cfg->SELECTED_TLS_PROTOS != 0) {
1999 fprintf(stderr, "%s (%s, line %d):"
2000 " It is illegal to specify tls after ssl,"
2001 " tls or tls-protos\n",
2002 __func__, __FILE__, __LINE__);
2003 YYABORT;
2004 }
2005 if ((yyvsp[0].i))
2006 cfg->SELECTED_TLS_PROTOS = TLS_OPTION_PROTOS;
2007 else
2008 fprintf(stderr,
2009 "Warning: tls = off is deprecated and has no effect.\n");
2010 }
2011 #line 2012 "cfg_parser.c" /* yacc.c:1652 */
2012 break;
2013
2014 case 118:
2015 #line 394 "cfg_parser.y" /* yacc.c:1652 */
2016 {
2017 if (cfg->SELECTED_TLS_PROTOS != 0) {
2018 fprintf(stderr, "%s (%s, line %d):"
2019 " It is illegal to specify ssl after ssl,"
2020 " tls or tls-protos.\n",
2021 __func__, __FILE__, __LINE__);
2022 YYABORT;
2023 }
2024 if ((yyvsp[0].i))
2025 cfg->SELECTED_TLS_PROTOS = SSL_OPTION_PROTOS;
2026 else
2027 fprintf(stderr,
2028 "Warning: ssl = off is deprecated and has no effect.\n");
2029 }
2030 #line 2031 "cfg_parser.c" /* yacc.c:1652 */
2031 break;
2032
2033 case 119:
2034 #line 409 "cfg_parser.y" /* yacc.c:1652 */
2035 {
2036 if (cfg->SELECTED_TLS_PROTOS != 0) {
2037 fprintf(stderr, "%s (%s, line %d):"
2038 " It is illegal to specify tls-protos after"
2039 " ssl, tls or tls-protos\n",
2040 __func__, __FILE__, __LINE__);
2041 YYABORT;
2042 }
2043 }
2044 #line 2045 "cfg_parser.c" /* yacc.c:1652 */
2045 break;
2046
2047 case 123:
2048 #line 421 "cfg_parser.y" /* yacc.c:1652 */
2049 { cfg->SELECTED_TLS_PROTOS |= SSLv3_PROTO; }
2050 #line 2051 "cfg_parser.c" /* yacc.c:1652 */
2051 break;
2052
2053 case 124:
2054 #line 422 "cfg_parser.y" /* yacc.c:1652 */
2055 { cfg->SELECTED_TLS_PROTOS |= TLSv1_0_PROTO; }
2056 #line 2057 "cfg_parser.c" /* yacc.c:1652 */
2057 break;
2058
2059 case 125:
2060 #line 423 "cfg_parser.y" /* yacc.c:1652 */
2061 { cfg->SELECTED_TLS_PROTOS |= TLSv1_1_PROTO; }
2062 #line 2063 "cfg_parser.c" /* yacc.c:1652 */
2063 break;
2064
2065 case 126:
2066 #line 424 "cfg_parser.y" /* yacc.c:1652 */
2067 { cfg->SELECTED_TLS_PROTOS |= TLSv1_2_PROTO; }
2068 #line 2069 "cfg_parser.c" /* yacc.c:1652 */
2069 break;
2070
2071 case 127:
2072 #line 425 "cfg_parser.y" /* yacc.c:1652 */
2073 { cfg->SELECTED_TLS_PROTOS |= TLSv1_3_PROTO; }
2074 #line 2075 "cfg_parser.c" /* yacc.c:1652 */
2075 break;
2076
2077 case 128:
2078 #line 427 "cfg_parser.y" /* yacc.c:1652 */
2079 { if ((yyvsp[0].s)) cfg->ENGINE = strdup((yyvsp[0].s)); }
2080 #line 2081 "cfg_parser.c" /* yacc.c:1652 */
2081 break;
2082
2083 case 129:
2084 #line 429 "cfg_parser.y" /* yacc.c:1652 */
2085 {
2086 cfg->PREFER_SERVER_CIPHERS = (yyvsp[0].i);
2087 }
2088 #line 2089 "cfg_parser.c" /* yacc.c:1652 */
2089 break;
2090
2091 case 130:
2092 #line 433 "cfg_parser.y" /* yacc.c:1652 */
2093 {
2094 /* XXX: passing an empty string for file */
2095 if ((yyvsp[0].s) && config_param_validate("chroot", (yyvsp[0].s), cfg, "",
2096 yyget_lineno()) != 0)
2097 YYABORT;
2098 }
2099 #line 2100 "cfg_parser.c" /* yacc.c:1652 */
2100 break;
2101
2102 case 131:
2103 #line 440 "cfg_parser.y" /* yacc.c:1652 */
2104 {
2105 /* XXX: passing an empty string for file */
2106 if ((yyvsp[0].s) && config_param_validate("backend", (yyvsp[0].s), cfg, "",
2107 yyget_lineno()) != 0)
2108 YYABORT;
2109 }
2110 #line 2111 "cfg_parser.c" /* yacc.c:1652 */
2111 break;
2112
2113 case 132:
2114 #line 448 "cfg_parser.y" /* yacc.c:1652 */
2115 {
2116 /* XXX: passing an empty string for file */
2117 if ((yyvsp[0].s) && config_param_validate("pem-file", (yyvsp[0].s), cfg, "",
2118 yyget_lineno()) != 0)
2119 YYABORT;
2120 }
2121 #line 2122 "cfg_parser.c" /* yacc.c:1652 */
2122 break;
2123
2124 case 133:
2125 #line 454 "cfg_parser.y" /* yacc.c:1652 */
2126 {
2127 /* NB: Mid-rule action */
2128 AZ(cur_pem);
2129 cur_pem = cfg_cert_file_new();
2130 }
2131 #line 2132 "cfg_parser.c" /* yacc.c:1652 */
2132 break;
2133
2134 case 134:
2135 #line 459 "cfg_parser.y" /* yacc.c:1652 */
2136 {
2137 if (cfg_cert_vfy(cur_pem) != 0) {
2138 if (cfg->CERT_DEFAULT != NULL) {
2139 struct cfg_cert_file *tmp = cfg->CERT_DEFAULT;
2140 cfg_cert_add(tmp, &cfg->CERT_FILES);
2141 }
2142 cfg->CERT_DEFAULT = cur_pem;
2143 } else {
2144 cfg_cert_file_free(&cur_pem);
2145 YYABORT;
2146 }
2147 cur_pem = NULL;
2148 }
2149 #line 2150 "cfg_parser.c" /* yacc.c:1652 */
2150 break;
2151
2152 case 135:
2153 #line 473 "cfg_parser.y" /* yacc.c:1652 */
2154 { cfg->SYSLOG = (yyvsp[0].i); }
2155 #line 2156 "cfg_parser.c" /* yacc.c:1652 */
2156 break;
2157
2158 case 136:
2159 #line 474 "cfg_parser.y" /* yacc.c:1652 */
2160 { cfg->DAEMONIZE = (yyvsp[0].i); }
2161 #line 2162 "cfg_parser.c" /* yacc.c:1652 */
2162 break;
2163
2164 case 137:
2165 #line 475 "cfg_parser.y" /* yacc.c:1652 */
2166 {
2167 cfg->SNI_NOMATCH_ABORT = (yyvsp[0].i);
2168 }
2169 #line 2170 "cfg_parser.c" /* yacc.c:1652 */
2170 break;
2171
2172 case 138:
2173 #line 479 "cfg_parser.y" /* yacc.c:1652 */
2174 {
2175 if ((yyvsp[0].s)) {
2176 free(cfg->CIPHERS_TLSv12);
2177 cfg->CIPHERS_TLSv12 = strdup((yyvsp[0].s));
2178 }
2179 }
2180 #line 2181 "cfg_parser.c" /* yacc.c:1652 */
2181 break;
2182
2183 case 139:
2184 #line 486 "cfg_parser.y" /* yacc.c:1652 */
2185 {
2186 if ((yyvsp[0].s)) {
2187 free(cfg->CIPHERSUITES_TLSv13);
2188 cfg->CIPHERSUITES_TLSv13 = strdup((yyvsp[0].s));
2189 }
2190 }
2191 #line 2192 "cfg_parser.c" /* yacc.c:1652 */
2192 break;
2193
2194 case 140:
2195 #line 494 "cfg_parser.y" /* yacc.c:1652 */
2196 {
2197 /* XXX: passing an empty string for file */
2198 if ((yyvsp[0].s) && config_param_validate("user", (yyvsp[0].s), cfg, "",
2199 yyget_lineno()) != 0)
2200 YYABORT;
2201 }
2202 #line 2203 "cfg_parser.c" /* yacc.c:1652 */
2203 break;
2204
2205 case 141:
2206 #line 501 "cfg_parser.y" /* yacc.c:1652 */
2207 {
2208 /* XXX: passing an empty string for file */
2209 if ((yyvsp[0].s) && config_param_validate("group", (yyvsp[0].s), cfg, "",
2210 yyget_lineno()) != 0)
2211 YYABORT;
2212 }
2213 #line 2214 "cfg_parser.c" /* yacc.c:1652 */
2214 break;
2215
2216 case 142:
2217 #line 508 "cfg_parser.y" /* yacc.c:1652 */
2218 { cfg->WRITE_IP_OCTET = (yyvsp[0].i); }
2219 #line 2220 "cfg_parser.c" /* yacc.c:1652 */
2220 break;
2221
2222 case 143:
2223 #line 510 "cfg_parser.y" /* yacc.c:1652 */
2224 { cfg->WRITE_PROXY_LINE_V2 = (yyvsp[0].i); }
2225 #line 2226 "cfg_parser.c" /* yacc.c:1652 */
2226 break;
2227
2228 case 144:
2229 #line 512 "cfg_parser.y" /* yacc.c:1652 */
2230 {
2231 cfg->WRITE_PROXY_LINE_V1 = (yyvsp[0].i);
2232 }
2233 #line 2234 "cfg_parser.c" /* yacc.c:1652 */
2234 break;
2235
2236 case 145:
2237 #line 516 "cfg_parser.y" /* yacc.c:1652 */
2238 {
2239 cfg->WRITE_PROXY_LINE_V2 = (yyvsp[0].i);
2240 }
2241 #line 2242 "cfg_parser.c" /* yacc.c:1652 */
2242 break;
2243
2244 case 146:
2245 #line 520 "cfg_parser.y" /* yacc.c:1652 */
2246 { cfg->PROXY_TLV = (yyvsp[0].i); }
2247 #line 2248 "cfg_parser.c" /* yacc.c:1652 */
2248 break;
2249
2250 case 147:
2251 #line 522 "cfg_parser.y" /* yacc.c:1652 */
2252 { cfg->PROXY_AUTHORITY = (yyvsp[0].i); }
2253 #line 2254 "cfg_parser.c" /* yacc.c:1652 */
2254 break;
2255
2256 case 148:
2257 #line 524 "cfg_parser.y" /* yacc.c:1652 */
2258 { cfg->PROXY_CLIENT_CERT = (yyvsp[0].i); }
2259 #line 2260 "cfg_parser.c" /* yacc.c:1652 */
2260 break;
2261
2262 case 149:
2263 #line 526 "cfg_parser.y" /* yacc.c:1652 */
2264 { cfg->PROXY_PROXY_LINE = (yyvsp[0].i); }
2265 #line 2266 "cfg_parser.c" /* yacc.c:1652 */
2266 break;
2267
2268 case 150:
2269 #line 528 "cfg_parser.y" /* yacc.c:1652 */
2270 {
2271 /* XXX: passing an empty string for file */
2272 if ((yyvsp[0].s) && config_param_validate("alpn-protos", (yyvsp[0].s), cfg, "",
2273 yyget_lineno()) != 0)
2274 YYABORT;
2275 }
2276 #line 2277 "cfg_parser.c" /* yacc.c:1652 */
2277 break;
2278
2279 case 151:
2280 #line 535 "cfg_parser.y" /* yacc.c:1652 */
2281 {
2282 /* XXX: passing an empty string for file */
2283 if ((yyvsp[0].s) &&
2284 config_param_validate("syslog-facility", (yyvsp[0].s), cfg, "",
2285 yyget_lineno()) != 0)
2286 YYABORT;
2287 }
2288 #line 2289 "cfg_parser.c" /* yacc.c:1652 */
2289 break;
2290
2291 case 152:
2292 #line 543 "cfg_parser.y" /* yacc.c:1652 */
2293 { cfg->SEND_BUFSIZE = (yyvsp[0].i); }
2294 #line 2295 "cfg_parser.c" /* yacc.c:1652 */
2295 break;
2296
2297 case 153:
2298 #line 545 "cfg_parser.y" /* yacc.c:1652 */
2299 { cfg->RECV_BUFSIZE = (yyvsp[0].i); }
2300 #line 2301 "cfg_parser.c" /* yacc.c:1652 */
2301 break;
2302
2303 case 154:
2304 #line 547 "cfg_parser.y" /* yacc.c:1652 */
2305 {
2306 /* XXX: passing an empty string for file */
2307 if ((yyvsp[0].s) &&
2308 config_param_validate("log-filename", (yyvsp[0].s), cfg, "",
2309 yyget_lineno()) != 0)
2310 YYABORT;
2311 }
2312 #line 2313 "cfg_parser.c" /* yacc.c:1652 */
2313 break;
2314
2315 case 155:
2316 #line 555 "cfg_parser.y" /* yacc.c:1652 */
2317 { cfg->LOG_LEVEL = (yyvsp[0].i); }
2318 #line 2319 "cfg_parser.c" /* yacc.c:1652 */
2319 break;
2320
2321 case 156:
2322 #line 557 "cfg_parser.y" /* yacc.c:1652 */
2323 {
2324 #ifdef USE_SHARED_CACHE
2325 cfg->SHARED_CACHE = (yyvsp[0].i);
2326 #else
2327 fprintf(stderr, "Hitch needs to be compiled with --enable-sessioncache "
2328 "for '%s'", input_line);
2329 YYABORT;
2330 #endif
2331 }
2332 #line 2333 "cfg_parser.c" /* yacc.c:1652 */
2333 break;
2334
2335 case 157:
2336 #line 567 "cfg_parser.y" /* yacc.c:1652 */
2337 {
2338 #ifdef USE_SHARED_CACHE
2339 /* XXX: passing an empty string for file */
2340 if ((yyvsp[0].s) && config_param_validate("shared-cache-listen", (yyvsp[0].s), cfg,
2341 "", yyget_lineno()) != 0)
2342 YYABORT;
2343 #else
2344 fprintf(stderr, "Hitch needs to be compiled with --enable-sessioncache "
2345 "for '%s'", input_line);
2346 YYABORT;
2347 #endif
2348 }
2349 #line 2350 "cfg_parser.c" /* yacc.c:1652 */
2350 break;
2351
2352 case 158:
2353 #line 580 "cfg_parser.y" /* yacc.c:1652 */
2354 {
2355 #ifdef USE_SHARED_CACHE
2356 /* XXX: passing an empty string for file */
2357 if ((yyvsp[0].s) && config_param_validate("shared-cache-peer", (yyvsp[0].s), cfg,
2358 "", yyget_lineno()) != 0)
2359 YYABORT;
2360 #else
2361 fprintf(stderr, "Hitch needs to be compiled with --enable-sessioncache "
2362 "for '%s'", input_line);
2363 YYABORT;
2364 #endif
2365 }
2366 #line 2367 "cfg_parser.c" /* yacc.c:1652 */
2367 break;
2368
2369 case 159:
2370 #line 593 "cfg_parser.y" /* yacc.c:1652 */
2371 {
2372 #ifdef USE_SHARED_CACHE
2373 /* XXX: passing an empty string for file */
2374 if ((yyvsp[0].s) && config_param_validate("shared-cache-if", (yyvsp[0].s), cfg,
2375 "", yyget_lineno()) != 0)
2376 YYABORT;
2377 #else
2378 fprintf(stderr, "Hitch needs to be compiled with --enable-sessioncache "
2379 "for '%s'", input_line);
2380 YYABORT;
2381 #endif
2382 }
2383 #line 2384 "cfg_parser.c" /* yacc.c:1652 */
2384 break;
2385
2386 case 160:
2387 #line 606 "cfg_parser.y" /* yacc.c:1652 */
2388 {
2389 #ifdef TCP_FASTOPEN_WORKS
2390 { cfg->TFO = (yyvsp[0].i); };
2391 #else
2392 fprintf(stderr, "Hitch needs to be compiled with --enable-tfo"
2393 "for '%s'", input_line);
2394 YYABORT;
2395 #endif
2396 }
2397 #line 2398 "cfg_parser.c" /* yacc.c:1652 */
2398 break;
2399
2400 case 161:
2401 #line 616 "cfg_parser.y" /* yacc.c:1652 */
2402 {
2403 cfg->BACKEND_REFRESH_TIME = (yyvsp[0].i);
2404 }
2405 #line 2406 "cfg_parser.c" /* yacc.c:1652 */
2406 break;
2407
2408 case 162:
2409 #line 620 "cfg_parser.y" /* yacc.c:1652 */
2410 {
2411 if ((yyvsp[0].s)) {
2412 free(cfg->ECDH_CURVE);
2413 cfg->ECDH_CURVE = strdup((yyvsp[0].s));
2414 }
2415 }
2416 #line 2417 "cfg_parser.c" /* yacc.c:1652 */
2417 break;
2418
2419 case 164:
2420 #line 630 "cfg_parser.y" /* yacc.c:1652 */
2421 {
2422 if (cur_fa)
2423 cur_fa->client_verify = SSL_VERIFY_NONE;
2424 else
2425 cfg->CLIENT_VERIFY = SSL_VERIFY_NONE;
2426 }
2427 #line 2428 "cfg_parser.c" /* yacc.c:1652 */
2428 break;
2429
2430 case 165:
2431 #line 636 "cfg_parser.y" /* yacc.c:1652 */
2432 {
2433 if (cur_fa)
2434 cur_fa->client_verify = SSL_VERIFY_PEER;
2435 else
2436 cfg->CLIENT_VERIFY = SSL_VERIFY_PEER;
2437 }
2438 #line 2439 "cfg_parser.c" /* yacc.c:1652 */
2439 break;
2440
2441 case 166:
2442 #line 642 "cfg_parser.y" /* yacc.c:1652 */
2443 {
2444 if (cur_fa)
2445 cur_fa->client_verify =
2446 SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
2447 else
2448 cfg->CLIENT_VERIFY =
2449 SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
2450 }
2451 #line 2452 "cfg_parser.c" /* yacc.c:1652 */
2452 break;
2453
2454 case 167:
2455 #line 651 "cfg_parser.y" /* yacc.c:1652 */
2456 {
2457 free(cfg->CLIENT_VERIFY_CA);
2458 cfg->CLIENT_VERIFY_CA = strdup((yyvsp[0].s));
2459 }
2460 #line 2461 "cfg_parser.c" /* yacc.c:1652 */
2461 break;
2462
2463
2464 #line 2465 "cfg_parser.c" /* yacc.c:1652 */
2465 default: break;
2466 }
2467 /* User semantic actions sometimes alter yychar, and that requires
2468 that yytoken be updated with the new translation. We take the
2469 approach of translating immediately before every use of yytoken.
2470 One alternative is translating here after every semantic action,
2471 but that translation would be missed if the semantic action invokes
2472 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2473 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2474 incorrect destructor might then be invoked immediately. In the
2475 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2476 to an incorrect destructor call or verbose syntax error message
2477 before the lookahead is translated. */
2478 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2479
2480 YYPOPSTACK (yylen);
2481 yylen = 0;
2482 YY_STACK_PRINT (yyss, yyssp);
2483
2484 *++yyvsp = yyval;
2485
2486 /* Now 'shift' the result of the reduction. Determine what state
2487 that goes to, based on the state we popped back to and the rule
2488 number reduced by. */
2489 {
2490 const int yylhs = yyr1[yyn] - YYNTOKENS;
2491 const int yyi = yypgoto[yylhs] + *yyssp;
2492 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2493 ? yytable[yyi]
2494 : yydefgoto[yylhs]);
2495 }
2496
2497 goto yynewstate;
2498
2499
2500 /*--------------------------------------.
2501 | yyerrlab -- here on detecting error. |
2502 `--------------------------------------*/
2503 yyerrlab:
2504 /* Make sure we have latest lookahead translation. See comments at
2505 user semantic actions for why this is necessary. */
2506 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2507
2508 /* If not already recovering from an error, report this error. */
2509 if (!yyerrstatus)
2510 {
2511 ++yynerrs;
2512 #if ! YYERROR_VERBOSE
2513 yyerror (cfg, YY_("syntax error"));
2514 #else
2515 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2516 yyssp, yytoken)
2517 {
2518 char const *yymsgp = YY_("syntax error");
2519 int yysyntax_error_status;
2520 yysyntax_error_status = YYSYNTAX_ERROR;
2521 if (yysyntax_error_status == 0)
2522 yymsgp = yymsg;
2523 else if (yysyntax_error_status == 1)
2524 {
2525 if (yymsg != yymsgbuf)
2526 YYSTACK_FREE (yymsg);
2527 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2528 if (!yymsg)
2529 {
2530 yymsg = yymsgbuf;
2531 yymsg_alloc = sizeof yymsgbuf;
2532 yysyntax_error_status = 2;
2533 }
2534 else
2535 {
2536 yysyntax_error_status = YYSYNTAX_ERROR;
2537 yymsgp = yymsg;
2538 }
2539 }
2540 yyerror (cfg, yymsgp);
2541 if (yysyntax_error_status == 2)
2542 goto yyexhaustedlab;
2543 }
2544 # undef YYSYNTAX_ERROR
2545 #endif
2546 }
2547
2548
2549
2550 if (yyerrstatus == 3)
2551 {
2552 /* If just tried and failed to reuse lookahead token after an
2553 error, discard it. */
2554
2555 if (yychar <= YYEOF)
2556 {
2557 /* Return failure if at end of input. */
2558 if (yychar == YYEOF)
2559 YYABORT;
2560 }
2561 else
2562 {
2563 yydestruct ("Error: discarding",
2564 yytoken, &yylval, cfg);
2565 yychar = YYEMPTY;
2566 }
2567 }
2568
2569 /* Else will try to reuse lookahead token after shifting the error
2570 token. */
2571 goto yyerrlab1;
2572
2573
2574 /*---------------------------------------------------.
2575 | yyerrorlab -- error raised explicitly by YYERROR. |
2576 `---------------------------------------------------*/
2577 yyerrorlab:
2578 /* Pacify compilers when the user code never invokes YYERROR and the
2579 label yyerrorlab therefore never appears in user code. */
2580 if (0)
2581 YYERROR;
2582
2583 /* Do not reclaim the symbols of the rule whose action triggered
2584 this YYERROR. */
2585 YYPOPSTACK (yylen);
2586 yylen = 0;
2587 YY_STACK_PRINT (yyss, yyssp);
2588 yystate = *yyssp;
2589 goto yyerrlab1;
2590
2591
2592 /*-------------------------------------------------------------.
2593 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2594 `-------------------------------------------------------------*/
2595 yyerrlab1:
2596 yyerrstatus = 3; /* Each real token shifted decrements this. */
2597
2598 for (;;)
2599 {
2600 yyn = yypact[yystate];
2601 if (!yypact_value_is_default (yyn))
2602 {
2603 yyn += YYTERROR;
2604 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2605 {
2606 yyn = yytable[yyn];
2607 if (0 < yyn)
2608 break;
2609 }
2610 }
2611
2612 /* Pop the current state because it cannot handle the error token. */
2613 if (yyssp == yyss)
2614 YYABORT;
2615
2616
2617 yydestruct ("Error: popping",
2618 yystos[yystate], yyvsp, cfg);
2619 YYPOPSTACK (1);
2620 yystate = *yyssp;
2621 YY_STACK_PRINT (yyss, yyssp);
2622 }
2623
2624 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2625 *++yyvsp = yylval;
2626 YY_IGNORE_MAYBE_UNINITIALIZED_END
2627
2628
2629 /* Shift the error token. */
2630 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2631
2632 yystate = yyn;
2633 goto yynewstate;
2634
2635
2636 /*-------------------------------------.
2637 | yyacceptlab -- YYACCEPT comes here. |
2638 `-------------------------------------*/
2639 yyacceptlab:
2640 yyresult = 0;
2641 goto yyreturn;
2642
2643
2644 /*-----------------------------------.
2645 | yyabortlab -- YYABORT comes here. |
2646 `-----------------------------------*/
2647 yyabortlab:
2648 yyresult = 1;
2649 goto yyreturn;
2650
2651
2652 #if !defined yyoverflow || YYERROR_VERBOSE
2653 /*-------------------------------------------------.
2654 | yyexhaustedlab -- memory exhaustion comes here. |
2655 `-------------------------------------------------*/
2656 yyexhaustedlab:
2657 yyerror (cfg, YY_("memory exhausted"));
2658 yyresult = 2;
2659 /* Fall through. */
2660 #endif
2661
2662
2663 /*-----------------------------------------------------.
2664 | yyreturn -- parsing is finished, return the result. |
2665 `-----------------------------------------------------*/
2666 yyreturn:
2667 if (yychar != YYEMPTY)
2668 {
2669 /* Make sure we have latest lookahead translation. See comments at
2670 user semantic actions for why this is necessary. */
2671 yytoken = YYTRANSLATE (yychar);
2672 yydestruct ("Cleanup: discarding lookahead",
2673 yytoken, &yylval, cfg);
2674 }
2675 /* Do not reclaim the symbols of the rule whose action triggered
2676 this YYABORT or YYACCEPT. */
2677 YYPOPSTACK (yylen);
2678 YY_STACK_PRINT (yyss, yyssp);
2679 while (yyssp != yyss)
2680 {
2681 yydestruct ("Cleanup: popping",
2682 yystos[*yyssp], yyvsp, cfg);
2683 YYPOPSTACK (1);
2684 }
2685 #ifndef yyoverflow
2686 if (yyss != yyssa)
2687 YYSTACK_FREE (yyss);
2688 #endif
2689 #if YYERROR_VERBOSE
2690 if (yymsg != yymsgbuf)
2691 YYSTACK_FREE (yymsg);
2692 #endif
2693 return yyresult;
2694 }
2695 #line 656 "cfg_parser.y" /* yacc.c:1918 */
2696
2697
2698 void
2699 yyerror(hitch_config *cfg, const char *s)
2700 {
2701 (void) cfg;
2702
2703 /* Clean up if FRONTEND_BLK parsing failed */
2704 if (cur_fa != NULL)
2705 FREE_OBJ(cur_fa);
2706
2707 config_error_set("Parsing error in line %d: %s: '%s'",
2708 yyget_lineno(), s, strlen(input_line) > 0 ? input_line : "");
2709 }