Coverage Report

Created: 2023-05-19 06:16

/src/ntp-dev/tests/fuzz/ntp_parser.c
Line
Count
Source (jump to first uncovered line)
1
/* A Bison parser, made by GNU Bison 3.5.1.  */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6
   Inc.
7
8
   This program is free software: you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation, either version 3 of the License, or
11
   (at your option) any later version.
12
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
18
   You should have received a copy of the GNU General Public License
19
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21
/* As a special exception, you may create a larger work that contains
22
   part or all of the Bison parser skeleton and distribute that work
23
   under terms of your choice, so long as that work isn't itself a
24
   parser generator using the skeleton or a modified version thereof
25
   as a parser skeleton.  Alternatively, if you modify or redistribute
26
   the parser skeleton itself, you may (at your option) remove this
27
   special exception, which will cause the skeleton and the resulting
28
   Bison output files to be licensed under the GNU General Public
29
   License without this special exception.
30
31
   This special exception was added by the Free Software Foundation in
32
   version 2.2 of Bison.  */
33
34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
   simplifying the original so-called "semantic" parser.  */
36
37
/* 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.5.1"
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 11 "../../ntpd/ntp_parser.y"
70
71
  #ifdef HAVE_CONFIG_H
72
  # include <config.h>
73
  #endif
74
75
  #include "ntp.h"
76
  #include "ntpd.h"
77
  #include "ntp_machine.h"
78
  #include "ntp_stdlib.h"
79
  #include "ntp_filegen.h"
80
  #include "ntp_scanner.h"
81
  #include "ntp_config.h"
82
  #include "ntp_crypto.h"
83
  #include "ntp_calendar.h"
84
85
  #include "ntpsim.h"   /* HMS: Do we really want this all the time? */
86
        /* SK: It might be a good idea to always
87
           include the simulator code. That way
88
           someone can use the same configuration file
89
           for both the simulator and the daemon
90
        */
91
92
  #define YYMALLOC  emalloc
93
0
  #define YYFREE  free
94
  #define YYERROR_VERBOSE
95
0
  #define YYMAXDEPTH  1000  /* stop the madness sooner */
96
  void yyerror(const char *msg);
97
98
  #ifdef SIM
99
  #  define ONLY_SIM(a) (a)
100
  #else
101
0
  #  define ONLY_SIM(a) NULL
102
  #endif
103
104
#line 105 "ntp_parser.c"
105
106
# ifndef YY_CAST
107
#  ifdef __cplusplus
108
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
109
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
110
#  else
111
0
#   define YY_CAST(Type, Val) ((Type) (Val))
112
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
113
#  endif
114
# endif
115
# ifndef YY_NULLPTR
116
#  if defined __cplusplus
117
#   if 201103L <= __cplusplus
118
#    define YY_NULLPTR nullptr
119
#   else
120
#    define YY_NULLPTR 0
121
#   endif
122
#  else
123
0
#   define YY_NULLPTR ((void*)0)
124
#  endif
125
# endif
126
127
/* Enabling verbose error messages.  */
128
#ifdef YYERROR_VERBOSE
129
# undef YYERROR_VERBOSE
130
# define YYERROR_VERBOSE 1
131
#else
132
# define YYERROR_VERBOSE 0
133
#endif
134
135
136
/* Debug traces.  */
137
#ifndef YYDEBUG
138
# define YYDEBUG 0
139
#endif
140
#if YYDEBUG
141
extern int yydebug;
142
#endif
143
144
/* Token type.  */
145
#ifndef YYTOKENTYPE
146
# define YYTOKENTYPE
147
  enum yytokentype
148
  {
149
    T_Abbrev = 258,
150
    T_Age = 259,
151
    T_All = 260,
152
    T_Allan = 261,
153
    T_Allpeers = 262,
154
    T_Auth = 263,
155
    T_Autokey = 264,
156
    T_Automax = 265,
157
    T_Average = 266,
158
    T_Basedate = 267,
159
    T_Bclient = 268,
160
    T_Bcpollbstep = 269,
161
    T_Beacon = 270,
162
    T_Broadcast = 271,
163
    T_Broadcastclient = 272,
164
    T_Broadcastdelay = 273,
165
    T_Burst = 274,
166
    T_Calibrate = 275,
167
    T_Ceiling = 276,
168
    T_Clockstats = 277,
169
    T_Cohort = 278,
170
    T_ControlKey = 279,
171
    T_Crypto = 280,
172
    T_Cryptostats = 281,
173
    T_Ctl = 282,
174
    T_Day = 283,
175
    T_Default = 284,
176
    T_Digest = 285,
177
    T_Disable = 286,
178
    T_Discard = 287,
179
    T_Dispersion = 288,
180
    T_Double = 289,
181
    T_Driftfile = 290,
182
    T_Drop = 291,
183
    T_Dscp = 292,
184
    T_Ellipsis = 293,
185
    T_Enable = 294,
186
    T_End = 295,
187
    T_Epeer = 296,
188
    T_False = 297,
189
    T_File = 298,
190
    T_Filegen = 299,
191
    T_Filenum = 300,
192
    T_Flag1 = 301,
193
    T_Flag2 = 302,
194
    T_Flag3 = 303,
195
    T_Flag4 = 304,
196
    T_Flake = 305,
197
    T_Floor = 306,
198
    T_Freq = 307,
199
    T_Fudge = 308,
200
    T_Host = 309,
201
    T_Huffpuff = 310,
202
    T_Iburst = 311,
203
    T_Ident = 312,
204
    T_Ignore = 313,
205
    T_Incalloc = 314,
206
    T_Incmem = 315,
207
    T_Initalloc = 316,
208
    T_Initmem = 317,
209
    T_Includefile = 318,
210
    T_Integer = 319,
211
    T_Interface = 320,
212
    T_Intrange = 321,
213
    T_Io = 322,
214
    T_Ippeerlimit = 323,
215
    T_Ipv4 = 324,
216
    T_Ipv4_flag = 325,
217
    T_Ipv6 = 326,
218
    T_Ipv6_flag = 327,
219
    T_Kernel = 328,
220
    T_Key = 329,
221
    T_Keys = 330,
222
    T_Keysdir = 331,
223
    T_Kod = 332,
224
    T_Mssntp = 333,
225
    T_Leapfile = 334,
226
    T_Leapsmearinterval = 335,
227
    T_Limited = 336,
228
    T_Link = 337,
229
    T_Listen = 338,
230
    T_Logconfig = 339,
231
    T_Logfile = 340,
232
    T_Loopstats = 341,
233
    T_Lowpriotrap = 342,
234
    T_Manycastclient = 343,
235
    T_Manycastserver = 344,
236
    T_Mask = 345,
237
    T_Maxage = 346,
238
    T_Maxclock = 347,
239
    T_Maxdepth = 348,
240
    T_Maxdist = 349,
241
    T_Maxmem = 350,
242
    T_Maxpoll = 351,
243
    T_Mdnstries = 352,
244
    T_Mem = 353,
245
    T_Memlock = 354,
246
    T_Minclock = 355,
247
    T_Mindepth = 356,
248
    T_Mindist = 357,
249
    T_Minimum = 358,
250
    T_Minpoll = 359,
251
    T_Minsane = 360,
252
    T_Mode = 361,
253
    T_Mode7 = 362,
254
    T_Monitor = 363,
255
    T_Month = 364,
256
    T_Mru = 365,
257
    T_Multicastclient = 366,
258
    T_Nic = 367,
259
    T_Nolink = 368,
260
    T_Nomodify = 369,
261
    T_Nomrulist = 370,
262
    T_None = 371,
263
    T_Nonvolatile = 372,
264
    T_Noepeer = 373,
265
    T_Nopeer = 374,
266
    T_Noquery = 375,
267
    T_Noselect = 376,
268
    T_Noserve = 377,
269
    T_Notrap = 378,
270
    T_Notrust = 379,
271
    T_Ntp = 380,
272
    T_Ntpport = 381,
273
    T_NtpSignDsocket = 382,
274
    T_Orphan = 383,
275
    T_Orphanwait = 384,
276
    T_PCEdigest = 385,
277
    T_Panic = 386,
278
    T_Peer = 387,
279
    T_Peerstats = 388,
280
    T_Phone = 389,
281
    T_Pid = 390,
282
    T_Pidfile = 391,
283
    T_Pool = 392,
284
    T_Port = 393,
285
    T_Preempt = 394,
286
    T_Prefer = 395,
287
    T_Protostats = 396,
288
    T_Pw = 397,
289
    T_Randfile = 398,
290
    T_Rawstats = 399,
291
    T_Refid = 400,
292
    T_Requestkey = 401,
293
    T_Reset = 402,
294
    T_Restrict = 403,
295
    T_Revoke = 404,
296
    T_Rlimit = 405,
297
    T_Saveconfigdir = 406,
298
    T_Server = 407,
299
    T_Setvar = 408,
300
    T_Source = 409,
301
    T_Stacksize = 410,
302
    T_Statistics = 411,
303
    T_Stats = 412,
304
    T_Statsdir = 413,
305
    T_Step = 414,
306
    T_Stepback = 415,
307
    T_Stepfwd = 416,
308
    T_Stepout = 417,
309
    T_Stratum = 418,
310
    T_String = 419,
311
    T_Sys = 420,
312
    T_Sysstats = 421,
313
    T_Tick = 422,
314
    T_Time1 = 423,
315
    T_Time2 = 424,
316
    T_Timer = 425,
317
    T_Timingstats = 426,
318
    T_Tinker = 427,
319
    T_Tos = 428,
320
    T_Trap = 429,
321
    T_True = 430,
322
    T_Trustedkey = 431,
323
    T_Ttl = 432,
324
    T_Type = 433,
325
    T_U_int = 434,
326
    T_UEcrypto = 435,
327
    T_UEcryptonak = 436,
328
    T_UEdigest = 437,
329
    T_Unconfig = 438,
330
    T_Unpeer = 439,
331
    T_Version = 440,
332
    T_WanderThreshold = 441,
333
    T_Week = 442,
334
    T_Wildcard = 443,
335
    T_Xleave = 444,
336
    T_Year = 445,
337
    T_Flag = 446,
338
    T_EOC = 447,
339
    T_Simulate = 448,
340
    T_Beep_Delay = 449,
341
    T_Sim_Duration = 450,
342
    T_Server_Offset = 451,
343
    T_Duration = 452,
344
    T_Freq_Offset = 453,
345
    T_Wander = 454,
346
    T_Jitter = 455,
347
    T_Prop_Delay = 456,
348
    T_Proc_Delay = 457
349
  };
350
#endif
351
/* Tokens.  */
352
#define T_Abbrev 258
353
#define T_Age 259
354
#define T_All 260
355
#define T_Allan 261
356
#define T_Allpeers 262
357
#define T_Auth 263
358
#define T_Autokey 264
359
#define T_Automax 265
360
#define T_Average 266
361
0
#define T_Basedate 267
362
#define T_Bclient 268
363
#define T_Bcpollbstep 269
364
#define T_Beacon 270
365
#define T_Broadcast 271
366
#define T_Broadcastclient 272
367
#define T_Broadcastdelay 273
368
#define T_Burst 274
369
#define T_Calibrate 275
370
#define T_Ceiling 276
371
#define T_Clockstats 277
372
#define T_Cohort 278
373
#define T_ControlKey 279
374
#define T_Crypto 280
375
#define T_Cryptostats 281
376
#define T_Ctl 282
377
#define T_Day 283
378
#define T_Default 284
379
#define T_Digest 285
380
#define T_Disable 286
381
#define T_Discard 287
382
#define T_Dispersion 288
383
#define T_Double 289
384
0
#define T_Driftfile 290
385
#define T_Drop 291
386
#define T_Dscp 292
387
#define T_Ellipsis 293
388
#define T_Enable 294
389
#define T_End 295
390
#define T_Epeer 296
391
#define T_False 297
392
#define T_File 298
393
#define T_Filegen 299
394
#define T_Filenum 300
395
#define T_Flag1 301
396
#define T_Flag2 302
397
#define T_Flag3 303
398
#define T_Flag4 304
399
#define T_Flake 305
400
#define T_Floor 306
401
#define T_Freq 307
402
#define T_Fudge 308
403
#define T_Host 309
404
#define T_Huffpuff 310
405
#define T_Iburst 311
406
#define T_Ident 312
407
#define T_Ignore 313
408
#define T_Incalloc 314
409
#define T_Incmem 315
410
#define T_Initalloc 316
411
#define T_Initmem 317
412
#define T_Includefile 318
413
#define T_Integer 319
414
#define T_Interface 320
415
#define T_Intrange 321
416
#define T_Io 322
417
#define T_Ippeerlimit 323
418
#define T_Ipv4 324
419
#define T_Ipv4_flag 325
420
#define T_Ipv6 326
421
#define T_Ipv6_flag 327
422
#define T_Kernel 328
423
#define T_Key 329
424
#define T_Keys 330
425
#define T_Keysdir 331
426
#define T_Kod 332
427
#define T_Mssntp 333
428
#define T_Leapfile 334
429
#define T_Leapsmearinterval 335
430
#define T_Limited 336
431
0
#define T_Link 337
432
#define T_Listen 338
433
#define T_Logconfig 339
434
#define T_Logfile 340
435
#define T_Loopstats 341
436
#define T_Lowpriotrap 342
437
#define T_Manycastclient 343
438
#define T_Manycastserver 344
439
#define T_Mask 345
440
#define T_Maxage 346
441
#define T_Maxclock 347
442
#define T_Maxdepth 348
443
#define T_Maxdist 349
444
#define T_Maxmem 350
445
#define T_Maxpoll 351
446
#define T_Mdnstries 352
447
#define T_Mem 353
448
#define T_Memlock 354
449
#define T_Minclock 355
450
#define T_Mindepth 356
451
#define T_Mindist 357
452
#define T_Minimum 358
453
#define T_Minpoll 359
454
#define T_Minsane 360
455
#define T_Mode 361
456
#define T_Mode7 362
457
#define T_Monitor 363
458
#define T_Month 364
459
#define T_Mru 365
460
#define T_Multicastclient 366
461
#define T_Nic 367
462
#define T_Nolink 368
463
#define T_Nomodify 369
464
#define T_Nomrulist 370
465
#define T_None 371
466
#define T_Nonvolatile 372
467
#define T_Noepeer 373
468
#define T_Nopeer 374
469
#define T_Noquery 375
470
#define T_Noselect 376
471
#define T_Noserve 377
472
#define T_Notrap 378
473
#define T_Notrust 379
474
#define T_Ntp 380
475
#define T_Ntpport 381
476
#define T_NtpSignDsocket 382
477
#define T_Orphan 383
478
#define T_Orphanwait 384
479
#define T_PCEdigest 385
480
#define T_Panic 386
481
#define T_Peer 387
482
#define T_Peerstats 388
483
#define T_Phone 389
484
#define T_Pid 390
485
#define T_Pidfile 391
486
#define T_Pool 392
487
#define T_Port 393
488
#define T_Preempt 394
489
#define T_Prefer 395
490
#define T_Protostats 396
491
#define T_Pw 397
492
#define T_Randfile 398
493
#define T_Rawstats 399
494
#define T_Refid 400
495
#define T_Requestkey 401
496
#define T_Reset 402
497
#define T_Restrict 403
498
#define T_Revoke 404
499
#define T_Rlimit 405
500
#define T_Saveconfigdir 406
501
#define T_Server 407
502
#define T_Setvar 408
503
#define T_Source 409
504
#define T_Stacksize 410
505
#define T_Statistics 411
506
#define T_Stats 412
507
#define T_Statsdir 413
508
#define T_Step 414
509
#define T_Stepback 415
510
#define T_Stepfwd 416
511
#define T_Stepout 417
512
#define T_Stratum 418
513
#define T_String 419
514
#define T_Sys 420
515
#define T_Sysstats 421
516
#define T_Tick 422
517
#define T_Time1 423
518
#define T_Time2 424
519
#define T_Timer 425
520
#define T_Timingstats 426
521
#define T_Tinker 427
522
#define T_Tos 428
523
#define T_Trap 429
524
#define T_True 430
525
#define T_Trustedkey 431
526
#define T_Ttl 432
527
#define T_Type 433
528
#define T_U_int 434
529
#define T_UEcrypto 435
530
#define T_UEcryptonak 436
531
#define T_UEdigest 437
532
#define T_Unconfig 438
533
#define T_Unpeer 439
534
#define T_Version 440
535
0
#define T_WanderThreshold 441
536
#define T_Week 442
537
#define T_Wildcard 443
538
#define T_Xleave 444
539
#define T_Year 445
540
0
#define T_Flag 446
541
#define T_EOC 447
542
#define T_Simulate 448
543
#define T_Beep_Delay 449
544
#define T_Sim_Duration 450
545
#define T_Server_Offset 451
546
#define T_Duration 452
547
#define T_Freq_Offset 453
548
#define T_Wander 454
549
#define T_Jitter 455
550
#define T_Prop_Delay 456
551
#define T_Proc_Delay 457
552
553
/* Value type.  */
554
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
555
union YYSTYPE
556
{
557
#line 52 "../../ntpd/ntp_parser.y"
558
559
  char *      String;
560
  double      Double;
561
  int     Integer;
562
  unsigned    U_int;
563
  gen_fifo *    Generic_fifo;
564
  attr_val *    Attr_val;
565
  attr_val_fifo *   Attr_val_fifo;
566
  int_fifo *    Int_fifo;
567
  string_fifo *   String_fifo;
568
  address_node *    Address_node;
569
  address_fifo *    Address_fifo;
570
  setvar_node *   Set_var;
571
  server_info *   Sim_server;
572
  server_info_fifo *  Sim_server_fifo;
573
  script_info *   Sim_script;
574
  script_info_fifo *  Sim_script_fifo;
575
576
#line 577 "ntp_parser.c"
577
578
};
579
typedef union YYSTYPE YYSTYPE;
580
# define YYSTYPE_IS_TRIVIAL 1
581
# define YYSTYPE_IS_DECLARED 1
582
#endif
583
584
585
extern YYSTYPE yylval;
586
587
int yyparse (void);
588
589
590
591
592
593
#ifdef short
594
# undef short
595
#endif
596
597
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
598
   <limits.h> and (if available) <stdint.h> are included
599
   so that the code can choose integer types of a good width.  */
600
601
#ifndef __PTRDIFF_MAX__
602
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
603
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
604
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
605
#  define YY_STDINT_H
606
# endif
607
#endif
608
609
/* Narrow types that promote to a signed type and that can represent a
610
   signed or unsigned integer of at least N bits.  In tables they can
611
   save space and decrease cache pressure.  Promoting to a signed type
612
   helps avoid bugs in integer arithmetic.  */
613
614
#ifdef __INT_LEAST8_MAX__
615
typedef __INT_LEAST8_TYPE__ yytype_int8;
616
#elif defined YY_STDINT_H
617
typedef int_least8_t yytype_int8;
618
#else
619
typedef signed char yytype_int8;
620
#endif
621
622
#ifdef __INT_LEAST16_MAX__
623
typedef __INT_LEAST16_TYPE__ yytype_int16;
624
#elif defined YY_STDINT_H
625
typedef int_least16_t yytype_int16;
626
#else
627
typedef short yytype_int16;
628
#endif
629
630
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
631
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
632
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
633
       && UINT_LEAST8_MAX <= INT_MAX)
634
typedef uint_least8_t yytype_uint8;
635
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
636
typedef unsigned char yytype_uint8;
637
#else
638
typedef short yytype_uint8;
639
#endif
640
641
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
642
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
643
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
644
       && UINT_LEAST16_MAX <= INT_MAX)
645
typedef uint_least16_t yytype_uint16;
646
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
647
typedef unsigned short yytype_uint16;
648
#else
649
typedef int yytype_uint16;
650
#endif
651
652
#ifndef YYPTRDIFF_T
653
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
654
0
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
655
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
656
# elif defined PTRDIFF_MAX
657
#  ifndef ptrdiff_t
658
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
659
#  endif
660
#  define YYPTRDIFF_T ptrdiff_t
661
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
662
# else
663
#  define YYPTRDIFF_T long
664
#  define YYPTRDIFF_MAXIMUM LONG_MAX
665
# endif
666
#endif
667
668
#ifndef YYSIZE_T
669
# ifdef __SIZE_TYPE__
670
#  define YYSIZE_T __SIZE_TYPE__
671
# elif defined size_t
672
#  define YYSIZE_T size_t
673
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
674
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
675
#  define YYSIZE_T size_t
676
# else
677
#  define YYSIZE_T unsigned
678
# endif
679
#endif
680
681
#define YYSIZE_MAXIMUM                                  \
682
0
  YY_CAST (YYPTRDIFF_T,                                 \
683
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
684
            ? YYPTRDIFF_MAXIMUM                         \
685
            : YY_CAST (YYSIZE_T, -1)))
686
687
0
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
688
689
/* Stored state numbers (used for stacks). */
690
typedef yytype_int16 yy_state_t;
691
692
/* State numbers in computations.  */
693
typedef int yy_state_fast_t;
694
695
#ifndef YY_
696
# if defined YYENABLE_NLS && YYENABLE_NLS
697
#  if ENABLE_NLS
698
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
699
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
700
#  endif
701
# endif
702
# ifndef YY_
703
0
#  define YY_(Msgid) Msgid
704
# endif
705
#endif
706
707
#ifndef YY_ATTRIBUTE_PURE
708
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
709
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
710
# else
711
#  define YY_ATTRIBUTE_PURE
712
# endif
713
#endif
714
715
#ifndef YY_ATTRIBUTE_UNUSED
716
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
717
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
718
# else
719
#  define YY_ATTRIBUTE_UNUSED
720
# endif
721
#endif
722
723
/* Suppress unused-variable warnings by "using" E.  */
724
#if ! defined lint || defined __GNUC__
725
0
# define YYUSE(E) ((void) (E))
726
#else
727
# define YYUSE(E) /* empty */
728
#endif
729
730
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
731
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
732
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
733
    _Pragma ("GCC diagnostic push")                                     \
734
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
735
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
736
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
737
    _Pragma ("GCC diagnostic pop")
738
#else
739
# define YY_INITIAL_VALUE(Value) Value
740
#endif
741
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
742
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
743
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
744
#endif
745
#ifndef YY_INITIAL_VALUE
746
# define YY_INITIAL_VALUE(Value) /* Nothing. */
747
#endif
748
749
#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
750
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
751
    _Pragma ("GCC diagnostic push")                            \
752
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
753
# define YY_IGNORE_USELESS_CAST_END            \
754
    _Pragma ("GCC diagnostic pop")
755
#endif
756
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
757
# define YY_IGNORE_USELESS_CAST_BEGIN
758
# define YY_IGNORE_USELESS_CAST_END
759
#endif
760
761
762
0
#define YY_ASSERT(E) ((void) (0 && (E)))
763
764
#if ! defined yyoverflow || YYERROR_VERBOSE
765
766
/* The parser invokes alloca or malloc; define the necessary symbols.  */
767
768
# ifdef YYSTACK_USE_ALLOCA
769
#  if YYSTACK_USE_ALLOCA
770
#   ifdef __GNUC__
771
#    define YYSTACK_ALLOC __builtin_alloca
772
#   elif defined __BUILTIN_VA_ARG_INCR
773
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
774
#   elif defined _AIX
775
#    define YYSTACK_ALLOC __alloca
776
#   elif defined _MSC_VER
777
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
778
#    define alloca _alloca
779
#   else
780
#    define YYSTACK_ALLOC alloca
781
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
782
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
783
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
784
#     ifndef EXIT_SUCCESS
785
#      define EXIT_SUCCESS 0
786
#     endif
787
#    endif
788
#   endif
789
#  endif
790
# endif
791
792
# ifdef YYSTACK_ALLOC
793
   /* Pacify GCC's 'empty if-body' warning.  */
794
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
795
#  ifndef YYSTACK_ALLOC_MAXIMUM
796
    /* The OS might guarantee only one guard page at the bottom of the stack,
797
       and a page size can be as small as 4096 bytes.  So we cannot safely
798
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
799
       to allow for a few compiler-allocated temporary stack slots.  */
800
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
801
#  endif
802
# else
803
#  define YYSTACK_ALLOC YYMALLOC
804
0
#  define YYSTACK_FREE YYFREE
805
#  ifndef YYSTACK_ALLOC_MAXIMUM
806
0
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
807
#  endif
808
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
809
       && ! ((defined YYMALLOC || defined malloc) \
810
             && (defined YYFREE || defined free)))
811
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
812
#   ifndef EXIT_SUCCESS
813
#    define EXIT_SUCCESS 0
814
#   endif
815
#  endif
816
#  ifndef YYMALLOC
817
#   define YYMALLOC malloc
818
#   if ! defined malloc && ! defined EXIT_SUCCESS
819
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
820
#   endif
821
#  endif
822
#  ifndef YYFREE
823
#   define YYFREE free
824
#   if ! defined free && ! defined EXIT_SUCCESS
825
void free (void *); /* INFRINGES ON USER NAME SPACE */
826
#   endif
827
#  endif
828
# endif
829
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
830
831
832
#if (! defined yyoverflow \
833
     && (! defined __cplusplus \
834
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
835
836
/* A type that is properly aligned for any stack member.  */
837
union yyalloc
838
{
839
  yy_state_t yyss_alloc;
840
  YYSTYPE yyvs_alloc;
841
};
842
843
/* The size of the maximum gap between one aligned stack and the next.  */
844
0
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
845
846
/* The size of an array large to enough to hold all stacks, each with
847
   N elements.  */
848
# define YYSTACK_BYTES(N) \
849
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
850
      + YYSTACK_GAP_MAXIMUM)
851
852
# define YYCOPY_NEEDED 1
853
854
/* Relocate STACK from its old location to the new one.  The
855
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
856
   elements in the stack, and YYPTR gives the new location of the
857
   stack.  Advance YYPTR to a properly aligned location for the next
858
   stack.  */
859
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
860
0
    do                                                                  \
861
0
      {                                                                 \
862
0
        YYPTRDIFF_T yynewbytes;                                         \
863
0
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
864
0
        Stack = &yyptr->Stack_alloc;                                    \
865
0
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
866
0
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
867
0
      }                                                                 \
868
0
    while (0)
869
870
#endif
871
872
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
873
/* Copy COUNT objects from SRC to DST.  The source and destination do
874
   not overlap.  */
875
# ifndef YYCOPY
876
#  if defined __GNUC__ && 1 < __GNUC__
877
#   define YYCOPY(Dst, Src, Count) \
878
0
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
879
#  else
880
#   define YYCOPY(Dst, Src, Count)              \
881
      do                                        \
882
        {                                       \
883
          YYPTRDIFF_T yyi;                      \
884
          for (yyi = 0; yyi < (Count); yyi++)   \
885
            (Dst)[yyi] = (Src)[yyi];            \
886
        }                                       \
887
      while (0)
888
#  endif
889
# endif
890
#endif /* !YYCOPY_NEEDED */
891
892
/* YYFINAL -- State number of the termination state.  */
893
0
#define YYFINAL  216
894
/* YYLAST -- Last index in YYTABLE.  */
895
0
#define YYLAST   662
896
897
/* YYNTOKENS -- Number of terminals.  */
898
0
#define YYNTOKENS  208
899
/* YYNNTS -- Number of nonterminals.  */
900
#define YYNNTS  107
901
/* YYNRULES -- Number of rules.  */
902
#define YYNRULES  324
903
/* YYNSTATES -- Number of states.  */
904
#define YYNSTATES  436
905
906
0
#define YYUNDEFTOK  2
907
0
#define YYMAXUTOK   457
908
909
910
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
911
   as returned by yylex, with out-of-bounds checking.  */
912
#define YYTRANSLATE(YYX)                                                \
913
0
  (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
914
915
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
916
   as returned by yylex.  */
917
static const yytype_uint8 yytranslate[] =
918
{
919
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
920
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
921
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
922
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
923
     204,   205,     2,     2,     2,     2,     2,     2,     2,     2,
924
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
925
       2,   203,     2,     2,     2,     2,     2,     2,     2,     2,
926
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
927
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
928
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
929
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
930
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
931
       2,     2,     2,   206,     2,   207,     2,     2,     2,     2,
932
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
933
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
934
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
935
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
936
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
937
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
938
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
939
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
940
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
941
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
942
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
943
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
944
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
945
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
946
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
947
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
948
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
949
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
950
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
951
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
952
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
953
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
954
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
955
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
956
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
957
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
958
     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
959
     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
960
     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
961
     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
962
     175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
963
     185,   186,   187,   188,   189,   190,   191,   192,   193,   194,
964
     195,   196,   197,   198,   199,   200,   201,   202
965
};
966
967
#if YYDEBUG
968
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
969
static const yytype_int16 yyrline[] =
970
{
971
       0,   378,   378,   382,   383,   384,   399,   400,   401,   402,
972
     403,   404,   405,   406,   407,   408,   409,   410,   411,   412,
973
     420,   430,   431,   432,   433,   434,   438,   439,   444,   449,
974
     451,   457,   458,   466,   467,   468,   472,   477,   478,   479,
975
     480,   481,   482,   483,   484,   488,   490,   495,   496,   497,
976
     498,   499,   500,   504,   509,   518,   528,   529,   539,   541,
977
     543,   545,   556,   563,   565,   570,   572,   574,   576,   578,
978
     588,   594,   595,   603,   605,   617,   618,   619,   620,   621,
979
     630,   635,   640,   648,   650,   652,   654,   659,   660,   661,
980
     662,   663,   664,   665,   666,   667,   671,   672,   681,   683,
981
     692,   702,   707,   715,   716,   717,   718,   719,   720,   721,
982
     722,   727,   728,   736,   746,   755,   770,   775,   776,   780,
983
     781,   785,   786,   787,   788,   789,   790,   791,   800,   804,
984
     808,   816,   824,   832,   847,   862,   875,   876,   896,   897,
985
     905,   906,   907,   908,   909,   910,   911,   912,   913,   914,
986
     915,   916,   917,   918,   919,   920,   921,   925,   930,   938,
987
     943,   944,   945,   949,   954,   962,   967,   968,   969,   970,
988
     971,   972,   973,   974,   982,   992,   997,  1005,  1007,  1009,
989
    1018,  1020,  1025,  1026,  1030,  1031,  1032,  1033,  1041,  1046,
990
    1051,  1059,  1064,  1065,  1066,  1075,  1077,  1082,  1087,  1095,
991
    1097,  1114,  1115,  1116,  1117,  1118,  1119,  1123,  1124,  1125,
992
    1126,  1127,  1128,  1136,  1141,  1146,  1154,  1159,  1160,  1161,
993
    1162,  1163,  1164,  1165,  1166,  1167,  1168,  1177,  1178,  1179,
994
    1186,  1193,  1200,  1216,  1235,  1237,  1239,  1241,  1243,  1245,
995
    1252,  1257,  1258,  1259,  1263,  1267,  1276,  1277,  1281,  1282,
996
    1283,  1287,  1298,  1316,  1328,  1333,  1335,  1340,  1341,  1349,
997
    1351,  1359,  1364,  1372,  1397,  1404,  1414,  1415,  1419,  1420,
998
    1421,  1422,  1426,  1427,  1428,  1432,  1437,  1442,  1450,  1451,
999
    1452,  1453,  1454,  1455,  1456,  1466,  1471,  1479,  1484,  1492,
1000
    1494,  1498,  1503,  1508,  1516,  1521,  1529,  1538,  1539,  1543,
1001
    1544,  1548,  1556,  1574,  1578,  1583,  1591,  1596,  1597,  1601,
1002
    1606,  1614,  1619,  1624,  1629,  1634,  1642,  1647,  1652,  1660,
1003
    1665,  1666,  1667,  1668,  1669
1004
};
1005
#endif
1006
1007
#if YYDEBUG || YYERROR_VERBOSE || 1
1008
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1009
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1010
static const char *const yytname[] =
1011
{
1012
  "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
1013
  "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
1014
  "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
1015
  "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
1016
  "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
1017
  "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
1018
  "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
1019
  "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
1020
  "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
1021
  "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host",
1022
  "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc",
1023
  "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer",
1024
  "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4",
1025
  "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys",
1026
  "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval",
1027
  "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
1028
  "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
1029
  "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
1030
  "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
1031
  "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll",
1032
  "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
1033
  "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
1034
  "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery",
1035
  "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
1036
  "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
1037
  "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
1038
  "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
1039
  "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
1040
  "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
1041
  "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
1042
  "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
1043
  "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
1044
  "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
1045
  "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
1046
  "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
1047
  "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
1048
  "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
1049
  "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
1050
  "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
1051
  "$accept", "configuration", "command_list", "command", "server_command",
1052
  "client_type", "address", "ip_address", "address_fam", "option_list",
1053
  "option", "option_flag", "option_flag_keyword", "option_int",
1054
  "option_int_keyword", "option_str", "option_str_keyword",
1055
  "unpeer_command", "unpeer_keyword", "other_mode_command",
1056
  "authentication_command", "crypto_command_list", "crypto_command",
1057
  "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
1058
  "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
1059
  "monitoring_command", "stats_list", "stat", "filegen_option_list",
1060
  "filegen_option", "link_nolink", "enable_disable", "filegen_type",
1061
  "access_control_command", "res_ippeerlimit", "ac_flag_list",
1062
  "access_control_flag", "discard_option_list", "discard_option",
1063
  "discard_option_keyword", "mru_option_list", "mru_option",
1064
  "mru_option_keyword", "fudge_command", "fudge_factor_list",
1065
  "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
1066
  "rlimit_command", "rlimit_option_list", "rlimit_option",
1067
  "rlimit_option_keyword", "system_option_command", "system_option_list",
1068
  "system_option", "system_option_flag_keyword",
1069
  "system_option_local_flag_keyword", "tinker_command",
1070
  "tinker_option_list", "tinker_option", "tinker_option_keyword",
1071
  "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
1072
  "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
1073
  "variable_assign", "t_default_or_zero", "trap_option_list",
1074
  "trap_option", "log_config_list", "log_config_command",
1075
  "interface_command", "interface_nic", "nic_rule_class",
1076
  "nic_rule_action", "reset_command", "counter_set_list",
1077
  "counter_set_keyword", "integer_list", "integer_list_range",
1078
  "integer_list_range_elt", "integer_range", "string_list", "address_list",
1079
  "boolean", "number", "basedate", "simulate_command", "sim_conf_start",
1080
  "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
1081
  "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
1082
  "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
1083
  "sim_act_keyword", YY_NULLPTR
1084
};
1085
#endif
1086
1087
# ifdef YYPRINT
1088
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
1089
   (internal) symbol number NUM (which must be that of a token).  */
1090
static const yytype_int16 yytoknum[] =
1091
{
1092
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1093
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1094
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1095
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1096
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1097
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1098
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
1099
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
1100
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
1101
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
1102
     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
1103
     365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
1104
     375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
1105
     385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
1106
     395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
1107
     405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
1108
     415,   416,   417,   418,   419,   420,   421,   422,   423,   424,
1109
     425,   426,   427,   428,   429,   430,   431,   432,   433,   434,
1110
     435,   436,   437,   438,   439,   440,   441,   442,   443,   444,
1111
     445,   446,   447,   448,   449,   450,   451,   452,   453,   454,
1112
     455,   456,   457,    61,    40,    41,   123,   125
1113
};
1114
# endif
1115
1116
0
#define YYPACT_NINF (-215)
1117
1118
#define yypact_value_is_default(Yyn) \
1119
0
  ((Yyn) == YYPACT_NINF)
1120
1121
#define YYTABLE_NINF (-7)
1122
1123
#define yytable_value_is_error(Yyn) \
1124
0
  0
1125
1126
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1127
     STATE-NUM.  */
1128
static const yytype_int16 yypact[] =
1129
{
1130
      11,  -175,     2,  -215,  -215,  -215,     3,  -215,    93,     9,
1131
    -138,  -215,    93,  -215,    66,   -40,  -215,   -93,  -215,   -87,
1132
     -82,  -215,  -215,   -81,  -215,  -215,   -40,    20,   210,   -40,
1133
    -215,  -215,   -70,  -215,   -67,  -215,  -215,    34,     6,   -13,
1134
      47,    -6,  -215,  -215,   -48,    66,   -45,  -215,   412,   483,
1135
     -39,   -60,    62,  -215,  -215,  -215,   127,   203,   -63,  -215,
1136
     -40,  -215,   -40,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1137
    -215,  -215,  -215,   -11,    75,   -24,   -22,  -215,   -18,  -215,
1138
    -215,   -53,  -215,  -215,  -215,    48,  -215,  -215,  -215,  -215,
1139
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,    93,  -215,
1140
    -215,  -215,  -215,  -215,  -215,     9,  -215,    82,   120,  -215,
1141
      93,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1142
    -215,  -215,  -215,    86,  -215,     4,   373,  -215,  -215,  -215,
1143
     -81,  -215,  -215,   -40,  -215,  -215,  -215,  -215,  -215,  -215,
1144
    -215,  -215,  -215,   210,  -215,   106,   -40,  -215,  -215,    15,
1145
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,     6,  -215,
1146
     105,   146,   151,   105,   -30,  -215,  -215,  -215,  -215,    -6,
1147
    -215,   117,   -21,  -215,    66,  -215,  -215,  -215,  -215,  -215,
1148
    -215,  -215,  -215,  -215,  -215,  -215,  -215,   412,  -215,   -11,
1149
      22,  -215,  -215,  -215,   -20,  -215,  -215,  -215,  -215,  -215,
1150
    -215,  -215,  -215,   483,  -215,   128,   -11,  -215,  -215,  -215,
1151
     129,   -60,  -215,  -215,  -215,   132,  -215,    10,  -215,  -215,
1152
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1153
       1,  -133,  -215,  -215,  -215,  -215,  -215,   134,  -215,    41,
1154
    -215,  -215,  -215,  -215,   -28,    42,  -215,  -215,  -215,  -215,
1155
      45,   148,  -215,  -215,    86,  -215,   -11,   -20,  -215,  -215,
1156
    -215,  -215,  -215,  -215,  -215,  -215,   150,  -215,   105,   105,
1157
    -215,   -39,  -215,  -215,  -215,    51,  -215,  -215,  -215,  -215,
1158
    -215,  -215,  -215,  -215,  -215,  -215,  -215,   -57,   178,  -215,
1159
    -215,  -215,   288,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1160
    -215,  -115,    25,    23,  -215,  -215,  -215,  -215,    61,  -215,
1161
    -215,    21,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1162
    -215,  -215,   477,  -215,  -215,   477,   105,   477,   201,   -39,
1163
     169,  -215,   172,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1164
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1165
    -215,  -215,   -59,  -215,    77,    36,    52,  -100,  -215,    39,
1166
    -215,   -11,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1167
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1168
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,   477,
1169
     477,  -215,  -215,  -215,  -215,  -215,    43,  -215,  -215,  -215,
1170
     -40,  -215,  -215,  -215,    55,  -215,   477,  -215,  -215,    49,
1171
      56,   -11,    54,  -166,  -215,    67,   -11,  -215,  -215,  -215,
1172
      70,    63,  -215,  -215,  -215,  -215,  -215,   124,    85,    64,
1173
    -215,    89,  -215,   -11,  -215,  -215
1174
};
1175
1176
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1177
     Performed when YYTABLE does not specify something else to do.  Zero
1178
     means the default is an error.  */
1179
static const yytype_int16 yydefact[] =
1180
{
1181
       0,     0,     0,    24,    58,   241,     0,    71,     0,     0,
1182
     253,   244,     0,   234,     0,     0,   246,     0,   266,     0,
1183
       0,   247,   245,     0,   248,    25,     0,     0,     0,     0,
1184
     267,   242,     0,    23,     0,   249,    22,     0,     0,     0,
1185
       0,     0,   250,    21,     0,     0,     0,   243,     0,     0,
1186
       0,     0,     0,    56,    57,   303,     0,     2,     0,     7,
1187
       0,     8,     0,     9,    10,    13,    11,    12,    14,    15,
1188
      16,    17,    18,     0,     0,     0,     0,   227,     0,   228,
1189
      19,     0,     5,    62,    63,    64,   201,   202,   203,   204,
1190
     207,   205,   206,   208,   209,   210,   211,   212,   196,   198,
1191
     199,   200,   160,   161,   162,   128,   158,     0,   251,   235,
1192
     195,   103,   104,   105,   106,   110,   107,   108,   109,   111,
1193
      29,    30,    28,     0,    26,     0,     6,    65,    66,   263,
1194
     236,   262,   295,    59,    61,   166,   167,   168,   169,   170,
1195
     171,   172,   173,   129,   164,     0,    60,    70,   293,   237,
1196
      67,   278,   279,   280,   281,   282,   283,   284,   275,   277,
1197
     136,    29,    30,   136,   136,    68,   194,   192,   193,   188,
1198
     190,     0,     0,   238,    98,   102,    99,   217,   218,   219,
1199
     220,   221,   222,   223,   224,   225,   226,   213,   215,     0,
1200
       0,    87,    88,    89,     0,    90,    91,    97,    92,    96,
1201
      93,    94,    95,    80,    82,     0,     0,    86,   257,   289,
1202
       0,    69,   288,   290,   286,   240,     1,     0,     4,    31,
1203
      55,   300,   299,   229,   230,   231,   232,   274,   273,   272,
1204
       0,     0,    79,    75,    76,    77,    78,     0,    72,     0,
1205
     197,   157,   159,   252,   100,     0,   184,   185,   186,   187,
1206
       0,     0,   182,   183,   174,   176,     0,     0,    27,   233,
1207
     261,   294,   163,   165,   292,   276,     0,   138,   136,   136,
1208
     138,     0,   138,   189,   191,     0,   101,   214,   216,   301,
1209
     298,   296,   297,    85,    81,    83,    84,   239,     0,   287,
1210
     285,     3,    20,   268,   269,   270,   265,   271,   264,   307,
1211
     308,     0,     0,     0,    74,    73,   120,   119,     0,   117,
1212
     118,     0,   112,   115,   116,   180,   181,   179,   175,   177,
1213
     178,   137,   132,   138,   138,   135,   136,   130,   256,     0,
1214
       0,   258,     0,    37,    38,    39,    54,    47,    49,    48,
1215
      51,    40,    41,    42,    43,    50,    52,    44,    32,    33,
1216
      36,    34,     0,    35,     0,     0,     0,     0,   310,     0,
1217
     305,     0,   113,   127,   123,   125,   121,   122,   124,   126,
1218
     114,   140,   141,   142,   143,   144,   145,   146,   148,   149,
1219
     147,   150,   151,   152,   153,   154,   155,   156,   139,   133,
1220
     134,   138,   255,   254,   260,   259,     0,    45,    46,    53,
1221
       0,   304,   302,   309,     0,   306,   131,   291,   313,     0,
1222
       0,     0,     0,     0,   315,     0,     0,   311,   314,   312,
1223
       0,     0,   320,   321,   322,   323,   324,     0,     0,     0,
1224
     316,     0,   318,     0,   317,   319
1225
};
1226
1227
  /* YYPGOTO[NTERM-NUM].  */
1228
static const yytype_int16 yypgoto[] =
1229
{
1230
    -215,  -215,  -215,   -23,  -215,  -215,   -15,   -49,  -215,  -215,
1231
    -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,  -215,
1232
    -215,  -215,  -215,  -215,  -215,  -215,    81,  -215,  -215,  -215,
1233
    -215,   -38,  -215,  -215,  -215,  -215,  -215,  -215,  -154,  -214,
1234
    -215,  -215,   153,  -215,  -215,   142,  -215,  -215,  -215,    32,
1235
    -215,  -215,  -215,  -215,   121,  -215,  -215,   277,   -35,  -215,
1236
    -215,  -215,  -215,   107,  -215,  -215,  -215,  -215,  -215,  -215,
1237
    -215,  -215,  -215,  -215,  -215,  -215,   163,  -215,  -215,  -215,
1238
    -215,  -215,  -215,   137,  -215,  -215,    87,  -215,  -215,   267,
1239
      53,  -187,  -215,  -215,  -215,  -215,    -2,  -215,  -215,   -55,
1240
    -215,  -215,  -215,  -109,  -215,  -121,  -215
1241
};
1242
1243
  /* YYDEFGOTO[NTERM-NUM].  */
1244
static const yytype_int16 yydefgoto[] =
1245
{
1246
      -1,    56,    57,    58,    59,    60,   132,   124,   125,   292,
1247
     348,   349,   350,   351,   352,   353,   354,    61,    62,    63,
1248
      64,    85,   238,   239,    65,   203,   204,   205,   206,    66,
1249
     174,   119,   244,   312,   313,   314,   370,    67,   267,   322,
1250
     388,   105,   106,   107,   143,   144,   145,    68,   254,   255,
1251
     256,   257,    69,   169,   170,   171,    70,    98,    99,   100,
1252
     101,    71,   187,   188,   189,    72,    73,    74,    75,    76,
1253
     109,   173,   393,   287,   331,   130,   131,    77,    78,   298,
1254
     230,    79,   158,   159,   215,   211,   212,   213,   149,   133,
1255
     283,   223,   207,    80,    81,   301,   302,   303,   357,   358,
1256
     410,   359,   413,   414,   427,   428,   429
1257
};
1258
1259
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
1260
     positive, shift that token.  If negative, reduce the rule whose
1261
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
1262
static const yytype_int16 yytable[] =
1263
{
1264
     123,   208,   278,   306,   209,   397,   293,   175,   329,   270,
1265
     272,   307,     1,   151,   152,   308,   160,    82,   227,   286,
1266
     102,     2,   280,   221,   164,   363,   108,     3,     4,     5,
1267
     120,   412,   121,   153,   217,     6,     7,   355,   266,   166,
1268
     228,   417,     8,     9,   281,   219,    10,   220,    11,   364,
1269
      12,    13,   355,   222,   309,    14,   325,   161,   327,   162,
1270
     271,   299,   300,   240,    15,   229,    83,    84,    16,   319,
1271
     294,   126,   295,   154,    17,   240,    18,   127,   232,   299,
1272
     300,   330,   128,   129,   134,   310,    19,    20,   111,   245,
1273
      21,    22,   112,   167,   147,    23,    24,   148,   150,    25,
1274
      26,    86,   233,   259,   155,   234,    87,   402,    27,   389,
1275
     390,   165,   103,    88,   323,   324,   172,   104,   261,   176,
1276
     398,    28,    29,    30,   122,   122,   214,   216,    31,   218,
1277
     365,   261,   246,   247,   248,   249,   276,   366,    32,   224,
1278
     225,   163,   226,    33,   210,    34,   242,    35,    36,   168,
1279
     311,   122,   113,   231,   243,   282,   367,    37,    38,    39,
1280
      40,    41,    42,    43,    44,   296,    89,    45,   258,    46,
1281
     263,   156,   391,   266,   405,   268,   157,   406,    47,   264,
1282
     269,   274,   275,    48,    49,    50,   279,    51,    52,   297,
1283
     235,   236,   285,   288,    53,    54,   290,   237,   304,   114,
1284
      90,    91,   291,    -6,    55,   305,   315,   115,   368,   316,
1285
     116,   369,   317,     2,   321,   328,   332,   360,    92,     3,
1286
       4,     5,   326,    93,   415,   362,   361,     6,     7,   420,
1287
     392,   250,   117,   395,     8,     9,   396,   118,    10,   400,
1288
      11,   399,    12,    13,   401,   404,   435,    14,   407,   251,
1289
      94,   409,   411,   412,   252,   253,    15,   416,   241,   419,
1290
      16,   422,   423,   424,   425,   426,    17,   433,    18,   135,
1291
     136,   137,   138,    95,    96,    97,   421,   432,    19,    20,
1292
     394,   434,    21,    22,   284,   262,   318,    23,    24,   110,
1293
     273,    25,    26,   260,   277,   265,   146,   333,   289,   356,
1294
      27,   139,   403,   140,   418,   141,   431,   334,     0,     0,
1295
     320,   142,     0,    28,    29,    30,     0,     0,     0,     0,
1296
      31,     0,   422,   423,   424,   425,   426,     0,     0,     0,
1297
      32,   430,     0,     0,     0,    33,     0,    34,     0,    35,
1298
      36,     0,     0,     0,   335,   336,     0,     0,     0,    37,
1299
      38,    39,    40,    41,    42,    43,    44,     0,     0,    45,
1300
       0,    46,   337,     0,     0,     0,     0,     0,     0,     0,
1301
      47,     0,     0,     0,     0,    48,    49,    50,     0,    51,
1302
      52,     0,     0,     2,   338,   408,    53,    54,     0,     3,
1303
       4,     5,   339,     0,   340,    -6,    55,     6,     7,     0,
1304
       0,     0,     0,     0,     8,     9,     0,     0,    10,   341,
1305
      11,     0,    12,    13,     0,     0,     0,    14,   177,     0,
1306
       0,     0,     0,     0,     0,     0,    15,   342,   343,     0,
1307
      16,     0,     0,     0,     0,     0,    17,     0,    18,     0,
1308
       0,     0,     0,     0,     0,   178,     0,     0,    19,    20,
1309
       0,     0,    21,    22,     0,     0,     0,    23,    24,     0,
1310
       0,    25,    26,   344,   179,   345,     0,   180,     0,     0,
1311
      27,     0,     0,   346,     0,     0,     0,   347,     0,     0,
1312
       0,     0,     0,    28,    29,    30,     0,     0,     0,     0,
1313
      31,     0,     0,     0,     0,   190,     0,   191,   192,     0,
1314
      32,     0,     0,     0,   193,    33,   194,    34,     0,    35,
1315
      36,     0,     0,     0,     0,     0,     0,     0,   371,    37,
1316
      38,    39,    40,    41,    42,    43,    44,   372,     0,    45,
1317
       0,    46,     0,     0,   195,   373,     0,     0,     0,     0,
1318
      47,     0,     0,   181,     0,    48,    49,    50,     0,    51,
1319
      52,     0,     0,     0,   374,   375,    53,    54,   376,     0,
1320
       0,     0,     0,     0,   377,     0,    55,     0,     0,     0,
1321
       0,   182,   183,   184,   185,   196,     0,   197,     0,   186,
1322
       0,     0,     0,   198,     0,   199,     0,     0,   200,     0,
1323
       0,   378,   379,     0,     0,   380,   381,   382,     0,   383,
1324
     384,   385,     0,   386,     0,     0,     0,     0,     0,     0,
1325
       0,   201,   202,     0,     0,     0,     0,     0,     0,     0,
1326
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1327
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1328
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1329
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1330
       0,     0,   387
1331
};
1332
1333
static const yytype_int16 yycheck[] =
1334
{
1335
      15,    50,   189,    31,    64,    64,     5,    45,    65,   163,
1336
     164,    39,     1,     7,     8,    43,    29,   192,    36,   206,
1337
      11,    10,    42,    34,    39,     4,   164,    16,    17,    18,
1338
      70,   197,    72,    27,    57,    24,    25,   152,    68,    45,
1339
      58,   207,    31,    32,    64,    60,    35,    62,    37,    28,
1340
      39,    40,   152,    64,    82,    44,   270,    70,   272,    72,
1341
      90,   194,   195,    98,    53,    83,    64,    64,    57,   256,
1342
      69,   164,    71,    67,    63,   110,    65,   164,    30,   194,
1343
     195,   138,   164,   164,    64,   113,    75,    76,    22,     3,
1344
      79,    80,    26,    99,   164,    84,    85,   164,    64,    88,
1345
      89,     8,    54,   126,    98,    57,    13,   207,    97,   323,
1346
     324,    64,   103,    20,   268,   269,   164,   108,   133,   164,
1347
     179,   110,   111,   112,   164,   164,    64,     0,   117,   192,
1348
     109,   146,    46,    47,    48,    49,   174,   116,   127,    64,
1349
     164,   154,   164,   132,   204,   134,    64,   136,   137,   155,
1350
     178,   164,    86,   206,    34,   175,   135,   146,   147,   148,
1351
     149,   150,   151,   152,   153,   164,    73,   156,   164,   158,
1352
      64,   165,   326,    68,   361,    29,   170,   391,   167,   164,
1353
      29,    64,   203,   172,   173,   174,   164,   176,   177,   188,
1354
     142,   143,    64,    64,   183,   184,    64,   149,    64,   133,
1355
     107,   108,   192,   192,   193,   164,   164,   141,   187,   164,
1356
     144,   190,    64,    10,    64,   164,    38,   192,   125,    16,
1357
      17,    18,   271,   130,   411,   164,   203,    24,    25,   416,
1358
      29,   145,   166,    64,    31,    32,    64,   171,    35,   203,
1359
      37,   164,    39,    40,   192,   206,   433,    44,   205,   163,
1360
     157,   196,   203,   197,   168,   169,    53,   203,   105,   192,
1361
      57,   198,   199,   200,   201,   202,    63,   203,    65,    59,
1362
      60,    61,    62,   180,   181,   182,   206,   192,    75,    76,
1363
     329,   192,    79,    80,   203,   143,   254,    84,    85,    12,
1364
     169,    88,    89,   130,   187,   158,    29,     9,   211,   301,
1365
      97,    91,   357,    93,   413,    95,   427,    19,    -1,    -1,
1366
     257,   101,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,
1367
     117,    -1,   198,   199,   200,   201,   202,    -1,    -1,    -1,
1368
     127,   207,    -1,    -1,    -1,   132,    -1,   134,    -1,   136,
1369
     137,    -1,    -1,    -1,    56,    57,    -1,    -1,    -1,   146,
1370
     147,   148,   149,   150,   151,   152,   153,    -1,    -1,   156,
1371
      -1,   158,    74,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1372
     167,    -1,    -1,    -1,    -1,   172,   173,   174,    -1,   176,
1373
     177,    -1,    -1,    10,    96,   400,   183,   184,    -1,    16,
1374
      17,    18,   104,    -1,   106,   192,   193,    24,    25,    -1,
1375
      -1,    -1,    -1,    -1,    31,    32,    -1,    -1,    35,   121,
1376
      37,    -1,    39,    40,    -1,    -1,    -1,    44,     6,    -1,
1377
      -1,    -1,    -1,    -1,    -1,    -1,    53,   139,   140,    -1,
1378
      57,    -1,    -1,    -1,    -1,    -1,    63,    -1,    65,    -1,
1379
      -1,    -1,    -1,    -1,    -1,    33,    -1,    -1,    75,    76,
1380
      -1,    -1,    79,    80,    -1,    -1,    -1,    84,    85,    -1,
1381
      -1,    88,    89,   175,    52,   177,    -1,    55,    -1,    -1,
1382
      97,    -1,    -1,   185,    -1,    -1,    -1,   189,    -1,    -1,
1383
      -1,    -1,    -1,   110,   111,   112,    -1,    -1,    -1,    -1,
1384
     117,    -1,    -1,    -1,    -1,    12,    -1,    14,    15,    -1,
1385
     127,    -1,    -1,    -1,    21,   132,    23,   134,    -1,   136,
1386
     137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    41,   146,
1387
     147,   148,   149,   150,   151,   152,   153,    50,    -1,   156,
1388
      -1,   158,    -1,    -1,    51,    58,    -1,    -1,    -1,    -1,
1389
     167,    -1,    -1,   131,    -1,   172,   173,   174,    -1,   176,
1390
     177,    -1,    -1,    -1,    77,    78,   183,   184,    81,    -1,
1391
      -1,    -1,    -1,    -1,    87,    -1,   193,    -1,    -1,    -1,
1392
      -1,   159,   160,   161,   162,    92,    -1,    94,    -1,   167,
1393
      -1,    -1,    -1,   100,    -1,   102,    -1,    -1,   105,    -1,
1394
      -1,   114,   115,    -1,    -1,   118,   119,   120,    -1,   122,
1395
     123,   124,    -1,   126,    -1,    -1,    -1,    -1,    -1,    -1,
1396
      -1,   128,   129,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1397
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1398
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1399
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1400
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1401
      -1,    -1,   185
1402
};
1403
1404
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1405
     symbol of state STATE-NUM.  */
1406
static const yytype_int16 yystos[] =
1407
{
1408
       0,     1,    10,    16,    17,    18,    24,    25,    31,    32,
1409
      35,    37,    39,    40,    44,    53,    57,    63,    65,    75,
1410
      76,    79,    80,    84,    85,    88,    89,    97,   110,   111,
1411
     112,   117,   127,   132,   134,   136,   137,   146,   147,   148,
1412
     149,   150,   151,   152,   153,   156,   158,   167,   172,   173,
1413
     174,   176,   177,   183,   184,   193,   209,   210,   211,   212,
1414
     213,   225,   226,   227,   228,   232,   237,   245,   255,   260,
1415
     264,   269,   273,   274,   275,   276,   277,   285,   286,   289,
1416
     301,   302,   192,    64,    64,   229,     8,    13,    20,    73,
1417
     107,   108,   125,   130,   157,   180,   181,   182,   265,   266,
1418
     267,   268,    11,   103,   108,   249,   250,   251,   164,   278,
1419
     265,    22,    26,    86,   133,   141,   144,   166,   171,   239,
1420
      70,    72,   164,   214,   215,   216,   164,   164,   164,   164,
1421
     283,   284,   214,   297,    64,    59,    60,    61,    62,    91,
1422
      93,    95,   101,   252,   253,   254,   297,   164,   164,   296,
1423
      64,     7,     8,    27,    67,    98,   165,   170,   290,   291,
1424
      29,    70,    72,   154,   214,    64,    45,    99,   155,   261,
1425
     262,   263,   164,   279,   238,   239,   164,     6,    33,    52,
1426
      55,   131,   159,   160,   161,   162,   167,   270,   271,   272,
1427
      12,    14,    15,    21,    23,    51,    92,    94,   100,   102,
1428
     105,   128,   129,   233,   234,   235,   236,   300,   215,    64,
1429
     204,   293,   294,   295,    64,   292,     0,   211,   192,   214,
1430
     214,    34,    64,   299,    64,   164,   164,    36,    58,    83,
1431
     288,   206,    30,    54,    57,   142,   143,   149,   230,   231,
1432
     266,   250,    64,    34,   240,     3,    46,    47,    48,    49,
1433
     145,   163,   168,   169,   256,   257,   258,   259,   164,   211,
1434
     284,   214,   253,    64,   164,   291,    68,   246,    29,    29,
1435
     246,    90,   246,   262,    64,   203,   239,   271,   299,   164,
1436
      42,    64,   175,   298,   234,    64,   299,   281,    64,   294,
1437
      64,   192,   217,     5,    69,    71,   164,   188,   287,   194,
1438
     195,   303,   304,   305,    64,   164,    31,    39,    43,    82,
1439
     113,   178,   241,   242,   243,   164,   164,    64,   257,   299,
1440
     298,    64,   247,   246,   246,   247,   215,   247,   164,    65,
1441
     138,   282,    38,     9,    19,    56,    57,    74,    96,   104,
1442
     106,   121,   139,   140,   175,   177,   185,   189,   218,   219,
1443
     220,   221,   222,   223,   224,   152,   304,   306,   307,   309,
1444
     192,   203,   164,     4,    28,   109,   116,   135,   187,   190,
1445
     244,    41,    50,    58,    77,    78,    81,    87,   114,   115,
1446
     118,   119,   120,   122,   123,   124,   126,   185,   248,   247,
1447
     247,   246,    29,   280,   215,    64,    64,    64,   179,   164,
1448
     203,   192,   207,   307,   206,   299,   247,   205,   214,   196,
1449
     308,   203,   197,   310,   311,   299,   203,   207,   311,   192,
1450
     299,   206,   198,   199,   200,   201,   202,   312,   313,   314,
1451
     207,   313,   192,   203,   192,   299
1452
};
1453
1454
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1455
static const yytype_int16 yyr1[] =
1456
{
1457
       0,   208,   209,   210,   210,   210,   211,   211,   211,   211,
1458
     211,   211,   211,   211,   211,   211,   211,   211,   211,   211,
1459
     212,   213,   213,   213,   213,   213,   214,   214,   215,   216,
1460
     216,   217,   217,   218,   218,   218,   219,   220,   220,   220,
1461
     220,   220,   220,   220,   220,   221,   221,   222,   222,   222,
1462
     222,   222,   222,   223,   224,   225,   226,   226,   227,   227,
1463
     227,   227,   228,   228,   228,   228,   228,   228,   228,   228,
1464
     228,   229,   229,   230,   230,   231,   231,   231,   231,   231,
1465
     232,   233,   233,   234,   234,   234,   234,   235,   235,   235,
1466
     235,   235,   235,   235,   235,   235,   236,   236,   237,   237,
1467
     237,   238,   238,   239,   239,   239,   239,   239,   239,   239,
1468
     239,   240,   240,   241,   241,   241,   241,   242,   242,   243,
1469
     243,   244,   244,   244,   244,   244,   244,   244,   245,   245,
1470
     245,   245,   245,   245,   245,   245,   246,   246,   247,   247,
1471
     248,   248,   248,   248,   248,   248,   248,   248,   248,   248,
1472
     248,   248,   248,   248,   248,   248,   248,   249,   249,   250,
1473
     251,   251,   251,   252,   252,   253,   254,   254,   254,   254,
1474
     254,   254,   254,   254,   255,   256,   256,   257,   257,   257,
1475
     257,   257,   258,   258,   259,   259,   259,   259,   260,   261,
1476
     261,   262,   263,   263,   263,   264,   264,   265,   265,   266,
1477
     266,   267,   267,   267,   267,   267,   267,   268,   268,   268,
1478
     268,   268,   268,   269,   270,   270,   271,   272,   272,   272,
1479
     272,   272,   272,   272,   272,   272,   272,   273,   273,   273,
1480
     273,   273,   273,   273,   273,   273,   273,   273,   273,   273,
1481
     273,   274,   274,   274,   275,   275,   276,   276,   277,   277,
1482
     277,   278,   278,   278,   279,   280,   280,   281,   281,   282,
1483
     282,   283,   283,   284,   285,   285,   286,   286,   287,   287,
1484
     287,   287,   288,   288,   288,   289,   290,   290,   291,   291,
1485
     291,   291,   291,   291,   291,   292,   292,   293,   293,   294,
1486
     294,   295,   296,   296,   297,   297,   298,   298,   298,   299,
1487
     299,   300,   301,   302,   303,   303,   304,   305,   305,   306,
1488
     306,   307,   308,   309,   310,   310,   311,   312,   312,   313,
1489
     314,   314,   314,   314,   314
1490
};
1491
1492
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
1493
static const yytype_int8 yyr2[] =
1494
{
1495
       0,     2,     1,     3,     2,     2,     0,     1,     1,     1,
1496
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1497
       3,     1,     1,     1,     1,     1,     1,     2,     1,     1,
1498
       1,     0,     2,     1,     1,     1,     1,     1,     1,     1,
1499
       1,     1,     1,     1,     1,     2,     2,     1,     1,     1,
1500
       1,     1,     1,     2,     1,     2,     1,     1,     1,     2,
1501
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1502
       2,     0,     2,     2,     2,     1,     1,     1,     1,     1,
1503
       2,     2,     1,     2,     2,     2,     1,     1,     1,     1,
1504
       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
1505
       3,     2,     1,     1,     1,     1,     1,     1,     1,     1,
1506
       1,     0,     2,     2,     2,     1,     1,     1,     1,     1,
1507
       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
1508
       4,     6,     4,     5,     5,     4,     0,     2,     0,     2,
1509
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1510
       1,     1,     1,     1,     1,     1,     1,     2,     1,     2,
1511
       1,     1,     1,     2,     1,     2,     1,     1,     1,     1,
1512
       1,     1,     1,     1,     3,     2,     1,     2,     2,     2,
1513
       2,     2,     1,     1,     1,     1,     1,     1,     2,     2,
1514
       1,     2,     1,     1,     1,     2,     2,     2,     1,     1,
1515
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1516
       1,     1,     1,     2,     2,     1,     2,     1,     1,     1,
1517
       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
1518
       2,     2,     2,     3,     1,     2,     2,     2,     2,     3,
1519
       2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1520
       1,     1,     2,     0,     4,     1,     0,     0,     2,     2,
1521
       2,     2,     1,     1,     3,     3,     1,     1,     1,     1,
1522
       1,     1,     1,     1,     1,     2,     2,     1,     1,     1,
1523
       1,     1,     1,     1,     1,     2,     1,     2,     1,     1,
1524
       1,     5,     2,     1,     2,     1,     1,     1,     1,     1,
1525
       1,     2,     5,     1,     3,     2,     3,     1,     1,     2,
1526
       1,     5,     4,     3,     2,     1,     6,     3,     2,     3,
1527
       1,     1,     1,     1,     1
1528
};
1529
1530
1531
#define yyerrok         (yyerrstatus = 0)
1532
#define yyclearin       (yychar = YYEMPTY)
1533
0
#define YYEMPTY         (-2)
1534
0
#define YYEOF           0
1535
1536
0
#define YYACCEPT        goto yyacceptlab
1537
0
#define YYABORT         goto yyabortlab
1538
0
#define YYERROR         goto yyerrorlab
1539
1540
1541
#define YYRECOVERING()  (!!yyerrstatus)
1542
1543
#define YYBACKUP(Token, Value)                                    \
1544
  do                                                              \
1545
    if (yychar == YYEMPTY)                                        \
1546
      {                                                           \
1547
        yychar = (Token);                                         \
1548
        yylval = (Value);                                         \
1549
        YYPOPSTACK (yylen);                                       \
1550
        yystate = *yyssp;                                         \
1551
        goto yybackup;                                            \
1552
      }                                                           \
1553
    else                                                          \
1554
      {                                                           \
1555
        yyerror (YY_("syntax error: cannot back up")); \
1556
        YYERROR;                                                  \
1557
      }                                                           \
1558
  while (0)
1559
1560
/* Error token number */
1561
0
#define YYTERROR        1
1562
#define YYERRCODE       256
1563
1564
1565
1566
/* Enable debugging if requested.  */
1567
#if YYDEBUG
1568
1569
# ifndef YYFPRINTF
1570
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1571
#  define YYFPRINTF fprintf
1572
# endif
1573
1574
# define YYDPRINTF(Args)                        \
1575
do {                                            \
1576
  if (yydebug)                                  \
1577
    YYFPRINTF Args;                             \
1578
} while (0)
1579
1580
/* This macro is provided for backward compatibility. */
1581
#ifndef YY_LOCATION_PRINT
1582
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1583
#endif
1584
1585
1586
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1587
do {                                                                      \
1588
  if (yydebug)                                                            \
1589
    {                                                                     \
1590
      YYFPRINTF (stderr, "%s ", Title);                                   \
1591
      yy_symbol_print (stderr,                                            \
1592
                  Type, Value); \
1593
      YYFPRINTF (stderr, "\n");                                           \
1594
    }                                                                     \
1595
} while (0)
1596
1597
1598
/*-----------------------------------.
1599
| Print this symbol's value on YYO.  |
1600
`-----------------------------------*/
1601
1602
static void
1603
yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1604
{
1605
  FILE *yyoutput = yyo;
1606
  YYUSE (yyoutput);
1607
  if (!yyvaluep)
1608
    return;
1609
# ifdef YYPRINT
1610
  if (yytype < YYNTOKENS)
1611
    YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1612
# endif
1613
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1614
  YYUSE (yytype);
1615
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1616
}
1617
1618
1619
/*---------------------------.
1620
| Print this symbol on YYO.  |
1621
`---------------------------*/
1622
1623
static void
1624
yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1625
{
1626
  YYFPRINTF (yyo, "%s %s (",
1627
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1628
1629
  yy_symbol_value_print (yyo, yytype, yyvaluep);
1630
  YYFPRINTF (yyo, ")");
1631
}
1632
1633
/*------------------------------------------------------------------.
1634
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1635
| TOP (included).                                                   |
1636
`------------------------------------------------------------------*/
1637
1638
static void
1639
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1640
{
1641
  YYFPRINTF (stderr, "Stack now");
1642
  for (; yybottom <= yytop; yybottom++)
1643
    {
1644
      int yybot = *yybottom;
1645
      YYFPRINTF (stderr, " %d", yybot);
1646
    }
1647
  YYFPRINTF (stderr, "\n");
1648
}
1649
1650
# define YY_STACK_PRINT(Bottom, Top)                            \
1651
do {                                                            \
1652
  if (yydebug)                                                  \
1653
    yy_stack_print ((Bottom), (Top));                           \
1654
} while (0)
1655
1656
1657
/*------------------------------------------------.
1658
| Report that the YYRULE is going to be reduced.  |
1659
`------------------------------------------------*/
1660
1661
static void
1662
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
1663
{
1664
  int yylno = yyrline[yyrule];
1665
  int yynrhs = yyr2[yyrule];
1666
  int yyi;
1667
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1668
             yyrule - 1, yylno);
1669
  /* The symbols being reduced.  */
1670
  for (yyi = 0; yyi < yynrhs; yyi++)
1671
    {
1672
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1673
      yy_symbol_print (stderr,
1674
                       yystos[+yyssp[yyi + 1 - yynrhs]],
1675
                       &yyvsp[(yyi + 1) - (yynrhs)]
1676
                                              );
1677
      YYFPRINTF (stderr, "\n");
1678
    }
1679
}
1680
1681
# define YY_REDUCE_PRINT(Rule)          \
1682
do {                                    \
1683
  if (yydebug)                          \
1684
    yy_reduce_print (yyssp, yyvsp, Rule); \
1685
} while (0)
1686
1687
/* Nonzero means print parse trace.  It is left uninitialized so that
1688
   multiple parsers can coexist.  */
1689
int yydebug;
1690
#else /* !YYDEBUG */
1691
# define YYDPRINTF(Args)
1692
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1693
# define YY_STACK_PRINT(Bottom, Top)
1694
# define YY_REDUCE_PRINT(Rule)
1695
#endif /* !YYDEBUG */
1696
1697
1698
/* YYINITDEPTH -- initial size of the parser's stacks.  */
1699
#ifndef YYINITDEPTH
1700
0
# define YYINITDEPTH 200
1701
#endif
1702
1703
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1704
   if the built-in stack extension method is used).
1705
1706
   Do not make this value too large; the results are undefined if
1707
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1708
   evaluated with infinite-precision integer arithmetic.  */
1709
1710
#ifndef YYMAXDEPTH
1711
# define YYMAXDEPTH 10000
1712
#endif
1713
1714
1715
#if YYERROR_VERBOSE
1716
1717
# ifndef yystrlen
1718
#  if defined __GLIBC__ && defined _STRING_H
1719
0
#   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1720
#  else
1721
/* Return the length of YYSTR.  */
1722
static YYPTRDIFF_T
1723
yystrlen (const char *yystr)
1724
{
1725
  YYPTRDIFF_T yylen;
1726
  for (yylen = 0; yystr[yylen]; yylen++)
1727
    continue;
1728
  return yylen;
1729
}
1730
#  endif
1731
# endif
1732
1733
# ifndef yystpcpy
1734
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1735
0
#   define yystpcpy stpcpy
1736
#  else
1737
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1738
   YYDEST.  */
1739
static char *
1740
yystpcpy (char *yydest, const char *yysrc)
1741
{
1742
  char *yyd = yydest;
1743
  const char *yys = yysrc;
1744
1745
  while ((*yyd++ = *yys++) != '\0')
1746
    continue;
1747
1748
  return yyd - 1;
1749
}
1750
#  endif
1751
# endif
1752
1753
# ifndef yytnamerr
1754
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1755
   quotes and backslashes, so that it's suitable for yyerror.  The
1756
   heuristic is that double-quoting is unnecessary unless the string
1757
   contains an apostrophe, a comma, or backslash (other than
1758
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1759
   null, do not copy; instead, return the length of what the result
1760
   would have been.  */
1761
static YYPTRDIFF_T
1762
yytnamerr (char *yyres, const char *yystr)
1763
0
{
1764
0
  if (*yystr == '"')
1765
0
    {
1766
0
      YYPTRDIFF_T yyn = 0;
1767
0
      char const *yyp = yystr;
1768
1769
0
      for (;;)
1770
0
        switch (*++yyp)
1771
0
          {
1772
0
          case '\'':
1773
0
          case ',':
1774
0
            goto do_not_strip_quotes;
1775
1776
0
          case '\\':
1777
0
            if (*++yyp != '\\')
1778
0
              goto do_not_strip_quotes;
1779
0
            else
1780
0
              goto append;
1781
1782
0
          append:
1783
0
          default:
1784
0
            if (yyres)
1785
0
              yyres[yyn] = *yyp;
1786
0
            yyn++;
1787
0
            break;
1788
1789
0
          case '"':
1790
0
            if (yyres)
1791
0
              yyres[yyn] = '\0';
1792
0
            return yyn;
1793
0
          }
1794
0
    do_not_strip_quotes: ;
1795
0
    }
1796
1797
0
  if (yyres)
1798
0
    return yystpcpy (yyres, yystr) - yyres;
1799
0
  else
1800
0
    return yystrlen (yystr);
1801
0
}
1802
# endif
1803
1804
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1805
   about the unexpected token YYTOKEN for the state stack whose top is
1806
   YYSSP.
1807
1808
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1809
   not large enough to hold the message.  In that case, also set
1810
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1811
   required number of bytes is too large to store.  */
1812
static int
1813
yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1814
                yy_state_t *yyssp, int yytoken)
1815
0
{
1816
0
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1817
  /* Internationalized format string. */
1818
0
  const char *yyformat = YY_NULLPTR;
1819
  /* Arguments of yyformat: reported tokens (one for the "unexpected",
1820
     one per "expected"). */
1821
0
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1822
  /* Actual size of YYARG. */
1823
0
  int yycount = 0;
1824
  /* Cumulated lengths of YYARG.  */
1825
0
  YYPTRDIFF_T yysize = 0;
1826
1827
  /* There are many possibilities here to consider:
1828
     - If this state is a consistent state with a default action, then
1829
       the only way this function was invoked is if the default action
1830
       is an error action.  In that case, don't check for expected
1831
       tokens because there are none.
1832
     - The only way there can be no lookahead present (in yychar) is if
1833
       this state is a consistent state with a default action.  Thus,
1834
       detecting the absence of a lookahead is sufficient to determine
1835
       that there is no unexpected or expected token to report.  In that
1836
       case, just report a simple "syntax error".
1837
     - Don't assume there isn't a lookahead just because this state is a
1838
       consistent state with a default action.  There might have been a
1839
       previous inconsistent state, consistent state with a non-default
1840
       action, or user semantic action that manipulated yychar.
1841
     - Of course, the expected token list depends on states to have
1842
       correct lookahead information, and it depends on the parser not
1843
       to perform extra reductions after fetching a lookahead from the
1844
       scanner and before detecting a syntax error.  Thus, state merging
1845
       (from LALR or IELR) and default reductions corrupt the expected
1846
       token list.  However, the list is correct for canonical LR with
1847
       one exception: it will still contain any token that will not be
1848
       accepted due to an error action in a later state.
1849
  */
1850
0
  if (yytoken != YYEMPTY)
1851
0
    {
1852
0
      int yyn = yypact[+*yyssp];
1853
0
      YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1854
0
      yysize = yysize0;
1855
0
      yyarg[yycount++] = yytname[yytoken];
1856
0
      if (!yypact_value_is_default (yyn))
1857
0
        {
1858
          /* Start YYX at -YYN if negative to avoid negative indexes in
1859
             YYCHECK.  In other words, skip the first -YYN actions for
1860
             this state because they are default actions.  */
1861
0
          int yyxbegin = yyn < 0 ? -yyn : 0;
1862
          /* Stay within bounds of both yycheck and yytname.  */
1863
0
          int yychecklim = YYLAST - yyn + 1;
1864
0
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1865
0
          int yyx;
1866
1867
0
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1868
0
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1869
0
                && !yytable_value_is_error (yytable[yyx + yyn]))
1870
0
              {
1871
0
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1872
0
                  {
1873
0
                    yycount = 1;
1874
0
                    yysize = yysize0;
1875
0
                    break;
1876
0
                  }
1877
0
                yyarg[yycount++] = yytname[yyx];
1878
0
                {
1879
0
                  YYPTRDIFF_T yysize1
1880
0
                    = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1881
0
                  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1882
0
                    yysize = yysize1;
1883
0
                  else
1884
0
                    return 2;
1885
0
                }
1886
0
              }
1887
0
        }
1888
0
    }
1889
1890
0
  switch (yycount)
1891
0
    {
1892
0
# define YYCASE_(N, S)                      \
1893
0
      case N:                               \
1894
0
        yyformat = S;                       \
1895
0
      break
1896
0
    default: /* Avoid compiler warnings. */
1897
0
      YYCASE_(0, YY_("syntax error"));
1898
0
      YYCASE_(1, YY_("syntax error, unexpected %s"));
1899
0
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1900
0
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1901
0
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1902
0
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1903
0
# undef YYCASE_
1904
0
    }
1905
1906
0
  {
1907
    /* Don't count the "%s"s in the final size, but reserve room for
1908
       the terminator.  */
1909
0
    YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1910
0
    if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1911
0
      yysize = yysize1;
1912
0
    else
1913
0
      return 2;
1914
0
  }
1915
1916
0
  if (*yymsg_alloc < yysize)
1917
0
    {
1918
0
      *yymsg_alloc = 2 * yysize;
1919
0
      if (! (yysize <= *yymsg_alloc
1920
0
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1921
0
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1922
0
      return 1;
1923
0
    }
1924
1925
  /* Avoid sprintf, as that infringes on the user's name space.
1926
     Don't have undefined behavior even if the translation
1927
     produced a string with the wrong number of "%s"s.  */
1928
0
  {
1929
0
    char *yyp = *yymsg;
1930
0
    int yyi = 0;
1931
0
    while ((*yyp = *yyformat) != '\0')
1932
0
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1933
0
        {
1934
0
          yyp += yytnamerr (yyp, yyarg[yyi++]);
1935
0
          yyformat += 2;
1936
0
        }
1937
0
      else
1938
0
        {
1939
0
          ++yyp;
1940
0
          ++yyformat;
1941
0
        }
1942
0
  }
1943
0
  return 0;
1944
0
}
1945
#endif /* YYERROR_VERBOSE */
1946
1947
/*-----------------------------------------------.
1948
| Release the memory associated to this symbol.  |
1949
`-----------------------------------------------*/
1950
1951
static void
1952
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1953
0
{
1954
0
  YYUSE (yyvaluep);
1955
0
  if (!yymsg)
1956
0
    yymsg = "Deleting";
1957
0
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1958
1959
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1960
0
  YYUSE (yytype);
1961
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1962
0
}
1963
1964
1965
1966
1967
/* The lookahead symbol.  */
1968
int yychar;
1969
1970
/* The semantic value of the lookahead symbol.  */
1971
YYSTYPE yylval;
1972
/* Number of syntax errors so far.  */
1973
int yynerrs;
1974
1975
1976
/*----------.
1977
| yyparse.  |
1978
`----------*/
1979
1980
int
1981
yyparse (void)
1982
0
{
1983
0
    yy_state_fast_t yystate;
1984
    /* Number of tokens to shift before error messages enabled.  */
1985
0
    int yyerrstatus;
1986
1987
    /* The stacks and their tools:
1988
       'yyss': related to states.
1989
       'yyvs': related to semantic values.
1990
1991
       Refer to the stacks through separate pointers, to allow yyoverflow
1992
       to reallocate them elsewhere.  */
1993
1994
    /* The state stack.  */
1995
0
    yy_state_t yyssa[YYINITDEPTH];
1996
0
    yy_state_t *yyss;
1997
0
    yy_state_t *yyssp;
1998
1999
    /* The semantic value stack.  */
2000
0
    YYSTYPE yyvsa[YYINITDEPTH];
2001
0
    YYSTYPE *yyvs;
2002
0
    YYSTYPE *yyvsp;
2003
2004
0
    YYPTRDIFF_T yystacksize;
2005
2006
0
  int yyn;
2007
0
  int yyresult;
2008
  /* Lookahead token as an internal (translated) token number.  */
2009
0
  int yytoken = 0;
2010
  /* The variables used to return semantic value and location from the
2011
     action routines.  */
2012
0
  YYSTYPE yyval;
2013
2014
0
#if YYERROR_VERBOSE
2015
  /* Buffer for error messages, and its allocated size.  */
2016
0
  char yymsgbuf[128];
2017
0
  char *yymsg = yymsgbuf;
2018
0
  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
2019
0
#endif
2020
2021
0
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
2022
2023
  /* The number of symbols on the RHS of the reduced rule.
2024
     Keep to zero when no symbol should be popped.  */
2025
0
  int yylen = 0;
2026
2027
0
  yyssp = yyss = yyssa;
2028
0
  yyvsp = yyvs = yyvsa;
2029
0
  yystacksize = YYINITDEPTH;
2030
2031
0
  YYDPRINTF ((stderr, "Starting parse\n"));
2032
2033
0
  yystate = 0;
2034
0
  yyerrstatus = 0;
2035
0
  yynerrs = 0;
2036
0
  yychar = YYEMPTY; /* Cause a token to be read.  */
2037
0
  goto yysetstate;
2038
2039
2040
/*------------------------------------------------------------.
2041
| yynewstate -- push a new state, which is found in yystate.  |
2042
`------------------------------------------------------------*/
2043
0
yynewstate:
2044
  /* In all cases, when you get here, the value and location stacks
2045
     have just been pushed.  So pushing a state here evens the stacks.  */
2046
0
  yyssp++;
2047
2048
2049
/*--------------------------------------------------------------------.
2050
| yysetstate -- set current state (the top of the stack) to yystate.  |
2051
`--------------------------------------------------------------------*/
2052
0
yysetstate:
2053
0
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2054
0
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
2055
0
  YY_IGNORE_USELESS_CAST_BEGIN
2056
0
  *yyssp = YY_CAST (yy_state_t, yystate);
2057
0
  YY_IGNORE_USELESS_CAST_END
2058
2059
0
  if (yyss + yystacksize - 1 <= yyssp)
2060
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
2061
    goto yyexhaustedlab;
2062
#else
2063
0
    {
2064
      /* Get the current used size of the three stacks, in elements.  */
2065
0
      YYPTRDIFF_T yysize = yyssp - yyss + 1;
2066
2067
# if defined yyoverflow
2068
      {
2069
        /* Give user a chance to reallocate the stack.  Use copies of
2070
           these so that the &'s don't force the real ones into
2071
           memory.  */
2072
        yy_state_t *yyss1 = yyss;
2073
        YYSTYPE *yyvs1 = yyvs;
2074
2075
        /* Each stack pointer address is followed by the size of the
2076
           data in use in that stack, in bytes.  This used to be a
2077
           conditional around just the two extra args, but that might
2078
           be undefined if yyoverflow is a macro.  */
2079
        yyoverflow (YY_("memory exhausted"),
2080
                    &yyss1, yysize * YYSIZEOF (*yyssp),
2081
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
2082
                    &yystacksize);
2083
        yyss = yyss1;
2084
        yyvs = yyvs1;
2085
      }
2086
# else /* defined YYSTACK_RELOCATE */
2087
      /* Extend the stack our own way.  */
2088
0
      if (YYMAXDEPTH <= yystacksize)
2089
0
        goto yyexhaustedlab;
2090
0
      yystacksize *= 2;
2091
0
      if (YYMAXDEPTH < yystacksize)
2092
0
        yystacksize = YYMAXDEPTH;
2093
2094
0
      {
2095
0
        yy_state_t *yyss1 = yyss;
2096
0
        union yyalloc *yyptr =
2097
0
          YY_CAST (union yyalloc *,
2098
0
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
2099
0
        if (! yyptr)
2100
0
          goto yyexhaustedlab;
2101
0
        YYSTACK_RELOCATE (yyss_alloc, yyss);
2102
0
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2103
0
# undef YYSTACK_RELOCATE
2104
0
        if (yyss1 != yyssa)
2105
0
          YYSTACK_FREE (yyss1);
2106
0
      }
2107
0
# endif
2108
2109
0
      yyssp = yyss + yysize - 1;
2110
0
      yyvsp = yyvs + yysize - 1;
2111
2112
0
      YY_IGNORE_USELESS_CAST_BEGIN
2113
0
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2114
0
                  YY_CAST (long, yystacksize)));
2115
0
      YY_IGNORE_USELESS_CAST_END
2116
2117
0
      if (yyss + yystacksize - 1 <= yyssp)
2118
0
        YYABORT;
2119
0
    }
2120
0
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
2121
2122
0
  if (yystate == YYFINAL)
2123
0
    YYACCEPT;
2124
2125
0
  goto yybackup;
2126
2127
2128
/*-----------.
2129
| yybackup.  |
2130
`-----------*/
2131
0
yybackup:
2132
  /* Do appropriate processing given the current state.  Read a
2133
     lookahead token if we need one and don't already have one.  */
2134
2135
  /* First try to decide what to do without reference to lookahead token.  */
2136
0
  yyn = yypact[yystate];
2137
0
  if (yypact_value_is_default (yyn))
2138
0
    goto yydefault;
2139
2140
  /* Not known => get a lookahead token if don't already have one.  */
2141
2142
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
2143
0
  if (yychar == YYEMPTY)
2144
0
    {
2145
0
      YYDPRINTF ((stderr, "Reading a token: "));
2146
0
      yychar = yylex ();
2147
0
    }
2148
2149
0
  if (yychar <= YYEOF)
2150
0
    {
2151
0
      yychar = yytoken = YYEOF;
2152
0
      YYDPRINTF ((stderr, "Now at end of input.\n"));
2153
0
    }
2154
0
  else
2155
0
    {
2156
0
      yytoken = YYTRANSLATE (yychar);
2157
0
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2158
0
    }
2159
2160
  /* If the proper action on seeing token YYTOKEN is to reduce or to
2161
     detect an error, take that action.  */
2162
0
  yyn += yytoken;
2163
0
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2164
0
    goto yydefault;
2165
0
  yyn = yytable[yyn];
2166
0
  if (yyn <= 0)
2167
0
    {
2168
0
      if (yytable_value_is_error (yyn))
2169
0
        goto yyerrlab;
2170
0
      yyn = -yyn;
2171
0
      goto yyreduce;
2172
0
    }
2173
2174
  /* Count tokens shifted since error; after three, turn off error
2175
     status.  */
2176
0
  if (yyerrstatus)
2177
0
    yyerrstatus--;
2178
2179
  /* Shift the lookahead token.  */
2180
0
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2181
0
  yystate = yyn;
2182
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2183
0
  *++yyvsp = yylval;
2184
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
2185
2186
  /* Discard the shifted token.  */
2187
0
  yychar = YYEMPTY;
2188
0
  goto yynewstate;
2189
2190
2191
/*-----------------------------------------------------------.
2192
| yydefault -- do the default action for the current state.  |
2193
`-----------------------------------------------------------*/
2194
0
yydefault:
2195
0
  yyn = yydefact[yystate];
2196
0
  if (yyn == 0)
2197
0
    goto yyerrlab;
2198
0
  goto yyreduce;
2199
2200
2201
/*-----------------------------.
2202
| yyreduce -- do a reduction.  |
2203
`-----------------------------*/
2204
0
yyreduce:
2205
  /* yyn is the number of a rule to reduce with.  */
2206
0
  yylen = yyr2[yyn];
2207
2208
  /* If YYLEN is nonzero, implement the default value of the action:
2209
     '$$ = $1'.
2210
2211
     Otherwise, the following line sets YYVAL to garbage.
2212
     This behavior is undocumented and Bison
2213
     users should not rely upon it.  Assigning to YYVAL
2214
     unconditionally makes the parser a bit smaller, and it avoids a
2215
     GCC warning that YYVAL may be used uninitialized.  */
2216
0
  yyval = yyvsp[1-yylen];
2217
2218
2219
0
  YY_REDUCE_PRINT (yyn);
2220
0
  switch (yyn)
2221
0
    {
2222
0
  case 5:
2223
0
#line 385 "../../ntpd/ntp_parser.y"
2224
0
                {
2225
      /* I will need to incorporate much more fine grained
2226
       * error messages. The following should suffice for
2227
       * the time being.
2228
       */
2229
0
      struct FILE_INFO * ip_ctx = lex_current();
2230
0
      msyslog(LOG_ERR,
2231
0
        "syntax error in %s line %d, column %d",
2232
0
        ip_ctx->fname,
2233
0
        ip_ctx->errpos.nline,
2234
0
        ip_ctx->errpos.ncol);
2235
0
    }
2236
0
#line 2237 "ntp_parser.c"
2237
0
    break;
2238
2239
0
  case 20:
2240
0
#line 421 "../../ntpd/ntp_parser.y"
2241
0
                {
2242
0
      peer_node *my_node;
2243
2244
0
      my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2245
0
      APPEND_G_FIFO(cfgt.peers, my_node);
2246
0
    }
2247
0
#line 2248 "ntp_parser.c"
2248
0
    break;
2249
2250
0
  case 27:
2251
0
#line 440 "../../ntpd/ntp_parser.y"
2252
0
                        { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2253
0
#line 2254 "ntp_parser.c"
2254
0
    break;
2255
2256
0
  case 28:
2257
0
#line 445 "../../ntpd/ntp_parser.y"
2258
0
                        { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2259
0
#line 2260 "ntp_parser.c"
2260
0
    break;
2261
2262
0
  case 29:
2263
0
#line 450 "../../ntpd/ntp_parser.y"
2264
0
                        { (yyval.Integer) = AF_INET; }
2265
0
#line 2266 "ntp_parser.c"
2266
0
    break;
2267
2268
0
  case 30:
2269
0
#line 452 "../../ntpd/ntp_parser.y"
2270
0
                        { (yyval.Integer) = AF_INET6; }
2271
0
#line 2272 "ntp_parser.c"
2272
0
    break;
2273
2274
0
  case 31:
2275
0
#line 457 "../../ntpd/ntp_parser.y"
2276
0
                        { (yyval.Attr_val_fifo) = NULL; }
2277
0
#line 2278 "ntp_parser.c"
2278
0
    break;
2279
2280
0
  case 32:
2281
0
#line 459 "../../ntpd/ntp_parser.y"
2282
0
                {
2283
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2284
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2285
0
    }
2286
0
#line 2287 "ntp_parser.c"
2287
0
    break;
2288
2289
0
  case 36:
2290
0
#line 473 "../../ntpd/ntp_parser.y"
2291
0
                        { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2292
0
#line 2293 "ntp_parser.c"
2293
0
    break;
2294
2295
0
  case 45:
2296
0
#line 489 "../../ntpd/ntp_parser.y"
2297
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2298
0
#line 2299 "ntp_parser.c"
2299
0
    break;
2300
2301
0
  case 46:
2302
0
#line 491 "../../ntpd/ntp_parser.y"
2303
0
                        { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2304
0
#line 2305 "ntp_parser.c"
2305
0
    break;
2306
2307
0
  case 53:
2308
0
#line 505 "../../ntpd/ntp_parser.y"
2309
0
                        { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2310
0
#line 2311 "ntp_parser.c"
2311
0
    break;
2312
2313
0
  case 55:
2314
0
#line 519 "../../ntpd/ntp_parser.y"
2315
0
                {
2316
0
      unpeer_node *my_node;
2317
2318
0
      my_node = create_unpeer_node((yyvsp[0].Address_node));
2319
0
      if (my_node)
2320
0
        APPEND_G_FIFO(cfgt.unpeers, my_node);
2321
0
    }
2322
0
#line 2323 "ntp_parser.c"
2323
0
    break;
2324
2325
0
  case 58:
2326
0
#line 540 "../../ntpd/ntp_parser.y"
2327
0
                        { cfgt.broadcastclient = 1; }
2328
0
#line 2329 "ntp_parser.c"
2329
0
    break;
2330
2331
0
  case 59:
2332
0
#line 542 "../../ntpd/ntp_parser.y"
2333
0
                        { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2334
0
#line 2335 "ntp_parser.c"
2335
0
    break;
2336
2337
0
  case 60:
2338
0
#line 544 "../../ntpd/ntp_parser.y"
2339
0
                        { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2340
0
#line 2341 "ntp_parser.c"
2341
0
    break;
2342
2343
0
  case 61:
2344
0
#line 546 "../../ntpd/ntp_parser.y"
2345
0
                        { cfgt.mdnstries = (yyvsp[0].Integer); }
2346
0
#line 2347 "ntp_parser.c"
2347
0
    break;
2348
2349
0
  case 62:
2350
0
#line 557 "../../ntpd/ntp_parser.y"
2351
0
                {
2352
0
      attr_val *atrv;
2353
2354
0
      atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2355
0
      APPEND_G_FIFO(cfgt.vars, atrv);
2356
0
    }
2357
0
#line 2358 "ntp_parser.c"
2358
0
    break;
2359
2360
0
  case 63:
2361
0
#line 564 "../../ntpd/ntp_parser.y"
2362
0
                        { cfgt.auth.control_key = (yyvsp[0].Integer); }
2363
0
#line 2364 "ntp_parser.c"
2364
0
    break;
2365
2366
0
  case 64:
2367
0
#line 566 "../../ntpd/ntp_parser.y"
2368
0
                {
2369
0
      cfgt.auth.cryptosw++;
2370
0
      CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2371
0
    }
2372
0
#line 2373 "ntp_parser.c"
2373
0
    break;
2374
2375
0
  case 65:
2376
0
#line 571 "../../ntpd/ntp_parser.y"
2377
0
                        { cfgt.auth.keys = (yyvsp[0].String); }
2378
0
#line 2379 "ntp_parser.c"
2379
0
    break;
2380
2381
0
  case 66:
2382
0
#line 573 "../../ntpd/ntp_parser.y"
2383
0
                        { cfgt.auth.keysdir = (yyvsp[0].String); }
2384
0
#line 2385 "ntp_parser.c"
2385
0
    break;
2386
2387
0
  case 67:
2388
0
#line 575 "../../ntpd/ntp_parser.y"
2389
0
                        { cfgt.auth.request_key = (yyvsp[0].Integer); }
2390
0
#line 2391 "ntp_parser.c"
2391
0
    break;
2392
2393
0
  case 68:
2394
0
#line 577 "../../ntpd/ntp_parser.y"
2395
0
                        { cfgt.auth.revoke = (yyvsp[0].Integer); }
2396
0
#line 2397 "ntp_parser.c"
2397
0
    break;
2398
2399
0
  case 69:
2400
0
#line 579 "../../ntpd/ntp_parser.y"
2401
0
                {
2402
      /* [Bug 948] leaves it open if appending or
2403
       * replacing the trusted key list is the right
2404
       * way. In any case, either alternative should
2405
       * be coded correctly!
2406
       */
2407
0
      DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
2408
0
      CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
2409
0
    }
2410
0
#line 2411 "ntp_parser.c"
2411
0
    break;
2412
2413
0
  case 70:
2414
0
#line 589 "../../ntpd/ntp_parser.y"
2415
0
                        { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2416
0
#line 2417 "ntp_parser.c"
2417
0
    break;
2418
2419
0
  case 71:
2420
0
#line 594 "../../ntpd/ntp_parser.y"
2421
0
                        { (yyval.Attr_val_fifo) = NULL; }
2422
0
#line 2423 "ntp_parser.c"
2423
0
    break;
2424
2425
0
  case 72:
2426
0
#line 596 "../../ntpd/ntp_parser.y"
2427
0
                {
2428
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2429
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2430
0
    }
2431
0
#line 2432 "ntp_parser.c"
2432
0
    break;
2433
2434
0
  case 73:
2435
0
#line 604 "../../ntpd/ntp_parser.y"
2436
0
                        { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2437
0
#line 2438 "ntp_parser.c"
2438
0
    break;
2439
2440
0
  case 74:
2441
0
#line 606 "../../ntpd/ntp_parser.y"
2442
0
                {
2443
0
      (yyval.Attr_val) = NULL;
2444
0
      cfgt.auth.revoke = (yyvsp[0].Integer);
2445
0
      msyslog(LOG_WARNING,
2446
0
        "'crypto revoke %d' is deprecated, "
2447
0
        "please use 'revoke %d' instead.",
2448
0
        cfgt.auth.revoke, cfgt.auth.revoke);
2449
0
    }
2450
0
#line 2451 "ntp_parser.c"
2451
0
    break;
2452
2453
0
  case 80:
2454
0
#line 631 "../../ntpd/ntp_parser.y"
2455
0
                        { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2456
0
#line 2457 "ntp_parser.c"
2457
0
    break;
2458
2459
0
  case 81:
2460
0
#line 636 "../../ntpd/ntp_parser.y"
2461
0
                {
2462
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2463
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2464
0
    }
2465
0
#line 2466 "ntp_parser.c"
2466
0
    break;
2467
2468
0
  case 82:
2469
0
#line 641 "../../ntpd/ntp_parser.y"
2470
0
                {
2471
0
      (yyval.Attr_val_fifo) = NULL;
2472
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2473
0
    }
2474
0
#line 2475 "ntp_parser.c"
2475
0
    break;
2476
2477
0
  case 83:
2478
0
#line 649 "../../ntpd/ntp_parser.y"
2479
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2480
0
#line 2481 "ntp_parser.c"
2481
0
    break;
2482
2483
0
  case 84:
2484
0
#line 651 "../../ntpd/ntp_parser.y"
2485
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2486
0
#line 2487 "ntp_parser.c"
2487
0
    break;
2488
2489
0
  case 85:
2490
0
#line 653 "../../ntpd/ntp_parser.y"
2491
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2492
0
#line 2493 "ntp_parser.c"
2493
0
    break;
2494
2495
0
  case 86:
2496
0
#line 655 "../../ntpd/ntp_parser.y"
2497
0
                        { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
2498
0
#line 2499 "ntp_parser.c"
2499
0
    break;
2500
2501
0
  case 98:
2502
0
#line 682 "../../ntpd/ntp_parser.y"
2503
0
                        { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2504
0
#line 2505 "ntp_parser.c"
2505
0
    break;
2506
2507
0
  case 99:
2508
0
#line 684 "../../ntpd/ntp_parser.y"
2509
0
                {
2510
0
      if (lex_from_file()) {
2511
0
        cfgt.stats_dir = (yyvsp[0].String);
2512
0
      } else {
2513
0
        YYFREE((yyvsp[0].String));
2514
0
        yyerror("statsdir remote configuration ignored");
2515
0
      }
2516
0
    }
2517
0
#line 2518 "ntp_parser.c"
2518
0
    break;
2519
2520
0
  case 100:
2521
0
#line 693 "../../ntpd/ntp_parser.y"
2522
0
                {
2523
0
      filegen_node *fgn;
2524
2525
0
      fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2526
0
      APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2527
0
    }
2528
0
#line 2529 "ntp_parser.c"
2529
0
    break;
2530
2531
0
  case 101:
2532
0
#line 703 "../../ntpd/ntp_parser.y"
2533
0
                {
2534
0
      (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2535
0
      APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2536
0
    }
2537
0
#line 2538 "ntp_parser.c"
2538
0
    break;
2539
2540
0
  case 102:
2541
0
#line 708 "../../ntpd/ntp_parser.y"
2542
0
                {
2543
0
      (yyval.Int_fifo) = NULL;
2544
0
      APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2545
0
    }
2546
0
#line 2547 "ntp_parser.c"
2547
0
    break;
2548
2549
0
  case 111:
2550
0
#line 727 "../../ntpd/ntp_parser.y"
2551
0
                        { (yyval.Attr_val_fifo) = NULL; }
2552
0
#line 2553 "ntp_parser.c"
2553
0
    break;
2554
2555
0
  case 112:
2556
0
#line 729 "../../ntpd/ntp_parser.y"
2557
0
                {
2558
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2559
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2560
0
    }
2561
0
#line 2562 "ntp_parser.c"
2562
0
    break;
2563
2564
0
  case 113:
2565
0
#line 737 "../../ntpd/ntp_parser.y"
2566
0
                {
2567
0
      if (lex_from_file()) {
2568
0
        (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2569
0
      } else {
2570
0
        (yyval.Attr_val) = NULL;
2571
0
        YYFREE((yyvsp[0].String));
2572
0
        yyerror("filegen file remote config ignored");
2573
0
      }
2574
0
    }
2575
0
#line 2576 "ntp_parser.c"
2576
0
    break;
2577
2578
0
  case 114:
2579
0
#line 747 "../../ntpd/ntp_parser.y"
2580
0
                {
2581
0
      if (lex_from_file()) {
2582
0
        (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2583
0
      } else {
2584
0
        (yyval.Attr_val) = NULL;
2585
0
        yyerror("filegen type remote config ignored");
2586
0
      }
2587
0
    }
2588
0
#line 2589 "ntp_parser.c"
2589
0
    break;
2590
2591
0
  case 115:
2592
0
#line 756 "../../ntpd/ntp_parser.y"
2593
0
                {
2594
0
      const char *err;
2595
2596
0
      if (lex_from_file()) {
2597
0
        (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2598
0
      } else {
2599
0
        (yyval.Attr_val) = NULL;
2600
0
        if (T_Link == (yyvsp[0].Integer))
2601
0
          err = "filegen link remote config ignored";
2602
0
        else
2603
0
          err = "filegen nolink remote config ignored";
2604
0
        yyerror(err);
2605
0
      }
2606
0
    }
2607
0
#line 2608 "ntp_parser.c"
2608
0
    break;
2609
2610
0
  case 116:
2611
0
#line 771 "../../ntpd/ntp_parser.y"
2612
0
                        { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2613
0
#line 2614 "ntp_parser.c"
2614
0
    break;
2615
2616
0
  case 128:
2617
0
#line 801 "../../ntpd/ntp_parser.y"
2618
0
                {
2619
0
      CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2620
0
    }
2621
0
#line 2622 "ntp_parser.c"
2622
0
    break;
2623
2624
0
  case 129:
2625
0
#line 805 "../../ntpd/ntp_parser.y"
2626
0
                {
2627
0
      CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2628
0
    }
2629
0
#line 2630 "ntp_parser.c"
2630
0
    break;
2631
2632
0
  case 130:
2633
0
#line 809 "../../ntpd/ntp_parser.y"
2634
0
                {
2635
0
      restrict_node *rn;
2636
2637
0
      rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2638
0
              lex_current()->curpos.nline);
2639
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2640
0
    }
2641
0
#line 2642 "ntp_parser.c"
2642
0
    break;
2643
2644
0
  case 131:
2645
0
#line 817 "../../ntpd/ntp_parser.y"
2646
0
                {
2647
0
      restrict_node *rn;
2648
2649
0
      rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2650
0
              lex_current()->curpos.nline);
2651
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2652
0
    }
2653
0
#line 2654 "ntp_parser.c"
2654
0
    break;
2655
2656
0
  case 132:
2657
0
#line 825 "../../ntpd/ntp_parser.y"
2658
0
                {
2659
0
      restrict_node *rn;
2660
2661
0
      rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2662
0
              lex_current()->curpos.nline);
2663
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2664
0
    }
2665
0
#line 2666 "ntp_parser.c"
2666
0
    break;
2667
2668
0
  case 133:
2669
0
#line 833 "../../ntpd/ntp_parser.y"
2670
0
                {
2671
0
      restrict_node *rn;
2672
2673
0
      rn = create_restrict_node(
2674
0
        create_address_node(
2675
0
          estrdup("0.0.0.0"),
2676
0
          AF_INET),
2677
0
        create_address_node(
2678
0
          estrdup("0.0.0.0"),
2679
0
          AF_INET),
2680
0
        (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2681
0
        lex_current()->curpos.nline);
2682
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2683
0
    }
2684
0
#line 2685 "ntp_parser.c"
2685
0
    break;
2686
2687
0
  case 134:
2688
0
#line 848 "../../ntpd/ntp_parser.y"
2689
0
                {
2690
0
      restrict_node *rn;
2691
2692
0
      rn = create_restrict_node(
2693
0
        create_address_node(
2694
0
          estrdup("::"),
2695
0
          AF_INET6),
2696
0
        create_address_node(
2697
0
          estrdup("::"),
2698
0
          AF_INET6),
2699
0
        (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2700
0
        lex_current()->curpos.nline);
2701
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2702
0
    }
2703
0
#line 2704 "ntp_parser.c"
2704
0
    break;
2705
2706
0
  case 135:
2707
0
#line 863 "../../ntpd/ntp_parser.y"
2708
0
                {
2709
0
      restrict_node * rn;
2710
2711
0
      APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer)));
2712
0
      rn = create_restrict_node(
2713
0
        NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2714
0
      APPEND_G_FIFO(cfgt.restrict_opts, rn);
2715
0
    }
2716
0
#line 2717 "ntp_parser.c"
2717
0
    break;
2718
2719
0
  case 136:
2720
0
#line 875 "../../ntpd/ntp_parser.y"
2721
0
                        { (yyval.Integer) = -1; }
2722
0
#line 2723 "ntp_parser.c"
2723
0
    break;
2724
2725
0
  case 137:
2726
0
#line 877 "../../ntpd/ntp_parser.y"
2727
0
                {
2728
0
      if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
2729
0
        struct FILE_INFO * ip_ctx;
2730
2731
0
        ip_ctx = lex_current();
2732
0
        msyslog(LOG_ERR,
2733
0
          "Unreasonable ippeerlimit value (%d) in %s line %d, column %d.  Using 0.",
2734
0
          (yyvsp[0].Integer),
2735
0
          ip_ctx->fname,
2736
0
          ip_ctx->errpos.nline,
2737
0
          ip_ctx->errpos.ncol);
2738
0
        (yyvsp[0].Integer) = 0;
2739
0
      }
2740
0
      (yyval.Integer) = (yyvsp[0].Integer);
2741
0
    }
2742
0
#line 2743 "ntp_parser.c"
2743
0
    break;
2744
2745
0
  case 138:
2746
0
#line 896 "../../ntpd/ntp_parser.y"
2747
0
                        { (yyval.Int_fifo) = NULL; }
2748
0
#line 2749 "ntp_parser.c"
2749
0
    break;
2750
2751
0
  case 139:
2752
0
#line 898 "../../ntpd/ntp_parser.y"
2753
0
                {
2754
0
      (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2755
0
      APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2756
0
    }
2757
0
#line 2758 "ntp_parser.c"
2758
0
    break;
2759
2760
0
  case 157:
2761
0
#line 926 "../../ntpd/ntp_parser.y"
2762
0
                {
2763
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2764
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2765
0
    }
2766
0
#line 2767 "ntp_parser.c"
2767
0
    break;
2768
2769
0
  case 158:
2770
0
#line 931 "../../ntpd/ntp_parser.y"
2771
0
                {
2772
0
      (yyval.Attr_val_fifo) = NULL;
2773
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2774
0
    }
2775
0
#line 2776 "ntp_parser.c"
2776
0
    break;
2777
2778
0
  case 159:
2779
0
#line 939 "../../ntpd/ntp_parser.y"
2780
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2781
0
#line 2782 "ntp_parser.c"
2782
0
    break;
2783
2784
0
  case 163:
2785
0
#line 950 "../../ntpd/ntp_parser.y"
2786
0
                {
2787
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2788
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2789
0
    }
2790
0
#line 2791 "ntp_parser.c"
2791
0
    break;
2792
2793
0
  case 164:
2794
0
#line 955 "../../ntpd/ntp_parser.y"
2795
0
                {
2796
0
      (yyval.Attr_val_fifo) = NULL;
2797
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2798
0
    }
2799
0
#line 2800 "ntp_parser.c"
2800
0
    break;
2801
2802
0
  case 165:
2803
0
#line 963 "../../ntpd/ntp_parser.y"
2804
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2805
0
#line 2806 "ntp_parser.c"
2806
0
    break;
2807
2808
0
  case 174:
2809
0
#line 983 "../../ntpd/ntp_parser.y"
2810
0
                {
2811
0
      addr_opts_node *aon;
2812
2813
0
      aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2814
0
      APPEND_G_FIFO(cfgt.fudge, aon);
2815
0
    }
2816
0
#line 2817 "ntp_parser.c"
2817
0
    break;
2818
2819
0
  case 175:
2820
0
#line 993 "../../ntpd/ntp_parser.y"
2821
0
                {
2822
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2823
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2824
0
    }
2825
0
#line 2826 "ntp_parser.c"
2826
0
    break;
2827
2828
0
  case 176:
2829
0
#line 998 "../../ntpd/ntp_parser.y"
2830
0
                {
2831
0
      (yyval.Attr_val_fifo) = NULL;
2832
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2833
0
    }
2834
0
#line 2835 "ntp_parser.c"
2835
0
    break;
2836
2837
0
  case 177:
2838
0
#line 1006 "../../ntpd/ntp_parser.y"
2839
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2840
0
#line 2841 "ntp_parser.c"
2841
0
    break;
2842
2843
0
  case 178:
2844
0
#line 1008 "../../ntpd/ntp_parser.y"
2845
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2846
0
#line 2847 "ntp_parser.c"
2847
0
    break;
2848
2849
0
  case 179:
2850
0
#line 1010 "../../ntpd/ntp_parser.y"
2851
0
                {
2852
0
      if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2853
0
        (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2854
0
      } else {
2855
0
        (yyval.Attr_val) = NULL;
2856
0
        yyerror("fudge factor: stratum value not in [0..16], ignored");
2857
0
      }
2858
0
    }
2859
0
#line 2860 "ntp_parser.c"
2860
0
    break;
2861
2862
0
  case 180:
2863
0
#line 1019 "../../ntpd/ntp_parser.y"
2864
0
                        { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2865
0
#line 2866 "ntp_parser.c"
2866
0
    break;
2867
2868
0
  case 181:
2869
0
#line 1021 "../../ntpd/ntp_parser.y"
2870
0
                        { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2871
0
#line 2872 "ntp_parser.c"
2872
0
    break;
2873
2874
0
  case 188:
2875
0
#line 1042 "../../ntpd/ntp_parser.y"
2876
0
                        { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2877
0
#line 2878 "ntp_parser.c"
2878
0
    break;
2879
2880
0
  case 189:
2881
0
#line 1047 "../../ntpd/ntp_parser.y"
2882
0
                {
2883
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2884
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2885
0
    }
2886
0
#line 2887 "ntp_parser.c"
2887
0
    break;
2888
2889
0
  case 190:
2890
0
#line 1052 "../../ntpd/ntp_parser.y"
2891
0
                {
2892
0
      (yyval.Attr_val_fifo) = NULL;
2893
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2894
0
    }
2895
0
#line 2896 "ntp_parser.c"
2896
0
    break;
2897
2898
0
  case 191:
2899
0
#line 1060 "../../ntpd/ntp_parser.y"
2900
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2901
0
#line 2902 "ntp_parser.c"
2902
0
    break;
2903
2904
0
  case 195:
2905
0
#line 1076 "../../ntpd/ntp_parser.y"
2906
0
                        { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2907
0
#line 2908 "ntp_parser.c"
2908
0
    break;
2909
2910
0
  case 196:
2911
0
#line 1078 "../../ntpd/ntp_parser.y"
2912
0
                        { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2913
0
#line 2914 "ntp_parser.c"
2914
0
    break;
2915
2916
0
  case 197:
2917
0
#line 1083 "../../ntpd/ntp_parser.y"
2918
0
                {
2919
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2920
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2921
0
    }
2922
0
#line 2923 "ntp_parser.c"
2923
0
    break;
2924
2925
0
  case 198:
2926
0
#line 1088 "../../ntpd/ntp_parser.y"
2927
0
                {
2928
0
      (yyval.Attr_val_fifo) = NULL;
2929
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2930
0
    }
2931
0
#line 2932 "ntp_parser.c"
2932
0
    break;
2933
2934
0
  case 199:
2935
0
#line 1096 "../../ntpd/ntp_parser.y"
2936
0
                        { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2937
0
#line 2938 "ntp_parser.c"
2938
0
    break;
2939
2940
0
  case 200:
2941
0
#line 1098 "../../ntpd/ntp_parser.y"
2942
0
                {
2943
0
      if (lex_from_file()) {
2944
0
        (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2945
0
      } else {
2946
0
        char err_str[128];
2947
2948
0
        (yyval.Attr_val) = NULL;
2949
0
        snprintf(err_str, sizeof(err_str),
2950
0
           "enable/disable %s remote configuration ignored",
2951
0
           keyword((yyvsp[0].Integer)));
2952
0
        yyerror(err_str);
2953
0
      }
2954
0
    }
2955
0
#line 2956 "ntp_parser.c"
2956
0
    break;
2957
2958
0
  case 213:
2959
0
#line 1137 "../../ntpd/ntp_parser.y"
2960
0
                        { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2961
0
#line 2962 "ntp_parser.c"
2962
0
    break;
2963
2964
0
  case 214:
2965
0
#line 1142 "../../ntpd/ntp_parser.y"
2966
0
                {
2967
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2968
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2969
0
    }
2970
0
#line 2971 "ntp_parser.c"
2971
0
    break;
2972
2973
0
  case 215:
2974
0
#line 1147 "../../ntpd/ntp_parser.y"
2975
0
                {
2976
0
      (yyval.Attr_val_fifo) = NULL;
2977
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2978
0
    }
2979
0
#line 2980 "ntp_parser.c"
2980
0
    break;
2981
2982
0
  case 216:
2983
0
#line 1155 "../../ntpd/ntp_parser.y"
2984
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2985
0
#line 2986 "ntp_parser.c"
2986
0
    break;
2987
2988
0
  case 229:
2989
0
#line 1180 "../../ntpd/ntp_parser.y"
2990
0
                {
2991
0
      attr_val *av;
2992
2993
0
      av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2994
0
      APPEND_G_FIFO(cfgt.vars, av);
2995
0
    }
2996
0
#line 2997 "ntp_parser.c"
2997
0
    break;
2998
2999
0
  case 230:
3000
0
#line 1187 "../../ntpd/ntp_parser.y"
3001
0
                {
3002
0
      attr_val *av;
3003
3004
0
      av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
3005
0
      APPEND_G_FIFO(cfgt.vars, av);
3006
0
    }
3007
0
#line 3008 "ntp_parser.c"
3008
0
    break;
3009
3010
0
  case 231:
3011
0
#line 1194 "../../ntpd/ntp_parser.y"
3012
0
                {
3013
0
      attr_val *av;
3014
3015
0
      av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
3016
0
      APPEND_G_FIFO(cfgt.vars, av);
3017
0
    }
3018
0
#line 3019 "ntp_parser.c"
3019
0
    break;
3020
3021
0
  case 232:
3022
0
#line 1201 "../../ntpd/ntp_parser.y"
3023
0
                {
3024
0
      char error_text[64];
3025
0
      attr_val *av;
3026
3027
0
      if (lex_from_file()) {
3028
0
        av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
3029
0
        APPEND_G_FIFO(cfgt.vars, av);
3030
0
      } else {
3031
0
        YYFREE((yyvsp[0].String));
3032
0
        snprintf(error_text, sizeof(error_text),
3033
0
           "%s remote config ignored",
3034
0
           keyword((yyvsp[-1].Integer)));
3035
0
        yyerror(error_text);
3036
0
      }
3037
0
    }
3038
0
#line 3039 "ntp_parser.c"
3039
0
    break;
3040
3041
0
  case 233:
3042
0
#line 1217 "../../ntpd/ntp_parser.y"
3043
0
                {
3044
0
      if (!lex_from_file()) {
3045
0
        YYFREE((yyvsp[-1].String)); /* avoid leak */
3046
0
        yyerror("remote includefile ignored");
3047
0
        break;
3048
0
      }
3049
0
      if (lex_level() > MAXINCLUDELEVEL) {
3050
0
        fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
3051
0
        msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
3052
0
      } else {
3053
0
        const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
3054
0
        if (!lex_push_file(path, "r")) {
3055
0
          fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
3056
0
          msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
3057
0
        }
3058
0
      }
3059
0
      YYFREE((yyvsp[-1].String)); /* avoid leak */
3060
0
    }
3061
0
#line 3062 "ntp_parser.c"
3062
0
    break;
3063
3064
0
  case 234:
3065
0
#line 1236 "../../ntpd/ntp_parser.y"
3066
0
                        { lex_flush_stack(); }
3067
0
#line 3068 "ntp_parser.c"
3068
0
    break;
3069
3070
0
  case 235:
3071
0
#line 1238 "../../ntpd/ntp_parser.y"
3072
0
                        { /* see drift_parm below for actions */ }
3073
0
#line 3074 "ntp_parser.c"
3074
0
    break;
3075
3076
0
  case 236:
3077
0
#line 1240 "../../ntpd/ntp_parser.y"
3078
0
                        { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
3079
0
#line 3080 "ntp_parser.c"
3080
0
    break;
3081
3082
0
  case 237:
3083
0
#line 1242 "../../ntpd/ntp_parser.y"
3084
0
                        { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
3085
0
#line 3086 "ntp_parser.c"
3086
0
    break;
3087
3088
0
  case 238:
3089
0
#line 1244 "../../ntpd/ntp_parser.y"
3090
0
                        { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
3091
0
#line 3092 "ntp_parser.c"
3092
0
    break;
3093
3094
0
  case 239:
3095
0
#line 1246 "../../ntpd/ntp_parser.y"
3096
0
                {
3097
0
      addr_opts_node *aon;
3098
3099
0
      aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
3100
0
      APPEND_G_FIFO(cfgt.trap, aon);
3101
0
    }
3102
0
#line 3103 "ntp_parser.c"
3103
0
    break;
3104
3105
0
  case 240:
3106
0
#line 1253 "../../ntpd/ntp_parser.y"
3107
0
                        { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
3108
0
#line 3109 "ntp_parser.c"
3109
0
    break;
3110
3111
0
  case 245:
3112
0
#line 1268 "../../ntpd/ntp_parser.y"
3113
0
                {
3114
0
#ifndef LEAP_SMEAR
3115
0
      yyerror("Built without LEAP_SMEAR support.");
3116
0
#endif
3117
0
    }
3118
0
#line 3119 "ntp_parser.c"
3119
0
    break;
3120
3121
0
  case 251:
3122
0
#line 1288 "../../ntpd/ntp_parser.y"
3123
0
                {
3124
0
      if (lex_from_file()) {
3125
0
        attr_val *av;
3126
0
        av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
3127
0
        APPEND_G_FIFO(cfgt.vars, av);
3128
0
      } else {
3129
0
        YYFREE((yyvsp[0].String));
3130
0
        yyerror("driftfile remote configuration ignored");
3131
0
      }
3132
0
    }
3133
0
#line 3134 "ntp_parser.c"
3134
0
    break;
3135
3136
0
  case 252:
3137
0
#line 1299 "../../ntpd/ntp_parser.y"
3138
0
                {
3139
0
      if (lex_from_file()) {
3140
0
        attr_val *av;
3141
0
        av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
3142
0
        APPEND_G_FIFO(cfgt.vars, av);
3143
0
        av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
3144
0
        APPEND_G_FIFO(cfgt.vars, av);
3145
0
      msyslog(LOG_WARNING,
3146
0
        "'driftfile FILENAME WanderValue' is deprecated, "
3147
0
        "please use separate 'driftfile FILENAME' and "
3148
0
        "'nonvolatile WanderValue' lines instead.");
3149
0
      } else {
3150
0
        YYFREE((yyvsp[-1].String));
3151
0
        yyerror("driftfile remote configuration ignored");
3152
0
      }
3153
0
    }
3154
0
#line 3155 "ntp_parser.c"
3155
0
    break;
3156
3157
0
  case 253:
3158
0
#line 1316 "../../ntpd/ntp_parser.y"
3159
0
                {
3160
0
      if (lex_from_file()) {
3161
0
        attr_val *av;
3162
0
        av = create_attr_sval(T_Driftfile, estrdup(""));
3163
0
        APPEND_G_FIFO(cfgt.vars, av);
3164
0
      } else {
3165
0
        yyerror("driftfile remote configuration ignored");
3166
0
      }
3167
0
    }
3168
0
#line 3169 "ntp_parser.c"
3169
0
    break;
3170
3171
0
  case 254:
3172
0
#line 1329 "../../ntpd/ntp_parser.y"
3173
0
                        { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3174
0
#line 3175 "ntp_parser.c"
3175
0
    break;
3176
3177
0
  case 256:
3178
0
#line 1335 "../../ntpd/ntp_parser.y"
3179
0
                        { (yyval.Integer) = 0; }
3180
0
#line 3181 "ntp_parser.c"
3181
0
    break;
3182
3183
0
  case 257:
3184
0
#line 1340 "../../ntpd/ntp_parser.y"
3185
0
                        { (yyval.Attr_val_fifo) = NULL; }
3186
0
#line 3187 "ntp_parser.c"
3187
0
    break;
3188
3189
0
  case 258:
3190
0
#line 1342 "../../ntpd/ntp_parser.y"
3191
0
                {
3192
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3193
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3194
0
    }
3195
0
#line 3196 "ntp_parser.c"
3196
0
    break;
3197
3198
0
  case 259:
3199
0
#line 1350 "../../ntpd/ntp_parser.y"
3200
0
                        { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3201
0
#line 3202 "ntp_parser.c"
3202
0
    break;
3203
3204
0
  case 260:
3205
0
#line 1352 "../../ntpd/ntp_parser.y"
3206
0
                {
3207
0
      (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3208
0
      destroy_address_node((yyvsp[0].Address_node));
3209
0
    }
3210
0
#line 3211 "ntp_parser.c"
3211
0
    break;
3212
3213
0
  case 261:
3214
0
#line 1360 "../../ntpd/ntp_parser.y"
3215
0
                {
3216
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3217
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3218
0
    }
3219
0
#line 3220 "ntp_parser.c"
3220
0
    break;
3221
3222
0
  case 262:
3223
0
#line 1365 "../../ntpd/ntp_parser.y"
3224
0
                {
3225
0
      (yyval.Attr_val_fifo) = NULL;
3226
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3227
0
    }
3228
0
#line 3229 "ntp_parser.c"
3229
0
    break;
3230
3231
0
  case 263:
3232
0
#line 1373 "../../ntpd/ntp_parser.y"
3233
0
                {
3234
0
      char  prefix;
3235
0
      char *  type;
3236
3237
0
      switch ((yyvsp[0].String)[0]) {
3238
3239
0
      case '+':
3240
0
      case '-':
3241
0
      case '=':
3242
0
        prefix = (yyvsp[0].String)[0];
3243
0
        type = (yyvsp[0].String) + 1;
3244
0
        break;
3245
3246
0
      default:
3247
0
        prefix = '=';
3248
0
        type = (yyvsp[0].String);
3249
0
      }
3250
3251
0
      (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3252
0
      YYFREE((yyvsp[0].String));
3253
0
    }
3254
0
#line 3255 "ntp_parser.c"
3255
0
    break;
3256
3257
0
  case 264:
3258
0
#line 1398 "../../ntpd/ntp_parser.y"
3259
0
                {
3260
0
      nic_rule_node *nrn;
3261
3262
0
      nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3263
0
      APPEND_G_FIFO(cfgt.nic_rules, nrn);
3264
0
    }
3265
0
#line 3266 "ntp_parser.c"
3266
0
    break;
3267
3268
0
  case 265:
3269
0
#line 1405 "../../ntpd/ntp_parser.y"
3270
0
                {
3271
0
      nic_rule_node *nrn;
3272
3273
0
      nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3274
0
      APPEND_G_FIFO(cfgt.nic_rules, nrn);
3275
0
    }
3276
0
#line 3277 "ntp_parser.c"
3277
0
    break;
3278
3279
0
  case 275:
3280
0
#line 1433 "../../ntpd/ntp_parser.y"
3281
0
                        { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3282
0
#line 3283 "ntp_parser.c"
3283
0
    break;
3284
3285
0
  case 276:
3286
0
#line 1438 "../../ntpd/ntp_parser.y"
3287
0
                {
3288
0
      (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3289
0
      APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3290
0
    }
3291
0
#line 3292 "ntp_parser.c"
3292
0
    break;
3293
3294
0
  case 277:
3295
0
#line 1443 "../../ntpd/ntp_parser.y"
3296
0
                {
3297
0
      (yyval.Int_fifo) = NULL;
3298
0
      APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3299
0
    }
3300
0
#line 3301 "ntp_parser.c"
3301
0
    break;
3302
3303
0
  case 285:
3304
0
#line 1467 "../../ntpd/ntp_parser.y"
3305
0
                {
3306
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3307
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3308
0
    }
3309
0
#line 3310 "ntp_parser.c"
3310
0
    break;
3311
3312
0
  case 286:
3313
0
#line 1472 "../../ntpd/ntp_parser.y"
3314
0
                {
3315
0
      (yyval.Attr_val_fifo) = NULL;
3316
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3317
0
    }
3318
0
#line 3319 "ntp_parser.c"
3319
0
    break;
3320
3321
0
  case 287:
3322
0
#line 1480 "../../ntpd/ntp_parser.y"
3323
0
                {
3324
0
      (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3325
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3326
0
    }
3327
0
#line 3328 "ntp_parser.c"
3328
0
    break;
3329
3330
0
  case 288:
3331
0
#line 1485 "../../ntpd/ntp_parser.y"
3332
0
                {
3333
0
      (yyval.Attr_val_fifo) = NULL;
3334
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3335
0
    }
3336
0
#line 3337 "ntp_parser.c"
3337
0
    break;
3338
3339
0
  case 289:
3340
0
#line 1493 "../../ntpd/ntp_parser.y"
3341
0
                        { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3342
0
#line 3343 "ntp_parser.c"
3343
0
    break;
3344
3345
0
  case 291:
3346
0
#line 1499 "../../ntpd/ntp_parser.y"
3347
0
                        { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3348
0
#line 3349 "ntp_parser.c"
3349
0
    break;
3350
3351
0
  case 292:
3352
0
#line 1504 "../../ntpd/ntp_parser.y"
3353
0
                {
3354
0
      (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3355
0
      APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3356
0
    }
3357
0
#line 3358 "ntp_parser.c"
3358
0
    break;
3359
3360
0
  case 293:
3361
0
#line 1509 "../../ntpd/ntp_parser.y"
3362
0
                {
3363
0
      (yyval.String_fifo) = NULL;
3364
0
      APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3365
0
    }
3366
0
#line 3367 "ntp_parser.c"
3367
0
    break;
3368
3369
0
  case 294:
3370
0
#line 1517 "../../ntpd/ntp_parser.y"
3371
0
                {
3372
0
      (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3373
0
      APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3374
0
    }
3375
0
#line 3376 "ntp_parser.c"
3376
0
    break;
3377
3378
0
  case 295:
3379
0
#line 1522 "../../ntpd/ntp_parser.y"
3380
0
                {
3381
0
      (yyval.Address_fifo) = NULL;
3382
0
      APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3383
0
    }
3384
0
#line 3385 "ntp_parser.c"
3385
0
    break;
3386
3387
0
  case 296:
3388
0
#line 1530 "../../ntpd/ntp_parser.y"
3389
0
                {
3390
0
      if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3391
0
        yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3392
0
        (yyval.Integer) = 1;
3393
0
      } else {
3394
0
        (yyval.Integer) = (yyvsp[0].Integer);
3395
0
      }
3396
0
    }
3397
0
#line 3398 "ntp_parser.c"
3398
0
    break;
3399
3400
0
  case 297:
3401
0
#line 1538 "../../ntpd/ntp_parser.y"
3402
0
                        { (yyval.Integer) = 1; }
3403
0
#line 3404 "ntp_parser.c"
3404
0
    break;
3405
3406
0
  case 298:
3407
0
#line 1539 "../../ntpd/ntp_parser.y"
3408
0
                        { (yyval.Integer) = 0; }
3409
0
#line 3410 "ntp_parser.c"
3410
0
    break;
3411
3412
0
  case 299:
3413
0
#line 1543 "../../ntpd/ntp_parser.y"
3414
0
                                { (yyval.Double) = (double)(yyvsp[0].Integer); }
3415
0
#line 3416 "ntp_parser.c"
3416
0
    break;
3417
3418
0
  case 301:
3419
0
#line 1549 "../../ntpd/ntp_parser.y"
3420
0
                        { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
3421
0
#line 3422 "ntp_parser.c"
3422
0
    break;
3423
3424
0
  case 302:
3425
0
#line 1557 "../../ntpd/ntp_parser.y"
3426
0
                {
3427
0
      sim_node *sn;
3428
3429
0
      sn =  create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3430
0
      APPEND_G_FIFO(cfgt.sim_details, sn);
3431
3432
      /* Revert from ; to \n for end-of-command */
3433
0
      old_config_style = 1;
3434
0
    }
3435
0
#line 3436 "ntp_parser.c"
3436
0
    break;
3437
3438
0
  case 303:
3439
0
#line 1574 "../../ntpd/ntp_parser.y"
3440
0
                           { old_config_style = 0; }
3441
0
#line 3442 "ntp_parser.c"
3442
0
    break;
3443
3444
0
  case 304:
3445
0
#line 1579 "../../ntpd/ntp_parser.y"
3446
0
                {
3447
0
      (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3448
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3449
0
    }
3450
0
#line 3451 "ntp_parser.c"
3451
0
    break;
3452
3453
0
  case 305:
3454
0
#line 1584 "../../ntpd/ntp_parser.y"
3455
0
                {
3456
0
      (yyval.Attr_val_fifo) = NULL;
3457
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3458
0
    }
3459
0
#line 3460 "ntp_parser.c"
3460
0
    break;
3461
3462
0
  case 306:
3463
0
#line 1592 "../../ntpd/ntp_parser.y"
3464
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3465
0
#line 3466 "ntp_parser.c"
3466
0
    break;
3467
3468
0
  case 309:
3469
0
#line 1602 "../../ntpd/ntp_parser.y"
3470
0
                {
3471
0
      (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3472
0
      APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3473
0
    }
3474
0
#line 3475 "ntp_parser.c"
3475
0
    break;
3476
3477
0
  case 310:
3478
0
#line 1607 "../../ntpd/ntp_parser.y"
3479
0
                {
3480
0
      (yyval.Sim_server_fifo) = NULL;
3481
0
      APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3482
0
    }
3483
0
#line 3484 "ntp_parser.c"
3484
0
    break;
3485
3486
0
  case 311:
3487
0
#line 1615 "../../ntpd/ntp_parser.y"
3488
0
                        { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3489
0
#line 3490 "ntp_parser.c"
3490
0
    break;
3491
3492
0
  case 312:
3493
0
#line 1620 "../../ntpd/ntp_parser.y"
3494
0
                        { (yyval.Double) = (yyvsp[-1].Double); }
3495
0
#line 3496 "ntp_parser.c"
3496
0
    break;
3497
3498
0
  case 313:
3499
0
#line 1625 "../../ntpd/ntp_parser.y"
3500
0
                        { (yyval.Address_node) = (yyvsp[0].Address_node); }
3501
0
#line 3502 "ntp_parser.c"
3502
0
    break;
3503
3504
0
  case 314:
3505
0
#line 1630 "../../ntpd/ntp_parser.y"
3506
0
                {
3507
0
      (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3508
0
      APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3509
0
    }
3510
0
#line 3511 "ntp_parser.c"
3511
0
    break;
3512
3513
0
  case 315:
3514
0
#line 1635 "../../ntpd/ntp_parser.y"
3515
0
                {
3516
0
      (yyval.Sim_script_fifo) = NULL;
3517
0
      APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3518
0
    }
3519
0
#line 3520 "ntp_parser.c"
3520
0
    break;
3521
3522
0
  case 316:
3523
0
#line 1643 "../../ntpd/ntp_parser.y"
3524
0
                        { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3525
0
#line 3526 "ntp_parser.c"
3526
0
    break;
3527
3528
0
  case 317:
3529
0
#line 1648 "../../ntpd/ntp_parser.y"
3530
0
                {
3531
0
      (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3532
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3533
0
    }
3534
0
#line 3535 "ntp_parser.c"
3535
0
    break;
3536
3537
0
  case 318:
3538
0
#line 1653 "../../ntpd/ntp_parser.y"
3539
0
                {
3540
0
      (yyval.Attr_val_fifo) = NULL;
3541
0
      APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3542
0
    }
3543
0
#line 3544 "ntp_parser.c"
3544
0
    break;
3545
3546
0
  case 319:
3547
0
#line 1661 "../../ntpd/ntp_parser.y"
3548
0
                        { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3549
0
#line 3550 "ntp_parser.c"
3550
0
    break;
3551
3552
3553
0
#line 3554 "ntp_parser.c"
3554
3555
0
      default: break;
3556
0
    }
3557
  /* User semantic actions sometimes alter yychar, and that requires
3558
     that yytoken be updated with the new translation.  We take the
3559
     approach of translating immediately before every use of yytoken.
3560
     One alternative is translating here after every semantic action,
3561
     but that translation would be missed if the semantic action invokes
3562
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3563
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
3564
     incorrect destructor might then be invoked immediately.  In the
3565
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
3566
     to an incorrect destructor call or verbose syntax error message
3567
     before the lookahead is translated.  */
3568
0
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3569
3570
0
  YYPOPSTACK (yylen);
3571
0
  yylen = 0;
3572
0
  YY_STACK_PRINT (yyss, yyssp);
3573
3574
0
  *++yyvsp = yyval;
3575
3576
  /* Now 'shift' the result of the reduction.  Determine what state
3577
     that goes to, based on the state we popped back to and the rule
3578
     number reduced by.  */
3579
0
  {
3580
0
    const int yylhs = yyr1[yyn] - YYNTOKENS;
3581
0
    const int yyi = yypgoto[yylhs] + *yyssp;
3582
0
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
3583
0
               ? yytable[yyi]
3584
0
               : yydefgoto[yylhs]);
3585
0
  }
3586
3587
0
  goto yynewstate;
3588
3589
3590
/*--------------------------------------.
3591
| yyerrlab -- here on detecting error.  |
3592
`--------------------------------------*/
3593
0
yyerrlab:
3594
  /* Make sure we have latest lookahead translation.  See comments at
3595
     user semantic actions for why this is necessary.  */
3596
0
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3597
3598
  /* If not already recovering from an error, report this error.  */
3599
0
  if (!yyerrstatus)
3600
0
    {
3601
0
      ++yynerrs;
3602
#if ! YYERROR_VERBOSE
3603
      yyerror (YY_("syntax error"));
3604
#else
3605
0
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3606
0
                                        yyssp, yytoken)
3607
0
      {
3608
0
        char const *yymsgp = YY_("syntax error");
3609
0
        int yysyntax_error_status;
3610
0
        yysyntax_error_status = YYSYNTAX_ERROR;
3611
0
        if (yysyntax_error_status == 0)
3612
0
          yymsgp = yymsg;
3613
0
        else if (yysyntax_error_status == 1)
3614
0
          {
3615
0
            if (yymsg != yymsgbuf)
3616
0
              YYSTACK_FREE (yymsg);
3617
0
            yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
3618
0
            if (!yymsg)
3619
0
              {
3620
0
                yymsg = yymsgbuf;
3621
0
                yymsg_alloc = sizeof yymsgbuf;
3622
0
                yysyntax_error_status = 2;
3623
0
              }
3624
0
            else
3625
0
              {
3626
0
                yysyntax_error_status = YYSYNTAX_ERROR;
3627
0
                yymsgp = yymsg;
3628
0
              }
3629
0
          }
3630
0
        yyerror (yymsgp);
3631
0
        if (yysyntax_error_status == 2)
3632
0
          goto yyexhaustedlab;
3633
0
      }
3634
0
# undef YYSYNTAX_ERROR
3635
0
#endif
3636
0
    }
3637
3638
3639
3640
0
  if (yyerrstatus == 3)
3641
0
    {
3642
      /* If just tried and failed to reuse lookahead token after an
3643
         error, discard it.  */
3644
3645
0
      if (yychar <= YYEOF)
3646
0
        {
3647
          /* Return failure if at end of input.  */
3648
0
          if (yychar == YYEOF)
3649
0
            YYABORT;
3650
0
        }
3651
0
      else
3652
0
        {
3653
0
          yydestruct ("Error: discarding",
3654
0
                      yytoken, &yylval);
3655
0
          yychar = YYEMPTY;
3656
0
        }
3657
0
    }
3658
3659
  /* Else will try to reuse lookahead token after shifting the error
3660
     token.  */
3661
0
  goto yyerrlab1;
3662
3663
3664
/*---------------------------------------------------.
3665
| yyerrorlab -- error raised explicitly by YYERROR.  |
3666
`---------------------------------------------------*/
3667
0
yyerrorlab:
3668
  /* Pacify compilers when the user code never invokes YYERROR and the
3669
     label yyerrorlab therefore never appears in user code.  */
3670
0
  if (0)
3671
0
    YYERROR;
3672
3673
  /* Do not reclaim the symbols of the rule whose action triggered
3674
     this YYERROR.  */
3675
0
  YYPOPSTACK (yylen);
3676
0
  yylen = 0;
3677
0
  YY_STACK_PRINT (yyss, yyssp);
3678
0
  yystate = *yyssp;
3679
0
  goto yyerrlab1;
3680
3681
3682
/*-------------------------------------------------------------.
3683
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
3684
`-------------------------------------------------------------*/
3685
0
yyerrlab1:
3686
0
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
3687
3688
0
  for (;;)
3689
0
    {
3690
0
      yyn = yypact[yystate];
3691
0
      if (!yypact_value_is_default (yyn))
3692
0
        {
3693
0
          yyn += YYTERROR;
3694
0
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3695
0
            {
3696
0
              yyn = yytable[yyn];
3697
0
              if (0 < yyn)
3698
0
                break;
3699
0
            }
3700
0
        }
3701
3702
      /* Pop the current state because it cannot handle the error token.  */
3703
0
      if (yyssp == yyss)
3704
0
        YYABORT;
3705
3706
3707
0
      yydestruct ("Error: popping",
3708
0
                  yystos[yystate], yyvsp);
3709
0
      YYPOPSTACK (1);
3710
0
      yystate = *yyssp;
3711
0
      YY_STACK_PRINT (yyss, yyssp);
3712
0
    }
3713
3714
0
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3715
0
  *++yyvsp = yylval;
3716
0
  YY_IGNORE_MAYBE_UNINITIALIZED_END
3717
3718
3719
  /* Shift the error token.  */
3720
0
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3721
3722
0
  yystate = yyn;
3723
0
  goto yynewstate;
3724
3725
3726
/*-------------------------------------.
3727
| yyacceptlab -- YYACCEPT comes here.  |
3728
`-------------------------------------*/
3729
0
yyacceptlab:
3730
0
  yyresult = 0;
3731
0
  goto yyreturn;
3732
3733
3734
/*-----------------------------------.
3735
| yyabortlab -- YYABORT comes here.  |
3736
`-----------------------------------*/
3737
0
yyabortlab:
3738
0
  yyresult = 1;
3739
0
  goto yyreturn;
3740
3741
3742
0
#if !defined yyoverflow || YYERROR_VERBOSE
3743
/*-------------------------------------------------.
3744
| yyexhaustedlab -- memory exhaustion comes here.  |
3745
`-------------------------------------------------*/
3746
0
yyexhaustedlab:
3747
0
  yyerror (YY_("memory exhausted"));
3748
0
  yyresult = 2;
3749
  /* Fall through.  */
3750
0
#endif
3751
3752
3753
/*-----------------------------------------------------.
3754
| yyreturn -- parsing is finished, return the result.  |
3755
`-----------------------------------------------------*/
3756
0
yyreturn:
3757
0
  if (yychar != YYEMPTY)
3758
0
    {
3759
      /* Make sure we have latest lookahead translation.  See comments at
3760
         user semantic actions for why this is necessary.  */
3761
0
      yytoken = YYTRANSLATE (yychar);
3762
0
      yydestruct ("Cleanup: discarding lookahead",
3763
0
                  yytoken, &yylval);
3764
0
    }
3765
  /* Do not reclaim the symbols of the rule whose action triggered
3766
     this YYABORT or YYACCEPT.  */
3767
0
  YYPOPSTACK (yylen);
3768
0
  YY_STACK_PRINT (yyss, yyssp);
3769
0
  while (yyssp != yyss)
3770
0
    {
3771
0
      yydestruct ("Cleanup: popping",
3772
0
                  yystos[+*yyssp], yyvsp);
3773
0
      YYPOPSTACK (1);
3774
0
    }
3775
0
#ifndef yyoverflow
3776
0
  if (yyss != yyssa)
3777
0
    YYSTACK_FREE (yyss);
3778
0
#endif
3779
0
#if YYERROR_VERBOSE
3780
0
  if (yymsg != yymsgbuf)
3781
0
    YYSTACK_FREE (yymsg);
3782
0
#endif
3783
0
  return yyresult;
3784
0
}
3785
#line 1672 "../../ntpd/ntp_parser.y"
3786
3787
3788
void
3789
yyerror(
3790
  const char *msg
3791
  )
3792
0
{
3793
0
  int retval;
3794
0
  struct FILE_INFO * ip_ctx;
3795
3796
0
  ip_ctx = lex_current();
3797
0
  ip_ctx->errpos = ip_ctx->tokpos;
3798
3799
0
  msyslog(LOG_ERR, "line %d column %d %s",
3800
0
    ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3801
0
  if (!lex_from_file()) {
3802
    /* Save the error message in the correct buffer */
3803
0
    retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3804
0
          MAXLINE - remote_config.err_pos,
3805
0
          "column %d %s",
3806
0
          ip_ctx->errpos.ncol, msg);
3807
3808
    /* Increment the value of err_pos */
3809
0
    if (retval > 0)
3810
0
      remote_config.err_pos += retval;
3811
3812
    /* Increment the number of errors */
3813
0
    ++remote_config.no_errors;
3814
0
  }
3815
0
}
3816
3817
3818
/*
3819
 * token_name - convert T_ token integers to text
3820
 *    example: token_name(T_Server) returns "T_Server"
3821
 */
3822
const char *
3823
token_name(
3824
  int token
3825
  )
3826
0
{
3827
0
  return yytname[YYTRANSLATE(token)];
3828
0
}
3829
3830
3831
/* Initial Testing function -- ignore */
3832
#if 0
3833
int main(int argc, char *argv[])
3834
{
3835
  ip_file = FOPEN(argv[1], "r");
3836
  if (!ip_file)
3837
    fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);
3838
  yyparse();
3839
  return 0;
3840
}
3841
#endif
3842