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"
79 #include "ntp_calendar.h"
81 #include "ntpsim.h" /* HMS: Do we really want this all the time? */
82 /* SK: It might be a good idea to always
83 include the simulator code. That way
84 someone can use the same configuration file
85 for both the simulator and the daemon
88 #define YYMALLOC emalloc
90 #define YYERROR_VERBOSE
91 #define YYMAXDEPTH 1000 /* stop the madness sooner */
92 void yyerror(const char *msg);
95 # define ONLY_SIM(a) (a)
97 # define ONLY_SIM(a) NULL
100 #line 101 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
103 # if defined __cplusplus && 201103L <= __cplusplus
104 # define YY_NULLPTR nullptr
106 # define YY_NULLPTR 0
110 /* Enabling verbose error messages. */
111 #ifdef YYERROR_VERBOSE
112 # undef YYERROR_VERBOSE
113 # define YYERROR_VERBOSE 1
115 # define YYERROR_VERBOSE 0
118 /* In a future release of Bison, this section will be replaced
119 by #include "y.tab.h". */
120 #ifndef YY_YY__NTPD_NTP_PARSER_H_INCLUDED
121 # define YY_YY__NTPD_NTP_PARSER_H_INCLUDED
149 T_Broadcastclient = 272,
150 T_Broadcastdelay = 273,
214 T_Leapsmearinterval = 337,
222 T_Manycastclient = 345,
223 T_Manycastserver = 346,
247 T_Multicastclient = 370,
263 T_NtpSignDsocket = 386,
274 T_PollSkewList = 397,
289 T_Saveconfigdir = 412,
291 T_Serverresponse = 414,
292 T_ServerresponseFuzz = 415,
326 T_WanderThreshold = 449,
336 T_Sim_Duration = 459,
337 T_Server_Offset = 460,
351 #define T_Allpeers 262
353 #define T_Autokey 264
354 #define T_Automax 265
355 #define T_Average 266
356 #define T_Basedate 267
357 #define T_Bclient 268
358 #define T_Bcpollbstep 269
360 #define T_Broadcast 271
361 #define T_Broadcastclient 272
362 #define T_Broadcastdelay 273
364 #define T_Calibrate 275
365 #define T_Ceiling 276
366 #define T_Checkhash 277
367 #define T_Clockstats 278
369 #define T_ControlKey 280
371 #define T_Cryptostats 282
374 #define T_Default 285
376 #define T_Disable 287
377 #define T_Discard 288
378 #define T_Dispersion 289
380 #define T_Driftfile 291
383 #define T_Ellipsis 294
389 #define T_Filegen 300
390 #define T_Filenum 301
401 #define T_Huffpuff 312
405 #define T_Ignorehash 316
406 #define T_Incalloc 317
408 #define T_Initalloc 319
409 #define T_Initmem 320
410 #define T_Includefile 321
411 #define T_Integer 322
412 #define T_Interface 323
413 #define T_Intrange 324
415 #define T_Ippeerlimit 326
417 #define T_Ipv4_flag 328
419 #define T_Ipv6_flag 330
423 #define T_Keysdir 334
425 #define T_Leapfile 336
426 #define T_Leapsmearinterval 337
427 #define T_Limited 338
430 #define T_Logconfig 341
431 #define T_Logfile 342
432 #define T_Loopstats 343
433 #define T_Lowpriotrap 344
434 #define T_Manycastclient 345
435 #define T_Manycastserver 346
438 #define T_Maxclock 349
439 #define T_Maxdepth 350
440 #define T_Maxdist 351
442 #define T_Maxpoll 353
443 #define T_Mdnstries 354
445 #define T_Memlock 356
446 #define T_Minclock 357
447 #define T_Mindepth 358
448 #define T_Mindist 359
449 #define T_Minimum 360
450 #define T_Minjitter 361
451 #define T_Minpoll 362
452 #define T_Minsane 363
455 #define T_Monitor 366
459 #define T_Multicastclient 370
462 #define T_Nomodify 373
463 #define T_Nomrulist 374
465 #define T_Nonvolatile 376
466 #define T_Noepeer 377
468 #define T_Noquery 379
469 #define T_Noselect 380
470 #define T_Noserve 381
472 #define T_Notrust 383
474 #define T_Ntpport 385
475 #define T_NtpSignDsocket 386
477 #define T_Orphanwait 388
478 #define T_PCEdigest 389
481 #define T_Peerstats 392
484 #define T_Pidfile 395
486 #define T_PollSkewList 397
489 #define T_Preempt 400
491 #define T_Protostats 402
493 #define T_Randfile 404
494 #define T_Rawstats 405
496 #define T_Requestkey 407
498 #define T_Restrict 409
501 #define T_Saveconfigdir 412
503 #define T_Serverresponse 414
504 #define T_ServerresponseFuzz 415
507 #define T_Stacksize 418
508 #define T_Statistics 419
510 #define T_Statsdir 421
512 #define T_Stepback 423
513 #define T_Stepfwd 424
514 #define T_Stepout 425
515 #define T_Stratum 426
518 #define T_Sysstats 429
523 #define T_Timingstats 434
528 #define T_Trustedkey 439
532 #define T_UEcrypto 443
533 #define T_UEcryptonak 444
534 #define T_UEdigest 445
535 #define T_Unconfig 446
537 #define T_Version 448
538 #define T_WanderThreshold 449
540 #define T_Wildcard 451
542 #define T_Xmtnonce 453
546 #define T_Simulate 457
547 #define T_Beep_Delay 458
548 #define T_Sim_Duration 459
549 #define T_Server_Offset 460
550 #define T_Duration 461
551 #define T_Freq_Offset 462
554 #define T_Prop_Delay 465
555 #define T_Proc_Delay 466
558 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
562 #line 52 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
568 gen_fifo * Generic_fifo;
570 attr_val_fifo * Attr_val_fifo;
572 string_fifo * String_fifo;
573 address_node * Address_node;
574 address_fifo * Address_fifo;
575 setvar_node * Set_var;
576 server_info * Sim_server;
577 server_info_fifo * Sim_server_fifo;
578 script_info * Sim_script;
579 script_info_fifo * Sim_script_fifo;
581 #line 582 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
584 typedef union YYSTYPE YYSTYPE;
585 # define YYSTYPE_IS_TRIVIAL 1
586 # define YYSTYPE_IS_DECLARED 1
590 extern YYSTYPE yylval;
594 #endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
596 /* Copy the second part of user declarations. */
598 #line 599 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
605 typedef YYTYPE_UINT8 yytype_uint8;
607 typedef unsigned char yytype_uint8;
611 typedef YYTYPE_INT8 yytype_int8;
613 typedef signed char yytype_int8;
617 typedef YYTYPE_UINT16 yytype_uint16;
619 typedef unsigned short int yytype_uint16;
623 typedef YYTYPE_INT16 yytype_int16;
625 typedef short int yytype_int16;
629 # ifdef __SIZE_TYPE__
630 # define YYSIZE_T __SIZE_TYPE__
631 # elif defined size_t
632 # define YYSIZE_T size_t
633 # elif ! defined YYSIZE_T
634 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
635 # define YYSIZE_T size_t
637 # define YYSIZE_T unsigned int
641 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
644 # if defined YYENABLE_NLS && YYENABLE_NLS
646 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
647 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
651 # define YY_(Msgid) Msgid
656 # if (defined __GNUC__ \
657 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
658 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
659 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
661 # define YY_ATTRIBUTE(Spec) /* empty */
665 #ifndef YY_ATTRIBUTE_PURE
666 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
669 #ifndef YY_ATTRIBUTE_UNUSED
670 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
673 #if !defined _Noreturn \
674 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
675 # if defined _MSC_VER && 1200 <= _MSC_VER
676 # define _Noreturn __declspec (noreturn)
678 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
682 /* Suppress unused-variable warnings by "using" E. */
683 #if ! defined lint || defined __GNUC__
684 # define YYUSE(E) ((void) (E))
686 # define YYUSE(E) /* empty */
689 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
690 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
691 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
692 _Pragma ("GCC diagnostic push") \
693 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
694 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
695 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
696 _Pragma ("GCC diagnostic pop")
698 # define YY_INITIAL_VALUE(Value) Value
700 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
701 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
702 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
704 #ifndef YY_INITIAL_VALUE
705 # define YY_INITIAL_VALUE(Value) /* Nothing. */
709 #if ! defined yyoverflow || YYERROR_VERBOSE
711 /* The parser invokes alloca or malloc; define the necessary symbols. */
713 # ifdef YYSTACK_USE_ALLOCA
714 # if YYSTACK_USE_ALLOCA
716 # define YYSTACK_ALLOC __builtin_alloca
717 # elif defined __BUILTIN_VA_ARG_INCR
718 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
720 # define YYSTACK_ALLOC __alloca
721 # elif defined _MSC_VER
722 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
723 # define alloca _alloca
725 # define YYSTACK_ALLOC alloca
726 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
727 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
728 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
729 # ifndef EXIT_SUCCESS
730 # define EXIT_SUCCESS 0
737 # ifdef YYSTACK_ALLOC
738 /* Pacify GCC's 'empty if-body' warning. */
739 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
740 # ifndef YYSTACK_ALLOC_MAXIMUM
741 /* The OS might guarantee only one guard page at the bottom of the stack,
742 and a page size can be as small as 4096 bytes. So we cannot safely
743 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
744 to allow for a few compiler-allocated temporary stack slots. */
745 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
748 # define YYSTACK_ALLOC YYMALLOC
749 # define YYSTACK_FREE YYFREE
750 # ifndef YYSTACK_ALLOC_MAXIMUM
751 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
753 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
754 && ! ((defined YYMALLOC || defined malloc) \
755 && (defined YYFREE || defined free)))
756 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
757 # ifndef EXIT_SUCCESS
758 # define EXIT_SUCCESS 0
762 # define YYMALLOC malloc
763 # if ! defined malloc && ! defined EXIT_SUCCESS
764 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
769 # if ! defined free && ! defined EXIT_SUCCESS
770 void free (void *); /* INFRINGES ON USER NAME SPACE */
774 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
777 #if (! defined yyoverflow \
778 && (! defined __cplusplus \
779 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
781 /* A type that is properly aligned for any stack member. */
784 yytype_int16 yyss_alloc;
788 /* The size of the maximum gap between one aligned stack and the next. */
789 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
791 /* The size of an array large to enough to hold all stacks, each with
793 # define YYSTACK_BYTES(N) \
794 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
795 + YYSTACK_GAP_MAXIMUM)
797 # define YYCOPY_NEEDED 1
799 /* Relocate STACK from its old location to the new one. The
800 local variables YYSIZE and YYSTACKSIZE give the old and new number of
801 elements in the stack, and YYPTR gives the new location of the
802 stack. Advance YYPTR to a properly aligned location for the next
804 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
807 YYSIZE_T yynewbytes; \
808 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
809 Stack = &yyptr->Stack_alloc; \
810 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
811 yyptr += yynewbytes / sizeof (*yyptr); \
817 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
818 /* Copy COUNT objects from SRC to DST. The source and destination do
821 # if defined __GNUC__ && 1 < __GNUC__
822 # define YYCOPY(Dst, Src, Count) \
823 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
825 # define YYCOPY(Dst, Src, Count) \
829 for (yyi = 0; yyi < (Count); yyi++) \
830 (Dst)[yyi] = (Src)[yyi]; \
835 #endif /* !YYCOPY_NEEDED */
837 /* YYFINAL -- State number of the termination state. */
839 /* YYLAST -- Last index in YYTABLE. */
842 /* YYNTOKENS -- Number of terminals. */
843 #define YYNTOKENS 218
844 /* YYNNTS -- Number of nonterminals. */
846 /* YYNRULES -- Number of rules. */
848 /* YYNSTATES -- Number of states. */
849 #define YYNSTATES 453
851 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
852 by yylex, with out-of-bounds checking. */
854 #define YYMAXUTOK 466
856 #define YYTRANSLATE(YYX) \
857 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
859 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
860 as returned by yylex, without out-of-bounds checking. */
861 static const yytype_uint8 yytranslate[] =
863 0, 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 214, 215, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 213, 2, 2, 2, 2, 2, 2, 2, 2,
870 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
871 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
872 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
873 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
874 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
875 2, 2, 2, 216, 212, 217, 2, 2, 2, 2,
876 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
877 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
878 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
879 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
880 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
881 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
882 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
883 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
884 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
885 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
886 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
887 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
888 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
889 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
890 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
891 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
892 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
893 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
894 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
895 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
896 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
897 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
898 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
899 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
900 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
901 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
902 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
903 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
904 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
905 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
906 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
907 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
908 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
909 205, 206, 207, 208, 209, 210, 211
913 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
914 static const yytype_uint16 yyrline[] =
916 0, 391, 391, 395, 396, 397, 412, 413, 414, 415,
917 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
918 433, 443, 444, 445, 446, 447, 451, 452, 457, 462,
919 464, 470, 471, 479, 480, 481, 485, 490, 491, 492,
920 493, 494, 495, 496, 497, 498, 502, 504, 509, 510,
921 511, 512, 513, 514, 518, 523, 532, 542, 543, 553,
922 555, 557, 559, 570, 577, 579, 584, 586, 588, 590,
923 592, 602, 608, 609, 617, 619, 631, 632, 633, 634,
924 635, 644, 649, 654, 662, 664, 666, 668, 673, 674,
925 675, 676, 677, 678, 679, 680, 681, 685, 686, 695,
926 697, 706, 716, 721, 729, 730, 731, 732, 733, 734,
927 735, 736, 741, 742, 750, 760, 769, 784, 789, 790,
928 794, 795, 799, 800, 801, 802, 803, 804, 805, 814,
929 818, 822, 830, 838, 846, 861, 876, 889, 890, 910,
930 911, 919, 930, 931, 932, 933, 934, 935, 936, 937,
931 938, 939, 940, 941, 942, 943, 944, 945, 946, 950,
932 955, 963, 968, 969, 970, 974, 979, 987, 992, 993,
933 994, 995, 996, 997, 998, 999, 1007, 1017, 1022, 1030,
934 1032, 1034, 1043, 1045, 1050, 1051, 1052, 1056, 1057, 1058,
935 1059, 1067, 1072, 1077, 1085, 1090, 1091, 1092, 1101, 1103,
936 1108, 1113, 1121, 1123, 1140, 1141, 1142, 1143, 1144, 1145,
937 1149, 1150, 1151, 1152, 1153, 1154, 1162, 1167, 1172, 1180,
938 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194,
939 1203, 1204, 1205, 1212, 1219, 1226, 1242, 1261, 1269, 1271,
940 1273, 1275, 1277, 1279, 1281, 1288, 1293, 1294, 1295, 1299,
941 1303, 1312, 1314, 1317, 1321, 1325, 1326, 1327, 1331, 1342,
942 1360, 1373, 1374, 1379, 1405, 1406, 1411, 1416, 1418, 1423,
943 1424, 1432, 1434, 1442, 1447, 1455, 1480, 1487, 1497, 1498,
944 1502, 1503, 1504, 1505, 1509, 1510, 1511, 1515, 1520, 1525,
945 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1549, 1554, 1562,
946 1567, 1575, 1577, 1581, 1586, 1591, 1599, 1604, 1612, 1621,
947 1622, 1626, 1627, 1631, 1639, 1657, 1661, 1666, 1674, 1679,
948 1680, 1684, 1689, 1697, 1702, 1707, 1712, 1717, 1725, 1730,
949 1735, 1743, 1748, 1749, 1750, 1751, 1752
953 #if YYDEBUG || YYERROR_VERBOSE || 1
954 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
955 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
956 static const char *const yytname[] =
958 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
959 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
960 "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
961 "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
962 "T_Ceiling", "T_Checkhash", "T_Clockstats", "T_Cohort", "T_ControlKey",
963 "T_Crypto", "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest",
964 "T_Disable", "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile",
965 "T_Drop", "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer",
966 "T_False", "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2",
967 "T_Flag3", "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge",
968 "T_Fuzz", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore",
969 "T_Ignorehash", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem",
970 "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io",
971 "T_Ippeerlimit", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
972 "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Leapfile",
973 "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
974 "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
975 "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
976 "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
977 "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
978 "T_Minjitter", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
979 "T_Monitor", "T_Month", "T_Mru", "T_Mssntp", "T_Multicastclient",
980 "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None",
981 "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery", "T_Noselect",
982 "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
983 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
984 "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Poll",
985 "T_PollSkewList", "T_Pool", "T_Port", "T_Preempt", "T_Prefer",
986 "T_Protostats", "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid",
987 "T_Requestkey", "T_Reset", "T_Restrict", "T_Revoke", "T_Rlimit",
988 "T_Saveconfigdir", "T_Server", "T_Serverresponse",
989 "T_ServerresponseFuzz", "T_Setvar", "T_Source", "T_Stacksize",
990 "T_Statistics", "T_Stats", "T_Statsdir", "T_Step", "T_Stepback",
991 "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys", "T_Sysstats",
992 "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats", "T_Tinker",
993 "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl", "T_Type",
994 "T_U_int", "T_UEcrypto", "T_UEcryptonak", "T_UEdigest", "T_Unconfig",
995 "T_Unpeer", "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard",
996 "T_Xleave", "T_Xmtnonce", "T_Year", "T_Flag", "T_EOC", "T_Simulate",
997 "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset", "T_Duration",
998 "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay",
999 "'|'", "'='", "'('", "')'", "'{'", "'}'", "$accept", "configuration",
1000 "command_list", "command", "server_command", "client_type", "address",
1001 "ip_address", "address_fam", "option_list", "option", "option_flag",
1002 "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
1003 "option_str_keyword", "unpeer_command", "unpeer_keyword",
1004 "other_mode_command", "authentication_command", "crypto_command_list",
1005 "crypto_command", "crypto_str_keyword", "orphan_mode_command",
1006 "tos_option_list", "tos_option", "tos_option_int_keyword",
1007 "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
1008 "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
1009 "filegen_type", "access_control_command", "res_ippeerlimit",
1010 "ac_flag_list", "access_control_flag", "discard_option_list",
1011 "discard_option", "discard_option_keyword", "mru_option_list",
1012 "mru_option", "mru_option_keyword", "fudge_command", "fudge_factor_list",
1013 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
1014 "rlimit_command", "rlimit_option_list", "rlimit_option",
1015 "rlimit_option_keyword", "system_option_command", "system_option_list",
1016 "system_option", "system_option_flag_keyword",
1017 "system_option_local_flag_keyword", "tinker_command",
1018 "tinker_option_list", "tinker_option", "tinker_option_keyword",
1019 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
1020 "opt_hash_check", "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword",
1021 "drift_parm", "pollskew_list", "pollskew_spec", "pollskew_cycle",
1022 "variable_assign", "t_default_or_zero", "trap_option_list",
1023 "trap_option", "log_config_list", "log_config_command",
1024 "interface_command", "interface_nic", "nic_rule_class",
1025 "nic_rule_action", "reset_command", "counter_set_list",
1026 "counter_set_keyword", "integer_list", "integer_list_range",
1027 "integer_list_range_elt", "integer_range", "string_list", "address_list",
1028 "boolean", "number", "basedate", "simulate_command", "sim_conf_start",
1029 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
1030 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
1031 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
1032 "sim_act_keyword", YY_NULLPTR
1037 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1038 (internal) symbol number NUM (which must be that of a token). */
1039 static const yytype_uint16 yytoknum[] =
1041 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1042 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1043 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1044 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1045 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1046 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1047 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1048 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1049 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1050 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1051 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1052 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1053 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1054 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1055 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1056 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1057 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1058 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1059 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1060 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
1061 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
1062 465, 466, 124, 61, 40, 41, 123, 125
1066 #define YYPACT_NINF -261
1068 #define yypact_value_is_default(Yystate) \
1069 (!!((Yystate) == (-261)))
1071 #define YYTABLE_NINF -7
1073 #define yytable_value_is_error(Yytable_value) \
1076 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1078 static const yytype_int16 yypact[] =
1080 19, -163, -36, -261, -261, -261, -25, -261, 326, 77,
1081 -125, -261, 326, -261, 16, -45, -261, -119, -261, -103,
1082 -100, -98, -261, -95, -261, -261, -45, 13, 238, -45,
1083 -261, -261, -88, -261, -86, -261, -261, -261, 22, 109,
1084 -8, 23, -38, -261, -261, -81, 16, -80, -261, 443,
1085 607, -73, -58, 35, -261, -261, -261, 103, 229, -90,
1086 -261, -45, -261, -45, -261, -261, -261, -261, -261, -261,
1087 -261, -261, -261, -261, -9, 45, -53, -51, -261, -19,
1088 -261, -261, -102, -261, -261, -261, 82, -261, -261, -261,
1089 -261, -261, -261, -261, -261, -261, -261, -261, -261, 326,
1090 -261, -261, -261, -261, -261, -261, 77, -261, 55, 91,
1091 -261, 326, -261, -261, -261, -261, -261, -261, -261, -261,
1092 -261, -261, -261, -261, 46, -261, -42, 407, -261, -261,
1093 -11, -261, -95, -261, -261, -45, -261, -261, -261, -261,
1094 -261, -261, -261, -261, -261, 238, -261, 64, -45, -261,
1095 -261, -28, -13, -261, -261, -261, -261, -261, -261, -261,
1096 -261, 109, -261, 74, 118, 119, 74, -31, -261, -261,
1097 -261, -261, -38, -261, 93, -55, -261, 16, -261, -261,
1098 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1099 443, -261, -9, -7, -261, -261, -261, -40, -261, -261,
1100 -261, -261, -261, -261, -261, -261, 607, -261, 100, -9,
1101 -261, -261, -261, 101, -58, -261, -261, -261, 102, -261,
1102 -23, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1103 -261, -261, -261, 9, -170, -261, -261, -261, -261, -261,
1104 122, -261, -2, -261, -261, -261, -261, 107, 14, -261,
1105 -261, -261, -261, -261, 20, 126, -261, -261, 46, -261,
1106 -9, -40, -261, -261, -261, -261, -261, -261, -261, -261,
1107 -261, -261, -261, -261, -261, 129, -261, 139, -261, 74,
1108 74, -261, -73, -261, -261, -261, 36, -261, -261, -261,
1109 -261, -261, -261, -261, -261, -261, -261, -261, -62, 168,
1110 -261, -261, -261, 410, -261, -261, -261, -261, -261, -261,
1111 -261, -261, -96, 17, 6, -261, -261, -261, -261, 61,
1112 -261, -261, 3, -261, -261, -261, -261, -261, -261, -261,
1113 -261, -261, 24, -261, 534, -261, -261, 534, 74, 534,
1114 204, -73, 173, -261, 174, -261, -261, -261, -261, -261,
1115 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1116 -261, -261, -261, -261, -261, -63, -261, 70, 31, 47,
1117 -146, -261, 33, -261, -9, -261, -261, -261, -261, -261,
1118 -261, -261, -261, -261, 183, -261, -261, -261, -261, -261,
1119 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1120 -261, 196, -261, -261, 534, 534, -261, -261, -261, -261,
1121 -261, 37, -261, -261, -261, -45, -261, -261, -261, 48,
1122 -261, -261, -261, 534, -261, -261, 43, 51, -9, 50,
1123 -193, -261, 57, -9, -261, -261, -261, 52, 5, -261,
1124 -261, -261, -261, -261, 18, 58, 53, -261, 63, -261,
1128 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1129 Performed when YYTABLE does not specify something else to do. Zero
1130 means the default is an error. */
1131 static const yytype_uint16 yydefact[] =
1133 0, 0, 0, 24, 59, 246, 0, 72, 0, 0,
1134 260, 249, 0, 238, 0, 0, 254, 0, 278, 0,
1135 0, 0, 250, 0, 255, 25, 0, 0, 0, 0,
1136 279, 247, 0, 23, 0, 256, 261, 22, 0, 0,
1137 0, 0, 0, 257, 21, 0, 0, 0, 248, 0,
1138 0, 0, 0, 0, 57, 58, 315, 0, 2, 0,
1139 7, 0, 8, 0, 9, 10, 13, 11, 12, 14,
1140 15, 16, 17, 18, 0, 0, 0, 0, 230, 0,
1141 231, 19, 0, 5, 63, 64, 65, 204, 205, 206,
1142 207, 210, 208, 209, 211, 212, 213, 214, 215, 199,
1143 201, 202, 203, 162, 163, 164, 129, 160, 0, 258,
1144 239, 198, 104, 105, 106, 107, 111, 108, 109, 110,
1145 112, 29, 30, 28, 0, 26, 0, 6, 66, 67,
1146 253, 275, 240, 274, 307, 60, 62, 168, 169, 170,
1147 171, 172, 173, 174, 175, 130, 166, 0, 61, 71,
1148 305, 241, 242, 68, 290, 291, 292, 293, 294, 295,
1149 296, 287, 289, 137, 29, 30, 137, 137, 69, 197,
1150 195, 196, 191, 193, 0, 0, 243, 99, 103, 100,
1151 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1152 216, 218, 0, 0, 88, 89, 90, 0, 91, 92,
1153 98, 93, 97, 94, 95, 96, 81, 83, 0, 0,
1154 87, 269, 301, 0, 70, 300, 302, 298, 245, 1,
1155 0, 4, 31, 56, 312, 311, 232, 233, 234, 235,
1156 286, 285, 284, 0, 0, 80, 76, 77, 78, 79,
1157 0, 73, 0, 200, 159, 161, 259, 101, 0, 187,
1158 188, 189, 190, 186, 0, 0, 184, 185, 176, 178,
1159 0, 0, 27, 236, 252, 251, 237, 273, 306, 165,
1160 167, 304, 265, 264, 262, 0, 288, 0, 139, 137,
1161 137, 139, 0, 139, 192, 194, 0, 102, 217, 219,
1162 313, 310, 308, 309, 86, 82, 84, 85, 244, 0,
1163 299, 297, 3, 20, 280, 281, 282, 277, 283, 276,
1164 319, 320, 0, 0, 0, 75, 74, 121, 120, 0,
1165 118, 119, 0, 113, 116, 117, 182, 183, 181, 177,
1166 179, 180, 0, 138, 133, 139, 139, 136, 137, 131,
1167 268, 0, 0, 270, 0, 37, 38, 39, 55, 48,
1168 50, 49, 52, 40, 41, 42, 43, 51, 53, 44,
1169 45, 32, 33, 36, 34, 0, 35, 0, 0, 0,
1170 0, 322, 0, 317, 0, 114, 128, 124, 126, 122,
1171 123, 125, 127, 115, 0, 142, 143, 144, 145, 146,
1172 147, 148, 150, 151, 149, 152, 153, 154, 155, 156,
1173 157, 0, 158, 140, 134, 135, 139, 267, 266, 272,
1174 271, 0, 46, 47, 54, 0, 316, 314, 321, 0,
1175 318, 263, 141, 132, 303, 325, 0, 0, 0, 0,
1176 0, 327, 0, 0, 323, 326, 324, 0, 0, 332,
1177 333, 334, 335, 336, 0, 0, 0, 328, 0, 330,
1181 /* YYPGOTO[NTERM-NUM]. */
1182 static const yytype_int16 yypgoto[] =
1184 -261, -261, -261, -48, -261, -261, -15, -50, -261, -261,
1185 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1186 -261, -261, -261, -261, -261, -261, 65, -261, -261, -261,
1187 -261, -41, -261, -261, -261, -261, -261, -261, -151, -260,
1188 -261, -261, 166, -261, -261, 128, -261, -261, -261, 21,
1189 -261, -261, -261, -261, 104, -261, -261, 263, -43, -261,
1190 -261, -261, -261, 87, -261, -261, -261, -261, -261, -261,
1191 -261, -261, -261, -261, -261, -261, -261, -261, -261, -261,
1192 146, -261, -261, -261, -261, -261, -261, 120, -261, -261,
1193 66, -261, -261, 255, 25, -190, -261, -261, -261, -261,
1194 -27, -261, -261, -78, -261, -261, -261, -141, -261, -154,
1198 /* YYDEFGOTO[NTERM-NUM]. */
1199 static const yytype_int16 yydefgoto[] =
1201 -1, 57, 58, 59, 60, 61, 134, 125, 126, 303,
1202 361, 362, 363, 364, 365, 366, 367, 62, 63, 64,
1203 65, 86, 241, 242, 66, 206, 207, 208, 209, 67,
1204 177, 120, 247, 323, 324, 325, 383, 68, 278, 334,
1205 403, 106, 107, 108, 145, 146, 147, 69, 258, 259,
1206 260, 261, 70, 172, 173, 174, 71, 99, 100, 101,
1207 102, 72, 190, 191, 192, 73, 74, 75, 266, 76,
1208 77, 110, 152, 274, 275, 176, 408, 298, 343, 132,
1209 133, 78, 79, 309, 233, 80, 161, 162, 218, 214,
1210 215, 216, 151, 135, 294, 226, 210, 81, 82, 312,
1211 313, 314, 370, 371, 427, 372, 430, 431, 444, 445,
1215 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1216 positive, shift that token. If negative, reduce the rule whose
1217 number is the opposite. If YYTABLE_NINF, syntax error. */
1218 static const yytype_int16 yytable[] =
1220 124, 211, 289, 291, 412, 178, 341, 376, 169, 212,
1221 220, 264, 368, 429, 304, 281, 283, 272, 230, 297,
1222 1, 337, 163, 339, 434, 167, 224, 292, 121, 2,
1223 122, 84, 377, 310, 311, 3, 4, 5, 83, 112,
1224 277, 231, 85, 113, 6, 7, 222, 109, 223, 248,
1225 265, 8, 9, 127, 273, 10, 243, 11, 225, 12,
1226 13, 282, 368, 170, 14, 164, 232, 165, 243, 128,
1227 330, 417, 129, 15, 130, 404, 405, 131, 16, 263,
1228 136, 305, 342, 306, 149, 17, 150, 18, 103, 153,
1229 168, 175, 179, 249, 250, 251, 252, 19, 20, 123,
1230 21, 22, 217, 219, 114, 23, 24, 310, 311, 25,
1231 26, 221, 227, 235, 234, 378, 154, 155, 27, 228,
1232 268, 229, 245, 379, 413, 171, 246, 123, 335, 336,
1233 262, 270, 28, 268, 29, 30, 287, 156, 236, 317,
1234 31, 237, 380, 293, 271, 277, 423, 318, 279, 280,
1235 32, 319, 253, 115, 166, 33, 213, 34, 286, 35,
1236 285, 36, 37, 116, 123, 290, 117, 296, 299, 301,
1237 316, 38, 39, 40, 41, 42, 43, 44, 302, 157,
1238 45, 307, 104, 46, 420, 47, 326, 406, 105, 315,
1239 118, 320, 327, 328, 48, 119, 332, 254, 381, 49,
1240 50, 51, 382, 52, 53, 308, 333, 344, 340, 158,
1241 54, 55, 439, 440, 441, 442, 443, 255, 373, 374,
1242 -6, 56, 256, 257, 321, 439, 440, 441, 442, 443,
1243 238, 239, 338, 375, 407, 447, 384, 240, 432, 2,
1244 410, 411, 414, 437, 415, 3, 4, 5, 416, 419,
1245 421, 422, 424, 426, 6, 7, 428, 429, 436, 449,
1246 452, 8, 9, 433, 451, 10, 450, 11, 438, 12,
1247 13, 295, 244, 269, 14, 111, 284, 288, 267, 329,
1248 300, 276, 159, 15, 148, 369, 331, 160, 16, 435,
1249 448, 409, 418, 322, 0, 17, 0, 18, 0, 0,
1250 137, 138, 139, 140, 0, 0, 0, 19, 20, 0,
1251 21, 22, 0, 0, 0, 23, 24, 0, 0, 25,
1252 26, 0, 0, 0, 0, 0, 0, 0, 27, 0,
1253 0, 141, 0, 142, 87, 143, 0, 0, 0, 88,
1254 0, 144, 28, 0, 29, 30, 89, 0, 0, 0,
1255 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1256 32, 0, 0, 0, 0, 33, 0, 34, 0, 35,
1257 0, 36, 37, 0, 0, 0, 0, 0, 0, 0,
1258 0, 38, 39, 40, 41, 42, 43, 44, 0, 0,
1259 45, 0, 0, 46, 0, 47, 0, 0, 0, 0,
1260 425, 0, 90, 0, 48, 0, 0, 0, 0, 49,
1261 50, 51, 0, 52, 53, 0, 0, 2, 0, 345,
1262 54, 55, 0, 3, 4, 5, 0, 0, 0, 346,
1263 -6, 56, 6, 7, 0, 0, 91, 92, 0, 8,
1264 9, 0, 0, 10, 0, 11, 0, 12, 13, 180,
1265 0, 0, 14, 0, 0, 93, 0, 0, 0, 0,
1266 94, 15, 0, 0, 0, 0, 16, 0, 347, 348,
1267 0, 0, 0, 17, 0, 18, 0, 181, 0, 0,
1268 0, 0, 0, 0, 0, 19, 20, 349, 21, 22,
1269 0, 95, 0, 23, 24, 0, 182, 25, 26, 0,
1270 183, 0, 0, 0, 0, 0, 27, 0, 350, 0,
1271 0, 0, 0, 0, 96, 97, 98, 351, 0, 352,
1272 28, 0, 29, 30, 0, 0, 0, 0, 31, 0,
1273 0, 0, 0, 0, 0, 353, 0, 0, 32, 0,
1274 0, 0, 0, 33, 0, 34, 0, 35, 0, 36,
1275 37, 0, 0, 0, 0, 354, 355, 0, 0, 38,
1276 39, 40, 41, 42, 43, 44, 0, 0, 45, 0,
1277 0, 46, 0, 47, 0, 0, 385, 0, 184, 0,
1278 0, 0, 48, 0, 0, 386, 0, 49, 50, 51,
1279 0, 52, 53, 356, 387, 357, 0, 0, 54, 55,
1280 0, 0, 0, 358, 0, 0, 0, 359, 360, 56,
1281 185, 186, 187, 188, 388, 0, 0, 389, 189, 193,
1282 0, 194, 195, 390, 0, 0, 0, 0, 196, 0,
1283 0, 197, 0, 0, 0, 0, 0, 0, 0, 0,
1284 0, 0, 0, 0, 0, 0, 0, 0, 391, 0,
1285 0, 0, 392, 393, 0, 0, 394, 395, 396, 198,
1286 397, 398, 399, 0, 400, 0, 0, 0, 0, 0,
1287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1289 0, 0, 0, 401, 0, 0, 0, 0, 0, 0,
1290 0, 199, 0, 200, 0, 0, 0, 0, 0, 201,
1291 0, 202, 0, 0, 0, 203, 0, 0, 0, 0,
1292 0, 0, 0, 0, 0, 0, 0, 402, 0, 0,
1293 0, 0, 0, 0, 0, 0, 0, 0, 0, 204,
1297 static const yytype_int16 yycheck[] =
1299 15, 51, 192, 43, 67, 46, 68, 4, 46, 67,
1300 58, 22, 158, 206, 5, 166, 167, 30, 37, 209,
1301 1, 281, 30, 283, 217, 40, 35, 67, 73, 10,
1302 75, 67, 29, 203, 204, 16, 17, 18, 201, 23,
1303 71, 60, 67, 27, 25, 26, 61, 172, 63, 3,
1304 61, 32, 33, 172, 67, 36, 99, 38, 67, 40,
1305 41, 92, 158, 101, 45, 73, 85, 75, 111, 172,
1306 260, 217, 172, 54, 172, 335, 336, 172, 59, 127,
1307 67, 72, 144, 74, 172, 66, 172, 68, 11, 67,
1308 67, 172, 172, 47, 48, 49, 50, 78, 79, 172,
1309 81, 82, 67, 0, 88, 86, 87, 203, 204, 90,
1310 91, 201, 67, 31, 216, 112, 7, 8, 99, 172,
1311 135, 172, 67, 120, 187, 163, 35, 172, 279, 280,
1312 172, 67, 113, 148, 115, 116, 177, 28, 56, 32,
1313 121, 59, 139, 183, 172, 71, 406, 40, 30, 30,
1314 131, 44, 106, 137, 162, 136, 214, 138, 213, 140,
1315 67, 142, 143, 147, 172, 172, 150, 67, 67, 67,
1316 172, 152, 153, 154, 155, 156, 157, 158, 201, 70,
1317 161, 172, 105, 164, 374, 166, 172, 338, 111, 67,
1318 174, 84, 172, 67, 175, 179, 67, 151, 195, 180,
1319 181, 182, 199, 184, 185, 196, 67, 39, 172, 100,
1320 191, 192, 207, 208, 209, 210, 211, 171, 201, 213,
1321 201, 202, 176, 177, 117, 207, 208, 209, 210, 211,
1322 148, 149, 282, 172, 30, 217, 212, 155, 428, 10,
1323 67, 67, 172, 433, 213, 16, 17, 18, 201, 216,
1324 67, 55, 215, 205, 25, 26, 213, 206, 201, 201,
1325 450, 32, 33, 213, 201, 36, 213, 38, 216, 40,
1326 41, 206, 106, 145, 45, 12, 172, 190, 132, 258,
1327 214, 161, 173, 54, 29, 312, 261, 178, 59, 430,
1328 444, 341, 370, 186, -1, 66, -1, 68, -1, -1,
1329 62, 63, 64, 65, -1, -1, -1, 78, 79, -1,
1330 81, 82, -1, -1, -1, 86, 87, -1, -1, 90,
1331 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
1332 -1, 93, -1, 95, 8, 97, -1, -1, -1, 13,
1333 -1, 103, 113, -1, 115, 116, 20, -1, -1, -1,
1334 121, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1335 131, -1, -1, -1, -1, 136, -1, 138, -1, 140,
1336 -1, 142, 143, -1, -1, -1, -1, -1, -1, -1,
1337 -1, 152, 153, 154, 155, 156, 157, 158, -1, -1,
1338 161, -1, -1, 164, -1, 166, -1, -1, -1, -1,
1339 415, -1, 76, -1, 175, -1, -1, -1, -1, 180,
1340 181, 182, -1, 184, 185, -1, -1, 10, -1, 9,
1341 191, 192, -1, 16, 17, 18, -1, -1, -1, 19,
1342 201, 202, 25, 26, -1, -1, 110, 111, -1, 32,
1343 33, -1, -1, 36, -1, 38, -1, 40, 41, 6,
1344 -1, -1, 45, -1, -1, 129, -1, -1, -1, -1,
1345 134, 54, -1, -1, -1, -1, 59, -1, 58, 59,
1346 -1, -1, -1, 66, -1, 68, -1, 34, -1, -1,
1347 -1, -1, -1, -1, -1, 78, 79, 77, 81, 82,
1348 -1, 165, -1, 86, 87, -1, 53, 90, 91, -1,
1349 57, -1, -1, -1, -1, -1, 99, -1, 98, -1,
1350 -1, -1, -1, -1, 188, 189, 190, 107, -1, 109,
1351 113, -1, 115, 116, -1, -1, -1, -1, 121, -1,
1352 -1, -1, -1, -1, -1, 125, -1, -1, 131, -1,
1353 -1, -1, -1, 136, -1, 138, -1, 140, -1, 142,
1354 143, -1, -1, -1, -1, 145, 146, -1, -1, 152,
1355 153, 154, 155, 156, 157, 158, -1, -1, 161, -1,
1356 -1, 164, -1, 166, -1, -1, 42, -1, 135, -1,
1357 -1, -1, 175, -1, -1, 51, -1, 180, 181, 182,
1358 -1, 184, 185, 183, 60, 185, -1, -1, 191, 192,
1359 -1, -1, -1, 193, -1, -1, -1, 197, 198, 202,
1360 167, 168, 169, 170, 80, -1, -1, 83, 175, 12,
1361 -1, 14, 15, 89, -1, -1, -1, -1, 21, -1,
1362 -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
1363 -1, -1, -1, -1, -1, -1, -1, -1, 114, -1,
1364 -1, -1, 118, 119, -1, -1, 122, 123, 124, 52,
1365 126, 127, 128, -1, 130, -1, -1, -1, -1, -1,
1366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1368 -1, -1, -1, 159, -1, -1, -1, -1, -1, -1,
1369 -1, 94, -1, 96, -1, -1, -1, -1, -1, 102,
1370 -1, 104, -1, -1, -1, 108, -1, -1, -1, -1,
1371 -1, -1, -1, -1, -1, -1, -1, 193, -1, -1,
1372 -1, -1, -1, -1, -1, -1, -1, -1, -1, 132,
1376 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1377 symbol of state STATE-NUM. */
1378 static const yytype_uint16 yystos[] =
1380 0, 1, 10, 16, 17, 18, 25, 26, 32, 33,
1381 36, 38, 40, 41, 45, 54, 59, 66, 68, 78,
1382 79, 81, 82, 86, 87, 90, 91, 99, 113, 115,
1383 116, 121, 131, 136, 138, 140, 142, 143, 152, 153,
1384 154, 155, 156, 157, 158, 161, 164, 166, 175, 180,
1385 181, 182, 184, 185, 191, 192, 202, 219, 220, 221,
1386 222, 223, 235, 236, 237, 238, 242, 247, 255, 265,
1387 270, 274, 279, 283, 284, 285, 287, 288, 299, 300,
1388 303, 315, 316, 201, 67, 67, 239, 8, 13, 20,
1389 76, 110, 111, 129, 134, 165, 188, 189, 190, 275,
1390 276, 277, 278, 11, 105, 111, 259, 260, 261, 172,
1391 289, 275, 23, 27, 88, 137, 147, 150, 174, 179,
1392 249, 73, 75, 172, 224, 225, 226, 172, 172, 172,
1393 172, 172, 297, 298, 224, 311, 67, 62, 63, 64,
1394 65, 93, 95, 97, 103, 262, 263, 264, 311, 172,
1395 172, 310, 290, 67, 7, 8, 28, 70, 100, 173,
1396 178, 304, 305, 30, 73, 75, 162, 224, 67, 46,
1397 101, 163, 271, 272, 273, 172, 293, 248, 249, 172,
1398 6, 34, 53, 57, 135, 167, 168, 169, 170, 175,
1399 280, 281, 282, 12, 14, 15, 21, 24, 52, 94,
1400 96, 102, 104, 108, 132, 133, 243, 244, 245, 246,
1401 314, 225, 67, 214, 307, 308, 309, 67, 306, 0,
1402 221, 201, 224, 224, 35, 67, 313, 67, 172, 172,
1403 37, 60, 85, 302, 216, 31, 56, 59, 148, 149,
1404 155, 240, 241, 276, 260, 67, 35, 250, 3, 47,
1405 48, 49, 50, 106, 151, 171, 176, 177, 266, 267,
1406 268, 269, 172, 221, 22, 61, 286, 298, 224, 263,
1407 67, 172, 30, 67, 291, 292, 305, 71, 256, 30,
1408 30, 256, 92, 256, 272, 67, 213, 249, 281, 313,
1409 172, 43, 67, 183, 312, 244, 67, 313, 295, 67,
1410 308, 67, 201, 227, 5, 72, 74, 172, 196, 301,
1411 203, 204, 317, 318, 319, 67, 172, 32, 40, 44,
1412 84, 117, 186, 251, 252, 253, 172, 172, 67, 267,
1413 313, 312, 67, 67, 257, 256, 256, 257, 225, 257,
1414 172, 68, 144, 296, 39, 9, 19, 58, 59, 77,
1415 98, 107, 109, 125, 145, 146, 183, 185, 193, 197,
1416 198, 228, 229, 230, 231, 232, 233, 234, 158, 318,
1417 320, 321, 323, 201, 213, 172, 4, 29, 112, 120,
1418 139, 195, 199, 254, 212, 42, 51, 60, 80, 83,
1419 89, 114, 118, 119, 122, 123, 124, 126, 127, 128,
1420 130, 159, 193, 258, 257, 257, 256, 30, 294, 225,
1421 67, 67, 67, 187, 172, 213, 201, 217, 321, 216,
1422 313, 67, 55, 257, 215, 224, 205, 322, 213, 206,
1423 324, 325, 313, 213, 217, 325, 201, 313, 216, 207,
1424 208, 209, 210, 211, 326, 327, 328, 217, 327, 201,
1428 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1429 static const yytype_uint16 yyr1[] =
1431 0, 218, 219, 220, 220, 220, 221, 221, 221, 221,
1432 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
1433 222, 223, 223, 223, 223, 223, 224, 224, 225, 226,
1434 226, 227, 227, 228, 228, 228, 229, 230, 230, 230,
1435 230, 230, 230, 230, 230, 230, 231, 231, 232, 232,
1436 232, 232, 232, 232, 233, 234, 235, 236, 236, 237,
1437 237, 237, 237, 238, 238, 238, 238, 238, 238, 238,
1438 238, 238, 239, 239, 240, 240, 241, 241, 241, 241,
1439 241, 242, 243, 243, 244, 244, 244, 244, 245, 245,
1440 245, 245, 245, 245, 245, 245, 245, 246, 246, 247,
1441 247, 247, 248, 248, 249, 249, 249, 249, 249, 249,
1442 249, 249, 250, 250, 251, 251, 251, 251, 252, 252,
1443 253, 253, 254, 254, 254, 254, 254, 254, 254, 255,
1444 255, 255, 255, 255, 255, 255, 255, 256, 256, 257,
1445 257, 257, 258, 258, 258, 258, 258, 258, 258, 258,
1446 258, 258, 258, 258, 258, 258, 258, 258, 258, 259,
1447 259, 260, 261, 261, 261, 262, 262, 263, 264, 264,
1448 264, 264, 264, 264, 264, 264, 265, 266, 266, 267,
1449 267, 267, 267, 267, 268, 268, 268, 269, 269, 269,
1450 269, 270, 271, 271, 272, 273, 273, 273, 274, 274,
1451 275, 275, 276, 276, 277, 277, 277, 277, 277, 277,
1452 278, 278, 278, 278, 278, 278, 279, 280, 280, 281,
1453 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
1454 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
1455 283, 283, 283, 283, 283, 283, 284, 284, 284, 285,
1456 285, 286, 286, 286, 287, 288, 288, 288, 289, 289,
1457 289, 290, 290, 291, 292, 292, 293, 294, 294, 295,
1458 295, 296, 296, 297, 297, 298, 299, 299, 300, 300,
1459 301, 301, 301, 301, 302, 302, 302, 303, 304, 304,
1460 305, 305, 305, 305, 305, 305, 305, 306, 306, 307,
1461 307, 308, 308, 309, 310, 310, 311, 311, 312, 312,
1462 312, 313, 313, 314, 315, 316, 317, 317, 318, 319,
1463 319, 320, 320, 321, 322, 323, 324, 324, 325, 326,
1464 326, 327, 328, 328, 328, 328, 328
1467 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1468 static const yytype_uint8 yyr2[] =
1470 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1472 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1473 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1474 1, 1, 1, 1, 1, 1, 2, 2, 1, 1,
1475 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
1476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1477 2, 2, 0, 2, 2, 2, 1, 1, 1, 1,
1478 1, 2, 2, 1, 2, 2, 2, 1, 1, 1,
1479 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1480 2, 3, 2, 1, 1, 1, 1, 1, 1, 1,
1481 1, 1, 0, 2, 2, 2, 1, 1, 1, 1,
1482 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1483 2, 4, 6, 4, 5, 5, 4, 0, 2, 0,
1484 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1485 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1486 1, 2, 1, 1, 1, 2, 1, 2, 1, 1,
1487 1, 1, 1, 1, 1, 1, 3, 2, 1, 2,
1488 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1489 1, 2, 2, 1, 2, 1, 1, 1, 2, 2,
1490 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1491 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
1492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1493 1, 1, 2, 2, 2, 2, 3, 3, 1, 2,
1494 2, 2, 2, 2, 3, 2, 1, 1, 1, 1,
1495 1, 1, 1, 0, 1, 1, 1, 1, 1, 2,
1496 0, 0, 2, 4, 1, 1, 4, 1, 0, 0,
1497 2, 2, 2, 2, 1, 1, 3, 3, 1, 1,
1498 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
1499 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
1500 1, 1, 1, 5, 2, 1, 2, 1, 1, 1,
1501 1, 1, 1, 2, 5, 1, 3, 2, 3, 1,
1502 1, 2, 1, 5, 4, 3, 2, 1, 6, 3,
1507 #define yyerrok (yyerrstatus = 0)
1508 #define yyclearin (yychar = YYEMPTY)
1509 #define YYEMPTY (-2)
1512 #define YYACCEPT goto yyacceptlab
1513 #define YYABORT goto yyabortlab
1514 #define YYERROR goto yyerrorlab
1517 #define YYRECOVERING() (!!yyerrstatus)
1519 #define YYBACKUP(Token, Value) \
1521 if (yychar == YYEMPTY) \
1525 YYPOPSTACK (yylen); \
1531 yyerror (YY_("syntax error: cannot back up")); \
1536 /* Error token number */
1538 #define YYERRCODE 256
1542 /* Enable debugging if requested. */
1546 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1547 # define YYFPRINTF fprintf
1550 # define YYDPRINTF(Args) \
1556 /* This macro is provided for backward compatibility. */
1557 #ifndef YY_LOCATION_PRINT
1558 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1562 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1566 YYFPRINTF (stderr, "%s ", Title); \
1567 yy_symbol_print (stderr, \
1569 YYFPRINTF (stderr, "\n"); \
1574 /*----------------------------------------.
1575 | Print this symbol's value on YYOUTPUT. |
1576 `----------------------------------------*/
1579 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1581 FILE *yyo = yyoutput;
1586 if (yytype < YYNTOKENS)
1587 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1593 /*--------------------------------.
1594 | Print this symbol on YYOUTPUT. |
1595 `--------------------------------*/
1598 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1600 YYFPRINTF (yyoutput, "%s %s (",
1601 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1603 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1604 YYFPRINTF (yyoutput, ")");
1607 /*------------------------------------------------------------------.
1608 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1610 `------------------------------------------------------------------*/
1613 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1615 YYFPRINTF (stderr, "Stack now");
1616 for (; yybottom <= yytop; yybottom++)
1618 int yybot = *yybottom;
1619 YYFPRINTF (stderr, " %d", yybot);
1621 YYFPRINTF (stderr, "\n");
1624 # define YY_STACK_PRINT(Bottom, Top) \
1627 yy_stack_print ((Bottom), (Top)); \
1631 /*------------------------------------------------.
1632 | Report that the YYRULE is going to be reduced. |
1633 `------------------------------------------------*/
1636 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1638 unsigned long int yylno = yyrline[yyrule];
1639 int yynrhs = yyr2[yyrule];
1641 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1643 /* The symbols being reduced. */
1644 for (yyi = 0; yyi < yynrhs; yyi++)
1646 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1647 yy_symbol_print (stderr,
1648 yystos[yyssp[yyi + 1 - yynrhs]],
1649 &(yyvsp[(yyi + 1) - (yynrhs)])
1651 YYFPRINTF (stderr, "\n");
1655 # define YY_REDUCE_PRINT(Rule) \
1658 yy_reduce_print (yyssp, yyvsp, Rule); \
1661 /* Nonzero means print parse trace. It is left uninitialized so that
1662 multiple parsers can coexist. */
1664 #else /* !YYDEBUG */
1665 # define YYDPRINTF(Args)
1666 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1667 # define YY_STACK_PRINT(Bottom, Top)
1668 # define YY_REDUCE_PRINT(Rule)
1669 #endif /* !YYDEBUG */
1672 /* YYINITDEPTH -- initial size of the parser's stacks. */
1674 # define YYINITDEPTH 200
1677 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1678 if the built-in stack extension method is used).
1680 Do not make this value too large; the results are undefined if
1681 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1682 evaluated with infinite-precision integer arithmetic. */
1685 # define YYMAXDEPTH 10000
1692 # if defined __GLIBC__ && defined _STRING_H
1693 # define yystrlen strlen
1695 /* Return the length of YYSTR. */
1697 yystrlen (const char *yystr)
1700 for (yylen = 0; yystr[yylen]; yylen++)
1708 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1709 # define yystpcpy stpcpy
1711 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1714 yystpcpy (char *yydest, const char *yysrc)
1717 const char *yys = yysrc;
1719 while ((*yyd++ = *yys++) != '\0')
1728 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1729 quotes and backslashes, so that it's suitable for yyerror. The
1730 heuristic is that double-quoting is unnecessary unless the string
1731 contains an apostrophe, a comma, or backslash (other than
1732 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1733 null, do not copy; instead, return the length of what the result
1736 yytnamerr (char *yyres, const char *yystr)
1741 char const *yyp = yystr;
1748 goto do_not_strip_quotes;
1752 goto do_not_strip_quotes;
1765 do_not_strip_quotes: ;
1769 return yystrlen (yystr);
1771 return yystpcpy (yyres, yystr) - yyres;
1775 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1776 about the unexpected token YYTOKEN for the state stack whose top is
1779 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1780 not large enough to hold the message. In that case, also set
1781 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1782 required number of bytes is too large to store. */
1784 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1785 yytype_int16 *yyssp, int yytoken)
1787 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1788 YYSIZE_T yysize = yysize0;
1789 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1790 /* Internationalized format string. */
1791 const char *yyformat = YY_NULLPTR;
1792 /* Arguments of yyformat. */
1793 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1794 /* Number of reported tokens (one for the "unexpected", one per
1798 /* There are many possibilities here to consider:
1799 - If this state is a consistent state with a default action, then
1800 the only way this function was invoked is if the default action
1801 is an error action. In that case, don't check for expected
1802 tokens because there are none.
1803 - The only way there can be no lookahead present (in yychar) is if
1804 this state is a consistent state with a default action. Thus,
1805 detecting the absence of a lookahead is sufficient to determine
1806 that there is no unexpected or expected token to report. In that
1807 case, just report a simple "syntax error".
1808 - Don't assume there isn't a lookahead just because this state is a
1809 consistent state with a default action. There might have been a
1810 previous inconsistent state, consistent state with a non-default
1811 action, or user semantic action that manipulated yychar.
1812 - Of course, the expected token list depends on states to have
1813 correct lookahead information, and it depends on the parser not
1814 to perform extra reductions after fetching a lookahead from the
1815 scanner and before detecting a syntax error. Thus, state merging
1816 (from LALR or IELR) and default reductions corrupt the expected
1817 token list. However, the list is correct for canonical LR with
1818 one exception: it will still contain any token that will not be
1819 accepted due to an error action in a later state.
1821 if (yytoken != YYEMPTY)
1823 int yyn = yypact[*yyssp];
1824 yyarg[yycount++] = yytname[yytoken];
1825 if (!yypact_value_is_default (yyn))
1827 /* Start YYX at -YYN if negative to avoid negative indexes in
1828 YYCHECK. In other words, skip the first -YYN actions for
1829 this state because they are default actions. */
1830 int yyxbegin = yyn < 0 ? -yyn : 0;
1831 /* Stay within bounds of both yycheck and yytname. */
1832 int yychecklim = YYLAST - yyn + 1;
1833 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1836 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1837 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1838 && !yytable_value_is_error (yytable[yyx + yyn]))
1840 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1846 yyarg[yycount++] = yytname[yyx];
1848 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1849 if (! (yysize <= yysize1
1850 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1860 # define YYCASE_(N, S) \
1864 YYCASE_(0, YY_("syntax error"));
1865 YYCASE_(1, YY_("syntax error, unexpected %s"));
1866 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1867 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1868 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1869 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1874 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1875 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1880 if (*yymsg_alloc < yysize)
1882 *yymsg_alloc = 2 * yysize;
1883 if (! (yysize <= *yymsg_alloc
1884 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1885 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1889 /* Avoid sprintf, as that infringes on the user's name space.
1890 Don't have undefined behavior even if the translation
1891 produced a string with the wrong number of "%s"s. */
1895 while ((*yyp = *yyformat) != '\0')
1896 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1898 yyp += yytnamerr (yyp, yyarg[yyi++]);
1909 #endif /* YYERROR_VERBOSE */
1911 /*-----------------------------------------------.
1912 | Release the memory associated to this symbol. |
1913 `-----------------------------------------------*/
1916 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1921 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1923 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1925 YY_IGNORE_MAYBE_UNINITIALIZED_END
1931 /* The lookahead symbol. */
1934 /* The semantic value of the lookahead symbol. */
1936 /* Number of syntax errors so far. */
1948 /* Number of tokens to shift before error messages enabled. */
1951 /* The stacks and their tools:
1952 'yyss': related to states.
1953 'yyvs': related to semantic values.
1955 Refer to the stacks through separate pointers, to allow yyoverflow
1956 to reallocate them elsewhere. */
1958 /* The state stack. */
1959 yytype_int16 yyssa[YYINITDEPTH];
1961 yytype_int16 *yyssp;
1963 /* The semantic value stack. */
1964 YYSTYPE yyvsa[YYINITDEPTH];
1968 YYSIZE_T yystacksize;
1972 /* Lookahead token as an internal (translated) token number. */
1974 /* The variables used to return semantic value and location from the
1979 /* Buffer for error messages, and its allocated size. */
1981 char *yymsg = yymsgbuf;
1982 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1985 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1987 /* The number of symbols on the RHS of the reduced rule.
1988 Keep to zero when no symbol should be popped. */
1991 yyssp = yyss = yyssa;
1992 yyvsp = yyvs = yyvsa;
1993 yystacksize = YYINITDEPTH;
1995 YYDPRINTF ((stderr, "Starting parse\n"));
2000 yychar = YYEMPTY; /* Cause a token to be read. */
2003 /*------------------------------------------------------------.
2004 | yynewstate -- Push a new state, which is found in yystate. |
2005 `------------------------------------------------------------*/
2007 /* In all cases, when you get here, the value and location stacks
2008 have just been pushed. So pushing a state here evens the stacks. */
2014 if (yyss + yystacksize - 1 <= yyssp)
2016 /* Get the current used size of the three stacks, in elements. */
2017 YYSIZE_T yysize = yyssp - yyss + 1;
2021 /* Give user a chance to reallocate the stack. Use copies of
2022 these so that the &'s don't force the real ones into
2024 YYSTYPE *yyvs1 = yyvs;
2025 yytype_int16 *yyss1 = yyss;
2027 /* Each stack pointer address is followed by the size of the
2028 data in use in that stack, in bytes. This used to be a
2029 conditional around just the two extra args, but that might
2030 be undefined if yyoverflow is a macro. */
2031 yyoverflow (YY_("memory exhausted"),
2032 &yyss1, yysize * sizeof (*yyssp),
2033 &yyvs1, yysize * sizeof (*yyvsp),
2039 #else /* no yyoverflow */
2040 # ifndef YYSTACK_RELOCATE
2041 goto yyexhaustedlab;
2043 /* Extend the stack our own way. */
2044 if (YYMAXDEPTH <= yystacksize)
2045 goto yyexhaustedlab;
2047 if (YYMAXDEPTH < yystacksize)
2048 yystacksize = YYMAXDEPTH;
2051 yytype_int16 *yyss1 = yyss;
2052 union yyalloc *yyptr =
2053 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2055 goto yyexhaustedlab;
2056 YYSTACK_RELOCATE (yyss_alloc, yyss);
2057 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2058 # undef YYSTACK_RELOCATE
2060 YYSTACK_FREE (yyss1);
2063 #endif /* no yyoverflow */
2065 yyssp = yyss + yysize - 1;
2066 yyvsp = yyvs + yysize - 1;
2068 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2069 (unsigned long int) yystacksize));
2071 if (yyss + yystacksize - 1 <= yyssp)
2075 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2077 if (yystate == YYFINAL)
2087 /* Do appropriate processing given the current state. Read a
2088 lookahead token if we need one and don't already have one. */
2090 /* First try to decide what to do without reference to lookahead token. */
2091 yyn = yypact[yystate];
2092 if (yypact_value_is_default (yyn))
2095 /* Not known => get a lookahead token if don't already have one. */
2097 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2098 if (yychar == YYEMPTY)
2100 YYDPRINTF ((stderr, "Reading a token: "));
2104 if (yychar <= YYEOF)
2106 yychar = yytoken = YYEOF;
2107 YYDPRINTF ((stderr, "Now at end of input.\n"));
2111 yytoken = YYTRANSLATE (yychar);
2112 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2115 /* If the proper action on seeing token YYTOKEN is to reduce or to
2116 detect an error, take that action. */
2118 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2123 if (yytable_value_is_error (yyn))
2129 /* Count tokens shifted since error; after three, turn off error
2134 /* Shift the lookahead token. */
2135 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2137 /* Discard the shifted token. */
2141 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2143 YY_IGNORE_MAYBE_UNINITIALIZED_END
2148 /*-----------------------------------------------------------.
2149 | yydefault -- do the default action for the current state. |
2150 `-----------------------------------------------------------*/
2152 yyn = yydefact[yystate];
2158 /*-----------------------------.
2159 | yyreduce -- Do a reduction. |
2160 `-----------------------------*/
2162 /* yyn is the number of a rule to reduce with. */
2165 /* If YYLEN is nonzero, implement the default value of the action:
2168 Otherwise, the following line sets YYVAL to garbage.
2169 This behavior is undocumented and Bison
2170 users should not rely upon it. Assigning to YYVAL
2171 unconditionally makes the parser a bit smaller, and it avoids a
2172 GCC warning that YYVAL may be used uninitialized. */
2173 yyval = yyvsp[1-yylen];
2176 YY_REDUCE_PRINT (yyn);
2180 #line 398 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2182 /* I will need to incorporate much more fine grained
2183 * error messages. The following should suffice for
2186 struct FILE_INFO * ip_ctx = lex_current();
2188 "syntax error in %s line %d, column %d",
2190 ip_ctx->errpos.nline,
2191 ip_ctx->errpos.ncol);
2193 #line 2194 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2197 #line 434 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2201 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2202 APPEND_G_FIFO(cfgt.peers, my_node);
2204 #line 2205 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2208 #line 453 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2209 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2210 #line 2211 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2214 #line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2215 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2216 #line 2217 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2220 #line 463 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2221 { (yyval.Integer) = AF_INET; }
2222 #line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2226 #line 465 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2227 { (yyval.Integer) = AF_INET6; }
2228 #line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2232 #line 470 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2233 { (yyval.Attr_val_fifo) = NULL; }
2234 #line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2238 #line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2240 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2241 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2243 #line 2244 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2247 #line 486 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2248 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2249 #line 2250 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2253 #line 503 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2254 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2255 #line 2256 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2259 #line 505 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2260 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2261 #line 2262 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2265 #line 519 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2266 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2267 #line 2268 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2271 #line 533 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2273 unpeer_node *my_node;
2275 my_node = create_unpeer_node((yyvsp[0].Address_node));
2277 APPEND_G_FIFO(cfgt.unpeers, my_node);
2279 #line 2280 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2283 #line 554 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2284 { cfgt.broadcastclient = 1; }
2285 #line 2286 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2289 #line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2290 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2291 #line 2292 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2295 #line 558 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2296 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2297 #line 2298 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2301 #line 560 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2302 { cfgt.mdnstries = (yyvsp[0].Integer); }
2303 #line 2304 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2307 #line 571 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2311 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2312 APPEND_G_FIFO(cfgt.vars, atrv);
2314 #line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2318 #line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2319 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2320 #line 2321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2324 #line 580 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2326 cfgt.auth.cryptosw++;
2327 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2329 #line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2333 #line 585 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2334 { cfgt.auth.keys = (yyvsp[0].String); }
2335 #line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2339 #line 587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2340 { cfgt.auth.keysdir = (yyvsp[0].String); }
2341 #line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2345 #line 589 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2346 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2347 #line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2351 #line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2352 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2353 #line 2354 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2357 #line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2359 /* [Bug 948] leaves it open if appending or
2360 * replacing the trusted key list is the right
2361 * way. In any case, either alternative should
2362 * be coded correctly!
2364 DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
2365 CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
2367 #line 2368 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2371 #line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2372 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2373 #line 2374 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2377 #line 608 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2378 { (yyval.Attr_val_fifo) = NULL; }
2379 #line 2380 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2383 #line 610 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2385 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2386 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2388 #line 2389 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2392 #line 618 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2393 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2394 #line 2395 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2398 #line 620 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2400 (yyval.Attr_val) = NULL;
2401 cfgt.auth.revoke = (yyvsp[0].Integer);
2402 msyslog(LOG_WARNING,
2403 "'crypto revoke %d' is deprecated, "
2404 "please use 'revoke %d' instead.",
2405 cfgt.auth.revoke, cfgt.auth.revoke);
2407 #line 2408 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2411 #line 645 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2412 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2413 #line 2414 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2417 #line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2419 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2420 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2422 #line 2423 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2426 #line 655 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2428 (yyval.Attr_val_fifo) = NULL;
2429 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2431 #line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2435 #line 663 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2436 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2437 #line 2438 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2441 #line 665 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2442 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2443 #line 2444 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2447 #line 667 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2448 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2449 #line 2450 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2453 #line 669 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2454 { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
2455 #line 2456 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2459 #line 696 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2460 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2461 #line 2462 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2465 #line 698 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2467 if (lex_from_file()) {
2468 cfgt.stats_dir = (yyvsp[0].String);
2470 YYFREE((yyvsp[0].String));
2471 yyerror("statsdir remote configuration ignored");
2474 #line 2475 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2478 #line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2482 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2483 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2485 #line 2486 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2489 #line 717 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2491 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2492 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2494 #line 2495 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2498 #line 722 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2500 (yyval.Int_fifo) = NULL;
2501 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2503 #line 2504 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2507 #line 741 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2508 { (yyval.Attr_val_fifo) = NULL; }
2509 #line 2510 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2513 #line 743 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2515 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2516 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2518 #line 2519 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2522 #line 751 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2524 if (lex_from_file()) {
2525 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2527 (yyval.Attr_val) = NULL;
2528 YYFREE((yyvsp[0].String));
2529 yyerror("filegen file remote config ignored");
2532 #line 2533 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2536 #line 761 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2538 if (lex_from_file()) {
2539 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2541 (yyval.Attr_val) = NULL;
2542 yyerror("filegen type remote config ignored");
2545 #line 2546 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2549 #line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2553 if (lex_from_file()) {
2554 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2556 (yyval.Attr_val) = NULL;
2557 if (T_Link == (yyvsp[0].Integer))
2558 err = "filegen link remote config ignored";
2560 err = "filegen nolink remote config ignored";
2564 #line 2565 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2568 #line 785 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2569 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2570 #line 2571 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2574 #line 815 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2576 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2578 #line 2579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2582 #line 819 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2584 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2586 #line 2587 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2590 #line 823 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2594 rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
2595 lex_current()->curpos.nline);
2596 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2598 #line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2602 #line 831 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2606 rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
2607 lex_current()->curpos.nline);
2608 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2610 #line 2611 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2614 #line 839 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2618 rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
2619 lex_current()->curpos.nline);
2620 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2622 #line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2626 #line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2630 rn = create_restrict_node(
2631 create_address_node(
2634 create_address_node(
2637 (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
2638 lex_current()->curpos.nline);
2639 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2641 #line 2642 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2645 #line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2649 rn = create_restrict_node(
2650 create_address_node(
2653 create_address_node(
2656 (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo),
2657 lex_current()->curpos.nline);
2658 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2660 #line 2661 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2664 #line 877 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2668 APPEND_G_FIFO((yyvsp[0].Attr_val_fifo), create_attr_ival((yyvsp[-2].Integer), 1));
2669 rn = create_restrict_node(
2670 NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo), lex_current()->curpos.nline);
2671 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2673 #line 2674 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2677 #line 889 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2678 { (yyval.Integer) = -1; }
2679 #line 2680 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2683 #line 891 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2685 if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
2686 struct FILE_INFO * ip_ctx;
2688 ip_ctx = lex_current();
2690 "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
2693 ip_ctx->errpos.nline,
2694 ip_ctx->errpos.ncol);
2695 (yyvsp[0].Integer) = 0;
2697 (yyval.Integer) = (yyvsp[0].Integer);
2699 #line 2700 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2703 #line 910 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2704 { (yyval.Attr_val_fifo) = NULL; }
2705 #line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2709 #line 912 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2713 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2714 av = create_attr_ival((yyvsp[0].Integer), 1);
2715 APPEND_G_FIFO((yyval.Attr_val_fifo), av);
2717 #line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2721 #line 920 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2725 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
2726 av = create_attr_ival(T_ServerresponseFuzz, 1);
2727 APPEND_G_FIFO((yyval.Attr_val_fifo), av);
2729 #line 2730 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2733 #line 951 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2735 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2736 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2738 #line 2739 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2742 #line 956 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2744 (yyval.Attr_val_fifo) = NULL;
2745 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2747 #line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2751 #line 964 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2752 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2753 #line 2754 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2757 #line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2759 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2760 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2762 #line 2763 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2766 #line 980 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2768 (yyval.Attr_val_fifo) = NULL;
2769 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2771 #line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2775 #line 988 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2776 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2777 #line 2778 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2781 #line 1008 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2783 addr_opts_node *aon;
2785 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2786 APPEND_G_FIFO(cfgt.fudge, aon);
2788 #line 2789 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2792 #line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2794 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2795 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2797 #line 2798 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2801 #line 1023 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2803 (yyval.Attr_val_fifo) = NULL;
2804 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2806 #line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2810 #line 1031 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2811 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2812 #line 2813 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2816 #line 1033 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2817 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2818 #line 2819 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2822 #line 1035 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2824 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2825 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2827 (yyval.Attr_val) = NULL;
2828 yyerror("fudge factor: stratum value not in [0..16], ignored");
2831 #line 2832 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2835 #line 1044 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2836 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2837 #line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2841 #line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2842 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2843 #line 2844 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2847 #line 1068 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2848 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2849 #line 2850 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2853 #line 1073 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2855 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2856 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2858 #line 2859 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2862 #line 1078 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2864 (yyval.Attr_val_fifo) = NULL;
2865 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2867 #line 2868 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2871 #line 1086 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2872 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2873 #line 2874 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2877 #line 1102 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2878 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2879 #line 2880 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2883 #line 1104 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2884 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2885 #line 2886 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2889 #line 1109 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2891 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2892 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2894 #line 2895 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2898 #line 1114 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2900 (yyval.Attr_val_fifo) = NULL;
2901 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2903 #line 2904 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2907 #line 1122 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2908 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2909 #line 2910 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2913 #line 1124 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2915 if (lex_from_file()) {
2916 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2920 (yyval.Attr_val) = NULL;
2921 snprintf(err_str, sizeof(err_str),
2922 "enable/disable %s remote configuration ignored",
2923 keyword((yyvsp[0].Integer)));
2927 #line 2928 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2931 #line 1163 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2932 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2933 #line 2934 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2937 #line 1168 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2939 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2940 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2942 #line 2943 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2946 #line 1173 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2948 (yyval.Attr_val_fifo) = NULL;
2949 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2951 #line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2955 #line 1181 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2956 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2957 #line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2961 #line 1206 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2965 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2966 APPEND_G_FIFO(cfgt.vars, av);
2968 #line 2969 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2972 #line 1213 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2976 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2977 APPEND_G_FIFO(cfgt.vars, av);
2979 #line 2980 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2983 #line 1220 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2987 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2988 APPEND_G_FIFO(cfgt.vars, av);
2990 #line 2991 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2994 #line 1227 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2996 char error_text[64];
2999 if (lex_from_file()) {
3000 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
3001 APPEND_G_FIFO(cfgt.vars, av);
3003 YYFREE((yyvsp[0].String));
3004 snprintf(error_text, sizeof(error_text),
3005 "%s remote config ignored",
3006 keyword((yyvsp[-1].Integer)));
3007 yyerror(error_text);
3010 #line 3011 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3014 #line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3016 if (!lex_from_file()) {
3017 YYFREE((yyvsp[-1].String)); /* avoid leak */
3018 yyerror("remote includefile ignored");
3021 if (lex_level() > MAXINCLUDELEVEL) {
3022 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
3023 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
3025 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
3026 if (!lex_push_file(path, "r")) {
3027 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
3028 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
3031 YYFREE((yyvsp[-1].String)); /* avoid leak */
3033 #line 3034 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3037 #line 1262 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3041 av = create_attr_sval((yyvsp[-2].Integer), (yyvsp[-1].String));
3042 av->flag = (yyvsp[0].Integer);
3043 APPEND_G_FIFO(cfgt.vars, av);
3045 #line 3046 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3049 #line 1270 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3050 { lex_flush_stack(); }
3051 #line 3052 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3055 #line 1272 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3056 { /* see drift_parm below for actions */ }
3057 #line 3058 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3061 #line 1274 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3062 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
3063 #line 3064 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3067 #line 1276 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3068 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
3069 #line 3070 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3073 #line 1278 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3074 { CONCAT_G_FIFOS(cfgt.pollskewlist, (yyvsp[0].Attr_val_fifo)); }
3075 #line 3076 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3079 #line 1280 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3080 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
3081 #line 3082 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3085 #line 1282 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3087 addr_opts_node *aon;
3089 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
3090 APPEND_G_FIFO(cfgt.trap, aon);
3092 #line 3093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3096 #line 1289 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3097 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
3098 #line 3099 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3102 #line 1304 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3105 yyerror("Built without LEAP_SMEAR support.");
3108 #line 3109 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3112 #line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3113 { (yyval.Integer) = FALSE; }
3114 #line 3115 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3118 #line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3119 { (yyval.Integer) = TRUE; }
3120 #line 3121 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3124 #line 1317 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3125 { (yyval.Integer) = TRUE; }
3126 #line 3127 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3130 #line 1332 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3132 if (lex_from_file()) {
3134 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
3135 APPEND_G_FIFO(cfgt.vars, av);
3137 YYFREE((yyvsp[0].String));
3138 yyerror("driftfile remote configuration ignored");
3141 #line 3142 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3145 #line 1343 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3147 if (lex_from_file()) {
3149 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
3150 APPEND_G_FIFO(cfgt.vars, av);
3151 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
3152 APPEND_G_FIFO(cfgt.vars, av);
3153 msyslog(LOG_WARNING,
3154 "'driftfile FILENAME WanderValue' is deprecated, "
3155 "please use separate 'driftfile FILENAME' and "
3156 "'nonvolatile WanderValue' lines instead.");
3158 YYFREE((yyvsp[-1].String));
3159 yyerror("driftfile remote configuration ignored");
3162 #line 3163 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3166 #line 1360 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3168 if (lex_from_file()) {
3170 av = create_attr_sval(T_Driftfile, estrdup(""));
3171 APPEND_G_FIFO(cfgt.vars, av);
3173 yyerror("driftfile remote configuration ignored");
3176 #line 3177 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3180 #line 1373 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3181 { (yyval.Attr_val_fifo) = NULL; }
3182 #line 3183 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3186 #line 1375 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3187 { (yyval.Attr_val_fifo) = append_gen_fifo((yyvsp[-1].Attr_val_fifo), (yyvsp[0].Attr_val)); }
3188 #line 3189 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3192 #line 1380 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3194 if ((yyvsp[-2].Integer) < 0 || (yyvsp[0].Integer) < 0) {
3196 yyerror("pollskewlist: skew values must be >=0");
3197 destroy_attr_val((yyvsp[-3].Attr_val));
3198 (yyvsp[-3].Attr_val) = NULL;
3199 } else if ((yyvsp[-3].Attr_val) == NULL) {
3200 yyerror("pollskewlist: poll value must be 3-17, inclusive");
3201 } else if ((yyvsp[-3].Attr_val)->attr <= 0) {
3202 /* process default range */
3203 (yyvsp[-3].Attr_val)->value.r.first = (yyvsp[-2].Integer);
3204 (yyvsp[-3].Attr_val)->value.r.last = (yyvsp[0].Integer);
3205 } else if ((yyvsp[-2].Integer) < (1 << ((yyvsp[-3].Attr_val)->attr - 1)) && (yyvsp[0].Integer) < (1 << ((yyvsp[-3].Attr_val)->attr - 1))) {
3206 (yyvsp[-3].Attr_val)->value.r.first = (yyvsp[-2].Integer);
3207 (yyvsp[-3].Attr_val)->value.r.last = (yyvsp[0].Integer);
3209 yyerror("pollskewlist: randomization limit must be <= half the poll interval");
3210 destroy_attr_val((yyvsp[-3].Attr_val));
3211 (yyvsp[-3].Attr_val) = NULL;
3213 (yyval.Attr_val) = (yyvsp[-3].Attr_val);
3215 #line 3216 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3219 #line 1405 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3220 { (yyval.Attr_val) = ((yyvsp[0].Integer) >= 3 && (yyvsp[0].Integer) <= 17) ? create_attr_rval((yyvsp[0].Integer), 0, 0) : NULL; }
3221 #line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3225 #line 1406 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3226 { (yyval.Attr_val) = create_attr_rval(-1, 0, 0); }
3227 #line 3228 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3231 #line 1412 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3232 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3233 #line 3234 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3237 #line 1418 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3238 { (yyval.Integer) = 0; }
3239 #line 3240 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3243 #line 1423 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3244 { (yyval.Attr_val_fifo) = NULL; }
3245 #line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3249 #line 1425 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3251 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3252 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3254 #line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3258 #line 1433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3259 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3260 #line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3264 #line 1435 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3266 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3267 destroy_address_node((yyvsp[0].Address_node));
3269 #line 3270 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3273 #line 1443 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3275 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3276 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3278 #line 3279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3282 #line 1448 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3284 (yyval.Attr_val_fifo) = NULL;
3285 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3287 #line 3288 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3291 #line 1456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3296 switch ((yyvsp[0].String)[0]) {
3301 prefix = (yyvsp[0].String)[0];
3302 type = (yyvsp[0].String) + 1;
3307 type = (yyvsp[0].String);
3310 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3311 YYFREE((yyvsp[0].String));
3313 #line 3314 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3317 #line 1481 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3321 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3322 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3324 #line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3328 #line 1488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3332 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3333 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3335 #line 3336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3339 #line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3340 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3341 #line 3342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3345 #line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3347 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3348 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3350 #line 3351 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3354 #line 1526 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3356 (yyval.Int_fifo) = NULL;
3357 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3359 #line 3360 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3363 #line 1550 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3365 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3366 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3368 #line 3369 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3372 #line 1555 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3374 (yyval.Attr_val_fifo) = NULL;
3375 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3377 #line 3378 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3381 #line 1563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3383 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3384 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3386 #line 3387 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3390 #line 1568 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3392 (yyval.Attr_val_fifo) = NULL;
3393 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3395 #line 3396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3399 #line 1576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3400 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3401 #line 3402 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3405 #line 1582 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3406 { (yyval.Attr_val) = create_attr_rval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3407 #line 3408 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3411 #line 1587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3413 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3414 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3416 #line 3417 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3420 #line 1592 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3422 (yyval.String_fifo) = NULL;
3423 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3425 #line 3426 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3429 #line 1600 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3431 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3432 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3434 #line 3435 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3438 #line 1605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3440 (yyval.Address_fifo) = NULL;
3441 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3443 #line 3444 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3447 #line 1613 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3449 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3450 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3451 (yyval.Integer) = 1;
3453 (yyval.Integer) = (yyvsp[0].Integer);
3456 #line 3457 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3460 #line 1621 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3461 { (yyval.Integer) = 1; }
3462 #line 3463 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3466 #line 1622 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3467 { (yyval.Integer) = 0; }
3468 #line 3469 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3472 #line 1626 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3473 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3474 #line 3475 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3478 #line 1632 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3479 { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
3480 #line 3481 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3484 #line 1640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3488 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3489 APPEND_G_FIFO(cfgt.sim_details, sn);
3491 /* Revert from ; to \n for end-of-command */
3492 old_config_style = 1;
3494 #line 3495 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3498 #line 1657 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3499 { old_config_style = 0; }
3500 #line 3501 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3504 #line 1662 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3506 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3507 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3509 #line 3510 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3513 #line 1667 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3515 (yyval.Attr_val_fifo) = NULL;
3516 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3518 #line 3519 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3522 #line 1675 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3523 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3524 #line 3525 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3528 #line 1685 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3530 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3531 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3533 #line 3534 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3537 #line 1690 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3539 (yyval.Sim_server_fifo) = NULL;
3540 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3542 #line 3543 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3546 #line 1698 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3547 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3548 #line 3549 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3552 #line 1703 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3553 { (yyval.Double) = (yyvsp[-1].Double); }
3554 #line 3555 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3558 #line 1708 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3559 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3560 #line 3561 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3564 #line 1713 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3566 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3567 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3569 #line 3570 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3573 #line 1718 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3575 (yyval.Sim_script_fifo) = NULL;
3576 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3578 #line 3579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3582 #line 1726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3583 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3584 #line 3585 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3588 #line 1731 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3590 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3591 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3593 #line 3594 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3597 #line 1736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3599 (yyval.Attr_val_fifo) = NULL;
3600 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3602 #line 3603 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3606 #line 1744 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3607 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3608 #line 3609 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3612 #line 3613 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3615 /* User semantic actions sometimes alter yychar, and that requires
3616 that yytoken be updated with the new translation. We take the
3617 approach of translating immediately before every use of yytoken.
3618 One alternative is translating here after every semantic action,
3619 but that translation would be missed if the semantic action invokes
3620 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3621 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3622 incorrect destructor might then be invoked immediately. In the
3623 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3624 to an incorrect destructor call or verbose syntax error message
3625 before the lookahead is translated. */
3626 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3630 YY_STACK_PRINT (yyss, yyssp);
3634 /* Now 'shift' the result of the reduction. Determine what state
3635 that goes to, based on the state we popped back to and the rule
3636 number reduced by. */
3640 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3641 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3642 yystate = yytable[yystate];
3644 yystate = yydefgoto[yyn - YYNTOKENS];
3649 /*--------------------------------------.
3650 | yyerrlab -- here on detecting error. |
3651 `--------------------------------------*/
3653 /* Make sure we have latest lookahead translation. See comments at
3654 user semantic actions for why this is necessary. */
3655 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3657 /* If not already recovering from an error, report this error. */
3661 #if ! YYERROR_VERBOSE
3662 yyerror (YY_("syntax error"));
3664 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3667 char const *yymsgp = YY_("syntax error");
3668 int yysyntax_error_status;
3669 yysyntax_error_status = YYSYNTAX_ERROR;
3670 if (yysyntax_error_status == 0)
3672 else if (yysyntax_error_status == 1)
3674 if (yymsg != yymsgbuf)
3675 YYSTACK_FREE (yymsg);
3676 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3680 yymsg_alloc = sizeof yymsgbuf;
3681 yysyntax_error_status = 2;
3685 yysyntax_error_status = YYSYNTAX_ERROR;
3690 if (yysyntax_error_status == 2)
3691 goto yyexhaustedlab;
3693 # undef YYSYNTAX_ERROR
3699 if (yyerrstatus == 3)
3701 /* If just tried and failed to reuse lookahead token after an
3702 error, discard it. */
3704 if (yychar <= YYEOF)
3706 /* Return failure if at end of input. */
3707 if (yychar == YYEOF)
3712 yydestruct ("Error: discarding",
3718 /* Else will try to reuse lookahead token after shifting the error
3723 /*---------------------------------------------------.
3724 | yyerrorlab -- error raised explicitly by YYERROR. |
3725 `---------------------------------------------------*/
3728 /* Pacify compilers like GCC when the user code never invokes
3729 YYERROR and the label yyerrorlab therefore never appears in user
3731 if (/*CONSTCOND*/ 0)
3734 /* Do not reclaim the symbols of the rule whose action triggered
3738 YY_STACK_PRINT (yyss, yyssp);
3743 /*-------------------------------------------------------------.
3744 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3745 `-------------------------------------------------------------*/
3747 yyerrstatus = 3; /* Each real token shifted decrements this. */
3751 yyn = yypact[yystate];
3752 if (!yypact_value_is_default (yyn))
3755 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3763 /* Pop the current state because it cannot handle the error token. */
3768 yydestruct ("Error: popping",
3769 yystos[yystate], yyvsp);
3772 YY_STACK_PRINT (yyss, yyssp);
3775 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3777 YY_IGNORE_MAYBE_UNINITIALIZED_END
3780 /* Shift the error token. */
3781 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3787 /*-------------------------------------.
3788 | yyacceptlab -- YYACCEPT comes here. |
3789 `-------------------------------------*/
3794 /*-----------------------------------.
3795 | yyabortlab -- YYABORT comes here. |
3796 `-----------------------------------*/
3801 #if !defined yyoverflow || YYERROR_VERBOSE
3802 /*-------------------------------------------------.
3803 | yyexhaustedlab -- memory exhaustion comes here. |
3804 `-------------------------------------------------*/
3806 yyerror (YY_("memory exhausted"));
3812 if (yychar != YYEMPTY)
3814 /* Make sure we have latest lookahead translation. See comments at
3815 user semantic actions for why this is necessary. */
3816 yytoken = YYTRANSLATE (yychar);
3817 yydestruct ("Cleanup: discarding lookahead",
3820 /* Do not reclaim the symbols of the rule whose action triggered
3821 this YYABORT or YYACCEPT. */
3823 YY_STACK_PRINT (yyss, yyssp);
3824 while (yyssp != yyss)
3826 yydestruct ("Cleanup: popping",
3827 yystos[*yyssp], yyvsp);
3832 YYSTACK_FREE (yyss);
3835 if (yymsg != yymsgbuf)
3836 YYSTACK_FREE (yymsg);
3840 #line 1755 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
3849 struct FILE_INFO * ip_ctx;
3851 ip_ctx = lex_current();
3852 ip_ctx->errpos = ip_ctx->tokpos;
3854 msyslog(LOG_ERR, "line %d column %d %s",
3855 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3856 if (!lex_from_file()) {
3857 /* Save the error message in the correct buffer */
3858 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3859 MAXLINE - remote_config.err_pos,
3861 ip_ctx->errpos.ncol, msg);
3863 /* Increment the value of err_pos */
3865 remote_config.err_pos += retval;
3867 /* Increment the number of errors */
3868 ++remote_config.no_errors;
3874 * token_name - convert T_ token integers to text
3875 * example: token_name(T_Server) returns "T_Server"
3882 return yytname[YYTRANSLATE(token)];
3886 /* Initial Testing function -- ignore */
3888 int main(int argc, char *argv[])
3890 ip_file = FOPEN(argv[1], "r");
3892 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);