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 "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 "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_NTP_PARSER_H_INCLUDED
121 # define YY_YY_NTP_PARSER_H_INCLUDED
149 T_Broadcastclient = 272,
150 T_Broadcastdelay = 273,
212 T_Leapsmearinterval = 335,
220 T_Manycastclient = 343,
221 T_Manycastserver = 344,
243 T_Multicastclient = 366,
259 T_NtpSignDsocket = 382,
283 T_Saveconfigdir = 406,
318 T_WanderThreshold = 441,
327 T_Sim_Duration = 450,
328 T_Server_Offset = 451,
342 #define T_Allpeers 262
344 #define T_Autokey 264
345 #define T_Automax 265
346 #define T_Average 266
347 #define T_Basedate 267
348 #define T_Bclient 268
349 #define T_Bcpollbstep 269
351 #define T_Broadcast 271
352 #define T_Broadcastclient 272
353 #define T_Broadcastdelay 273
355 #define T_Calibrate 275
356 #define T_Ceiling 276
357 #define T_Clockstats 277
359 #define T_ControlKey 279
361 #define T_Cryptostats 281
364 #define T_Default 284
366 #define T_Disable 286
367 #define T_Discard 287
368 #define T_Dispersion 288
370 #define T_Driftfile 290
373 #define T_Ellipsis 293
379 #define T_Filegen 299
380 #define T_Filenum 300
390 #define T_Huffpuff 310
394 #define T_Incalloc 314
396 #define T_Initalloc 316
397 #define T_Initmem 317
398 #define T_Includefile 318
399 #define T_Integer 319
400 #define T_Interface 320
401 #define T_Intrange 321
403 #define T_Ippeerlimit 323
405 #define T_Ipv4_flag 325
407 #define T_Ipv6_flag 327
411 #define T_Keysdir 331
414 #define T_Leapfile 334
415 #define T_Leapsmearinterval 335
416 #define T_Limited 336
419 #define T_Logconfig 339
420 #define T_Logfile 340
421 #define T_Loopstats 341
422 #define T_Lowpriotrap 342
423 #define T_Manycastclient 343
424 #define T_Manycastserver 344
427 #define T_Maxclock 347
428 #define T_Maxdepth 348
429 #define T_Maxdist 349
431 #define T_Maxpoll 351
432 #define T_Mdnstries 352
434 #define T_Memlock 354
435 #define T_Minclock 355
436 #define T_Mindepth 356
437 #define T_Mindist 357
438 #define T_Minimum 358
439 #define T_Minpoll 359
440 #define T_Minsane 360
443 #define T_Monitor 363
446 #define T_Multicastclient 366
449 #define T_Nomodify 369
450 #define T_Nomrulist 370
452 #define T_Nonvolatile 372
453 #define T_Noepeer 373
455 #define T_Noquery 375
456 #define T_Noselect 376
457 #define T_Noserve 377
459 #define T_Notrust 379
461 #define T_Ntpport 381
462 #define T_NtpSignDsocket 382
464 #define T_Orphanwait 384
465 #define T_PCEdigest 385
468 #define T_Peerstats 388
471 #define T_Pidfile 391
474 #define T_Preempt 394
476 #define T_Protostats 396
478 #define T_Randfile 398
479 #define T_Rawstats 399
481 #define T_Requestkey 401
483 #define T_Restrict 403
486 #define T_Saveconfigdir 406
490 #define T_Stacksize 410
491 #define T_Statistics 411
493 #define T_Statsdir 413
495 #define T_Stepback 415
496 #define T_Stepfwd 416
497 #define T_Stepout 417
498 #define T_Stratum 418
501 #define T_Sysstats 421
506 #define T_Timingstats 426
511 #define T_Trustedkey 431
515 #define T_UEcrypto 435
516 #define T_UEcryptonak 436
517 #define T_UEdigest 437
518 #define T_Unconfig 438
520 #define T_Version 440
521 #define T_WanderThreshold 441
523 #define T_Wildcard 443
528 #define T_Simulate 448
529 #define T_Beep_Delay 449
530 #define T_Sim_Duration 450
531 #define T_Server_Offset 451
532 #define T_Duration 452
533 #define T_Freq_Offset 453
536 #define T_Prop_Delay 456
537 #define T_Proc_Delay 457
540 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
544 #line 52 "ntp_parser.y" /* yacc.c:355 */
550 gen_fifo * Generic_fifo;
552 attr_val_fifo * Attr_val_fifo;
554 string_fifo * String_fifo;
555 address_node * Address_node;
556 address_fifo * Address_fifo;
557 setvar_node * Set_var;
558 server_info * Sim_server;
559 server_info_fifo * Sim_server_fifo;
560 script_info * Sim_script;
561 script_info_fifo * Sim_script_fifo;
563 #line 564 "ntp_parser.c" /* yacc.c:355 */
566 typedef union YYSTYPE YYSTYPE;
567 # define YYSTYPE_IS_TRIVIAL 1
568 # define YYSTYPE_IS_DECLARED 1
572 extern YYSTYPE yylval;
576 #endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
578 /* Copy the second part of user declarations. */
580 #line 581 "ntp_parser.c" /* yacc.c:358 */
587 typedef YYTYPE_UINT8 yytype_uint8;
589 typedef unsigned char yytype_uint8;
593 typedef YYTYPE_INT8 yytype_int8;
595 typedef signed char yytype_int8;
599 typedef YYTYPE_UINT16 yytype_uint16;
601 typedef unsigned short int yytype_uint16;
605 typedef YYTYPE_INT16 yytype_int16;
607 typedef short int yytype_int16;
611 # ifdef __SIZE_TYPE__
612 # define YYSIZE_T __SIZE_TYPE__
613 # elif defined size_t
614 # define YYSIZE_T size_t
615 # elif ! defined YYSIZE_T
616 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
617 # define YYSIZE_T size_t
619 # define YYSIZE_T unsigned int
623 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
626 # if defined YYENABLE_NLS && YYENABLE_NLS
628 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
629 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
633 # define YY_(Msgid) Msgid
638 # if (defined __GNUC__ \
639 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
640 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
641 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
643 # define YY_ATTRIBUTE(Spec) /* empty */
647 #ifndef YY_ATTRIBUTE_PURE
648 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
651 #ifndef YY_ATTRIBUTE_UNUSED
652 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
655 #if !defined _Noreturn \
656 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
657 # if defined _MSC_VER && 1200 <= _MSC_VER
658 # define _Noreturn __declspec (noreturn)
660 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
664 /* Suppress unused-variable warnings by "using" E. */
665 #if ! defined lint || defined __GNUC__
666 # define YYUSE(E) ((void) (E))
668 # define YYUSE(E) /* empty */
671 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
672 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
673 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
674 _Pragma ("GCC diagnostic push") \
675 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
676 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
677 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
678 _Pragma ("GCC diagnostic pop")
680 # define YY_INITIAL_VALUE(Value) Value
682 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
683 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
684 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
686 #ifndef YY_INITIAL_VALUE
687 # define YY_INITIAL_VALUE(Value) /* Nothing. */
691 #if ! defined yyoverflow || YYERROR_VERBOSE
693 /* The parser invokes alloca or malloc; define the necessary symbols. */
695 # ifdef YYSTACK_USE_ALLOCA
696 # if YYSTACK_USE_ALLOCA
698 # define YYSTACK_ALLOC __builtin_alloca
699 # elif defined __BUILTIN_VA_ARG_INCR
700 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
702 # define YYSTACK_ALLOC __alloca
703 # elif defined _MSC_VER
704 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
705 # define alloca _alloca
707 # define YYSTACK_ALLOC alloca
708 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
709 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
710 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
711 # ifndef EXIT_SUCCESS
712 # define EXIT_SUCCESS 0
719 # ifdef YYSTACK_ALLOC
720 /* Pacify GCC's 'empty if-body' warning. */
721 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
722 # ifndef YYSTACK_ALLOC_MAXIMUM
723 /* The OS might guarantee only one guard page at the bottom of the stack,
724 and a page size can be as small as 4096 bytes. So we cannot safely
725 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
726 to allow for a few compiler-allocated temporary stack slots. */
727 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
730 # define YYSTACK_ALLOC YYMALLOC
731 # define YYSTACK_FREE YYFREE
732 # ifndef YYSTACK_ALLOC_MAXIMUM
733 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
735 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
736 && ! ((defined YYMALLOC || defined malloc) \
737 && (defined YYFREE || defined free)))
738 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
739 # ifndef EXIT_SUCCESS
740 # define EXIT_SUCCESS 0
744 # define YYMALLOC malloc
745 # if ! defined malloc && ! defined EXIT_SUCCESS
746 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
751 # if ! defined free && ! defined EXIT_SUCCESS
752 void free (void *); /* INFRINGES ON USER NAME SPACE */
756 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
759 #if (! defined yyoverflow \
760 && (! defined __cplusplus \
761 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
763 /* A type that is properly aligned for any stack member. */
766 yytype_int16 yyss_alloc;
770 /* The size of the maximum gap between one aligned stack and the next. */
771 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
773 /* The size of an array large to enough to hold all stacks, each with
775 # define YYSTACK_BYTES(N) \
776 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
777 + YYSTACK_GAP_MAXIMUM)
779 # define YYCOPY_NEEDED 1
781 /* Relocate STACK from its old location to the new one. The
782 local variables YYSIZE and YYSTACKSIZE give the old and new number of
783 elements in the stack, and YYPTR gives the new location of the
784 stack. Advance YYPTR to a properly aligned location for the next
786 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
789 YYSIZE_T yynewbytes; \
790 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
791 Stack = &yyptr->Stack_alloc; \
792 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
793 yyptr += yynewbytes / sizeof (*yyptr); \
799 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
800 /* Copy COUNT objects from SRC to DST. The source and destination do
803 # if defined __GNUC__ && 1 < __GNUC__
804 # define YYCOPY(Dst, Src, Count) \
805 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
807 # define YYCOPY(Dst, Src, Count) \
811 for (yyi = 0; yyi < (Count); yyi++) \
812 (Dst)[yyi] = (Src)[yyi]; \
817 #endif /* !YYCOPY_NEEDED */
819 /* YYFINAL -- State number of the termination state. */
821 /* YYLAST -- Last index in YYTABLE. */
824 /* YYNTOKENS -- Number of terminals. */
825 #define YYNTOKENS 208
826 /* YYNNTS -- Number of nonterminals. */
828 /* YYNRULES -- Number of rules. */
830 /* YYNSTATES -- Number of states. */
831 #define YYNSTATES 436
833 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
834 by yylex, with out-of-bounds checking. */
836 #define YYMAXUTOK 457
838 #define YYTRANSLATE(YYX) \
839 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
841 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
842 as returned by yylex, without out-of-bounds checking. */
843 static const yytype_uint8 yytranslate[] =
845 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 204, 205, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 203, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 206, 2, 207, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
865 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
870 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
871 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
872 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
873 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
874 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
875 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
876 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
877 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
878 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
879 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
880 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
881 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
882 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
883 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
884 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
885 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
886 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
887 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
888 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
889 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
890 195, 196, 197, 198, 199, 200, 201, 202
894 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
895 static const yytype_uint16 yyrline[] =
897 0, 378, 378, 382, 383, 384, 399, 400, 401, 402,
898 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
899 420, 430, 431, 432, 433, 434, 438, 439, 444, 449,
900 451, 457, 458, 466, 467, 468, 472, 477, 478, 479,
901 480, 481, 482, 483, 484, 488, 490, 495, 496, 497,
902 498, 499, 500, 504, 509, 518, 528, 529, 539, 541,
903 543, 545, 556, 563, 565, 570, 572, 574, 576, 578,
904 588, 594, 595, 603, 605, 617, 618, 619, 620, 621,
905 630, 635, 640, 648, 650, 652, 654, 659, 660, 661,
906 662, 663, 664, 665, 666, 667, 671, 672, 681, 683,
907 692, 702, 707, 715, 716, 717, 718, 719, 720, 721,
908 722, 727, 728, 736, 746, 755, 770, 775, 776, 780,
909 781, 785, 786, 787, 788, 789, 790, 791, 800, 804,
910 808, 816, 824, 832, 847, 862, 875, 876, 896, 897,
911 905, 906, 907, 908, 909, 910, 911, 912, 913, 914,
912 915, 916, 917, 918, 919, 920, 921, 925, 930, 938,
913 943, 944, 945, 949, 954, 962, 967, 968, 969, 970,
914 971, 972, 973, 974, 982, 992, 997, 1005, 1007, 1009,
915 1018, 1020, 1025, 1026, 1030, 1031, 1032, 1033, 1041, 1046,
916 1051, 1059, 1064, 1065, 1066, 1075, 1077, 1082, 1087, 1095,
917 1097, 1114, 1115, 1116, 1117, 1118, 1119, 1123, 1124, 1125,
918 1126, 1127, 1128, 1136, 1141, 1146, 1154, 1159, 1160, 1161,
919 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1177, 1178, 1179,
920 1186, 1193, 1200, 1216, 1235, 1237, 1239, 1241, 1243, 1245,
921 1252, 1257, 1258, 1259, 1263, 1267, 1276, 1277, 1281, 1282,
922 1283, 1287, 1298, 1316, 1328, 1333, 1335, 1340, 1341, 1349,
923 1351, 1359, 1364, 1372, 1397, 1404, 1414, 1415, 1419, 1420,
924 1421, 1422, 1426, 1427, 1428, 1432, 1437, 1442, 1450, 1451,
925 1452, 1453, 1454, 1455, 1456, 1466, 1471, 1479, 1484, 1492,
926 1494, 1498, 1503, 1508, 1516, 1521, 1529, 1538, 1539, 1543,
927 1544, 1548, 1556, 1574, 1578, 1583, 1591, 1596, 1597, 1601,
928 1606, 1614, 1619, 1624, 1629, 1634, 1642, 1647, 1652, 1660,
929 1665, 1666, 1667, 1668, 1669
933 #if YYDEBUG || YYERROR_VERBOSE || 1
934 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
935 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
936 static const char *const yytname[] =
938 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
939 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
940 "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
941 "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
942 "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
943 "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
944 "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
945 "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False",
946 "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3",
947 "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host",
948 "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc",
949 "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer",
950 "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4",
951 "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys",
952 "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval",
953 "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile",
954 "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver",
955 "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist",
956 "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock",
957 "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll",
958 "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
959 "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
960 "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery",
961 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
962 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
963 "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
964 "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
965 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
966 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
967 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
968 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
969 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
970 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
971 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
972 "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
973 "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
974 "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
975 "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
976 "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
977 "$accept", "configuration", "command_list", "command", "server_command",
978 "client_type", "address", "ip_address", "address_fam", "option_list",
979 "option", "option_flag", "option_flag_keyword", "option_int",
980 "option_int_keyword", "option_str", "option_str_keyword",
981 "unpeer_command", "unpeer_keyword", "other_mode_command",
982 "authentication_command", "crypto_command_list", "crypto_command",
983 "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
984 "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
985 "monitoring_command", "stats_list", "stat", "filegen_option_list",
986 "filegen_option", "link_nolink", "enable_disable", "filegen_type",
987 "access_control_command", "res_ippeerlimit", "ac_flag_list",
988 "access_control_flag", "discard_option_list", "discard_option",
989 "discard_option_keyword", "mru_option_list", "mru_option",
990 "mru_option_keyword", "fudge_command", "fudge_factor_list",
991 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
992 "rlimit_command", "rlimit_option_list", "rlimit_option",
993 "rlimit_option_keyword", "system_option_command", "system_option_list",
994 "system_option", "system_option_flag_keyword",
995 "system_option_local_flag_keyword", "tinker_command",
996 "tinker_option_list", "tinker_option", "tinker_option_keyword",
997 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
998 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
999 "variable_assign", "t_default_or_zero", "trap_option_list",
1000 "trap_option", "log_config_list", "log_config_command",
1001 "interface_command", "interface_nic", "nic_rule_class",
1002 "nic_rule_action", "reset_command", "counter_set_list",
1003 "counter_set_keyword", "integer_list", "integer_list_range",
1004 "integer_list_range_elt", "integer_range", "string_list", "address_list",
1005 "boolean", "number", "basedate", "simulate_command", "sim_conf_start",
1006 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
1007 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
1008 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
1009 "sim_act_keyword", YY_NULLPTR
1014 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1015 (internal) symbol number NUM (which must be that of a token). */
1016 static const yytype_uint16 yytoknum[] =
1018 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1019 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1020 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1021 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1022 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1023 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1024 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1025 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1026 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1027 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1028 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1029 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1030 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1031 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1032 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1033 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1034 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1035 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1036 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1037 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
1038 455, 456, 457, 61, 40, 41, 123, 125
1042 #define YYPACT_NINF -215
1044 #define yypact_value_is_default(Yystate) \
1045 (!!((Yystate) == (-215)))
1047 #define YYTABLE_NINF -7
1049 #define yytable_value_is_error(Yytable_value) \
1052 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1054 static const yytype_int16 yypact[] =
1056 11, -175, 2, -215, -215, -215, 3, -215, 93, 9,
1057 -138, -215, 93, -215, 66, -40, -215, -93, -215, -87,
1058 -82, -215, -215, -81, -215, -215, -40, 20, 210, -40,
1059 -215, -215, -70, -215, -67, -215, -215, 34, 6, -13,
1060 47, -6, -215, -215, -48, 66, -45, -215, 412, 483,
1061 -39, -60, 62, -215, -215, -215, 127, 203, -63, -215,
1062 -40, -215, -40, -215, -215, -215, -215, -215, -215, -215,
1063 -215, -215, -215, -11, 75, -24, -22, -215, -18, -215,
1064 -215, -53, -215, -215, -215, 48, -215, -215, -215, -215,
1065 -215, -215, -215, -215, -215, -215, -215, -215, 93, -215,
1066 -215, -215, -215, -215, -215, 9, -215, 82, 120, -215,
1067 93, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1068 -215, -215, -215, 86, -215, 4, 373, -215, -215, -215,
1069 -81, -215, -215, -40, -215, -215, -215, -215, -215, -215,
1070 -215, -215, -215, 210, -215, 106, -40, -215, -215, 15,
1071 -215, -215, -215, -215, -215, -215, -215, -215, 6, -215,
1072 105, 146, 151, 105, -30, -215, -215, -215, -215, -6,
1073 -215, 117, -21, -215, 66, -215, -215, -215, -215, -215,
1074 -215, -215, -215, -215, -215, -215, -215, 412, -215, -11,
1075 22, -215, -215, -215, -20, -215, -215, -215, -215, -215,
1076 -215, -215, -215, 483, -215, 128, -11, -215, -215, -215,
1077 129, -60, -215, -215, -215, 132, -215, 10, -215, -215,
1078 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1079 1, -133, -215, -215, -215, -215, -215, 134, -215, 41,
1080 -215, -215, -215, -215, -28, 42, -215, -215, -215, -215,
1081 45, 148, -215, -215, 86, -215, -11, -20, -215, -215,
1082 -215, -215, -215, -215, -215, -215, 150, -215, 105, 105,
1083 -215, -39, -215, -215, -215, 51, -215, -215, -215, -215,
1084 -215, -215, -215, -215, -215, -215, -215, -57, 178, -215,
1085 -215, -215, 288, -215, -215, -215, -215, -215, -215, -215,
1086 -215, -115, 25, 23, -215, -215, -215, -215, 61, -215,
1087 -215, 21, -215, -215, -215, -215, -215, -215, -215, -215,
1088 -215, -215, 477, -215, -215, 477, 105, 477, 201, -39,
1089 169, -215, 172, -215, -215, -215, -215, -215, -215, -215,
1090 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1091 -215, -215, -59, -215, 77, 36, 52, -100, -215, 39,
1092 -215, -11, -215, -215, -215, -215, -215, -215, -215, -215,
1093 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1094 -215, -215, -215, -215, -215, -215, -215, -215, -215, 477,
1095 477, -215, -215, -215, -215, -215, 43, -215, -215, -215,
1096 -40, -215, -215, -215, 55, -215, 477, -215, -215, 49,
1097 56, -11, 54, -166, -215, 67, -11, -215, -215, -215,
1098 70, 63, -215, -215, -215, -215, -215, 124, 85, 64,
1099 -215, 89, -215, -11, -215, -215
1102 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1103 Performed when YYTABLE does not specify something else to do. Zero
1104 means the default is an error. */
1105 static const yytype_uint16 yydefact[] =
1107 0, 0, 0, 24, 58, 241, 0, 71, 0, 0,
1108 253, 244, 0, 234, 0, 0, 246, 0, 266, 0,
1109 0, 247, 245, 0, 248, 25, 0, 0, 0, 0,
1110 267, 242, 0, 23, 0, 249, 22, 0, 0, 0,
1111 0, 0, 250, 21, 0, 0, 0, 243, 0, 0,
1112 0, 0, 0, 56, 57, 303, 0, 2, 0, 7,
1113 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1114 16, 17, 18, 0, 0, 0, 0, 227, 0, 228,
1115 19, 0, 5, 62, 63, 64, 201, 202, 203, 204,
1116 207, 205, 206, 208, 209, 210, 211, 212, 196, 198,
1117 199, 200, 160, 161, 162, 128, 158, 0, 251, 235,
1118 195, 103, 104, 105, 106, 110, 107, 108, 109, 111,
1119 29, 30, 28, 0, 26, 0, 6, 65, 66, 263,
1120 236, 262, 295, 59, 61, 166, 167, 168, 169, 170,
1121 171, 172, 173, 129, 164, 0, 60, 70, 293, 237,
1122 67, 278, 279, 280, 281, 282, 283, 284, 275, 277,
1123 136, 29, 30, 136, 136, 68, 194, 192, 193, 188,
1124 190, 0, 0, 238, 98, 102, 99, 217, 218, 219,
1125 220, 221, 222, 223, 224, 225, 226, 213, 215, 0,
1126 0, 87, 88, 89, 0, 90, 91, 97, 92, 96,
1127 93, 94, 95, 80, 82, 0, 0, 86, 257, 289,
1128 0, 69, 288, 290, 286, 240, 1, 0, 4, 31,
1129 55, 300, 299, 229, 230, 231, 232, 274, 273, 272,
1130 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
1131 197, 157, 159, 252, 100, 0, 184, 185, 186, 187,
1132 0, 0, 182, 183, 174, 176, 0, 0, 27, 233,
1133 261, 294, 163, 165, 292, 276, 0, 138, 136, 136,
1134 138, 0, 138, 189, 191, 0, 101, 214, 216, 301,
1135 298, 296, 297, 85, 81, 83, 84, 239, 0, 287,
1136 285, 3, 20, 268, 269, 270, 265, 271, 264, 307,
1137 308, 0, 0, 0, 74, 73, 120, 119, 0, 117,
1138 118, 0, 112, 115, 116, 180, 181, 179, 175, 177,
1139 178, 137, 132, 138, 138, 135, 136, 130, 256, 0,
1140 0, 258, 0, 37, 38, 39, 54, 47, 49, 48,
1141 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
1142 36, 34, 0, 35, 0, 0, 0, 0, 310, 0,
1143 305, 0, 113, 127, 123, 125, 121, 122, 124, 126,
1144 114, 140, 141, 142, 143, 144, 145, 146, 148, 149,
1145 147, 150, 151, 152, 153, 154, 155, 156, 139, 133,
1146 134, 138, 255, 254, 260, 259, 0, 45, 46, 53,
1147 0, 304, 302, 309, 0, 306, 131, 291, 313, 0,
1148 0, 0, 0, 0, 315, 0, 0, 311, 314, 312,
1149 0, 0, 320, 321, 322, 323, 324, 0, 0, 0,
1150 316, 0, 318, 0, 317, 319
1153 /* YYPGOTO[NTERM-NUM]. */
1154 static const yytype_int16 yypgoto[] =
1156 -215, -215, -215, -23, -215, -215, -15, -49, -215, -215,
1157 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
1158 -215, -215, -215, -215, -215, -215, 81, -215, -215, -215,
1159 -215, -38, -215, -215, -215, -215, -215, -215, -154, -214,
1160 -215, -215, 153, -215, -215, 142, -215, -215, -215, 32,
1161 -215, -215, -215, -215, 121, -215, -215, 277, -35, -215,
1162 -215, -215, -215, 107, -215, -215, -215, -215, -215, -215,
1163 -215, -215, -215, -215, -215, -215, 163, -215, -215, -215,
1164 -215, -215, -215, 137, -215, -215, 87, -215, -215, 267,
1165 53, -187, -215, -215, -215, -215, -2, -215, -215, -55,
1166 -215, -215, -215, -109, -215, -121, -215
1169 /* YYDEFGOTO[NTERM-NUM]. */
1170 static const yytype_int16 yydefgoto[] =
1172 -1, 56, 57, 58, 59, 60, 132, 124, 125, 292,
1173 348, 349, 350, 351, 352, 353, 354, 61, 62, 63,
1174 64, 85, 238, 239, 65, 203, 204, 205, 206, 66,
1175 174, 119, 244, 312, 313, 314, 370, 67, 267, 322,
1176 388, 105, 106, 107, 143, 144, 145, 68, 254, 255,
1177 256, 257, 69, 169, 170, 171, 70, 98, 99, 100,
1178 101, 71, 187, 188, 189, 72, 73, 74, 75, 76,
1179 109, 173, 393, 287, 331, 130, 131, 77, 78, 298,
1180 230, 79, 158, 159, 215, 211, 212, 213, 149, 133,
1181 283, 223, 207, 80, 81, 301, 302, 303, 357, 358,
1182 410, 359, 413, 414, 427, 428, 429
1185 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1186 positive, shift that token. If negative, reduce the rule whose
1187 number is the opposite. If YYTABLE_NINF, syntax error. */
1188 static const yytype_int16 yytable[] =
1190 123, 208, 278, 306, 209, 397, 293, 175, 329, 270,
1191 272, 307, 1, 151, 152, 308, 160, 82, 227, 286,
1192 102, 2, 280, 221, 164, 363, 108, 3, 4, 5,
1193 120, 412, 121, 153, 217, 6, 7, 355, 266, 166,
1194 228, 417, 8, 9, 281, 219, 10, 220, 11, 364,
1195 12, 13, 355, 222, 309, 14, 325, 161, 327, 162,
1196 271, 299, 300, 240, 15, 229, 83, 84, 16, 319,
1197 294, 126, 295, 154, 17, 240, 18, 127, 232, 299,
1198 300, 330, 128, 129, 134, 310, 19, 20, 111, 245,
1199 21, 22, 112, 167, 147, 23, 24, 148, 150, 25,
1200 26, 86, 233, 259, 155, 234, 87, 402, 27, 389,
1201 390, 165, 103, 88, 323, 324, 172, 104, 261, 176,
1202 398, 28, 29, 30, 122, 122, 214, 216, 31, 218,
1203 365, 261, 246, 247, 248, 249, 276, 366, 32, 224,
1204 225, 163, 226, 33, 210, 34, 242, 35, 36, 168,
1205 311, 122, 113, 231, 243, 282, 367, 37, 38, 39,
1206 40, 41, 42, 43, 44, 296, 89, 45, 258, 46,
1207 263, 156, 391, 266, 405, 268, 157, 406, 47, 264,
1208 269, 274, 275, 48, 49, 50, 279, 51, 52, 297,
1209 235, 236, 285, 288, 53, 54, 290, 237, 304, 114,
1210 90, 91, 291, -6, 55, 305, 315, 115, 368, 316,
1211 116, 369, 317, 2, 321, 328, 332, 360, 92, 3,
1212 4, 5, 326, 93, 415, 362, 361, 6, 7, 420,
1213 392, 250, 117, 395, 8, 9, 396, 118, 10, 400,
1214 11, 399, 12, 13, 401, 404, 435, 14, 407, 251,
1215 94, 409, 411, 412, 252, 253, 15, 416, 241, 419,
1216 16, 422, 423, 424, 425, 426, 17, 433, 18, 135,
1217 136, 137, 138, 95, 96, 97, 421, 432, 19, 20,
1218 394, 434, 21, 22, 284, 262, 318, 23, 24, 110,
1219 273, 25, 26, 260, 277, 265, 146, 333, 289, 356,
1220 27, 139, 403, 140, 418, 141, 431, 334, 0, 0,
1221 320, 142, 0, 28, 29, 30, 0, 0, 0, 0,
1222 31, 0, 422, 423, 424, 425, 426, 0, 0, 0,
1223 32, 430, 0, 0, 0, 33, 0, 34, 0, 35,
1224 36, 0, 0, 0, 335, 336, 0, 0, 0, 37,
1225 38, 39, 40, 41, 42, 43, 44, 0, 0, 45,
1226 0, 46, 337, 0, 0, 0, 0, 0, 0, 0,
1227 47, 0, 0, 0, 0, 48, 49, 50, 0, 51,
1228 52, 0, 0, 2, 338, 408, 53, 54, 0, 3,
1229 4, 5, 339, 0, 340, -6, 55, 6, 7, 0,
1230 0, 0, 0, 0, 8, 9, 0, 0, 10, 341,
1231 11, 0, 12, 13, 0, 0, 0, 14, 177, 0,
1232 0, 0, 0, 0, 0, 0, 15, 342, 343, 0,
1233 16, 0, 0, 0, 0, 0, 17, 0, 18, 0,
1234 0, 0, 0, 0, 0, 178, 0, 0, 19, 20,
1235 0, 0, 21, 22, 0, 0, 0, 23, 24, 0,
1236 0, 25, 26, 344, 179, 345, 0, 180, 0, 0,
1237 27, 0, 0, 346, 0, 0, 0, 347, 0, 0,
1238 0, 0, 0, 28, 29, 30, 0, 0, 0, 0,
1239 31, 0, 0, 0, 0, 190, 0, 191, 192, 0,
1240 32, 0, 0, 0, 193, 33, 194, 34, 0, 35,
1241 36, 0, 0, 0, 0, 0, 0, 0, 371, 37,
1242 38, 39, 40, 41, 42, 43, 44, 372, 0, 45,
1243 0, 46, 0, 0, 195, 373, 0, 0, 0, 0,
1244 47, 0, 0, 181, 0, 48, 49, 50, 0, 51,
1245 52, 0, 0, 0, 374, 375, 53, 54, 376, 0,
1246 0, 0, 0, 0, 377, 0, 55, 0, 0, 0,
1247 0, 182, 183, 184, 185, 196, 0, 197, 0, 186,
1248 0, 0, 0, 198, 0, 199, 0, 0, 200, 0,
1249 0, 378, 379, 0, 0, 380, 381, 382, 0, 383,
1250 384, 385, 0, 386, 0, 0, 0, 0, 0, 0,
1251 0, 201, 202, 0, 0, 0, 0, 0, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1259 static const yytype_int16 yycheck[] =
1261 15, 50, 189, 31, 64, 64, 5, 45, 65, 163,
1262 164, 39, 1, 7, 8, 43, 29, 192, 36, 206,
1263 11, 10, 42, 34, 39, 4, 164, 16, 17, 18,
1264 70, 197, 72, 27, 57, 24, 25, 152, 68, 45,
1265 58, 207, 31, 32, 64, 60, 35, 62, 37, 28,
1266 39, 40, 152, 64, 82, 44, 270, 70, 272, 72,
1267 90, 194, 195, 98, 53, 83, 64, 64, 57, 256,
1268 69, 164, 71, 67, 63, 110, 65, 164, 30, 194,
1269 195, 138, 164, 164, 64, 113, 75, 76, 22, 3,
1270 79, 80, 26, 99, 164, 84, 85, 164, 64, 88,
1271 89, 8, 54, 126, 98, 57, 13, 207, 97, 323,
1272 324, 64, 103, 20, 268, 269, 164, 108, 133, 164,
1273 179, 110, 111, 112, 164, 164, 64, 0, 117, 192,
1274 109, 146, 46, 47, 48, 49, 174, 116, 127, 64,
1275 164, 154, 164, 132, 204, 134, 64, 136, 137, 155,
1276 178, 164, 86, 206, 34, 175, 135, 146, 147, 148,
1277 149, 150, 151, 152, 153, 164, 73, 156, 164, 158,
1278 64, 165, 326, 68, 361, 29, 170, 391, 167, 164,
1279 29, 64, 203, 172, 173, 174, 164, 176, 177, 188,
1280 142, 143, 64, 64, 183, 184, 64, 149, 64, 133,
1281 107, 108, 192, 192, 193, 164, 164, 141, 187, 164,
1282 144, 190, 64, 10, 64, 164, 38, 192, 125, 16,
1283 17, 18, 271, 130, 411, 164, 203, 24, 25, 416,
1284 29, 145, 166, 64, 31, 32, 64, 171, 35, 203,
1285 37, 164, 39, 40, 192, 206, 433, 44, 205, 163,
1286 157, 196, 203, 197, 168, 169, 53, 203, 105, 192,
1287 57, 198, 199, 200, 201, 202, 63, 203, 65, 59,
1288 60, 61, 62, 180, 181, 182, 206, 192, 75, 76,
1289 329, 192, 79, 80, 203, 143, 254, 84, 85, 12,
1290 169, 88, 89, 130, 187, 158, 29, 9, 211, 301,
1291 97, 91, 357, 93, 413, 95, 427, 19, -1, -1,
1292 257, 101, -1, 110, 111, 112, -1, -1, -1, -1,
1293 117, -1, 198, 199, 200, 201, 202, -1, -1, -1,
1294 127, 207, -1, -1, -1, 132, -1, 134, -1, 136,
1295 137, -1, -1, -1, 56, 57, -1, -1, -1, 146,
1296 147, 148, 149, 150, 151, 152, 153, -1, -1, 156,
1297 -1, 158, 74, -1, -1, -1, -1, -1, -1, -1,
1298 167, -1, -1, -1, -1, 172, 173, 174, -1, 176,
1299 177, -1, -1, 10, 96, 400, 183, 184, -1, 16,
1300 17, 18, 104, -1, 106, 192, 193, 24, 25, -1,
1301 -1, -1, -1, -1, 31, 32, -1, -1, 35, 121,
1302 37, -1, 39, 40, -1, -1, -1, 44, 6, -1,
1303 -1, -1, -1, -1, -1, -1, 53, 139, 140, -1,
1304 57, -1, -1, -1, -1, -1, 63, -1, 65, -1,
1305 -1, -1, -1, -1, -1, 33, -1, -1, 75, 76,
1306 -1, -1, 79, 80, -1, -1, -1, 84, 85, -1,
1307 -1, 88, 89, 175, 52, 177, -1, 55, -1, -1,
1308 97, -1, -1, 185, -1, -1, -1, 189, -1, -1,
1309 -1, -1, -1, 110, 111, 112, -1, -1, -1, -1,
1310 117, -1, -1, -1, -1, 12, -1, 14, 15, -1,
1311 127, -1, -1, -1, 21, 132, 23, 134, -1, 136,
1312 137, -1, -1, -1, -1, -1, -1, -1, 41, 146,
1313 147, 148, 149, 150, 151, 152, 153, 50, -1, 156,
1314 -1, 158, -1, -1, 51, 58, -1, -1, -1, -1,
1315 167, -1, -1, 131, -1, 172, 173, 174, -1, 176,
1316 177, -1, -1, -1, 77, 78, 183, 184, 81, -1,
1317 -1, -1, -1, -1, 87, -1, 193, -1, -1, -1,
1318 -1, 159, 160, 161, 162, 92, -1, 94, -1, 167,
1319 -1, -1, -1, 100, -1, 102, -1, -1, 105, -1,
1320 -1, 114, 115, -1, -1, 118, 119, 120, -1, 122,
1321 123, 124, -1, 126, -1, -1, -1, -1, -1, -1,
1322 -1, 128, 129, -1, -1, -1, -1, -1, -1, -1,
1323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1326 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1330 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1331 symbol of state STATE-NUM. */
1332 static const yytype_uint16 yystos[] =
1334 0, 1, 10, 16, 17, 18, 24, 25, 31, 32,
1335 35, 37, 39, 40, 44, 53, 57, 63, 65, 75,
1336 76, 79, 80, 84, 85, 88, 89, 97, 110, 111,
1337 112, 117, 127, 132, 134, 136, 137, 146, 147, 148,
1338 149, 150, 151, 152, 153, 156, 158, 167, 172, 173,
1339 174, 176, 177, 183, 184, 193, 209, 210, 211, 212,
1340 213, 225, 226, 227, 228, 232, 237, 245, 255, 260,
1341 264, 269, 273, 274, 275, 276, 277, 285, 286, 289,
1342 301, 302, 192, 64, 64, 229, 8, 13, 20, 73,
1343 107, 108, 125, 130, 157, 180, 181, 182, 265, 266,
1344 267, 268, 11, 103, 108, 249, 250, 251, 164, 278,
1345 265, 22, 26, 86, 133, 141, 144, 166, 171, 239,
1346 70, 72, 164, 214, 215, 216, 164, 164, 164, 164,
1347 283, 284, 214, 297, 64, 59, 60, 61, 62, 91,
1348 93, 95, 101, 252, 253, 254, 297, 164, 164, 296,
1349 64, 7, 8, 27, 67, 98, 165, 170, 290, 291,
1350 29, 70, 72, 154, 214, 64, 45, 99, 155, 261,
1351 262, 263, 164, 279, 238, 239, 164, 6, 33, 52,
1352 55, 131, 159, 160, 161, 162, 167, 270, 271, 272,
1353 12, 14, 15, 21, 23, 51, 92, 94, 100, 102,
1354 105, 128, 129, 233, 234, 235, 236, 300, 215, 64,
1355 204, 293, 294, 295, 64, 292, 0, 211, 192, 214,
1356 214, 34, 64, 299, 64, 164, 164, 36, 58, 83,
1357 288, 206, 30, 54, 57, 142, 143, 149, 230, 231,
1358 266, 250, 64, 34, 240, 3, 46, 47, 48, 49,
1359 145, 163, 168, 169, 256, 257, 258, 259, 164, 211,
1360 284, 214, 253, 64, 164, 291, 68, 246, 29, 29,
1361 246, 90, 246, 262, 64, 203, 239, 271, 299, 164,
1362 42, 64, 175, 298, 234, 64, 299, 281, 64, 294,
1363 64, 192, 217, 5, 69, 71, 164, 188, 287, 194,
1364 195, 303, 304, 305, 64, 164, 31, 39, 43, 82,
1365 113, 178, 241, 242, 243, 164, 164, 64, 257, 299,
1366 298, 64, 247, 246, 246, 247, 215, 247, 164, 65,
1367 138, 282, 38, 9, 19, 56, 57, 74, 96, 104,
1368 106, 121, 139, 140, 175, 177, 185, 189, 218, 219,
1369 220, 221, 222, 223, 224, 152, 304, 306, 307, 309,
1370 192, 203, 164, 4, 28, 109, 116, 135, 187, 190,
1371 244, 41, 50, 58, 77, 78, 81, 87, 114, 115,
1372 118, 119, 120, 122, 123, 124, 126, 185, 248, 247,
1373 247, 246, 29, 280, 215, 64, 64, 64, 179, 164,
1374 203, 192, 207, 307, 206, 299, 247, 205, 214, 196,
1375 308, 203, 197, 310, 311, 299, 203, 207, 311, 192,
1376 299, 206, 198, 199, 200, 201, 202, 312, 313, 314,
1377 207, 313, 192, 203, 192, 299
1380 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1381 static const yytype_uint16 yyr1[] =
1383 0, 208, 209, 210, 210, 210, 211, 211, 211, 211,
1384 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
1385 212, 213, 213, 213, 213, 213, 214, 214, 215, 216,
1386 216, 217, 217, 218, 218, 218, 219, 220, 220, 220,
1387 220, 220, 220, 220, 220, 221, 221, 222, 222, 222,
1388 222, 222, 222, 223, 224, 225, 226, 226, 227, 227,
1389 227, 227, 228, 228, 228, 228, 228, 228, 228, 228,
1390 228, 229, 229, 230, 230, 231, 231, 231, 231, 231,
1391 232, 233, 233, 234, 234, 234, 234, 235, 235, 235,
1392 235, 235, 235, 235, 235, 235, 236, 236, 237, 237,
1393 237, 238, 238, 239, 239, 239, 239, 239, 239, 239,
1394 239, 240, 240, 241, 241, 241, 241, 242, 242, 243,
1395 243, 244, 244, 244, 244, 244, 244, 244, 245, 245,
1396 245, 245, 245, 245, 245, 245, 246, 246, 247, 247,
1397 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1398 248, 248, 248, 248, 248, 248, 248, 249, 249, 250,
1399 251, 251, 251, 252, 252, 253, 254, 254, 254, 254,
1400 254, 254, 254, 254, 255, 256, 256, 257, 257, 257,
1401 257, 257, 258, 258, 259, 259, 259, 259, 260, 261,
1402 261, 262, 263, 263, 263, 264, 264, 265, 265, 266,
1403 266, 267, 267, 267, 267, 267, 267, 268, 268, 268,
1404 268, 268, 268, 269, 270, 270, 271, 272, 272, 272,
1405 272, 272, 272, 272, 272, 272, 272, 273, 273, 273,
1406 273, 273, 273, 273, 273, 273, 273, 273, 273, 273,
1407 273, 274, 274, 274, 275, 275, 276, 276, 277, 277,
1408 277, 278, 278, 278, 279, 280, 280, 281, 281, 282,
1409 282, 283, 283, 284, 285, 285, 286, 286, 287, 287,
1410 287, 287, 288, 288, 288, 289, 290, 290, 291, 291,
1411 291, 291, 291, 291, 291, 292, 292, 293, 293, 294,
1412 294, 295, 296, 296, 297, 297, 298, 298, 298, 299,
1413 299, 300, 301, 302, 303, 303, 304, 305, 305, 306,
1414 306, 307, 308, 309, 310, 310, 311, 312, 312, 313,
1415 314, 314, 314, 314, 314
1418 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1419 static const yytype_uint8 yyr2[] =
1421 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1423 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1424 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1425 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1426 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1428 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1429 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1430 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1431 3, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1432 1, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1433 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1434 4, 6, 4, 5, 5, 4, 0, 2, 0, 2,
1435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1436 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
1437 1, 1, 1, 2, 1, 2, 1, 1, 1, 1,
1438 1, 1, 1, 1, 3, 2, 1, 2, 2, 2,
1439 2, 2, 1, 1, 1, 1, 1, 1, 2, 2,
1440 1, 2, 1, 1, 1, 2, 2, 2, 1, 1,
1441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1442 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1443 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1444 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
1445 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1446 1, 1, 2, 0, 4, 1, 0, 0, 2, 2,
1447 2, 2, 1, 1, 3, 3, 1, 1, 1, 1,
1448 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1449 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1450 1, 5, 2, 1, 2, 1, 1, 1, 1, 1,
1451 1, 2, 5, 1, 3, 2, 3, 1, 1, 2,
1452 1, 5, 4, 3, 2, 1, 6, 3, 2, 3,
1457 #define yyerrok (yyerrstatus = 0)
1458 #define yyclearin (yychar = YYEMPTY)
1459 #define YYEMPTY (-2)
1462 #define YYACCEPT goto yyacceptlab
1463 #define YYABORT goto yyabortlab
1464 #define YYERROR goto yyerrorlab
1467 #define YYRECOVERING() (!!yyerrstatus)
1469 #define YYBACKUP(Token, Value) \
1471 if (yychar == YYEMPTY) \
1475 YYPOPSTACK (yylen); \
1481 yyerror (YY_("syntax error: cannot back up")); \
1486 /* Error token number */
1488 #define YYERRCODE 256
1492 /* Enable debugging if requested. */
1496 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1497 # define YYFPRINTF fprintf
1500 # define YYDPRINTF(Args) \
1506 /* This macro is provided for backward compatibility. */
1507 #ifndef YY_LOCATION_PRINT
1508 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1512 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1516 YYFPRINTF (stderr, "%s ", Title); \
1517 yy_symbol_print (stderr, \
1519 YYFPRINTF (stderr, "\n"); \
1524 /*----------------------------------------.
1525 | Print this symbol's value on YYOUTPUT. |
1526 `----------------------------------------*/
1529 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1531 FILE *yyo = yyoutput;
1536 if (yytype < YYNTOKENS)
1537 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1543 /*--------------------------------.
1544 | Print this symbol on YYOUTPUT. |
1545 `--------------------------------*/
1548 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1550 YYFPRINTF (yyoutput, "%s %s (",
1551 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1553 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1554 YYFPRINTF (yyoutput, ")");
1557 /*------------------------------------------------------------------.
1558 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1560 `------------------------------------------------------------------*/
1563 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1565 YYFPRINTF (stderr, "Stack now");
1566 for (; yybottom <= yytop; yybottom++)
1568 int yybot = *yybottom;
1569 YYFPRINTF (stderr, " %d", yybot);
1571 YYFPRINTF (stderr, "\n");
1574 # define YY_STACK_PRINT(Bottom, Top) \
1577 yy_stack_print ((Bottom), (Top)); \
1581 /*------------------------------------------------.
1582 | Report that the YYRULE is going to be reduced. |
1583 `------------------------------------------------*/
1586 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1588 unsigned long int yylno = yyrline[yyrule];
1589 int yynrhs = yyr2[yyrule];
1591 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1593 /* The symbols being reduced. */
1594 for (yyi = 0; yyi < yynrhs; yyi++)
1596 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1597 yy_symbol_print (stderr,
1598 yystos[yyssp[yyi + 1 - yynrhs]],
1599 &(yyvsp[(yyi + 1) - (yynrhs)])
1601 YYFPRINTF (stderr, "\n");
1605 # define YY_REDUCE_PRINT(Rule) \
1608 yy_reduce_print (yyssp, yyvsp, Rule); \
1611 /* Nonzero means print parse trace. It is left uninitialized so that
1612 multiple parsers can coexist. */
1614 #else /* !YYDEBUG */
1615 # define YYDPRINTF(Args)
1616 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1617 # define YY_STACK_PRINT(Bottom, Top)
1618 # define YY_REDUCE_PRINT(Rule)
1619 #endif /* !YYDEBUG */
1622 /* YYINITDEPTH -- initial size of the parser's stacks. */
1624 # define YYINITDEPTH 200
1627 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1628 if the built-in stack extension method is used).
1630 Do not make this value too large; the results are undefined if
1631 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1632 evaluated with infinite-precision integer arithmetic. */
1635 # define YYMAXDEPTH 10000
1642 # if defined __GLIBC__ && defined _STRING_H
1643 # define yystrlen strlen
1645 /* Return the length of YYSTR. */
1647 yystrlen (const char *yystr)
1650 for (yylen = 0; yystr[yylen]; yylen++)
1658 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1659 # define yystpcpy stpcpy
1661 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1664 yystpcpy (char *yydest, const char *yysrc)
1667 const char *yys = yysrc;
1669 while ((*yyd++ = *yys++) != '\0')
1678 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1679 quotes and backslashes, so that it's suitable for yyerror. The
1680 heuristic is that double-quoting is unnecessary unless the string
1681 contains an apostrophe, a comma, or backslash (other than
1682 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1683 null, do not copy; instead, return the length of what the result
1686 yytnamerr (char *yyres, const char *yystr)
1691 char const *yyp = yystr;
1698 goto do_not_strip_quotes;
1702 goto do_not_strip_quotes;
1715 do_not_strip_quotes: ;
1719 return yystrlen (yystr);
1721 return yystpcpy (yyres, yystr) - yyres;
1725 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1726 about the unexpected token YYTOKEN for the state stack whose top is
1729 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1730 not large enough to hold the message. In that case, also set
1731 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1732 required number of bytes is too large to store. */
1734 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1735 yytype_int16 *yyssp, int yytoken)
1737 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1738 YYSIZE_T yysize = yysize0;
1739 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1740 /* Internationalized format string. */
1741 const char *yyformat = YY_NULLPTR;
1742 /* Arguments of yyformat. */
1743 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1744 /* Number of reported tokens (one for the "unexpected", one per
1748 /* There are many possibilities here to consider:
1749 - If this state is a consistent state with a default action, then
1750 the only way this function was invoked is if the default action
1751 is an error action. In that case, don't check for expected
1752 tokens because there are none.
1753 - The only way there can be no lookahead present (in yychar) is if
1754 this state is a consistent state with a default action. Thus,
1755 detecting the absence of a lookahead is sufficient to determine
1756 that there is no unexpected or expected token to report. In that
1757 case, just report a simple "syntax error".
1758 - Don't assume there isn't a lookahead just because this state is a
1759 consistent state with a default action. There might have been a
1760 previous inconsistent state, consistent state with a non-default
1761 action, or user semantic action that manipulated yychar.
1762 - Of course, the expected token list depends on states to have
1763 correct lookahead information, and it depends on the parser not
1764 to perform extra reductions after fetching a lookahead from the
1765 scanner and before detecting a syntax error. Thus, state merging
1766 (from LALR or IELR) and default reductions corrupt the expected
1767 token list. However, the list is correct for canonical LR with
1768 one exception: it will still contain any token that will not be
1769 accepted due to an error action in a later state.
1771 if (yytoken != YYEMPTY)
1773 int yyn = yypact[*yyssp];
1774 yyarg[yycount++] = yytname[yytoken];
1775 if (!yypact_value_is_default (yyn))
1777 /* Start YYX at -YYN if negative to avoid negative indexes in
1778 YYCHECK. In other words, skip the first -YYN actions for
1779 this state because they are default actions. */
1780 int yyxbegin = yyn < 0 ? -yyn : 0;
1781 /* Stay within bounds of both yycheck and yytname. */
1782 int yychecklim = YYLAST - yyn + 1;
1783 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1786 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1787 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1788 && !yytable_value_is_error (yytable[yyx + yyn]))
1790 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1796 yyarg[yycount++] = yytname[yyx];
1798 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1799 if (! (yysize <= yysize1
1800 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1810 # define YYCASE_(N, S) \
1814 YYCASE_(0, YY_("syntax error"));
1815 YYCASE_(1, YY_("syntax error, unexpected %s"));
1816 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1817 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1818 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1819 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1824 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1825 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1830 if (*yymsg_alloc < yysize)
1832 *yymsg_alloc = 2 * yysize;
1833 if (! (yysize <= *yymsg_alloc
1834 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1835 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1839 /* Avoid sprintf, as that infringes on the user's name space.
1840 Don't have undefined behavior even if the translation
1841 produced a string with the wrong number of "%s"s. */
1845 while ((*yyp = *yyformat) != '\0')
1846 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1848 yyp += yytnamerr (yyp, yyarg[yyi++]);
1859 #endif /* YYERROR_VERBOSE */
1861 /*-----------------------------------------------.
1862 | Release the memory associated to this symbol. |
1863 `-----------------------------------------------*/
1866 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1871 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1873 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1875 YY_IGNORE_MAYBE_UNINITIALIZED_END
1881 /* The lookahead symbol. */
1884 /* The semantic value of the lookahead symbol. */
1886 /* Number of syntax errors so far. */
1898 /* Number of tokens to shift before error messages enabled. */
1901 /* The stacks and their tools:
1902 'yyss': related to states.
1903 'yyvs': related to semantic values.
1905 Refer to the stacks through separate pointers, to allow yyoverflow
1906 to reallocate them elsewhere. */
1908 /* The state stack. */
1909 yytype_int16 yyssa[YYINITDEPTH];
1911 yytype_int16 *yyssp;
1913 /* The semantic value stack. */
1914 YYSTYPE yyvsa[YYINITDEPTH];
1918 YYSIZE_T yystacksize;
1922 /* Lookahead token as an internal (translated) token number. */
1924 /* The variables used to return semantic value and location from the
1929 /* Buffer for error messages, and its allocated size. */
1931 char *yymsg = yymsgbuf;
1932 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1935 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1937 /* The number of symbols on the RHS of the reduced rule.
1938 Keep to zero when no symbol should be popped. */
1941 yyssp = yyss = yyssa;
1942 yyvsp = yyvs = yyvsa;
1943 yystacksize = YYINITDEPTH;
1945 YYDPRINTF ((stderr, "Starting parse\n"));
1950 yychar = YYEMPTY; /* Cause a token to be read. */
1953 /*------------------------------------------------------------.
1954 | yynewstate -- Push a new state, which is found in yystate. |
1955 `------------------------------------------------------------*/
1957 /* In all cases, when you get here, the value and location stacks
1958 have just been pushed. So pushing a state here evens the stacks. */
1964 if (yyss + yystacksize - 1 <= yyssp)
1966 /* Get the current used size of the three stacks, in elements. */
1967 YYSIZE_T yysize = yyssp - yyss + 1;
1971 /* Give user a chance to reallocate the stack. Use copies of
1972 these so that the &'s don't force the real ones into
1974 YYSTYPE *yyvs1 = yyvs;
1975 yytype_int16 *yyss1 = yyss;
1977 /* Each stack pointer address is followed by the size of the
1978 data in use in that stack, in bytes. This used to be a
1979 conditional around just the two extra args, but that might
1980 be undefined if yyoverflow is a macro. */
1981 yyoverflow (YY_("memory exhausted"),
1982 &yyss1, yysize * sizeof (*yyssp),
1983 &yyvs1, yysize * sizeof (*yyvsp),
1989 #else /* no yyoverflow */
1990 # ifndef YYSTACK_RELOCATE
1991 goto yyexhaustedlab;
1993 /* Extend the stack our own way. */
1994 if (YYMAXDEPTH <= yystacksize)
1995 goto yyexhaustedlab;
1997 if (YYMAXDEPTH < yystacksize)
1998 yystacksize = YYMAXDEPTH;
2001 yytype_int16 *yyss1 = yyss;
2002 union yyalloc *yyptr =
2003 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2005 goto yyexhaustedlab;
2006 YYSTACK_RELOCATE (yyss_alloc, yyss);
2007 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2008 # undef YYSTACK_RELOCATE
2010 YYSTACK_FREE (yyss1);
2013 #endif /* no yyoverflow */
2015 yyssp = yyss + yysize - 1;
2016 yyvsp = yyvs + yysize - 1;
2018 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2019 (unsigned long int) yystacksize));
2021 if (yyss + yystacksize - 1 <= yyssp)
2025 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2027 if (yystate == YYFINAL)
2037 /* Do appropriate processing given the current state. Read a
2038 lookahead token if we need one and don't already have one. */
2040 /* First try to decide what to do without reference to lookahead token. */
2041 yyn = yypact[yystate];
2042 if (yypact_value_is_default (yyn))
2045 /* Not known => get a lookahead token if don't already have one. */
2047 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2048 if (yychar == YYEMPTY)
2050 YYDPRINTF ((stderr, "Reading a token: "));
2054 if (yychar <= YYEOF)
2056 yychar = yytoken = YYEOF;
2057 YYDPRINTF ((stderr, "Now at end of input.\n"));
2061 yytoken = YYTRANSLATE (yychar);
2062 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2065 /* If the proper action on seeing token YYTOKEN is to reduce or to
2066 detect an error, take that action. */
2068 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2073 if (yytable_value_is_error (yyn))
2079 /* Count tokens shifted since error; after three, turn off error
2084 /* Shift the lookahead token. */
2085 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2087 /* Discard the shifted token. */
2091 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2093 YY_IGNORE_MAYBE_UNINITIALIZED_END
2098 /*-----------------------------------------------------------.
2099 | yydefault -- do the default action for the current state. |
2100 `-----------------------------------------------------------*/
2102 yyn = yydefact[yystate];
2108 /*-----------------------------.
2109 | yyreduce -- Do a reduction. |
2110 `-----------------------------*/
2112 /* yyn is the number of a rule to reduce with. */
2115 /* If YYLEN is nonzero, implement the default value of the action:
2118 Otherwise, the following line sets YYVAL to garbage.
2119 This behavior is undocumented and Bison
2120 users should not rely upon it. Assigning to YYVAL
2121 unconditionally makes the parser a bit smaller, and it avoids a
2122 GCC warning that YYVAL may be used uninitialized. */
2123 yyval = yyvsp[1-yylen];
2126 YY_REDUCE_PRINT (yyn);
2130 #line 385 "ntp_parser.y" /* yacc.c:1646 */
2132 /* I will need to incorporate much more fine grained
2133 * error messages. The following should suffice for
2136 struct FILE_INFO * ip_ctx = lex_current();
2138 "syntax error in %s line %d, column %d",
2140 ip_ctx->errpos.nline,
2141 ip_ctx->errpos.ncol);
2143 #line 2144 "ntp_parser.c" /* yacc.c:1646 */
2147 #line 421 "ntp_parser.y" /* yacc.c:1646 */
2151 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2152 APPEND_G_FIFO(cfgt.peers, my_node);
2154 #line 2155 "ntp_parser.c" /* yacc.c:1646 */
2158 #line 440 "ntp_parser.y" /* yacc.c:1646 */
2159 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2160 #line 2161 "ntp_parser.c" /* yacc.c:1646 */
2164 #line 445 "ntp_parser.y" /* yacc.c:1646 */
2165 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2166 #line 2167 "ntp_parser.c" /* yacc.c:1646 */
2170 #line 450 "ntp_parser.y" /* yacc.c:1646 */
2171 { (yyval.Integer) = AF_INET; }
2172 #line 2173 "ntp_parser.c" /* yacc.c:1646 */
2176 #line 452 "ntp_parser.y" /* yacc.c:1646 */
2177 { (yyval.Integer) = AF_INET6; }
2178 #line 2179 "ntp_parser.c" /* yacc.c:1646 */
2182 #line 457 "ntp_parser.y" /* yacc.c:1646 */
2183 { (yyval.Attr_val_fifo) = NULL; }
2184 #line 2185 "ntp_parser.c" /* yacc.c:1646 */
2188 #line 459 "ntp_parser.y" /* yacc.c:1646 */
2190 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2191 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2193 #line 2194 "ntp_parser.c" /* yacc.c:1646 */
2197 #line 473 "ntp_parser.y" /* yacc.c:1646 */
2198 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2199 #line 2200 "ntp_parser.c" /* yacc.c:1646 */
2203 #line 489 "ntp_parser.y" /* yacc.c:1646 */
2204 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2205 #line 2206 "ntp_parser.c" /* yacc.c:1646 */
2209 #line 491 "ntp_parser.y" /* yacc.c:1646 */
2210 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2211 #line 2212 "ntp_parser.c" /* yacc.c:1646 */
2215 #line 505 "ntp_parser.y" /* yacc.c:1646 */
2216 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2217 #line 2218 "ntp_parser.c" /* yacc.c:1646 */
2221 #line 519 "ntp_parser.y" /* yacc.c:1646 */
2223 unpeer_node *my_node;
2225 my_node = create_unpeer_node((yyvsp[0].Address_node));
2227 APPEND_G_FIFO(cfgt.unpeers, my_node);
2229 #line 2230 "ntp_parser.c" /* yacc.c:1646 */
2233 #line 540 "ntp_parser.y" /* yacc.c:1646 */
2234 { cfgt.broadcastclient = 1; }
2235 #line 2236 "ntp_parser.c" /* yacc.c:1646 */
2239 #line 542 "ntp_parser.y" /* yacc.c:1646 */
2240 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2241 #line 2242 "ntp_parser.c" /* yacc.c:1646 */
2245 #line 544 "ntp_parser.y" /* yacc.c:1646 */
2246 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2247 #line 2248 "ntp_parser.c" /* yacc.c:1646 */
2251 #line 546 "ntp_parser.y" /* yacc.c:1646 */
2252 { cfgt.mdnstries = (yyvsp[0].Integer); }
2253 #line 2254 "ntp_parser.c" /* yacc.c:1646 */
2257 #line 557 "ntp_parser.y" /* yacc.c:1646 */
2261 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2262 APPEND_G_FIFO(cfgt.vars, atrv);
2264 #line 2265 "ntp_parser.c" /* yacc.c:1646 */
2268 #line 564 "ntp_parser.y" /* yacc.c:1646 */
2269 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2270 #line 2271 "ntp_parser.c" /* yacc.c:1646 */
2274 #line 566 "ntp_parser.y" /* yacc.c:1646 */
2276 cfgt.auth.cryptosw++;
2277 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2279 #line 2280 "ntp_parser.c" /* yacc.c:1646 */
2283 #line 571 "ntp_parser.y" /* yacc.c:1646 */
2284 { cfgt.auth.keys = (yyvsp[0].String); }
2285 #line 2286 "ntp_parser.c" /* yacc.c:1646 */
2289 #line 573 "ntp_parser.y" /* yacc.c:1646 */
2290 { cfgt.auth.keysdir = (yyvsp[0].String); }
2291 #line 2292 "ntp_parser.c" /* yacc.c:1646 */
2295 #line 575 "ntp_parser.y" /* yacc.c:1646 */
2296 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2297 #line 2298 "ntp_parser.c" /* yacc.c:1646 */
2301 #line 577 "ntp_parser.y" /* yacc.c:1646 */
2302 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2303 #line 2304 "ntp_parser.c" /* yacc.c:1646 */
2307 #line 579 "ntp_parser.y" /* yacc.c:1646 */
2309 /* [Bug 948] leaves it open if appending or
2310 * replacing the trusted key list is the right
2311 * way. In any case, either alternative should
2312 * be coded correctly!
2314 DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */
2315 CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo));
2317 #line 2318 "ntp_parser.c" /* yacc.c:1646 */
2321 #line 589 "ntp_parser.y" /* yacc.c:1646 */
2322 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2323 #line 2324 "ntp_parser.c" /* yacc.c:1646 */
2327 #line 594 "ntp_parser.y" /* yacc.c:1646 */
2328 { (yyval.Attr_val_fifo) = NULL; }
2329 #line 2330 "ntp_parser.c" /* yacc.c:1646 */
2333 #line 596 "ntp_parser.y" /* yacc.c:1646 */
2335 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2336 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2338 #line 2339 "ntp_parser.c" /* yacc.c:1646 */
2342 #line 604 "ntp_parser.y" /* yacc.c:1646 */
2343 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2344 #line 2345 "ntp_parser.c" /* yacc.c:1646 */
2348 #line 606 "ntp_parser.y" /* yacc.c:1646 */
2350 (yyval.Attr_val) = NULL;
2351 cfgt.auth.revoke = (yyvsp[0].Integer);
2352 msyslog(LOG_WARNING,
2353 "'crypto revoke %d' is deprecated, "
2354 "please use 'revoke %d' instead.",
2355 cfgt.auth.revoke, cfgt.auth.revoke);
2357 #line 2358 "ntp_parser.c" /* yacc.c:1646 */
2361 #line 631 "ntp_parser.y" /* yacc.c:1646 */
2362 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2363 #line 2364 "ntp_parser.c" /* yacc.c:1646 */
2367 #line 636 "ntp_parser.y" /* yacc.c:1646 */
2369 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2370 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2372 #line 2373 "ntp_parser.c" /* yacc.c:1646 */
2376 #line 641 "ntp_parser.y" /* yacc.c:1646 */
2378 (yyval.Attr_val_fifo) = NULL;
2379 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2381 #line 2382 "ntp_parser.c" /* yacc.c:1646 */
2385 #line 649 "ntp_parser.y" /* yacc.c:1646 */
2386 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2387 #line 2388 "ntp_parser.c" /* yacc.c:1646 */
2391 #line 651 "ntp_parser.y" /* yacc.c:1646 */
2392 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2393 #line 2394 "ntp_parser.c" /* yacc.c:1646 */
2397 #line 653 "ntp_parser.y" /* yacc.c:1646 */
2398 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2399 #line 2400 "ntp_parser.c" /* yacc.c:1646 */
2403 #line 655 "ntp_parser.y" /* yacc.c:1646 */
2404 { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); }
2405 #line 2406 "ntp_parser.c" /* yacc.c:1646 */
2409 #line 682 "ntp_parser.y" /* yacc.c:1646 */
2410 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2411 #line 2412 "ntp_parser.c" /* yacc.c:1646 */
2415 #line 684 "ntp_parser.y" /* yacc.c:1646 */
2417 if (lex_from_file()) {
2418 cfgt.stats_dir = (yyvsp[0].String);
2420 YYFREE((yyvsp[0].String));
2421 yyerror("statsdir remote configuration ignored");
2424 #line 2425 "ntp_parser.c" /* yacc.c:1646 */
2428 #line 693 "ntp_parser.y" /* yacc.c:1646 */
2432 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2433 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2435 #line 2436 "ntp_parser.c" /* yacc.c:1646 */
2439 #line 703 "ntp_parser.y" /* yacc.c:1646 */
2441 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2442 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2444 #line 2445 "ntp_parser.c" /* yacc.c:1646 */
2448 #line 708 "ntp_parser.y" /* yacc.c:1646 */
2450 (yyval.Int_fifo) = NULL;
2451 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2453 #line 2454 "ntp_parser.c" /* yacc.c:1646 */
2457 #line 727 "ntp_parser.y" /* yacc.c:1646 */
2458 { (yyval.Attr_val_fifo) = NULL; }
2459 #line 2460 "ntp_parser.c" /* yacc.c:1646 */
2463 #line 729 "ntp_parser.y" /* yacc.c:1646 */
2465 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2466 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2468 #line 2469 "ntp_parser.c" /* yacc.c:1646 */
2472 #line 737 "ntp_parser.y" /* yacc.c:1646 */
2474 if (lex_from_file()) {
2475 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2477 (yyval.Attr_val) = NULL;
2478 YYFREE((yyvsp[0].String));
2479 yyerror("filegen file remote config ignored");
2482 #line 2483 "ntp_parser.c" /* yacc.c:1646 */
2486 #line 747 "ntp_parser.y" /* yacc.c:1646 */
2488 if (lex_from_file()) {
2489 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2491 (yyval.Attr_val) = NULL;
2492 yyerror("filegen type remote config ignored");
2495 #line 2496 "ntp_parser.c" /* yacc.c:1646 */
2499 #line 756 "ntp_parser.y" /* yacc.c:1646 */
2503 if (lex_from_file()) {
2504 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2506 (yyval.Attr_val) = NULL;
2507 if (T_Link == (yyvsp[0].Integer))
2508 err = "filegen link remote config ignored";
2510 err = "filegen nolink remote config ignored";
2514 #line 2515 "ntp_parser.c" /* yacc.c:1646 */
2518 #line 771 "ntp_parser.y" /* yacc.c:1646 */
2519 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2520 #line 2521 "ntp_parser.c" /* yacc.c:1646 */
2524 #line 801 "ntp_parser.y" /* yacc.c:1646 */
2526 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2528 #line 2529 "ntp_parser.c" /* yacc.c:1646 */
2532 #line 805 "ntp_parser.y" /* yacc.c:1646 */
2534 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2536 #line 2537 "ntp_parser.c" /* yacc.c:1646 */
2540 #line 809 "ntp_parser.y" /* yacc.c:1646 */
2544 rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2545 lex_current()->curpos.nline);
2546 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2548 #line 2549 "ntp_parser.c" /* yacc.c:1646 */
2552 #line 817 "ntp_parser.y" /* yacc.c:1646 */
2556 rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2557 lex_current()->curpos.nline);
2558 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2560 #line 2561 "ntp_parser.c" /* yacc.c:1646 */
2564 #line 825 "ntp_parser.y" /* yacc.c:1646 */
2568 rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2569 lex_current()->curpos.nline);
2570 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2572 #line 2573 "ntp_parser.c" /* yacc.c:1646 */
2576 #line 833 "ntp_parser.y" /* yacc.c:1646 */
2580 rn = create_restrict_node(
2581 create_address_node(
2584 create_address_node(
2587 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2588 lex_current()->curpos.nline);
2589 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2591 #line 2592 "ntp_parser.c" /* yacc.c:1646 */
2595 #line 848 "ntp_parser.y" /* yacc.c:1646 */
2599 rn = create_restrict_node(
2600 create_address_node(
2603 create_address_node(
2606 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo),
2607 lex_current()->curpos.nline);
2608 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2610 #line 2611 "ntp_parser.c" /* yacc.c:1646 */
2614 #line 863 "ntp_parser.y" /* yacc.c:1646 */
2618 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer)));
2619 rn = create_restrict_node(
2620 NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2621 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2623 #line 2624 "ntp_parser.c" /* yacc.c:1646 */
2627 #line 875 "ntp_parser.y" /* yacc.c:1646 */
2628 { (yyval.Integer) = -1; }
2629 #line 2630 "ntp_parser.c" /* yacc.c:1646 */
2633 #line 877 "ntp_parser.y" /* yacc.c:1646 */
2635 if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) {
2636 struct FILE_INFO * ip_ctx;
2638 ip_ctx = lex_current();
2640 "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.",
2643 ip_ctx->errpos.nline,
2644 ip_ctx->errpos.ncol);
2645 (yyvsp[0].Integer) = 0;
2647 (yyval.Integer) = (yyvsp[0].Integer);
2649 #line 2650 "ntp_parser.c" /* yacc.c:1646 */
2653 #line 896 "ntp_parser.y" /* yacc.c:1646 */
2654 { (yyval.Int_fifo) = NULL; }
2655 #line 2656 "ntp_parser.c" /* yacc.c:1646 */
2659 #line 898 "ntp_parser.y" /* yacc.c:1646 */
2661 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2662 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2664 #line 2665 "ntp_parser.c" /* yacc.c:1646 */
2668 #line 926 "ntp_parser.y" /* yacc.c:1646 */
2670 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2671 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2673 #line 2674 "ntp_parser.c" /* yacc.c:1646 */
2677 #line 931 "ntp_parser.y" /* yacc.c:1646 */
2679 (yyval.Attr_val_fifo) = NULL;
2680 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2682 #line 2683 "ntp_parser.c" /* yacc.c:1646 */
2686 #line 939 "ntp_parser.y" /* yacc.c:1646 */
2687 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2688 #line 2689 "ntp_parser.c" /* yacc.c:1646 */
2692 #line 950 "ntp_parser.y" /* yacc.c:1646 */
2694 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2695 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2697 #line 2698 "ntp_parser.c" /* yacc.c:1646 */
2701 #line 955 "ntp_parser.y" /* yacc.c:1646 */
2703 (yyval.Attr_val_fifo) = NULL;
2704 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2706 #line 2707 "ntp_parser.c" /* yacc.c:1646 */
2710 #line 963 "ntp_parser.y" /* yacc.c:1646 */
2711 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2712 #line 2713 "ntp_parser.c" /* yacc.c:1646 */
2716 #line 983 "ntp_parser.y" /* yacc.c:1646 */
2718 addr_opts_node *aon;
2720 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2721 APPEND_G_FIFO(cfgt.fudge, aon);
2723 #line 2724 "ntp_parser.c" /* yacc.c:1646 */
2727 #line 993 "ntp_parser.y" /* yacc.c:1646 */
2729 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2730 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2732 #line 2733 "ntp_parser.c" /* yacc.c:1646 */
2736 #line 998 "ntp_parser.y" /* yacc.c:1646 */
2738 (yyval.Attr_val_fifo) = NULL;
2739 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2741 #line 2742 "ntp_parser.c" /* yacc.c:1646 */
2745 #line 1006 "ntp_parser.y" /* yacc.c:1646 */
2746 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2747 #line 2748 "ntp_parser.c" /* yacc.c:1646 */
2751 #line 1008 "ntp_parser.y" /* yacc.c:1646 */
2752 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2753 #line 2754 "ntp_parser.c" /* yacc.c:1646 */
2757 #line 1010 "ntp_parser.y" /* yacc.c:1646 */
2759 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2760 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2762 (yyval.Attr_val) = NULL;
2763 yyerror("fudge factor: stratum value not in [0..16], ignored");
2766 #line 2767 "ntp_parser.c" /* yacc.c:1646 */
2770 #line 1019 "ntp_parser.y" /* yacc.c:1646 */
2771 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2772 #line 2773 "ntp_parser.c" /* yacc.c:1646 */
2776 #line 1021 "ntp_parser.y" /* yacc.c:1646 */
2777 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2778 #line 2779 "ntp_parser.c" /* yacc.c:1646 */
2782 #line 1042 "ntp_parser.y" /* yacc.c:1646 */
2783 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2784 #line 2785 "ntp_parser.c" /* yacc.c:1646 */
2788 #line 1047 "ntp_parser.y" /* yacc.c:1646 */
2790 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2791 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2793 #line 2794 "ntp_parser.c" /* yacc.c:1646 */
2797 #line 1052 "ntp_parser.y" /* yacc.c:1646 */
2799 (yyval.Attr_val_fifo) = NULL;
2800 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2802 #line 2803 "ntp_parser.c" /* yacc.c:1646 */
2806 #line 1060 "ntp_parser.y" /* yacc.c:1646 */
2807 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2808 #line 2809 "ntp_parser.c" /* yacc.c:1646 */
2812 #line 1076 "ntp_parser.y" /* yacc.c:1646 */
2813 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2814 #line 2815 "ntp_parser.c" /* yacc.c:1646 */
2818 #line 1078 "ntp_parser.y" /* yacc.c:1646 */
2819 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2820 #line 2821 "ntp_parser.c" /* yacc.c:1646 */
2824 #line 1083 "ntp_parser.y" /* yacc.c:1646 */
2826 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2827 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2829 #line 2830 "ntp_parser.c" /* yacc.c:1646 */
2833 #line 1088 "ntp_parser.y" /* yacc.c:1646 */
2835 (yyval.Attr_val_fifo) = NULL;
2836 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2838 #line 2839 "ntp_parser.c" /* yacc.c:1646 */
2842 #line 1096 "ntp_parser.y" /* yacc.c:1646 */
2843 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2844 #line 2845 "ntp_parser.c" /* yacc.c:1646 */
2848 #line 1098 "ntp_parser.y" /* yacc.c:1646 */
2850 if (lex_from_file()) {
2851 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2855 (yyval.Attr_val) = NULL;
2856 snprintf(err_str, sizeof(err_str),
2857 "enable/disable %s remote configuration ignored",
2858 keyword((yyvsp[0].Integer)));
2862 #line 2863 "ntp_parser.c" /* yacc.c:1646 */
2866 #line 1137 "ntp_parser.y" /* yacc.c:1646 */
2867 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2868 #line 2869 "ntp_parser.c" /* yacc.c:1646 */
2872 #line 1142 "ntp_parser.y" /* yacc.c:1646 */
2874 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2875 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2877 #line 2878 "ntp_parser.c" /* yacc.c:1646 */
2881 #line 1147 "ntp_parser.y" /* yacc.c:1646 */
2883 (yyval.Attr_val_fifo) = NULL;
2884 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2886 #line 2887 "ntp_parser.c" /* yacc.c:1646 */
2890 #line 1155 "ntp_parser.y" /* yacc.c:1646 */
2891 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2892 #line 2893 "ntp_parser.c" /* yacc.c:1646 */
2896 #line 1180 "ntp_parser.y" /* yacc.c:1646 */
2900 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2901 APPEND_G_FIFO(cfgt.vars, av);
2903 #line 2904 "ntp_parser.c" /* yacc.c:1646 */
2907 #line 1187 "ntp_parser.y" /* yacc.c:1646 */
2911 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2912 APPEND_G_FIFO(cfgt.vars, av);
2914 #line 2915 "ntp_parser.c" /* yacc.c:1646 */
2918 #line 1194 "ntp_parser.y" /* yacc.c:1646 */
2922 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2923 APPEND_G_FIFO(cfgt.vars, av);
2925 #line 2926 "ntp_parser.c" /* yacc.c:1646 */
2929 #line 1201 "ntp_parser.y" /* yacc.c:1646 */
2931 char error_text[64];
2934 if (lex_from_file()) {
2935 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2936 APPEND_G_FIFO(cfgt.vars, av);
2938 YYFREE((yyvsp[0].String));
2939 snprintf(error_text, sizeof(error_text),
2940 "%s remote config ignored",
2941 keyword((yyvsp[-1].Integer)));
2942 yyerror(error_text);
2945 #line 2946 "ntp_parser.c" /* yacc.c:1646 */
2949 #line 1217 "ntp_parser.y" /* yacc.c:1646 */
2951 if (!lex_from_file()) {
2952 YYFREE((yyvsp[-1].String)); /* avoid leak */
2953 yyerror("remote includefile ignored");
2956 if (lex_level() > MAXINCLUDELEVEL) {
2957 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2958 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2960 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
2961 if (!lex_push_file(path, "r")) {
2962 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
2963 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
2966 YYFREE((yyvsp[-1].String)); /* avoid leak */
2968 #line 2969 "ntp_parser.c" /* yacc.c:1646 */
2972 #line 1236 "ntp_parser.y" /* yacc.c:1646 */
2973 { lex_flush_stack(); }
2974 #line 2975 "ntp_parser.c" /* yacc.c:1646 */
2978 #line 1238 "ntp_parser.y" /* yacc.c:1646 */
2979 { /* see drift_parm below for actions */ }
2980 #line 2981 "ntp_parser.c" /* yacc.c:1646 */
2984 #line 1240 "ntp_parser.y" /* yacc.c:1646 */
2985 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2986 #line 2987 "ntp_parser.c" /* yacc.c:1646 */
2990 #line 1242 "ntp_parser.y" /* yacc.c:1646 */
2991 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2992 #line 2993 "ntp_parser.c" /* yacc.c:1646 */
2996 #line 1244 "ntp_parser.y" /* yacc.c:1646 */
2997 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2998 #line 2999 "ntp_parser.c" /* yacc.c:1646 */
3002 #line 1246 "ntp_parser.y" /* yacc.c:1646 */
3004 addr_opts_node *aon;
3006 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
3007 APPEND_G_FIFO(cfgt.trap, aon);
3009 #line 3010 "ntp_parser.c" /* yacc.c:1646 */
3013 #line 1253 "ntp_parser.y" /* yacc.c:1646 */
3014 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
3015 #line 3016 "ntp_parser.c" /* yacc.c:1646 */
3019 #line 1268 "ntp_parser.y" /* yacc.c:1646 */
3022 yyerror("Built without LEAP_SMEAR support.");
3025 #line 3026 "ntp_parser.c" /* yacc.c:1646 */
3029 #line 1288 "ntp_parser.y" /* yacc.c:1646 */
3031 if (lex_from_file()) {
3033 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
3034 APPEND_G_FIFO(cfgt.vars, av);
3036 YYFREE((yyvsp[0].String));
3037 yyerror("driftfile remote configuration ignored");
3040 #line 3041 "ntp_parser.c" /* yacc.c:1646 */
3044 #line 1299 "ntp_parser.y" /* yacc.c:1646 */
3046 if (lex_from_file()) {
3048 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
3049 APPEND_G_FIFO(cfgt.vars, av);
3050 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
3051 APPEND_G_FIFO(cfgt.vars, av);
3052 msyslog(LOG_WARNING,
3053 "'driftfile FILENAME WanderValue' is deprecated, "
3054 "please use separate 'driftfile FILENAME' and "
3055 "'nonvolatile WanderValue' lines instead.");
3057 YYFREE((yyvsp[-1].String));
3058 yyerror("driftfile remote configuration ignored");
3061 #line 3062 "ntp_parser.c" /* yacc.c:1646 */
3065 #line 1316 "ntp_parser.y" /* yacc.c:1646 */
3067 if (lex_from_file()) {
3069 av = create_attr_sval(T_Driftfile, estrdup(""));
3070 APPEND_G_FIFO(cfgt.vars, av);
3072 yyerror("driftfile remote configuration ignored");
3075 #line 3076 "ntp_parser.c" /* yacc.c:1646 */
3079 #line 1329 "ntp_parser.y" /* yacc.c:1646 */
3080 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3081 #line 3082 "ntp_parser.c" /* yacc.c:1646 */
3085 #line 1335 "ntp_parser.y" /* yacc.c:1646 */
3086 { (yyval.Integer) = 0; }
3087 #line 3088 "ntp_parser.c" /* yacc.c:1646 */
3091 #line 1340 "ntp_parser.y" /* yacc.c:1646 */
3092 { (yyval.Attr_val_fifo) = NULL; }
3093 #line 3094 "ntp_parser.c" /* yacc.c:1646 */
3097 #line 1342 "ntp_parser.y" /* yacc.c:1646 */
3099 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3100 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3102 #line 3103 "ntp_parser.c" /* yacc.c:1646 */
3106 #line 1350 "ntp_parser.y" /* yacc.c:1646 */
3107 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3108 #line 3109 "ntp_parser.c" /* yacc.c:1646 */
3112 #line 1352 "ntp_parser.y" /* yacc.c:1646 */
3114 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3115 destroy_address_node((yyvsp[0].Address_node));
3117 #line 3118 "ntp_parser.c" /* yacc.c:1646 */
3121 #line 1360 "ntp_parser.y" /* yacc.c:1646 */
3123 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3124 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3126 #line 3127 "ntp_parser.c" /* yacc.c:1646 */
3130 #line 1365 "ntp_parser.y" /* yacc.c:1646 */
3132 (yyval.Attr_val_fifo) = NULL;
3133 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3135 #line 3136 "ntp_parser.c" /* yacc.c:1646 */
3139 #line 1373 "ntp_parser.y" /* yacc.c:1646 */
3144 switch ((yyvsp[0].String)[0]) {
3149 prefix = (yyvsp[0].String)[0];
3150 type = (yyvsp[0].String) + 1;
3155 type = (yyvsp[0].String);
3158 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3159 YYFREE((yyvsp[0].String));
3161 #line 3162 "ntp_parser.c" /* yacc.c:1646 */
3165 #line 1398 "ntp_parser.y" /* yacc.c:1646 */
3169 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3170 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3172 #line 3173 "ntp_parser.c" /* yacc.c:1646 */
3176 #line 1405 "ntp_parser.y" /* yacc.c:1646 */
3180 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3181 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3183 #line 3184 "ntp_parser.c" /* yacc.c:1646 */
3187 #line 1433 "ntp_parser.y" /* yacc.c:1646 */
3188 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3189 #line 3190 "ntp_parser.c" /* yacc.c:1646 */
3193 #line 1438 "ntp_parser.y" /* yacc.c:1646 */
3195 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3196 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3198 #line 3199 "ntp_parser.c" /* yacc.c:1646 */
3202 #line 1443 "ntp_parser.y" /* yacc.c:1646 */
3204 (yyval.Int_fifo) = NULL;
3205 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3207 #line 3208 "ntp_parser.c" /* yacc.c:1646 */
3211 #line 1467 "ntp_parser.y" /* yacc.c:1646 */
3213 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3214 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3216 #line 3217 "ntp_parser.c" /* yacc.c:1646 */
3220 #line 1472 "ntp_parser.y" /* yacc.c:1646 */
3222 (yyval.Attr_val_fifo) = NULL;
3223 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3225 #line 3226 "ntp_parser.c" /* yacc.c:1646 */
3229 #line 1480 "ntp_parser.y" /* yacc.c:1646 */
3231 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3232 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3234 #line 3235 "ntp_parser.c" /* yacc.c:1646 */
3238 #line 1485 "ntp_parser.y" /* yacc.c:1646 */
3240 (yyval.Attr_val_fifo) = NULL;
3241 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3243 #line 3244 "ntp_parser.c" /* yacc.c:1646 */
3247 #line 1493 "ntp_parser.y" /* yacc.c:1646 */
3248 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3249 #line 3250 "ntp_parser.c" /* yacc.c:1646 */
3253 #line 1499 "ntp_parser.y" /* yacc.c:1646 */
3254 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3255 #line 3256 "ntp_parser.c" /* yacc.c:1646 */
3259 #line 1504 "ntp_parser.y" /* yacc.c:1646 */
3261 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3262 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3264 #line 3265 "ntp_parser.c" /* yacc.c:1646 */
3268 #line 1509 "ntp_parser.y" /* yacc.c:1646 */
3270 (yyval.String_fifo) = NULL;
3271 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3273 #line 3274 "ntp_parser.c" /* yacc.c:1646 */
3277 #line 1517 "ntp_parser.y" /* yacc.c:1646 */
3279 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3280 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3282 #line 3283 "ntp_parser.c" /* yacc.c:1646 */
3286 #line 1522 "ntp_parser.y" /* yacc.c:1646 */
3288 (yyval.Address_fifo) = NULL;
3289 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3291 #line 3292 "ntp_parser.c" /* yacc.c:1646 */
3295 #line 1530 "ntp_parser.y" /* yacc.c:1646 */
3297 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3298 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3299 (yyval.Integer) = 1;
3301 (yyval.Integer) = (yyvsp[0].Integer);
3304 #line 3305 "ntp_parser.c" /* yacc.c:1646 */
3308 #line 1538 "ntp_parser.y" /* yacc.c:1646 */
3309 { (yyval.Integer) = 1; }
3310 #line 3311 "ntp_parser.c" /* yacc.c:1646 */
3314 #line 1539 "ntp_parser.y" /* yacc.c:1646 */
3315 { (yyval.Integer) = 0; }
3316 #line 3317 "ntp_parser.c" /* yacc.c:1646 */
3320 #line 1543 "ntp_parser.y" /* yacc.c:1646 */
3321 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3322 #line 3323 "ntp_parser.c" /* yacc.c:1646 */
3326 #line 1549 "ntp_parser.y" /* yacc.c:1646 */
3327 { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); }
3328 #line 3329 "ntp_parser.c" /* yacc.c:1646 */
3332 #line 1557 "ntp_parser.y" /* yacc.c:1646 */
3336 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3337 APPEND_G_FIFO(cfgt.sim_details, sn);
3339 /* Revert from ; to \n for end-of-command */
3340 old_config_style = 1;
3342 #line 3343 "ntp_parser.c" /* yacc.c:1646 */
3346 #line 1574 "ntp_parser.y" /* yacc.c:1646 */
3347 { old_config_style = 0; }
3348 #line 3349 "ntp_parser.c" /* yacc.c:1646 */
3352 #line 1579 "ntp_parser.y" /* yacc.c:1646 */
3354 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3355 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3357 #line 3358 "ntp_parser.c" /* yacc.c:1646 */
3361 #line 1584 "ntp_parser.y" /* yacc.c:1646 */
3363 (yyval.Attr_val_fifo) = NULL;
3364 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3366 #line 3367 "ntp_parser.c" /* yacc.c:1646 */
3370 #line 1592 "ntp_parser.y" /* yacc.c:1646 */
3371 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3372 #line 3373 "ntp_parser.c" /* yacc.c:1646 */
3376 #line 1602 "ntp_parser.y" /* yacc.c:1646 */
3378 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3379 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3381 #line 3382 "ntp_parser.c" /* yacc.c:1646 */
3385 #line 1607 "ntp_parser.y" /* yacc.c:1646 */
3387 (yyval.Sim_server_fifo) = NULL;
3388 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3390 #line 3391 "ntp_parser.c" /* yacc.c:1646 */
3394 #line 1615 "ntp_parser.y" /* yacc.c:1646 */
3395 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3396 #line 3397 "ntp_parser.c" /* yacc.c:1646 */
3400 #line 1620 "ntp_parser.y" /* yacc.c:1646 */
3401 { (yyval.Double) = (yyvsp[-1].Double); }
3402 #line 3403 "ntp_parser.c" /* yacc.c:1646 */
3406 #line 1625 "ntp_parser.y" /* yacc.c:1646 */
3407 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3408 #line 3409 "ntp_parser.c" /* yacc.c:1646 */
3412 #line 1630 "ntp_parser.y" /* yacc.c:1646 */
3414 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3415 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3417 #line 3418 "ntp_parser.c" /* yacc.c:1646 */
3421 #line 1635 "ntp_parser.y" /* yacc.c:1646 */
3423 (yyval.Sim_script_fifo) = NULL;
3424 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3426 #line 3427 "ntp_parser.c" /* yacc.c:1646 */
3430 #line 1643 "ntp_parser.y" /* yacc.c:1646 */
3431 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3432 #line 3433 "ntp_parser.c" /* yacc.c:1646 */
3436 #line 1648 "ntp_parser.y" /* yacc.c:1646 */
3438 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3439 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3441 #line 3442 "ntp_parser.c" /* yacc.c:1646 */
3445 #line 1653 "ntp_parser.y" /* yacc.c:1646 */
3447 (yyval.Attr_val_fifo) = NULL;
3448 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3450 #line 3451 "ntp_parser.c" /* yacc.c:1646 */
3454 #line 1661 "ntp_parser.y" /* yacc.c:1646 */
3455 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3456 #line 3457 "ntp_parser.c" /* yacc.c:1646 */
3460 #line 3461 "ntp_parser.c" /* yacc.c:1646 */
3463 /* User semantic actions sometimes alter yychar, and that requires
3464 that yytoken be updated with the new translation. We take the
3465 approach of translating immediately before every use of yytoken.
3466 One alternative is translating here after every semantic action,
3467 but that translation would be missed if the semantic action invokes
3468 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3469 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3470 incorrect destructor might then be invoked immediately. In the
3471 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3472 to an incorrect destructor call or verbose syntax error message
3473 before the lookahead is translated. */
3474 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3478 YY_STACK_PRINT (yyss, yyssp);
3482 /* Now 'shift' the result of the reduction. Determine what state
3483 that goes to, based on the state we popped back to and the rule
3484 number reduced by. */
3488 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3489 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3490 yystate = yytable[yystate];
3492 yystate = yydefgoto[yyn - YYNTOKENS];
3497 /*--------------------------------------.
3498 | yyerrlab -- here on detecting error. |
3499 `--------------------------------------*/
3501 /* Make sure we have latest lookahead translation. See comments at
3502 user semantic actions for why this is necessary. */
3503 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3505 /* If not already recovering from an error, report this error. */
3509 #if ! YYERROR_VERBOSE
3510 yyerror (YY_("syntax error"));
3512 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3515 char const *yymsgp = YY_("syntax error");
3516 int yysyntax_error_status;
3517 yysyntax_error_status = YYSYNTAX_ERROR;
3518 if (yysyntax_error_status == 0)
3520 else if (yysyntax_error_status == 1)
3522 if (yymsg != yymsgbuf)
3523 YYSTACK_FREE (yymsg);
3524 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3528 yymsg_alloc = sizeof yymsgbuf;
3529 yysyntax_error_status = 2;
3533 yysyntax_error_status = YYSYNTAX_ERROR;
3538 if (yysyntax_error_status == 2)
3539 goto yyexhaustedlab;
3541 # undef YYSYNTAX_ERROR
3547 if (yyerrstatus == 3)
3549 /* If just tried and failed to reuse lookahead token after an
3550 error, discard it. */
3552 if (yychar <= YYEOF)
3554 /* Return failure if at end of input. */
3555 if (yychar == YYEOF)
3560 yydestruct ("Error: discarding",
3566 /* Else will try to reuse lookahead token after shifting the error
3571 /*---------------------------------------------------.
3572 | yyerrorlab -- error raised explicitly by YYERROR. |
3573 `---------------------------------------------------*/
3576 /* Pacify compilers like GCC when the user code never invokes
3577 YYERROR and the label yyerrorlab therefore never appears in user
3579 if (/*CONSTCOND*/ 0)
3582 /* Do not reclaim the symbols of the rule whose action triggered
3586 YY_STACK_PRINT (yyss, yyssp);
3591 /*-------------------------------------------------------------.
3592 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3593 `-------------------------------------------------------------*/
3595 yyerrstatus = 3; /* Each real token shifted decrements this. */
3599 yyn = yypact[yystate];
3600 if (!yypact_value_is_default (yyn))
3603 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3611 /* Pop the current state because it cannot handle the error token. */
3616 yydestruct ("Error: popping",
3617 yystos[yystate], yyvsp);
3620 YY_STACK_PRINT (yyss, yyssp);
3623 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3625 YY_IGNORE_MAYBE_UNINITIALIZED_END
3628 /* Shift the error token. */
3629 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3635 /*-------------------------------------.
3636 | yyacceptlab -- YYACCEPT comes here. |
3637 `-------------------------------------*/
3642 /*-----------------------------------.
3643 | yyabortlab -- YYABORT comes here. |
3644 `-----------------------------------*/
3649 #if !defined yyoverflow || YYERROR_VERBOSE
3650 /*-------------------------------------------------.
3651 | yyexhaustedlab -- memory exhaustion comes here. |
3652 `-------------------------------------------------*/
3654 yyerror (YY_("memory exhausted"));
3660 if (yychar != YYEMPTY)
3662 /* Make sure we have latest lookahead translation. See comments at
3663 user semantic actions for why this is necessary. */
3664 yytoken = YYTRANSLATE (yychar);
3665 yydestruct ("Cleanup: discarding lookahead",
3668 /* Do not reclaim the symbols of the rule whose action triggered
3669 this YYABORT or YYACCEPT. */
3671 YY_STACK_PRINT (yyss, yyssp);
3672 while (yyssp != yyss)
3674 yydestruct ("Cleanup: popping",
3675 yystos[*yyssp], yyvsp);
3680 YYSTACK_FREE (yyss);
3683 if (yymsg != yymsgbuf)
3684 YYSTACK_FREE (yymsg);
3688 #line 1672 "ntp_parser.y" /* yacc.c:1906 */
3697 struct FILE_INFO * ip_ctx;
3699 ip_ctx = lex_current();
3700 ip_ctx->errpos = ip_ctx->tokpos;
3702 msyslog(LOG_ERR, "line %d column %d %s",
3703 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3704 if (!lex_from_file()) {
3705 /* Save the error message in the correct buffer */
3706 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3707 MAXLINE - remote_config.err_pos,
3709 ip_ctx->errpos.ncol, msg);
3711 /* Increment the value of err_pos */
3713 remote_config.err_pos += retval;
3715 /* Increment the number of errors */
3716 ++remote_config.no_errors;
3722 * token_name - convert T_ token integers to text
3723 * example: token_name(T_Server) returns "T_Server"
3730 return yytname[YYTRANSLATE(token)];
3734 /* Initial Testing function -- ignore */
3736 int main(int argc, char *argv[])
3738 ip_file = FOPEN(argv[1], "r");
3740 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);