1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
73 #include "ntp_machine.h"
74 #include "ntp_stdlib.h"
75 #include "ntp_filegen.h"
76 #include "ntp_scanner.h"
77 #include "ntp_config.h"
78 #include "ntp_crypto.h"
80 #include "ntpsim.h" /* HMS: Do we really want this all the time? */
81 /* SK: It might be a good idea to always
82 include the simulator code. That way
83 someone can use the same configuration file
84 for both the simulator and the daemon
87 #define YYMALLOC emalloc
89 #define YYERROR_VERBOSE
90 #define YYMAXDEPTH 1000 /* stop the madness sooner */
91 void yyerror(const char *msg);
94 # define ONLY_SIM(a) (a)
96 # define ONLY_SIM(a) NULL
99 #line 100 "ntp_parser.c" /* yacc.c:339 */
102 # if defined __cplusplus && 201103L <= __cplusplus
103 # define YY_NULLPTR nullptr
105 # define YY_NULLPTR 0
109 /* Enabling verbose error messages. */
110 #ifdef YYERROR_VERBOSE
111 # undef YYERROR_VERBOSE
112 # define YYERROR_VERBOSE 1
114 # define YYERROR_VERBOSE 0
117 /* In a future release of Bison, this section will be replaced
118 by #include "y.tab.h". */
119 #ifndef YY_YY_NTP_PARSER_H_INCLUDED
120 # define YY_YY_NTP_PARSER_H_INCLUDED
148 T_Broadcastclient = 272,
149 T_Broadcastdelay = 273,
211 T_Leapsmearinterval = 335,
219 T_Manycastclient = 343,
220 T_Manycastserver = 344,
242 T_Multicastclient = 366,
258 T_NtpSignDsocket = 382,
282 T_Saveconfigdir = 406,
317 T_WanderThreshold = 441,
326 T_Sim_Duration = 450,
327 T_Server_Offset = 451,
341 #define T_Allpeers 262
343 #define T_Autokey 264
344 #define T_Automax 265
345 #define T_Average 266
346 #define T_Basedate 267
347 #define T_Bclient 268
348 #define T_Bcpollbstep 269
350 #define T_Broadcast 271
351 #define T_Broadcastclient 272
352 #define T_Broadcastdelay 273
354 #define T_Calibrate 275
355 #define T_Ceiling 276
356 #define T_Clockstats 277
358 #define T_ControlKey 279
360 #define T_Cryptostats 281
363 #define T_Default 284
365 #define T_Disable 286
366 #define T_Discard 287
367 #define T_Dispersion 288
369 #define T_Driftfile 290
372 #define T_Ellipsis 293
378 #define T_Filegen 299
379 #define T_Filenum 300
389 #define T_Huffpuff 310
393 #define T_Incalloc 314
395 #define T_Initalloc 316
396 #define T_Initmem 317
397 #define T_Includefile 318
398 #define T_Integer 319
399 #define T_Interface 320
400 #define T_Intrange 321
402 #define T_Ippeerlimit 323
404 #define T_Ipv4_flag 325
406 #define T_Ipv6_flag 327
410 #define T_Keysdir 331
413 #define T_Leapfile 334
414 #define T_Leapsmearinterval 335
415 #define T_Limited 336
418 #define T_Logconfig 339
419 #define T_Logfile 340
420 #define T_Loopstats 341
421 #define T_Lowpriotrap 342
422 #define T_Manycastclient 343
423 #define T_Manycastserver 344
426 #define T_Maxclock 347
427 #define T_Maxdepth 348
428 #define T_Maxdist 349
430 #define T_Maxpoll 351
431 #define T_Mdnstries 352
433 #define T_Memlock 354
434 #define T_Minclock 355
435 #define T_Mindepth 356
436 #define T_Mindist 357
437 #define T_Minimum 358
438 #define T_Minpoll 359
439 #define T_Minsane 360
442 #define T_Monitor 363
445 #define T_Multicastclient 366
448 #define T_Nomodify 369
449 #define T_Nomrulist 370
451 #define T_Nonvolatile 372
452 #define T_Noepeer 373
454 #define T_Noquery 375
455 #define T_Noselect 376
456 #define T_Noserve 377
458 #define T_Notrust 379
460 #define T_Ntpport 381
461 #define T_NtpSignDsocket 382
463 #define T_Orphanwait 384
464 #define T_PCEdigest 385
467 #define T_Peerstats 388
470 #define T_Pidfile 391
473 #define T_Preempt 394
475 #define T_Protostats 396
477 #define T_Randfile 398
478 #define T_Rawstats 399
480 #define T_Requestkey 401
482 #define T_Restrict 403
485 #define T_Saveconfigdir 406
489 #define T_Stacksize 410
490 #define T_Statistics 411
492 #define T_Statsdir 413
494 #define T_Stepback 415
495 #define T_Stepfwd 416
496 #define T_Stepout 417
497 #define T_Stratum 418
500 #define T_Sysstats 421
505 #define T_Timingstats 426
510 #define T_Trustedkey 431
514 #define T_UEcrypto 435
515 #define T_UEcryptonak 436
516 #define T_UEdigest 437
517 #define T_Unconfig 438
519 #define T_Version 440
520 #define T_WanderThreshold 441
522 #define T_Wildcard 443
527 #define T_Simulate 448
528 #define T_Beep_Delay 449
529 #define T_Sim_Duration 450
530 #define T_Server_Offset 451
531 #define T_Duration 452
532 #define T_Freq_Offset 453
535 #define T_Prop_Delay 456
536 #define T_Proc_Delay 457
539 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
543 #line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
549 gen_fifo * Generic_fifo;
551 attr_val_fifo * Attr_val_fifo;
553 string_fifo * String_fifo;
554 address_node * Address_node;
555 address_fifo * Address_fifo;
556 setvar_node * Set_var;
557 server_info * Sim_server;
558 server_info_fifo * Sim_server_fifo;
559 script_info * Sim_script;
560 script_info_fifo * Sim_script_fifo;
562 #line 563 "ntp_parser.c" /* yacc.c:355 */
565 typedef union YYSTYPE YYSTYPE;
566 # define YYSTYPE_IS_TRIVIAL 1
567 # define YYSTYPE_IS_DECLARED 1
571 extern YYSTYPE yylval;
575 #endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
577 /* Copy the second part of user declarations. */
579 #line 580 "ntp_parser.c" /* yacc.c:358 */
586 typedef YYTYPE_UINT8 yytype_uint8;
588 typedef unsigned char yytype_uint8;
592 typedef YYTYPE_INT8 yytype_int8;
594 typedef signed char yytype_int8;
598 typedef YYTYPE_UINT16 yytype_uint16;
600 typedef unsigned short int yytype_uint16;
604 typedef YYTYPE_INT16 yytype_int16;
606 typedef short int yytype_int16;
610 # ifdef __SIZE_TYPE__
611 # define YYSIZE_T __SIZE_TYPE__
612 # elif defined size_t
613 # define YYSIZE_T size_t
614 # elif ! defined YYSIZE_T
615 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
616 # define YYSIZE_T size_t
618 # define YYSIZE_T unsigned int
622 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
625 # if defined YYENABLE_NLS && YYENABLE_NLS
627 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
628 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
632 # define YY_(Msgid) Msgid
637 # if (defined __GNUC__ \
638 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
639 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
640 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
642 # define YY_ATTRIBUTE(Spec) /* empty */
646 #ifndef YY_ATTRIBUTE_PURE
647 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
650 #ifndef YY_ATTRIBUTE_UNUSED
651 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
654 #if !defined _Noreturn \
655 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
656 # if defined _MSC_VER && 1200 <= _MSC_VER
657 # define _Noreturn __declspec (noreturn)
659 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
663 /* Suppress unused-variable warnings by "using" E. */
664 #if ! defined lint || defined __GNUC__
665 # define YYUSE(E) ((void) (E))
667 # define YYUSE(E) /* empty */
670 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
671 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
672 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
673 _Pragma ("GCC diagnostic push") \
674 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
675 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
676 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
677 _Pragma ("GCC diagnostic pop")
679 # define YY_INITIAL_VALUE(Value) Value
681 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
682 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
683 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
685 #ifndef YY_INITIAL_VALUE
686 # define YY_INITIAL_VALUE(Value) /* Nothing. */
690 #if ! defined yyoverflow || YYERROR_VERBOSE
692 /* The parser invokes alloca or malloc; define the necessary symbols. */
694 # ifdef YYSTACK_USE_ALLOCA
695 # if YYSTACK_USE_ALLOCA
697 # define YYSTACK_ALLOC __builtin_alloca
698 # elif defined __BUILTIN_VA_ARG_INCR
699 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
701 # define YYSTACK_ALLOC __alloca
702 # elif defined _MSC_VER
703 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
704 # define alloca _alloca
706 # define YYSTACK_ALLOC alloca
707 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
708 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
709 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
710 # ifndef EXIT_SUCCESS
711 # define EXIT_SUCCESS 0
718 # ifdef YYSTACK_ALLOC
719 /* Pacify GCC's 'empty if-body' warning. */
720 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
721 # ifndef YYSTACK_ALLOC_MAXIMUM
722 /* The OS might guarantee only one guard page at the bottom of the stack,
723 and a page size can be as small as 4096 bytes. So we cannot safely
724 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
725 to allow for a few compiler-allocated temporary stack slots. */
726 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
729 # define YYSTACK_ALLOC YYMALLOC
730 # define YYSTACK_FREE YYFREE
731 # ifndef YYSTACK_ALLOC_MAXIMUM
732 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
734 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
735 && ! ((defined YYMALLOC || defined malloc) \
736 && (defined YYFREE || defined free)))
737 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
738 # ifndef EXIT_SUCCESS
739 # define EXIT_SUCCESS 0
743 # define YYMALLOC malloc
744 # if ! defined malloc && ! defined EXIT_SUCCESS
745 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
750 # if ! defined free && ! defined EXIT_SUCCESS
751 void free (void *); /* INFRINGES ON USER NAME SPACE */
755 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
758 #if (! defined yyoverflow \
759 && (! defined __cplusplus \
760 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
762 /* A type that is properly aligned for any stack member. */
765 yytype_int16 yyss_alloc;
769 /* The size of the maximum gap between one aligned stack and the next. */
770 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
772 /* The size of an array large to enough to hold all stacks, each with
774 # define YYSTACK_BYTES(N) \
775 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
776 + YYSTACK_GAP_MAXIMUM)
778 # define YYCOPY_NEEDED 1
780 /* Relocate STACK from its old location to the new one. The
781 local variables YYSIZE and YYSTACKSIZE give the old and new number of
782 elements in the stack, and YYPTR gives the new location of the
783 stack. Advance YYPTR to a properly aligned location for the next
785 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
788 YYSIZE_T yynewbytes; \
789 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
790 Stack = &yyptr->Stack_alloc; \
791 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
792 yyptr += yynewbytes / sizeof (*yyptr); \
798 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
799 /* Copy COUNT objects from SRC to DST. The source and destination do
802 # if defined __GNUC__ && 1 < __GNUC__
803 # define YYCOPY(Dst, Src, Count) \
804 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
806 # define YYCOPY(Dst, Src, Count) \
810 for (yyi = 0; yyi < (Count); yyi++) \
811 (Dst)[yyi] = (Src)[yyi]; \
816 #endif /* !YYCOPY_NEEDED */
818 /* YYFINAL -- State number of the termination state. */
820 /* YYLAST -- Last index in YYTABLE. */
823 /* YYNTOKENS -- Number of terminals. */
824 #define YYNTOKENS 208
825 /* YYNNTS -- Number of nonterminals. */
827 /* YYNRULES -- Number of rules. */
829 /* YYNSTATES -- Number of states. */
830 #define YYNSTATES 436
832 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
833 by yylex, with out-of-bounds checking. */
835 #define YYMAXUTOK 457
837 #define YYTRANSLATE(YYX) \
838 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
840 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
841 as returned by yylex, without out-of-bounds checking. */
842 static const yytype_uint8 yytranslate[] =
844 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 204, 205, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 203, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 206, 2, 207, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
865 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
870 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
871 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
872 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
873 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
874 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
875 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
876 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
877 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
878 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
879 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
880 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
881 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
882 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
883 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
884 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
885 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
886 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
887 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
888 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
889 195, 196, 197, 198, 199, 200, 201, 202
893 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
894 static const yytype_uint16 yyrline[] =
896 0, 377, 377, 381, 382, 383, 398, 399, 400, 401,
897 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
898 419, 429, 430, 431, 432, 433, 437, 438, 443, 448,
899 450, 456, 457, 465, 466, 467, 471, 476, 477, 478,
900 479, 480, 481, 482, 483, 487, 489, 494, 495, 496,
901 497, 498, 499, 503, 508, 517, 527, 528, 538, 540,
902 542, 544, 555, 562, 564, 569, 571, 573, 575, 577,
903 587, 593, 594, 602, 604, 616, 617, 618, 619, 620,
904 629, 634, 639, 647, 649, 651, 653, 658, 659, 660,
905 661, 662, 663, 664, 665, 666, 670, 671, 680, 682,
906 691, 701, 706, 714, 715, 716, 717, 718, 719, 720,
907 721, 726, 727, 735, 745, 754, 769, 774, 775, 779,
908 780, 784, 785, 786, 787, 788, 789, 790, 799, 803,
909 807, 815, 823, 831, 846, 861, 874, 875, 895, 896,
910 904, 905, 906, 907, 908, 909, 910, 911, 912, 913,
911 914, 915, 916, 917, 918, 919, 920, 924, 929, 937,
912 942, 943, 944, 948, 953, 961, 966, 967, 968, 969,
913 970, 971, 972, 973, 981, 991, 996, 1004, 1006, 1008,
914 1017, 1019, 1024, 1025, 1029, 1030, 1031, 1032, 1040, 1045,
915 1050, 1058, 1063, 1064, 1065, 1074, 1076, 1081, 1086, 1094,
916 1096, 1113, 1114, 1115, 1116, 1117, 1118, 1122, 1123, 1124,
917 1125, 1126, 1127, 1135, 1140, 1145, 1153, 1158, 1159, 1160,
918 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1176, 1177, 1178,
919 1185, 1192, 1199, 1215, 1234, 1236, 1238, 1240, 1242, 1244,
920 1251, 1256, 1257, 1258, 1262, 1266, 1275, 1276, 1280, 1281,
921 1282, 1286, 1297, 1315, 1327, 1332, 1334, 1339, 1340, 1348,
922 1350, 1358, 1363, 1371, 1396, 1403, 1413, 1414, 1418, 1419,
923 1420, 1421, 1425, 1426, 1427, 1431, 1436, 1441, 1449, 1450,
924 1451, 1452, 1453, 1454, 1455, 1465, 1470, 1478, 1483, 1491,
925 1493, 1497, 1502, 1507, 1515, 1520, 1528, 1537, 1538, 1542,
926 1543, 1547, 1555, 1573, 1577, 1582, 1590, 1595, 1596, 1600,
927 1605, 1613, 1618, 1623, 1628, 1633, 1641, 1646, 1651, 1659,
928 1664, 1665, 1666, 1667, 1668
932 #if YYDEBUG || YYERROR_VERBOSE || 1
933 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
934 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
935 static const char *const yytname[] =
937 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
938 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
939 "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
940 "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
941 "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
942 "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
943 "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
944 "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
945 "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
946 "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host",
947 "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc",
948 "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer",
949 "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4",
950 "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys",
951 "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval",
952 "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
953 "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
954 "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
955 "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
956 "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll",
957 "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
958 "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
959 "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery",
960 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
961 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
962 "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
963 "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
964 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
965 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
966 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
967 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
968 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
969 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
970 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
971 "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
972 "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
973 "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
974 "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
975 "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
976 "$accept", "configuration", "command_list", "command", "server_command",
977 "client_type", "address", "ip_address", "address_fam", "option_list",
978 "option", "option_flag", "option_flag_keyword", "option_int",
979 "option_int_keyword", "option_str", "option_str_keyword",
980 "unpeer_command", "unpeer_keyword", "other_mode_command",
981 "authentication_command", "crypto_command_list", "crypto_command",
982 "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
983 "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
984 "monitoring_command", "stats_list", "stat", "filegen_option_list",
985 "filegen_option", "link_nolink", "enable_disable", "filegen_type",
986 "access_control_command", "res_ippeerlimit", "ac_flag_list",
987 "access_control_flag", "discard_option_list", "discard_option",
988 "discard_option_keyword", "mru_option_list", "mru_option",
989 "mru_option_keyword", "fudge_command", "fudge_factor_list",
990 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
991 "rlimit_command", "rlimit_option_list", "rlimit_option",
992 "rlimit_option_keyword", "system_option_command", "system_option_list",
993 "system_option", "system_option_flag_keyword",
994 "system_option_local_flag_keyword", "tinker_command",
995 "tinker_option_list", "tinker_option", "tinker_option_keyword",
996 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
997 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
998 "variable_assign", "t_default_or_zero", "trap_option_list",
999 "trap_option", "log_config_list", "log_config_command",
1000 "interface_command", "interface_nic", "nic_rule_class",
1001 "nic_rule_action", "reset_command", "counter_set_list",
1002 "counter_set_keyword", "integer_list", "integer_list_range",
1003 "integer_list_range_elt", "integer_range", "string_list", "address_list",
1004 "boolean", "number", "basedate", "simulate_command", "sim_conf_start",
1005 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
1006 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
1007 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
1008 "sim_act_keyword", YY_NULLPTR
1013 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1014 (internal) symbol number NUM (which must be that of a token). */
1015 static const yytype_uint16 yytoknum[] =
1017 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1018 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1019 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1020 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1021 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1022 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1023 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1024 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1025 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1026 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1027 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1028 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1029 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1030 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1031 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1032 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1033 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1034 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1035 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1036 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
1037 455, 456, 457, 61, 40, 41, 123, 125
1041 #define YYPACT_NINF -215
1043 #define yypact_value_is_default(Yystate) \
1044 (!!((Yystate) == (-215)))
1046 #define YYTABLE_NINF -7
1048 #define yytable_value_is_error(Yytable_value) \
1051 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1053 static const yytype_int16 yypact[] =
1055 11, -175, 2, -215, -215, -215, 3, -215, 93, 9,
1056 -138, -215, 93, -215, 66, -40, -215, -93, -215, -87,
1057 -82, -215, -215, -81, -215, -215, -40, 20, 210, -40,
1058 -215, -215, -70, -215, -67, -215, -215, 34, 6, -13,
1059 47, -6, -215, -215, -48, 66, -45, -215, 412, 483,
1060 -39, -60, 62, -215, -215, -215, 127, 203, -63, -215,
1061 -40, -215, -40, -215, -215, -215, -215, -215, -215, -215,
1062 -215, -215, -215, -11, 75, -24, -22, -215, -18, -215,
1063 -215, -53, -215, -215, -215, 48, -215, -215, -215, -215,
1064 -215, -215, -215, -215, -215, -215, -215, -215, 93, -215,
1065 -215, -215, -215, -215, -215, 9, -215, 82, 120, -215,
1066 93, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1067 -215, -215, -215, 86, -215, 4, 373, -215, -215, -215,
1068 -81, -215, -215, -40, -215, -215, -215, -215, -215, -215,
1069 -215, -215, -215, 210, -215, 106, -40, -215, -215, 15,
1070 -215, -215, -215, -215, -215, -215, -215, -215, 6, -215,
1071 105, 146, 151, 105, -30, -215, -215, -215, -215, -6,
1072 -215, 117, -21, -215, 66, -215, -215, -215, -215, -215,
1073 -215, -215, -215, -215, -215, -215, -215, 412, -215, -11,
1074 22, -215, -215, -215, -20, -215, -215, -215, -215, -215,
1075 -215, -215, -215, 483, -215, 128, -11, -215, -215, -215,
1076 129, -60, -215, -215, -215, 132, -215, 10, -215, -215,
1077 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1078 1, -133, -215, -215, -215, -215, -215, 134, -215, 41,
1079 -215, -215, -215, -215, -28, 42, -215, -215, -215, -215,
1080 45, 148, -215, -215, 86, -215, -11, -20, -215, -215,
1081 -215, -215, -215, -215, -215, -215, 150, -215, 105, 105,
1082 -215, -39, -215, -215, -215, 51, -215, -215, -215, -215,
1083 -215, -215, -215, -215, -215, -215, -215, -57, 178, -215,
1084 -215, -215, 288, -215, -215, -215, -215, -215, -215, -215,
1085 -215, -115, 25, 23, -215, -215, -215, -215, 61, -215,
1086 -215, 21, -215, -215, -215, -215, -215, -215, -215, -215,
1087 -215, -215, 477, -215, -215, 477, 105, 477, 201, -39,
1088 169, -215, 172, -215, -215, -215, -215, -215, -215, -215,
1089 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1090 -215, -215, -59, -215, 77, 36, 52, -100, -215, 39,
1091 -215, -11, -215, -215, -215, -215, -215, -215, -215, -215,
1092 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1093 -215, -215, -215, -215, -215, -215, -215, -215, -215, 477,
1094 477, -215, -215, -215, -215, -215, 43, -215, -215, -215,
1095 -40, -215, -215, -215, 55, -215, 477, -215, -215, 49,
1096 56, -11, 54, -166, -215, 67, -11, -215, -215, -215,
1097 70, 63, -215, -215, -215, -215, -215, 124, 85, 64,
1098 -215, 89, -215, -11, -215, -215
1101 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1102 Performed when YYTABLE does not specify something else to do. Zero
1103 means the default is an error. */
1104 static const yytype_uint16 yydefact[] =
1106 0, 0, 0, 24, 58, 241, 0, 71, 0, 0,
1107 253, 244, 0, 234, 0, 0, 246, 0, 266, 0,
1108 0, 247, 245, 0, 248, 25, 0, 0, 0, 0,
1109 267, 242, 0, 23, 0, 249, 22, 0, 0, 0,
1110 0, 0, 250, 21, 0, 0, 0, 243, 0, 0,
1111 0, 0, 0, 56, 57, 303, 0, 2, 0, 7,
1112 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1113 16, 17, 18, 0, 0, 0, 0, 227, 0, 228,
1114 19, 0, 5, 62, 63, 64, 201, 202, 203, 204,
1115 207, 205, 206, 208, 209, 210, 211, 212, 196, 198,
1116 199, 200, 160, 161, 162, 128, 158, 0, 251, 235,
1117 195, 103, 104, 105, 106, 110, 107, 108, 109, 111,
1118 29, 30, 28, 0, 26, 0, 6, 65, 66, 263,
1119 236, 262, 295, 59, 61, 166, 167, 168, 169, 170,
1120 171, 172, 173, 129, 164, 0, 60, 70, 293, 237,
1121 67, 278, 279, 280, 281, 282, 283, 284, 275, 277,
1122 136, 29, 30, 136, 136, 68, 194, 192, 193, 188,
1123 190, 0, 0, 238, 98, 102, 99, 217, 218, 219,
1124 220, 221, 222, 223, 224, 225, 226, 213, 215, 0,
1125 0, 87, 88, 89, 0, 90, 91, 97, 92, 96,
1126 93, 94, 95, 80, 82, 0, 0, 86, 257, 289,
1127 0, 69, 288, 290, 286, 240, 1, 0, 4, 31,
1128 55, 300, 299, 229, 230, 231, 232, 274, 273, 272,
1129 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
1130 197, 157, 159, 252, 100, 0, 184, 185, 186, 187,
1131 0, 0, 182, 183, 174, 176, 0, 0, 27, 233,
1132 261, 294, 163, 165, 292, 276, 0, 138, 136, 136,
1133 138, 0, 138, 189, 191, 0, 101, 214, 216, 301,
1134 298, 296, 297, 85, 81, 83, 84, 239, 0, 287,
1135 285, 3, 20, 268, 269, 270, 265, 271, 264, 307,
1136 308, 0, 0, 0, 74, 73, 120, 119, 0, 117,
1137 118, 0, 112, 115, 116, 180, 181, 179, 175, 177,
1138 178, 137, 132, 138, 138, 135, 136, 130, 256, 0,
1139 0, 258, 0, 37, 38, 39, 54, 47, 49, 48,
1140 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
1141 36, 34, 0, 35, 0, 0, 0, 0, 310, 0,
1142 305, 0, 113, 127, 123, 125, 121, 122, 124, 126,
1143 114, 140, 141, 142, 143, 144, 145, 146, 148, 149,
1144 147, 150, 151, 152, 153, 154, 155, 156, 139, 133,
1145 134, 138, 255, 254, 260, 259, 0, 45, 46, 53,
1146 0, 304, 302, 309, 0, 306, 131, 291, 313, 0,
1147 0, 0, 0, 0, 315, 0, 0, 311, 314, 312,
1148 0, 0, 320, 321, 322, 323, 324, 0, 0, 0,
1149 316, 0, 318, 0, 317, 319
1152 /* YYPGOTO[NTERM-NUM]. */
1153 static const yytype_int16 yypgoto[] =
1155 -215, -215, -215, -23, -215, -215, -15, -49, -215, -215,
1156 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1157 -215, -215, -215, -215, -215, -215, 81, -215, -215, -215,
1158 -215, -38, -215, -215, -215, -215, -215, -215, -154, -214,
1159 -215, -215, 153, -215, -215, 142, -215, -215, -215, 32,
1160 -215, -215, -215, -215, 121, -215, -215, 277, -35, -215,
1161 -215, -215, -215, 107, -215, -215, -215, -215, -215, -215,
1162 -215, -215, -215, -215, -215, -215, 163, -215, -215, -215,
1163 -215, -215, -215, 137, -215, -215, 87, -215, -215, 267,
1164 53, -187, -215, -215, -215, -215, -2, -215, -215, -55,
1165 -215, -215, -215, -109, -215, -121, -215
1168 /* YYDEFGOTO[NTERM-NUM]. */
1169 static const yytype_int16 yydefgoto[] =
1171 -1, 56, 57, 58, 59, 60, 132, 124, 125, 292,
1172 348, 349, 350, 351, 352, 353, 354, 61, 62, 63,
1173 64, 85, 238, 239, 65, 203, 204, 205, 206, 66,
1174 174, 119, 244, 312, 313, 314, 370, 67, 267, 322,
1175 388, 105, 106, 107, 143, 144, 145, 68, 254, 255,
1176 256, 257, 69, 169, 170, 171, 70, 98, 99, 100,
1177 101, 71, 187, 188, 189, 72, 73, 74, 75, 76,
1178 109, 173, 393, 287, 331, 130, 131, 77, 78, 298,
1179 230, 79, 158, 159, 215, 211, 212, 213, 149, 133,
1180 283, 223, 207, 80, 81, 301, 302, 303, 357, 358,
1181 410, 359, 413, 414, 427, 428, 429
1184 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1185 positive, shift that token. If negative, reduce the rule whose
1186 number is the opposite. If YYTABLE_NINF, syntax error. */
1187 static const yytype_int16 yytable[] =
1189 123, 208, 278, 306, 209, 397, 293, 175, 329, 270,
1190 272, 307, 1, 151, 152, 308, 160, 82, 227, 286,
1191 102, 2, 280, 221, 164, 363, 108, 3, 4, 5,
1192 120, 412, 121, 153, 217, 6, 7, 355, 266, 166,
1193 228, 417, 8, 9, 281, 219, 10, 220, 11, 364,
1194 12, 13, 355, 222, 309, 14, 325, 161, 327, 162,
1195 271, 299, 300, 240, 15, 229, 83, 84, 16, 319,
1196 294, 126, 295, 154, 17, 240, 18, 127, 232, 299,
1197 300, 330, 128, 129, 134, 310, 19, 20, 111, 245,
1198 21, 22, 112, 167, 147, 23, 24, 148, 150, 25,
1199 26, 86, 233, 259, 155, 234, 87, 402, 27, 389,
1200 390, 165, 103, 88, 323, 324, 172, 104, 261, 176,
1201 398, 28, 29, 30, 122, 122, 214, 216, 31, 218,
1202 365, 261, 246, 247, 248, 249, 276, 366, 32, 224,
1203 225, 163, 226, 33, 210, 34, 242, 35, 36, 168,
1204 311, 122, 113, 231, 243, 282, 367, 37, 38, 39,
1205 40, 41, 42, 43, 44, 296, 89, 45, 258, 46,
1206 263, 156, 391, 266, 405, 268, 157, 406, 47, 264,
1207 269, 274, 275, 48, 49, 50, 279, 51, 52, 297,
1208 235, 236, 285, 288, 53, 54, 290, 237, 304, 114,
1209 90, 91, 291, -6, 55, 305, 315, 115, 368, 316,
1210 116, 369, 317, 2, 321, 328, 332, 360, 92, 3,
1211 4, 5, 326, 93, 415, 362, 361, 6, 7, 420,
1212 392, 250, 117, 395, 8, 9, 396, 118, 10, 400,
1213 11, 399, 12, 13, 401, 404, 435, 14, 407, 251,
1214 94, 409, 411, 412, 252, 253, 15, 416, 241, 419,
1215 16, 422, 423, 424, 425, 426, 17, 433, 18, 135,
1216 136, 137, 138, 95, 96, 97, 421, 432, 19, 20,
1217 394, 434, 21, 22, 284, 262, 318, 23, 24, 110,
1218 273, 25, 26, 260, 277, 265, 146, 333, 289, 356,
1219 27, 139, 403, 140, 418, 141, 431, 334, 0, 0,
1220 320, 142, 0, 28, 29, 30, 0, 0, 0, 0,
1221 31, 0, 422, 423, 424, 425, 426, 0, 0, 0,
1222 32, 430, 0, 0, 0, 33, 0, 34, 0, 35,
1223 36, 0, 0, 0, 335, 336, 0, 0, 0, 37,
1224 38, 39, 40, 41, 42, 43, 44, 0, 0, 45,
1225 0, 46, 337, 0, 0, 0, 0, 0, 0, 0,
1226 47, 0, 0, 0, 0, 48, 49, 50, 0, 51,
1227 52, 0, 0, 2, 338, 408, 53, 54, 0, 3,
1228 4, 5, 339, 0, 340, -6, 55, 6, 7, 0,
1229 0, 0, 0, 0, 8, 9, 0, 0, 10, 341,
1230 11, 0, 12, 13, 0, 0, 0, 14, 177, 0,
1231 0, 0, 0, 0, 0, 0, 15, 342, 343, 0,
1232 16, 0, 0, 0, 0, 0, 17, 0, 18, 0,
1233 0, 0, 0, 0, 0, 178, 0, 0, 19, 20,
1234 0, 0, 21, 22, 0, 0, 0, 23, 24, 0,
1235 0, 25, 26, 344, 179, 345, 0, 180, 0, 0,
1236 27, 0, 0, 346, 0, 0, 0, 347, 0, 0,
1237 0, 0, 0, 28, 29, 30, 0, 0, 0, 0,
1238 31, 0, 0, 0, 0, 190, 0, 191, 192, 0,
1239 32, 0, 0, 0, 193, 33, 194, 34, 0, 35,
1240 36, 0, 0, 0, 0, 0, 0, 0, 371, 37,
1241 38, 39, 40, 41, 42, 43, 44, 372, 0, 45,
1242 0, 46, 0, 0, 195, 373, 0, 0, 0, 0,
1243 47, 0, 0, 181, 0, 48, 49, 50, 0, 51,
1244 52, 0, 0, 0, 374, 375, 53, 54, 376, 0,
1245 0, 0, 0, 0, 377, 0, 55, 0, 0, 0,
1246 0, 182, 183, 184, 185, 196, 0, 197, 0, 186,
1247 0, 0, 0, 198, 0, 199, 0, 0, 200, 0,
1248 0, 378, 379, 0, 0, 380, 381, 382, 0, 383,
1249 384, 385, 0, 386, 0, 0, 0, 0, 0, 0,
1250 0, 201, 202, 0, 0, 0, 0, 0, 0, 0,
1251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1258 static const yytype_int16 yycheck[] =
1260 15, 50, 189, 31, 64, 64, 5, 45, 65, 163,
1261 164, 39, 1, 7, 8, 43, 29, 192, 36, 206,
1262 11, 10, 42, 34, 39, 4, 164, 16, 17, 18,
1263 70, 197, 72, 27, 57, 24, 25, 152, 68, 45,
1264 58, 207, 31, 32, 64, 60, 35, 62, 37, 28,
1265 39, 40, 152, 64, 82, 44, 270, 70, 272, 72,
1266 90, 194, 195, 98, 53, 83, 64, 64, 57, 256,
1267 69, 164, 71, 67, 63, 110, 65, 164, 30, 194,
1268 195, 138, 164, 164, 64, 113, 75, 76, 22, 3,
1269 79, 80, 26, 99, 164, 84, 85, 164, 64, 88,
1270 89, 8, 54, 126, 98, 57, 13, 207, 97, 323,
1271 324, 64, 103, 20, 268, 269, 164, 108, 133, 164,
1272 179, 110, 111, 112, 164, 164, 64, 0, 117, 192,
1273 109, 146, 46, 47, 48, 49, 174, 116, 127, 64,
1274 164, 154, 164, 132, 204, 134, 64, 136, 137, 155,
1275 178, 164, 86, 206, 34, 175, 135, 146, 147, 148,
1276 149, 150, 151, 152, 153, 164, 73, 156, 164, 158,
1277 64, 165, 326, 68, 361, 29, 170, 391, 167, 164,
1278 29, 64, 203, 172, 173, 174, 164, 176, 177, 188,
1279 142, 143, 64, 64, 183, 184, 64, 149, 64, 133,
1280 107, 108, 192, 192, 193, 164, 164, 141, 187, 164,
1281 144, 190, 64, 10, 64, 164, 38, 192, 125, 16,
1282 17, 18, 271, 130, 411, 164, 203, 24, 25, 416,
1283 29, 145, 166, 64, 31, 32, 64, 171, 35, 203,
1284 37, 164, 39, 40, 192, 206, 433, 44, 205, 163,
1285 157, 196, 203, 197, 168, 169, 53, 203, 105, 192,
1286 57, 198, 199, 200, 201, 202, 63, 203, 65, 59,
1287 60, 61, 62, 180, 181, 182, 206, 192, 75, 76,
1288 329, 192, 79, 80, 203, 143, 254, 84, 85, 12,
1289 169, 88, 89, 130, 187, 158, 29, 9, 211, 301,
1290 97, 91, 357, 93, 413, 95, 427, 19, -1, -1,
1291 257, 101, -1, 110, 111, 112, -1, -1, -1, -1,
1292 117, -1, 198, 199, 200, 201, 202, -1, -1, -1,
1293 127, 207, -1, -1, -1, 132, -1, 134, -1, 136,
1294 137, -1, -1, -1, 56, 57, -1, -1, -1, 146,
1295 147, 148, 149, 150, 151, 152, 153, -1, -1, 156,
1296 -1, 158, 74, -1, -1, -1, -1, -1, -1, -1,
1297 167, -1, -1, -1, -1, 172, 173, 174, -1, 176,
1298 177, -1, -1, 10, 96, 400, 183, 184, -1, 16,
1299 17, 18, 104, -1, 106, 192, 193, 24, 25, -1,
1300 -1, -1, -1, -1, 31, 32, -1, -1, 35, 121,
1301 37, -1, 39, 40, -1, -1, -1, 44, 6, -1,
1302 -1, -1, -1, -1, -1, -1, 53, 139, 140, -1,
1303 57, -1, -1, -1, -1, -1, 63, -1, 65, -1,
1304 -1, -1, -1, -1, -1, 33, -1, -1, 75, 76,
1305 -1, -1, 79, 80, -1, -1, -1, 84, 85, -1,
1306 -1, 88, 89, 175, 52, 177, -1, 55, -1, -1,
1307 97, -1, -1, 185, -1, -1, -1, 189, -1, -1,
1308 -1, -1, -1, 110, 111, 112, -1, -1, -1, -1,
1309 117, -1, -1, -1, -1, 12, -1, 14, 15, -1,
1310 127, -1, -1, -1, 21, 132, 23, 134, -1, 136,
1311 137, -1, -1, -1, -1, -1, -1, -1, 41, 146,
1312 147, 148, 149, 150, 151, 152, 153, 50, -1, 156,
1313 -1, 158, -1, -1, 51, 58, -1, -1, -1, -1,
1314 167, -1, -1, 131, -1, 172, 173, 174, -1, 176,
1315 177, -1, -1, -1, 77, 78, 183, 184, 81, -1,
1316 -1, -1, -1, -1, 87, -1, 193, -1, -1, -1,
1317 -1, 159, 160, 161, 162, 92, -1, 94, -1, 167,
1318 -1, -1, -1, 100, -1, 102, -1, -1, 105, -1,
1319 -1, 114, 115, -1, -1, 118, 119, 120, -1, 122,
1320 123, 124, -1, 126, -1, -1, -1, -1, -1, -1,
1321 -1, 128, 129, -1, -1, -1, -1, -1, -1, -1,
1322 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1329 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1330 symbol of state STATE-NUM. */
1331 static const yytype_uint16 yystos[] =
1333 0, 1, 10, 16, 17, 18, 24, 25, 31, 32,
1334 35, 37, 39, 40, 44, 53, 57, 63, 65, 75,
1335 76, 79, 80, 84, 85, 88, 89, 97, 110, 111,
1336 112, 117, 127, 132, 134, 136, 137, 146, 147, 148,
1337 149, 150, 151, 152, 153, 156, 158, 167, 172, 173,
1338 174, 176, 177, 183, 184, 193, 209, 210, 211, 212,
1339 213, 225, 226, 227, 228, 232, 237, 245, 255, 260,
1340 264, 269, 273, 274, 275, 276, 277, 285, 286, 289,
1341 301, 302, 192, 64, 64, 229, 8, 13, 20, 73,
1342 107, 108, 125, 130, 157, 180, 181, 182, 265, 266,
1343 267, 268, 11, 103, 108, 249, 250, 251, 164, 278,
1344 265, 22, 26, 86, 133, 141, 144, 166, 171, 239,
1345 70, 72, 164, 214, 215, 216, 164, 164, 164, 164,
1346 283, 284, 214, 297, 64, 59, 60, 61, 62, 91,
1347 93, 95, 101, 252, 253, 254, 297, 164, 164, 296,
1348 64, 7, 8, 27, 67, 98, 165, 170, 290, 291,
1349 29, 70, 72, 154, 214, 64, 45, 99, 155, 261,
1350 262, 263, 164, 279, 238, 239, 164, 6, 33, 52,
1351 55, 131, 159, 160, 161, 162, 167, 270, 271, 272,
1352 12, 14, 15, 21, 23, 51, 92, 94, 100, 102,
1353 105, 128, 129, 233, 234, 235, 236, 300, 215, 64,
1354 204, 293, 294, 295, 64, 292, 0, 211, 192, 214,
1355 214, 34, 64, 299, 64, 164, 164, 36, 58, 83,
1356 288, 206, 30, 54, 57, 142, 143, 149, 230, 231,
1357 266, 250, 64, 34, 240, 3, 46, 47, 48, 49,
1358 145, 163, 168, 169, 256, 257, 258, 259, 164, 211,
1359 284, 214, 253, 64, 164, 291, 68, 246, 29, 29,
1360 246, 90, 246, 262, 64, 203, 239, 271, 299, 164,
1361 42, 64, 175, 298, 234, 64, 299, 281, 64, 294,
1362 64, 192, 217, 5, 69, 71, 164, 188, 287, 194,
1363 195, 303, 304, 305, 64, 164, 31, 39, 43, 82,
1364 113, 178, 241, 242, 243, 164, 164, 64, 257, 299,
1365 298, 64, 247, 246, 246, 247, 215, 247, 164, 65,
1366 138, 282, 38, 9, 19, 56, 57, 74, 96, 104,
1367 106, 121, 139, 140, 175, 177, 185, 189, 218, 219,
1368 220, 221, 222, 223, 224, 152, 304, 306, 307, 309,
1369 192, 203, 164, 4, 28, 109, 116, 135, 187, 190,
1370 244, 41, 50, 58, 77, 78, 81, 87, 114, 115,
1371 118, 119, 120, 122, 123, 124, 126, 185, 248, 247,
1372 247, 246, 29, 280, 215, 64, 64, 64, 179, 164,
1373 203, 192, 207, 307, 206, 299, 247, 205, 214, 196,
1374 308, 203, 197, 310, 311, 299, 203, 207, 311, 192,
1375 299, 206, 198, 199, 200, 201, 202, 312, 313, 314,
1376 207, 313, 192, 203, 192, 299
1379 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1380 static const yytype_uint16 yyr1[] =
1382 0, 208, 209, 210, 210, 210, 211, 211, 211, 211,
1383 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
1384 212, 213, 213, 213, 213, 213, 214, 214, 215, 216,
1385 216, 217, 217, 218, 218, 218, 219, 220, 220, 220,
1386 220, 220, 220, 220, 220, 221, 221, 222, 222, 222,
1387 222, 222, 222, 223, 224, 225, 226, 226, 227, 227,
1388 227, 227, 228, 228, 228, 228, 228, 228, 228, 228,
1389 228, 229, 229, 230, 230, 231, 231, 231, 231, 231,
1390 232, 233, 233, 234, 234, 234, 234, 235, 235, 235,
1391 235, 235, 235, 235, 235, 235, 236, 236, 237, 237,
1392 237, 238, 238, 239, 239, 239, 239, 239, 239, 239,
1393 239, 240, 240, 241, 241, 241, 241, 242, 242, 243,
1394 243, 244, 244, 244, 244, 244, 244, 244, 245, 245,
1395 245, 245, 245, 245, 245, 245, 246, 246, 247, 247,
1396 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1397 248, 248, 248, 248, 248, 248, 248, 249, 249, 250,
1398 251, 251, 251, 252, 252, 253, 254, 254, 254, 254,
1399 254, 254, 254, 254, 255, 256, 256, 257, 257, 257,
1400 257, 257, 258, 258, 259, 259, 259, 259, 260, 261,
1401 261, 262, 263, 263, 263, 264, 264, 265, 265, 266,
1402 266, 267, 267, 267, 267, 267, 267, 268, 268, 268,
1403 268, 268, 268, 269, 270, 270, 271, 272, 272, 272,
1404 272, 272, 272, 272, 272, 272, 272, 273, 273, 273,
1405 273, 273, 273, 273, 273, 273, 273, 273, 273, 273,
1406 273, 274, 274, 274, 275, 275, 276, 276, 277, 277,
1407 277, 278, 278, 278, 279, 280, 280, 281, 281, 282,
1408 282, 283, 283, 284, 285, 285, 286, 286, 287, 287,
1409 287, 287, 288, 288, 288, 289, 290, 290, 291, 291,
1410 291, 291, 291, 291, 291, 292, 292, 293, 293, 294,
1411 294, 295, 296, 296, 297, 297, 298, 298, 298, 299,
1412 299, 300, 301, 302, 303, 303, 304, 305, 305, 306,
1413 306, 307, 308, 309, 310, 310, 311, 312, 312, 313,
1414 314, 314, 314, 314, 314
1417 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1418 static const yytype_uint8 yyr2[] =
1420 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1422 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1423 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1424 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1425 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1427 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1428 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1429 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1430 3, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1431 1, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1432 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1433 4, 6, 4, 5, 5, 4, 0, 2, 0, 2,
1434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1435 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
1436 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1437 1, 1, 1, 1, 3, 2, 1, 2, 2, 2,
1438 2, 2, 1, 1, 1, 1, 1, 1, 2, 2,
1439 1, 2, 1, 1, 1, 2, 2, 2, 1, 1,
1440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1441 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1442 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1443 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
1444 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1445 1, 1, 2, 0, 4, 1, 0, 0, 2, 2,
1446 2, 2, 1, 1, 3, 3, 1, 1, 1, 1,
1447 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1448 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1449 1, 5, 2, 1, 2, 1, 1, 1, 1, 1,
1450 1, 2, 5, 1, 3, 2, 3, 1, 1, 2,
1451 1, 5, 4, 3, 2, 1, 6, 3, 2, 3,
1456 #define yyerrok (yyerrstatus = 0)
1457 #define yyclearin (yychar = YYEMPTY)
1458 #define YYEMPTY (-2)
1461 #define YYACCEPT goto yyacceptlab
1462 #define YYABORT goto yyabortlab
1463 #define YYERROR goto yyerrorlab
1466 #define YYRECOVERING() (!!yyerrstatus)
1468 #define YYBACKUP(Token, Value) \
1470 if (yychar == YYEMPTY) \
1474 YYPOPSTACK (yylen); \
1480 yyerror (YY_("syntax error: cannot back up")); \
1485 /* Error token number */
1487 #define YYERRCODE 256
1491 /* Enable debugging if requested. */
1495 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1496 # define YYFPRINTF fprintf
1499 # define YYDPRINTF(Args) \
1505 /* This macro is provided for backward compatibility. */
1506 #ifndef YY_LOCATION_PRINT
1507 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1511 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1515 YYFPRINTF (stderr, "%s ", Title); \
1516 yy_symbol_print (stderr, \
1518 YYFPRINTF (stderr, "\n"); \
1523 /*----------------------------------------.
1524 | Print this symbol's value on YYOUTPUT. |
1525 `----------------------------------------*/
1528 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1530 FILE *yyo = yyoutput;
1535 if (yytype < YYNTOKENS)
1536 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1542 /*--------------------------------.
1543 | Print this symbol on YYOUTPUT. |
1544 `--------------------------------*/
1547 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1549 YYFPRINTF (yyoutput, "%s %s (",
1550 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1552 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1553 YYFPRINTF (yyoutput, ")");
1556 /*------------------------------------------------------------------.
1557 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1559 `------------------------------------------------------------------*/
1562 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1564 YYFPRINTF (stderr, "Stack now");
1565 for (; yybottom <= yytop; yybottom++)
1567 int yybot = *yybottom;
1568 YYFPRINTF (stderr, " %d", yybot);
1570 YYFPRINTF (stderr, "\n");
1573 # define YY_STACK_PRINT(Bottom, Top) \
1576 yy_stack_print ((Bottom), (Top)); \
1580 /*------------------------------------------------.
1581 | Report that the YYRULE is going to be reduced. |
1582 `------------------------------------------------*/
1585 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1587 unsigned long int yylno = yyrline[yyrule];
1588 int yynrhs = yyr2[yyrule];
1590 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1592 /* The symbols being reduced. */
1593 for (yyi = 0; yyi < yynrhs; yyi++)
1595 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1596 yy_symbol_print (stderr,
1597 yystos[yyssp[yyi + 1 - yynrhs]],
1598 &(yyvsp[(yyi + 1) - (yynrhs)])
1600 YYFPRINTF (stderr, "\n");
1604 # define YY_REDUCE_PRINT(Rule) \
1607 yy_reduce_print (yyssp, yyvsp, Rule); \
1610 /* Nonzero means print parse trace. It is left uninitialized so that
1611 multiple parsers can coexist. */
1613 #else /* !YYDEBUG */
1614 # define YYDPRINTF(Args)
1615 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1616 # define YY_STACK_PRINT(Bottom, Top)
1617 # define YY_REDUCE_PRINT(Rule)
1618 #endif /* !YYDEBUG */
1621 /* YYINITDEPTH -- initial size of the parser's stacks. */
1623 # define YYINITDEPTH 200
1626 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1627 if the built-in stack extension method is used).
1629 Do not make this value too large; the results are undefined if
1630 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1631 evaluated with infinite-precision integer arithmetic. */
1634 # define YYMAXDEPTH 10000
1641 # if defined __GLIBC__ && defined _STRING_H
1642 # define yystrlen strlen
1644 /* Return the length of YYSTR. */
1646 yystrlen (const char *yystr)
1649 for (yylen = 0; yystr[yylen]; yylen++)
1657 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1658 # define yystpcpy stpcpy
1660 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1663 yystpcpy (char *yydest, const char *yysrc)
1666 const char *yys = yysrc;
1668 while ((*yyd++ = *yys++) != '\0')
1677 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1678 quotes and backslashes, so that it's suitable for yyerror. The
1679 heuristic is that double-quoting is unnecessary unless the string
1680 contains an apostrophe, a comma, or backslash (other than
1681 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1682 null, do not copy; instead, return the length of what the result
1685 yytnamerr (char *yyres, const char *yystr)
1690 char const *yyp = yystr;
1697 goto do_not_strip_quotes;
1701 goto do_not_strip_quotes;
1714 do_not_strip_quotes: ;
1718 return yystrlen (yystr);
1720 return yystpcpy (yyres, yystr) - yyres;
1724 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1725 about the unexpected token YYTOKEN for the state stack whose top is
1728 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1729 not large enough to hold the message. In that case, also set
1730 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1731 required number of bytes is too large to store. */
1733 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1734 yytype_int16 *yyssp, int yytoken)
1736 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1737 YYSIZE_T yysize = yysize0;
1738 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1739 /* Internationalized format string. */
1740 const char *yyformat = YY_NULLPTR;
1741 /* Arguments of yyformat. */
1742 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1743 /* Number of reported tokens (one for the "unexpected", one per
1747 /* There are many possibilities here to consider:
1748 - If this state is a consistent state with a default action, then
1749 the only way this function was invoked is if the default action
1750 is an error action. In that case, don't check for expected
1751 tokens because there are none.
1752 - The only way there can be no lookahead present (in yychar) is if
1753 this state is a consistent state with a default action. Thus,
1754 detecting the absence of a lookahead is sufficient to determine
1755 that there is no unexpected or expected token to report. In that
1756 case, just report a simple "syntax error".
1757 - Don't assume there isn't a lookahead just because this state is a
1758 consistent state with a default action. There might have been a
1759 previous inconsistent state, consistent state with a non-default
1760 action, or user semantic action that manipulated yychar.
1761 - Of course, the expected token list depends on states to have
1762 correct lookahead information, and it depends on the parser not
1763 to perform extra reductions after fetching a lookahead from the
1764 scanner and before detecting a syntax error. Thus, state merging
1765 (from LALR or IELR) and default reductions corrupt the expected
1766 token list. However, the list is correct for canonical LR with
1767 one exception: it will still contain any token that will not be
1768 accepted due to an error action in a later state.
1770 if (yytoken != YYEMPTY)
1772 int yyn = yypact[*yyssp];
1773 yyarg[yycount++] = yytname[yytoken];
1774 if (!yypact_value_is_default (yyn))
1776 /* Start YYX at -YYN if negative to avoid negative indexes in
1777 YYCHECK. In other words, skip the first -YYN actions for
1778 this state because they are default actions. */
1779 int yyxbegin = yyn < 0 ? -yyn : 0;
1780 /* Stay within bounds of both yycheck and yytname. */
1781 int yychecklim = YYLAST - yyn + 1;
1782 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1785 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1786 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1787 && !yytable_value_is_error (yytable[yyx + yyn]))
1789 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1795 yyarg[yycount++] = yytname[yyx];
1797 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1798 if (! (yysize <= yysize1
1799 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1809 # define YYCASE_(N, S) \
1813 YYCASE_(0, YY_("syntax error"));
1814 YYCASE_(1, YY_("syntax error, unexpected %s"));
1815 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1816 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1817 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1818 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1823 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1824 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1829 if (*yymsg_alloc < yysize)
1831 *yymsg_alloc = 2 * yysize;
1832 if (! (yysize <= *yymsg_alloc
1833 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1834 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1838 /* Avoid sprintf, as that infringes on the user's name space.
1839 Don't have undefined behavior even if the translation
1840 produced a string with the wrong number of "%s"s. */
1844 while ((*yyp = *yyformat) != '\0')
1845 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1847 yyp += yytnamerr (yyp, yyarg[yyi++]);
1858 #endif /* YYERROR_VERBOSE */
1860 /*-----------------------------------------------.
1861 | Release the memory associated to this symbol. |
1862 `-----------------------------------------------*/
1865 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1870 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1872 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1874 YY_IGNORE_MAYBE_UNINITIALIZED_END
1880 /* The lookahead symbol. */
1883 /* The semantic value of the lookahead symbol. */
1885 /* Number of syntax errors so far. */
1897 /* Number of tokens to shift before error messages enabled. */
1900 /* The stacks and their tools:
1901 'yyss': related to states.
1902 'yyvs': related to semantic values.
1904 Refer to the stacks through separate pointers, to allow yyoverflow
1905 to reallocate them elsewhere. */
1907 /* The state stack. */
1908 yytype_int16 yyssa[YYINITDEPTH];
1910 yytype_int16 *yyssp;
1912 /* The semantic value stack. */
1913 YYSTYPE yyvsa[YYINITDEPTH];
1917 YYSIZE_T yystacksize;
1921 /* Lookahead token as an internal (translated) token number. */
1923 /* The variables used to return semantic value and location from the
1928 /* Buffer for error messages, and its allocated size. */
1930 char *yymsg = yymsgbuf;
1931 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1934 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1936 /* The number of symbols on the RHS of the reduced rule.
1937 Keep to zero when no symbol should be popped. */
1940 yyssp = yyss = yyssa;
1941 yyvsp = yyvs = yyvsa;
1942 yystacksize = YYINITDEPTH;
1944 YYDPRINTF ((stderr, "Starting parse\n"));
1949 yychar = YYEMPTY; /* Cause a token to be read. */
1952 /*------------------------------------------------------------.
1953 | yynewstate -- Push a new state, which is found in yystate. |
1954 `------------------------------------------------------------*/
1956 /* In all cases, when you get here, the value and location stacks
1957 have just been pushed. So pushing a state here evens the stacks. */
1963 if (yyss + yystacksize - 1 <= yyssp)
1965 /* Get the current used size of the three stacks, in elements. */
1966 YYSIZE_T yysize = yyssp - yyss + 1;
1970 /* Give user a chance to reallocate the stack. Use copies of
1971 these so that the &'s don't force the real ones into
1973 YYSTYPE *yyvs1 = yyvs;
1974 yytype_int16 *yyss1 = yyss;
1976 /* Each stack pointer address is followed by the size of the
1977 data in use in that stack, in bytes. This used to be a
1978 conditional around just the two extra args, but that might
1979 be undefined if yyoverflow is a macro. */
1980 yyoverflow (YY_("memory exhausted"),
1981 &yyss1, yysize * sizeof (*yyssp),
1982 &yyvs1, yysize * sizeof (*yyvsp),
1988 #else /* no yyoverflow */
1989 # ifndef YYSTACK_RELOCATE
1990 goto yyexhaustedlab;
1992 /* Extend the stack our own way. */
1993 if (YYMAXDEPTH <= yystacksize)
1994 goto yyexhaustedlab;
1996 if (YYMAXDEPTH < yystacksize)
1997 yystacksize = YYMAXDEPTH;
2000 yytype_int16 *yyss1 = yyss;
2001 union yyalloc *yyptr =
2002 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2004 goto yyexhaustedlab;
2005 YYSTACK_RELOCATE (yyss_alloc, yyss);
2006 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2007 # undef YYSTACK_RELOCATE
2009 YYSTACK_FREE (yyss1);
2012 #endif /* no yyoverflow */
2014 yyssp = yyss + yysize - 1;
2015 yyvsp = yyvs + yysize - 1;
2017 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2018 (unsigned long int) yystacksize));
2020 if (yyss + yystacksize - 1 <= yyssp)
2024 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2026 if (yystate == YYFINAL)
2036 /* Do appropriate processing given the current state. Read a
2037 lookahead token if we need one and don't already have one. */
2039 /* First try to decide what to do without reference to lookahead token. */
2040 yyn = yypact[yystate];
2041 if (yypact_value_is_default (yyn))
2044 /* Not known => get a lookahead token if don't already have one. */
2046 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2047 if (yychar == YYEMPTY)
2049 YYDPRINTF ((stderr, "Reading a token: "));
2053 if (yychar <= YYEOF)
2055 yychar = yytoken = YYEOF;
2056 YYDPRINTF ((stderr, "Now at end of input.\n"));
2060 yytoken = YYTRANSLATE (yychar);
2061 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2064 /* If the proper action on seeing token YYTOKEN is to reduce or to
2065 detect an error, take that action. */
2067 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2072 if (yytable_value_is_error (yyn))
2078 /* Count tokens shifted since error; after three, turn off error
2083 /* Shift the lookahead token. */
2084 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2086 /* Discard the shifted token. */
2090 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2092 YY_IGNORE_MAYBE_UNINITIALIZED_END
2097 /*-----------------------------------------------------------.
2098 | yydefault -- do the default action for the current state. |
2099 `-----------------------------------------------------------*/
2101 yyn = yydefact[yystate];
2107 /*-----------------------------.
2108 | yyreduce -- Do a reduction. |
2109 `-----------------------------*/
2111 /* yyn is the number of a rule to reduce with. */
2114 /* If YYLEN is nonzero, implement the default value of the action:
2117 Otherwise, the following line sets YYVAL to garbage.
2118 This behavior is undocumented and Bison
2119 users should not rely upon it. Assigning to YYVAL
2120 unconditionally makes the parser a bit smaller, and it avoids a
2121 GCC warning that YYVAL may be used uninitialized. */
2122 yyval = yyvsp[1-yylen];
2125 YY_REDUCE_PRINT (yyn);
2129 #line 384 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2131 /* I will need to incorporate much more fine grained
2132 * error messages. The following should suffice for
2135 struct FILE_INFO * ip_ctx = lex_current();
2137 "syntax error in %s line %d, column %d",
2139 ip_ctx->errpos.nline,
2140 ip_ctx->errpos.ncol);
2142 #line 2143 "ntp_parser.c" /* yacc.c:1646 */
2146 #line 420 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2150 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2151 APPEND_G_FIFO(cfgt.peers, my_node);
2153 #line 2154 "ntp_parser.c" /* yacc.c:1646 */
2157 #line 439 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2158 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2159 #line 2160 "ntp_parser.c" /* yacc.c:1646 */
2163 #line 444 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2164 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2165 #line 2166 "ntp_parser.c" /* yacc.c:1646 */
2169 #line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2170 { (yyval.Integer) = AF_INET; }
2171 #line 2172 "ntp_parser.c" /* yacc.c:1646 */
2175 #line 451 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2176 { (yyval.Integer) = AF_INET6; }
2177 #line 2178 "ntp_parser.c" /* yacc.c:1646 */
2181 #line 456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2182 { (yyval.Attr_val_fifo) = NULL; }
2183 #line 2184 "ntp_parser.c" /* yacc.c:1646 */
2187 #line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2189 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2190 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2192 #line 2193 "ntp_parser.c" /* yacc.c:1646 */
2196 #line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2197 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2198 #line 2199 "ntp_parser.c" /* yacc.c:1646 */
2202 #line 488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2203 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2204 #line 2205 "ntp_parser.c" /* yacc.c:1646 */
2208 #line 490 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2209 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2210 #line 2211 "ntp_parser.c" /* yacc.c:1646 */
2214 #line 504 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2215 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2216 #line 2217 "ntp_parser.c" /* yacc.c:1646 */
2220 #line 518 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2222 unpeer_node *my_node;
2224 my_node = create_unpeer_node((yyvsp[0].Address_node));
2226 APPEND_G_FIFO(cfgt.unpeers, my_node);
2228 #line 2229 "ntp_parser.c" /* yacc.c:1646 */
2232 #line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2233 { cfgt.broadcastclient = 1; }
2234 #line 2235 "ntp_parser.c" /* yacc.c:1646 */
2238 #line 541 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2239 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2240 #line 2241 "ntp_parser.c" /* yacc.c:1646 */
2244 #line 543 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2245 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2246 #line 2247 "ntp_parser.c" /* yacc.c:1646 */
2250 #line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2251 { cfgt.mdnstries = (yyvsp[0].Integer); }
2252 #line 2253 "ntp_parser.c" /* yacc.c:1646 */
2256 #line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2260 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2261 APPEND_G_FIFO(cfgt.vars, atrv);
2263 #line 2264 "ntp_parser.c" /* yacc.c:1646 */
2267 #line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2268 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2269 #line 2270 "ntp_parser.c" /* yacc.c:1646 */
2273 #line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2275 cfgt.auth.cryptosw++;
2276 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2278 #line 2279 "ntp_parser.c" /* yacc.c:1646 */
2282 #line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2283 { cfgt.auth.keys = (yyvsp[0].String); }
2284 #line 2285 "ntp_parser.c" /* yacc.c:1646 */
2288 #line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2289 { cfgt.auth.keysdir = (yyvsp[0].String); }
2290 #line 2291 "ntp_parser.c" /* yacc.c:1646 */
2294 #line 574 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2295 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2296 #line 2297 "ntp_parser.c" /* yacc.c:1646 */
2300 #line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2301 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2302 #line 2303 "ntp_parser.c" /* yacc.c:1646 */
2306 #line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2308 /* [Bug 948] leaves it open if appending or
2309 * replacing the trusted key list is the right
2310 * way. In any case, either alternative should
2311 * be coded correctly!
2313 DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
2314 CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
2316 #line 2317 "ntp_parser.c" /* yacc.c:1646 */
2320 #line 588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2321 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2322 #line 2323 "ntp_parser.c" /* yacc.c:1646 */
2326 #line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2327 { (yyval.Attr_val_fifo) = NULL; }
2328 #line 2329 "ntp_parser.c" /* yacc.c:1646 */
2332 #line 595 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2334 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2335 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2337 #line 2338 "ntp_parser.c" /* yacc.c:1646 */
2341 #line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2342 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2343 #line 2344 "ntp_parser.c" /* yacc.c:1646 */
2347 #line 605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2349 (yyval.Attr_val) = NULL;
2350 cfgt.auth.revoke = (yyvsp[0].Integer);
2351 msyslog(LOG_WARNING,
2352 "'crypto revoke %d' is deprecated, "
2353 "please use 'revoke %d' instead.",
2354 cfgt.auth.revoke, cfgt.auth.revoke);
2356 #line 2357 "ntp_parser.c" /* yacc.c:1646 */
2360 #line 630 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2361 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2362 #line 2363 "ntp_parser.c" /* yacc.c:1646 */
2366 #line 635 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2368 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2369 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2371 #line 2372 "ntp_parser.c" /* yacc.c:1646 */
2375 #line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2377 (yyval.Attr_val_fifo) = NULL;
2378 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2380 #line 2381 "ntp_parser.c" /* yacc.c:1646 */
2384 #line 648 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2385 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2386 #line 2387 "ntp_parser.c" /* yacc.c:1646 */
2390 #line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2391 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2392 #line 2393 "ntp_parser.c" /* yacc.c:1646 */
2396 #line 652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2397 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2398 #line 2399 "ntp_parser.c" /* yacc.c:1646 */
2402 #line 654 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2403 { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
2404 #line 2405 "ntp_parser.c" /* yacc.c:1646 */
2408 #line 681 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2409 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2410 #line 2411 "ntp_parser.c" /* yacc.c:1646 */
2414 #line 683 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2416 if (lex_from_file()) {
2417 cfgt.stats_dir = (yyvsp[0].String);
2419 YYFREE((yyvsp[0].String));
2420 yyerror("statsdir remote configuration ignored");
2423 #line 2424 "ntp_parser.c" /* yacc.c:1646 */
2427 #line 692 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2431 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2432 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2434 #line 2435 "ntp_parser.c" /* yacc.c:1646 */
2438 #line 702 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2440 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2441 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2443 #line 2444 "ntp_parser.c" /* yacc.c:1646 */
2447 #line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2449 (yyval.Int_fifo) = NULL;
2450 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2452 #line 2453 "ntp_parser.c" /* yacc.c:1646 */
2456 #line 726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2457 { (yyval.Attr_val_fifo) = NULL; }
2458 #line 2459 "ntp_parser.c" /* yacc.c:1646 */
2462 #line 728 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2464 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2465 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2467 #line 2468 "ntp_parser.c" /* yacc.c:1646 */
2471 #line 736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2473 if (lex_from_file()) {
2474 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2476 (yyval.Attr_val) = NULL;
2477 YYFREE((yyvsp[0].String));
2478 yyerror("filegen file remote config ignored");
2481 #line 2482 "ntp_parser.c" /* yacc.c:1646 */
2485 #line 746 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2487 if (lex_from_file()) {
2488 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2490 (yyval.Attr_val) = NULL;
2491 yyerror("filegen type remote config ignored");
2494 #line 2495 "ntp_parser.c" /* yacc.c:1646 */
2498 #line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2502 if (lex_from_file()) {
2503 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2505 (yyval.Attr_val) = NULL;
2506 if (T_Link == (yyvsp[0].Integer))
2507 err = "filegen link remote config ignored";
2509 err = "filegen nolink remote config ignored";
2513 #line 2514 "ntp_parser.c" /* yacc.c:1646 */
2517 #line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2518 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2519 #line 2520 "ntp_parser.c" /* yacc.c:1646 */
2523 #line 800 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2525 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2527 #line 2528 "ntp_parser.c" /* yacc.c:1646 */
2531 #line 804 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2533 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2535 #line 2536 "ntp_parser.c" /* yacc.c:1646 */
2539 #line 808 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2543 rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2544 lex_current()->curpos.nline);
2545 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2547 #line 2548 "ntp_parser.c" /* yacc.c:1646 */
2551 #line 816 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2555 rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2556 lex_current()->curpos.nline);
2557 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2559 #line 2560 "ntp_parser.c" /* yacc.c:1646 */
2563 #line 824 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2567 rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2568 lex_current()->curpos.nline);
2569 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2571 #line 2572 "ntp_parser.c" /* yacc.c:1646 */
2575 #line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2579 rn = create_restrict_node(
2580 create_address_node(
2583 create_address_node(
2586 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2587 lex_current()->curpos.nline);
2588 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2590 #line 2591 "ntp_parser.c" /* yacc.c:1646 */
2594 #line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2598 rn = create_restrict_node(
2599 create_address_node(
2602 create_address_node(
2605 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2606 lex_current()->curpos.nline);
2607 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2609 #line 2610 "ntp_parser.c" /* yacc.c:1646 */
2613 #line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2617 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer)));
2618 rn = create_restrict_node(
2619 NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2620 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2622 #line 2623 "ntp_parser.c" /* yacc.c:1646 */
2626 #line 874 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2627 { (yyval.Integer) = -1; }
2628 #line 2629 "ntp_parser.c" /* yacc.c:1646 */
2632 #line 876 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2634 if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
2635 struct FILE_INFO * ip_ctx;
2637 ip_ctx = lex_current();
2639 "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
2642 ip_ctx->errpos.nline,
2643 ip_ctx->errpos.ncol);
2644 (yyvsp[0].Integer) = 0;
2646 (yyval.Integer) = (yyvsp[0].Integer);
2648 #line 2649 "ntp_parser.c" /* yacc.c:1646 */
2652 #line 895 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2653 { (yyval.Int_fifo) = NULL; }
2654 #line 2655 "ntp_parser.c" /* yacc.c:1646 */
2658 #line 897 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2660 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2661 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2663 #line 2664 "ntp_parser.c" /* yacc.c:1646 */
2667 #line 925 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2669 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2670 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2672 #line 2673 "ntp_parser.c" /* yacc.c:1646 */
2676 #line 930 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2678 (yyval.Attr_val_fifo) = NULL;
2679 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2681 #line 2682 "ntp_parser.c" /* yacc.c:1646 */
2685 #line 938 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2686 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2687 #line 2688 "ntp_parser.c" /* yacc.c:1646 */
2691 #line 949 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2693 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2694 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2696 #line 2697 "ntp_parser.c" /* yacc.c:1646 */
2700 #line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2702 (yyval.Attr_val_fifo) = NULL;
2703 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2705 #line 2706 "ntp_parser.c" /* yacc.c:1646 */
2709 #line 962 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2710 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2711 #line 2712 "ntp_parser.c" /* yacc.c:1646 */
2715 #line 982 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2717 addr_opts_node *aon;
2719 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2720 APPEND_G_FIFO(cfgt.fudge, aon);
2722 #line 2723 "ntp_parser.c" /* yacc.c:1646 */
2726 #line 992 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2728 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2729 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2731 #line 2732 "ntp_parser.c" /* yacc.c:1646 */
2735 #line 997 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2737 (yyval.Attr_val_fifo) = NULL;
2738 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2740 #line 2741 "ntp_parser.c" /* yacc.c:1646 */
2744 #line 1005 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2745 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2746 #line 2747 "ntp_parser.c" /* yacc.c:1646 */
2750 #line 1007 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2751 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2752 #line 2753 "ntp_parser.c" /* yacc.c:1646 */
2756 #line 1009 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2758 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2759 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2761 (yyval.Attr_val) = NULL;
2762 yyerror("fudge factor: stratum value not in [0..16], ignored");
2765 #line 2766 "ntp_parser.c" /* yacc.c:1646 */
2769 #line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2770 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2771 #line 2772 "ntp_parser.c" /* yacc.c:1646 */
2775 #line 1020 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2776 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2777 #line 2778 "ntp_parser.c" /* yacc.c:1646 */
2781 #line 1041 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2782 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2783 #line 2784 "ntp_parser.c" /* yacc.c:1646 */
2787 #line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2789 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2790 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2792 #line 2793 "ntp_parser.c" /* yacc.c:1646 */
2796 #line 1051 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2798 (yyval.Attr_val_fifo) = NULL;
2799 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2801 #line 2802 "ntp_parser.c" /* yacc.c:1646 */
2805 #line 1059 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2806 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2807 #line 2808 "ntp_parser.c" /* yacc.c:1646 */
2811 #line 1075 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2812 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2813 #line 2814 "ntp_parser.c" /* yacc.c:1646 */
2817 #line 1077 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2818 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2819 #line 2820 "ntp_parser.c" /* yacc.c:1646 */
2823 #line 1082 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2825 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2826 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2828 #line 2829 "ntp_parser.c" /* yacc.c:1646 */
2832 #line 1087 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2834 (yyval.Attr_val_fifo) = NULL;
2835 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2837 #line 2838 "ntp_parser.c" /* yacc.c:1646 */
2841 #line 1095 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2842 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2843 #line 2844 "ntp_parser.c" /* yacc.c:1646 */
2847 #line 1097 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2849 if (lex_from_file()) {
2850 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2854 (yyval.Attr_val) = NULL;
2855 snprintf(err_str, sizeof(err_str),
2856 "enable/disable %s remote configuration ignored",
2857 keyword((yyvsp[0].Integer)));
2861 #line 2862 "ntp_parser.c" /* yacc.c:1646 */
2865 #line 1136 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2866 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2867 #line 2868 "ntp_parser.c" /* yacc.c:1646 */
2871 #line 1141 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2873 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2874 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2876 #line 2877 "ntp_parser.c" /* yacc.c:1646 */
2880 #line 1146 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2882 (yyval.Attr_val_fifo) = NULL;
2883 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2885 #line 2886 "ntp_parser.c" /* yacc.c:1646 */
2889 #line 1154 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2890 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2891 #line 2892 "ntp_parser.c" /* yacc.c:1646 */
2895 #line 1179 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2899 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2900 APPEND_G_FIFO(cfgt.vars, av);
2902 #line 2903 "ntp_parser.c" /* yacc.c:1646 */
2906 #line 1186 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2910 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2911 APPEND_G_FIFO(cfgt.vars, av);
2913 #line 2914 "ntp_parser.c" /* yacc.c:1646 */
2917 #line 1193 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2921 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2922 APPEND_G_FIFO(cfgt.vars, av);
2924 #line 2925 "ntp_parser.c" /* yacc.c:1646 */
2928 #line 1200 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2930 char error_text[64];
2933 if (lex_from_file()) {
2934 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2935 APPEND_G_FIFO(cfgt.vars, av);
2937 YYFREE((yyvsp[0].String));
2938 snprintf(error_text, sizeof(error_text),
2939 "%s remote config ignored",
2940 keyword((yyvsp[-1].Integer)));
2941 yyerror(error_text);
2944 #line 2945 "ntp_parser.c" /* yacc.c:1646 */
2948 #line 1216 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2950 if (!lex_from_file()) {
2951 YYFREE((yyvsp[-1].String)); /* avoid leak */
2952 yyerror("remote includefile ignored");
2955 if (lex_level() > MAXINCLUDELEVEL) {
2956 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2957 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2959 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
2960 if (!lex_push_file(path, "r")) {
2961 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
2962 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
2965 YYFREE((yyvsp[-1].String)); /* avoid leak */
2967 #line 2968 "ntp_parser.c" /* yacc.c:1646 */
2971 #line 1235 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2972 { lex_flush_stack(); }
2973 #line 2974 "ntp_parser.c" /* yacc.c:1646 */
2977 #line 1237 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2978 { /* see drift_parm below for actions */ }
2979 #line 2980 "ntp_parser.c" /* yacc.c:1646 */
2983 #line 1239 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2984 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2985 #line 2986 "ntp_parser.c" /* yacc.c:1646 */
2989 #line 1241 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2990 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2991 #line 2992 "ntp_parser.c" /* yacc.c:1646 */
2995 #line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2996 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2997 #line 2998 "ntp_parser.c" /* yacc.c:1646 */
3001 #line 1245 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3003 addr_opts_node *aon;
3005 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
3006 APPEND_G_FIFO(cfgt.trap, aon);
3008 #line 3009 "ntp_parser.c" /* yacc.c:1646 */
3012 #line 1252 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3013 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
3014 #line 3015 "ntp_parser.c" /* yacc.c:1646 */
3018 #line 1267 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3021 yyerror("Built without LEAP_SMEAR support.");
3024 #line 3025 "ntp_parser.c" /* yacc.c:1646 */
3028 #line 1287 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3030 if (lex_from_file()) {
3032 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
3033 APPEND_G_FIFO(cfgt.vars, av);
3035 YYFREE((yyvsp[0].String));
3036 yyerror("driftfile remote configuration ignored");
3039 #line 3040 "ntp_parser.c" /* yacc.c:1646 */
3043 #line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3045 if (lex_from_file()) {
3047 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
3048 APPEND_G_FIFO(cfgt.vars, av);
3049 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
3050 APPEND_G_FIFO(cfgt.vars, av);
3051 msyslog(LOG_WARNING,
3052 "'driftfile FILENAME WanderValue' is deprecated, "
3053 "please use separate 'driftfile FILENAME' and "
3054 "'nonvolatile WanderValue' lines instead.");
3056 YYFREE((yyvsp[-1].String));
3057 yyerror("driftfile remote configuration ignored");
3060 #line 3061 "ntp_parser.c" /* yacc.c:1646 */
3064 #line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3066 if (lex_from_file()) {
3068 av = create_attr_sval(T_Driftfile, estrdup(""));
3069 APPEND_G_FIFO(cfgt.vars, av);
3071 yyerror("driftfile remote configuration ignored");
3074 #line 3075 "ntp_parser.c" /* yacc.c:1646 */
3078 #line 1328 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3079 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3080 #line 3081 "ntp_parser.c" /* yacc.c:1646 */
3084 #line 1334 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3085 { (yyval.Integer) = 0; }
3086 #line 3087 "ntp_parser.c" /* yacc.c:1646 */
3090 #line 1339 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3091 { (yyval.Attr_val_fifo) = NULL; }
3092 #line 3093 "ntp_parser.c" /* yacc.c:1646 */
3096 #line 1341 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3098 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3099 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3101 #line 3102 "ntp_parser.c" /* yacc.c:1646 */
3105 #line 1349 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3106 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3107 #line 3108 "ntp_parser.c" /* yacc.c:1646 */
3111 #line 1351 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3113 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3114 destroy_address_node((yyvsp[0].Address_node));
3116 #line 3117 "ntp_parser.c" /* yacc.c:1646 */
3120 #line 1359 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3122 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3123 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3125 #line 3126 "ntp_parser.c" /* yacc.c:1646 */
3129 #line 1364 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3131 (yyval.Attr_val_fifo) = NULL;
3132 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3134 #line 3135 "ntp_parser.c" /* yacc.c:1646 */
3138 #line 1372 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3143 switch ((yyvsp[0].String)[0]) {
3148 prefix = (yyvsp[0].String)[0];
3149 type = (yyvsp[0].String) + 1;
3154 type = (yyvsp[0].String);
3157 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3158 YYFREE((yyvsp[0].String));
3160 #line 3161 "ntp_parser.c" /* yacc.c:1646 */
3164 #line 1397 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3168 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3169 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3171 #line 3172 "ntp_parser.c" /* yacc.c:1646 */
3175 #line 1404 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3179 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3180 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3182 #line 3183 "ntp_parser.c" /* yacc.c:1646 */
3186 #line 1432 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3187 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3188 #line 3189 "ntp_parser.c" /* yacc.c:1646 */
3192 #line 1437 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3194 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3195 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3197 #line 3198 "ntp_parser.c" /* yacc.c:1646 */
3201 #line 1442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3203 (yyval.Int_fifo) = NULL;
3204 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3206 #line 3207 "ntp_parser.c" /* yacc.c:1646 */
3210 #line 1466 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3212 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3213 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3215 #line 3216 "ntp_parser.c" /* yacc.c:1646 */
3219 #line 1471 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3221 (yyval.Attr_val_fifo) = NULL;
3222 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3224 #line 3225 "ntp_parser.c" /* yacc.c:1646 */
3228 #line 1479 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3230 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3231 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3233 #line 3234 "ntp_parser.c" /* yacc.c:1646 */
3237 #line 1484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3239 (yyval.Attr_val_fifo) = NULL;
3240 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3242 #line 3243 "ntp_parser.c" /* yacc.c:1646 */
3246 #line 1492 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3247 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3248 #line 3249 "ntp_parser.c" /* yacc.c:1646 */
3252 #line 1498 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3253 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3254 #line 3255 "ntp_parser.c" /* yacc.c:1646 */
3258 #line 1503 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3260 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3261 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3263 #line 3264 "ntp_parser.c" /* yacc.c:1646 */
3267 #line 1508 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3269 (yyval.String_fifo) = NULL;
3270 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3272 #line 3273 "ntp_parser.c" /* yacc.c:1646 */
3276 #line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3278 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3279 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3281 #line 3282 "ntp_parser.c" /* yacc.c:1646 */
3285 #line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3287 (yyval.Address_fifo) = NULL;
3288 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3290 #line 3291 "ntp_parser.c" /* yacc.c:1646 */
3294 #line 1529 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3296 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3297 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3298 (yyval.Integer) = 1;
3300 (yyval.Integer) = (yyvsp[0].Integer);
3303 #line 3304 "ntp_parser.c" /* yacc.c:1646 */
3307 #line 1537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3308 { (yyval.Integer) = 1; }
3309 #line 3310 "ntp_parser.c" /* yacc.c:1646 */
3313 #line 1538 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3314 { (yyval.Integer) = 0; }
3315 #line 3316 "ntp_parser.c" /* yacc.c:1646 */
3319 #line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3320 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3321 #line 3322 "ntp_parser.c" /* yacc.c:1646 */
3325 #line 1548 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3326 { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
3327 #line 3328 "ntp_parser.c" /* yacc.c:1646 */
3331 #line 1556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3335 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3336 APPEND_G_FIFO(cfgt.sim_details, sn);
3338 /* Revert from ; to \n for end-of-command */
3339 old_config_style = 1;
3341 #line 3342 "ntp_parser.c" /* yacc.c:1646 */
3345 #line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3346 { old_config_style = 0; }
3347 #line 3348 "ntp_parser.c" /* yacc.c:1646 */
3351 #line 1578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3353 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3354 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3356 #line 3357 "ntp_parser.c" /* yacc.c:1646 */
3360 #line 1583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3362 (yyval.Attr_val_fifo) = NULL;
3363 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3365 #line 3366 "ntp_parser.c" /* yacc.c:1646 */
3369 #line 1591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3370 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3371 #line 3372 "ntp_parser.c" /* yacc.c:1646 */
3375 #line 1601 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3377 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3378 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3380 #line 3381 "ntp_parser.c" /* yacc.c:1646 */
3384 #line 1606 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3386 (yyval.Sim_server_fifo) = NULL;
3387 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3389 #line 3390 "ntp_parser.c" /* yacc.c:1646 */
3393 #line 1614 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3394 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3395 #line 3396 "ntp_parser.c" /* yacc.c:1646 */
3399 #line 1619 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3400 { (yyval.Double) = (yyvsp[-1].Double); }
3401 #line 3402 "ntp_parser.c" /* yacc.c:1646 */
3405 #line 1624 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3406 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3407 #line 3408 "ntp_parser.c" /* yacc.c:1646 */
3411 #line 1629 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3413 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3414 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3416 #line 3417 "ntp_parser.c" /* yacc.c:1646 */
3420 #line 1634 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3422 (yyval.Sim_script_fifo) = NULL;
3423 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3425 #line 3426 "ntp_parser.c" /* yacc.c:1646 */
3429 #line 1642 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3430 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3431 #line 3432 "ntp_parser.c" /* yacc.c:1646 */
3435 #line 1647 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3437 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3438 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3440 #line 3441 "ntp_parser.c" /* yacc.c:1646 */
3444 #line 1652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3446 (yyval.Attr_val_fifo) = NULL;
3447 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3449 #line 3450 "ntp_parser.c" /* yacc.c:1646 */
3453 #line 1660 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3454 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3455 #line 3456 "ntp_parser.c" /* yacc.c:1646 */
3459 #line 3460 "ntp_parser.c" /* yacc.c:1646 */
3462 /* User semantic actions sometimes alter yychar, and that requires
3463 that yytoken be updated with the new translation. We take the
3464 approach of translating immediately before every use of yytoken.
3465 One alternative is translating here after every semantic action,
3466 but that translation would be missed if the semantic action invokes
3467 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3468 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3469 incorrect destructor might then be invoked immediately. In the
3470 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3471 to an incorrect destructor call or verbose syntax error message
3472 before the lookahead is translated. */
3473 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3477 YY_STACK_PRINT (yyss, yyssp);
3481 /* Now 'shift' the result of the reduction. Determine what state
3482 that goes to, based on the state we popped back to and the rule
3483 number reduced by. */
3487 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3488 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3489 yystate = yytable[yystate];
3491 yystate = yydefgoto[yyn - YYNTOKENS];
3496 /*--------------------------------------.
3497 | yyerrlab -- here on detecting error. |
3498 `--------------------------------------*/
3500 /* Make sure we have latest lookahead translation. See comments at
3501 user semantic actions for why this is necessary. */
3502 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3504 /* If not already recovering from an error, report this error. */
3508 #if ! YYERROR_VERBOSE
3509 yyerror (YY_("syntax error"));
3511 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3514 char const *yymsgp = YY_("syntax error");
3515 int yysyntax_error_status;
3516 yysyntax_error_status = YYSYNTAX_ERROR;
3517 if (yysyntax_error_status == 0)
3519 else if (yysyntax_error_status == 1)
3521 if (yymsg != yymsgbuf)
3522 YYSTACK_FREE (yymsg);
3523 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3527 yymsg_alloc = sizeof yymsgbuf;
3528 yysyntax_error_status = 2;
3532 yysyntax_error_status = YYSYNTAX_ERROR;
3537 if (yysyntax_error_status == 2)
3538 goto yyexhaustedlab;
3540 # undef YYSYNTAX_ERROR
3546 if (yyerrstatus == 3)
3548 /* If just tried and failed to reuse lookahead token after an
3549 error, discard it. */
3551 if (yychar <= YYEOF)
3553 /* Return failure if at end of input. */
3554 if (yychar == YYEOF)
3559 yydestruct ("Error: discarding",
3565 /* Else will try to reuse lookahead token after shifting the error
3570 /*---------------------------------------------------.
3571 | yyerrorlab -- error raised explicitly by YYERROR. |
3572 `---------------------------------------------------*/
3575 /* Pacify compilers like GCC when the user code never invokes
3576 YYERROR and the label yyerrorlab therefore never appears in user
3578 if (/*CONSTCOND*/ 0)
3581 /* Do not reclaim the symbols of the rule whose action triggered
3585 YY_STACK_PRINT (yyss, yyssp);
3590 /*-------------------------------------------------------------.
3591 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3592 `-------------------------------------------------------------*/
3594 yyerrstatus = 3; /* Each real token shifted decrements this. */
3598 yyn = yypact[yystate];
3599 if (!yypact_value_is_default (yyn))
3602 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3610 /* Pop the current state because it cannot handle the error token. */
3615 yydestruct ("Error: popping",
3616 yystos[yystate], yyvsp);
3619 YY_STACK_PRINT (yyss, yyssp);
3622 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3624 YY_IGNORE_MAYBE_UNINITIALIZED_END
3627 /* Shift the error token. */
3628 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3634 /*-------------------------------------.
3635 | yyacceptlab -- YYACCEPT comes here. |
3636 `-------------------------------------*/
3641 /*-----------------------------------.
3642 | yyabortlab -- YYABORT comes here. |
3643 `-----------------------------------*/
3648 #if !defined yyoverflow || YYERROR_VERBOSE
3649 /*-------------------------------------------------.
3650 | yyexhaustedlab -- memory exhaustion comes here. |
3651 `-------------------------------------------------*/
3653 yyerror (YY_("memory exhausted"));
3659 if (yychar != YYEMPTY)
3661 /* Make sure we have latest lookahead translation. See comments at
3662 user semantic actions for why this is necessary. */
3663 yytoken = YYTRANSLATE (yychar);
3664 yydestruct ("Cleanup: discarding lookahead",
3667 /* Do not reclaim the symbols of the rule whose action triggered
3668 this YYABORT or YYACCEPT. */
3670 YY_STACK_PRINT (yyss, yyssp);
3671 while (yyssp != yyss)
3673 yydestruct ("Cleanup: popping",
3674 yystos[*yyssp], yyvsp);
3679 YYSTACK_FREE (yyss);
3682 if (yymsg != yymsgbuf)
3683 YYSTACK_FREE (yymsg);
3687 #line 1671 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
3696 struct FILE_INFO * ip_ctx;
3698 ip_ctx = lex_current();
3699 ip_ctx->errpos = ip_ctx->tokpos;
3701 msyslog(LOG_ERR, "line %d column %d %s",
3702 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3703 if (!lex_from_file()) {
3704 /* Save the error message in the correct buffer */
3705 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3706 MAXLINE - remote_config.err_pos,
3708 ip_ctx->errpos.ncol, msg);
3710 /* Increment the value of err_pos */
3712 remote_config.err_pos += retval;
3714 /* Increment the number of errors */
3715 ++remote_config.no_errors;
3721 * token_name - convert T_ token integers to text
3722 * example: token_name(T_Server) returns "T_Server"
3729 return yytname[YYTRANSLATE(token)];
3733 /* Initial Testing function -- ignore */
3735 int main(int argc, char *argv[])
3737 ip_file = FOPEN(argv[1], "r");
3739 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);