1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */
73 #include "ntp_machine.h"
74 #include "ntp_stdlib.h"
75 #include "ntp_filegen.h"
76 #include "ntp_scanner.h"
77 #include "ntp_config.h"
78 #include "ntp_crypto.h"
80 #include "ntpsim.h" /* HMS: Do we really want this all the time? */
81 /* SK: It might be a good idea to always
82 include the simulator code. That way
83 someone can use the same configuration file
84 for both the simulator and the daemon
87 #define YYMALLOC emalloc
89 #define YYERROR_VERBOSE
90 #define YYMAXDEPTH 1000 /* stop the madness sooner */
91 void yyerror(const char *msg);
94 # define ONLY_SIM(a) (a)
96 # define ONLY_SIM(a) NULL
99 #line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
102 # if defined __cplusplus && 201103L <= __cplusplus
103 # define YY_NULLPTR nullptr
105 # define YY_NULLPTR 0
109 /* Enabling verbose error messages. */
110 #ifdef YYERROR_VERBOSE
111 # undef YYERROR_VERBOSE
112 # define YYERROR_VERBOSE 1
114 # define YYERROR_VERBOSE 0
117 /* In a future release of Bison, this section will be replaced
118 by #include "y.tab.h". */
119 #ifndef YY_YY_Y_TAB_H_INCLUDED
120 # define YY_YY_Y_TAB_H_INCLUDED
146 T_Broadcastclient = 270,
147 T_Broadcastdelay = 271,
207 T_Leapsmearinterval = 331,
215 T_Manycastclient = 339,
216 T_Manycastserver = 340,
238 T_Multicastclient = 362,
253 T_NtpSignDsocket = 377,
277 T_Saveconfigdir = 401,
312 T_WanderThreshold = 436,
321 T_Sim_Duration = 445,
322 T_Server_Offset = 446,
336 #define T_Allpeers 262
338 #define T_Autokey 264
339 #define T_Automax 265
340 #define T_Average 266
341 #define T_Bclient 267
343 #define T_Broadcast 269
344 #define T_Broadcastclient 270
345 #define T_Broadcastdelay 271
347 #define T_Calibrate 273
348 #define T_Ceiling 274
349 #define T_Clockstats 275
351 #define T_ControlKey 277
353 #define T_Cryptostats 279
356 #define T_Default 282
358 #define T_Disable 284
359 #define T_Discard 285
360 #define T_Dispersion 286
362 #define T_Driftfile 288
365 #define T_Ellipsis 291
370 #define T_Filegen 296
371 #define T_Filenum 297
381 #define T_Huffpuff 307
385 #define T_Incalloc 311
387 #define T_Initalloc 313
388 #define T_Initmem 314
389 #define T_Includefile 315
390 #define T_Integer 316
391 #define T_Interface 317
392 #define T_Intrange 318
395 #define T_Ipv4_flag 321
397 #define T_Ipv6_flag 323
401 #define T_Keysdir 327
404 #define T_Leapfile 330
405 #define T_Leapsmearinterval 331
406 #define T_Limited 332
409 #define T_Logconfig 335
410 #define T_Logfile 336
411 #define T_Loopstats 337
412 #define T_Lowpriotrap 338
413 #define T_Manycastclient 339
414 #define T_Manycastserver 340
417 #define T_Maxclock 343
418 #define T_Maxdepth 344
419 #define T_Maxdist 345
421 #define T_Maxpoll 347
422 #define T_Mdnstries 348
424 #define T_Memlock 350
425 #define T_Minclock 351
426 #define T_Mindepth 352
427 #define T_Mindist 353
428 #define T_Minimum 354
429 #define T_Minpoll 355
430 #define T_Minsane 356
433 #define T_Monitor 359
436 #define T_Multicastclient 362
439 #define T_Nomodify 365
440 #define T_Nomrulist 366
442 #define T_Nonvolatile 368
444 #define T_Noquery 370
445 #define T_Noselect 371
446 #define T_Noserve 372
448 #define T_Notrust 374
450 #define T_Ntpport 376
451 #define T_NtpSignDsocket 377
453 #define T_Orphanwait 379
454 #define T_PCEdigest 380
457 #define T_Peerstats 383
460 #define T_Pidfile 386
463 #define T_Preempt 389
465 #define T_Protostats 391
467 #define T_Randfile 393
468 #define T_Rawstats 394
470 #define T_Requestkey 396
472 #define T_Restrict 398
475 #define T_Saveconfigdir 401
479 #define T_Stacksize 405
480 #define T_Statistics 406
482 #define T_Statsdir 408
484 #define T_Stepback 410
485 #define T_Stepfwd 411
486 #define T_Stepout 412
487 #define T_Stratum 413
490 #define T_Sysstats 416
495 #define T_Timingstats 421
500 #define T_Trustedkey 426
504 #define T_UEcrypto 430
505 #define T_UEcryptonak 431
506 #define T_UEdigest 432
507 #define T_Unconfig 433
509 #define T_Version 435
510 #define T_WanderThreshold 436
512 #define T_Wildcard 438
517 #define T_Simulate 443
518 #define T_Beep_Delay 444
519 #define T_Sim_Duration 445
520 #define T_Server_Offset 446
521 #define T_Duration 447
522 #define T_Freq_Offset 448
525 #define T_Prop_Delay 451
526 #define T_Proc_Delay 452
529 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
533 #line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
539 gen_fifo * Generic_fifo;
541 attr_val_fifo * Attr_val_fifo;
543 string_fifo * String_fifo;
544 address_node * Address_node;
545 address_fifo * Address_fifo;
546 setvar_node * Set_var;
547 server_info * Sim_server;
548 server_info_fifo * Sim_server_fifo;
549 script_info * Sim_script;
550 script_info_fifo * Sim_script_fifo;
552 #line 553 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
555 typedef union YYSTYPE YYSTYPE;
556 # define YYSTYPE_IS_TRIVIAL 1
557 # define YYSTYPE_IS_DECLARED 1
561 extern YYSTYPE yylval;
565 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
567 /* Copy the second part of user declarations. */
569 #line 570 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
576 typedef YYTYPE_UINT8 yytype_uint8;
578 typedef unsigned char yytype_uint8;
582 typedef YYTYPE_INT8 yytype_int8;
584 typedef signed char yytype_int8;
588 typedef YYTYPE_UINT16 yytype_uint16;
590 typedef unsigned short int yytype_uint16;
594 typedef YYTYPE_INT16 yytype_int16;
596 typedef short int yytype_int16;
600 # ifdef __SIZE_TYPE__
601 # define YYSIZE_T __SIZE_TYPE__
602 # elif defined size_t
603 # define YYSIZE_T size_t
604 # elif ! defined YYSIZE_T
605 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
606 # define YYSIZE_T size_t
608 # define YYSIZE_T unsigned int
612 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
615 # if defined YYENABLE_NLS && YYENABLE_NLS
617 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
618 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
622 # define YY_(Msgid) Msgid
627 # if (defined __GNUC__ \
628 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
629 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
630 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
632 # define YY_ATTRIBUTE(Spec) /* empty */
636 #ifndef YY_ATTRIBUTE_PURE
637 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
640 #ifndef YY_ATTRIBUTE_UNUSED
641 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
644 #if !defined _Noreturn \
645 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
646 # if defined _MSC_VER && 1200 <= _MSC_VER
647 # define _Noreturn __declspec (noreturn)
649 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
653 /* Suppress unused-variable warnings by "using" E. */
654 #if ! defined lint || defined __GNUC__
655 # define YYUSE(E) ((void) (E))
657 # define YYUSE(E) /* empty */
660 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
661 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
662 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
663 _Pragma ("GCC diagnostic push") \
664 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
665 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
666 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
667 _Pragma ("GCC diagnostic pop")
669 # define YY_INITIAL_VALUE(Value) Value
671 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
672 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
673 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
675 #ifndef YY_INITIAL_VALUE
676 # define YY_INITIAL_VALUE(Value) /* Nothing. */
680 #if ! defined yyoverflow || YYERROR_VERBOSE
682 /* The parser invokes alloca or malloc; define the necessary symbols. */
684 # ifdef YYSTACK_USE_ALLOCA
685 # if YYSTACK_USE_ALLOCA
687 # define YYSTACK_ALLOC __builtin_alloca
688 # elif defined __BUILTIN_VA_ARG_INCR
689 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
691 # define YYSTACK_ALLOC __alloca
692 # elif defined _MSC_VER
693 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
694 # define alloca _alloca
696 # define YYSTACK_ALLOC alloca
697 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
698 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
699 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
700 # ifndef EXIT_SUCCESS
701 # define EXIT_SUCCESS 0
708 # ifdef YYSTACK_ALLOC
709 /* Pacify GCC's 'empty if-body' warning. */
710 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
711 # ifndef YYSTACK_ALLOC_MAXIMUM
712 /* The OS might guarantee only one guard page at the bottom of the stack,
713 and a page size can be as small as 4096 bytes. So we cannot safely
714 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
715 to allow for a few compiler-allocated temporary stack slots. */
716 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
719 # define YYSTACK_ALLOC YYMALLOC
720 # define YYSTACK_FREE YYFREE
721 # ifndef YYSTACK_ALLOC_MAXIMUM
722 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
724 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
725 && ! ((defined YYMALLOC || defined malloc) \
726 && (defined YYFREE || defined free)))
727 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
728 # ifndef EXIT_SUCCESS
729 # define EXIT_SUCCESS 0
733 # define YYMALLOC malloc
734 # if ! defined malloc && ! defined EXIT_SUCCESS
735 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
740 # if ! defined free && ! defined EXIT_SUCCESS
741 void free (void *); /* INFRINGES ON USER NAME SPACE */
745 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
748 #if (! defined yyoverflow \
749 && (! defined __cplusplus \
750 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
752 /* A type that is properly aligned for any stack member. */
755 yytype_int16 yyss_alloc;
759 /* The size of the maximum gap between one aligned stack and the next. */
760 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
762 /* The size of an array large to enough to hold all stacks, each with
764 # define YYSTACK_BYTES(N) \
765 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
766 + YYSTACK_GAP_MAXIMUM)
768 # define YYCOPY_NEEDED 1
770 /* Relocate STACK from its old location to the new one. The
771 local variables YYSIZE and YYSTACKSIZE give the old and new number of
772 elements in the stack, and YYPTR gives the new location of the
773 stack. Advance YYPTR to a properly aligned location for the next
775 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
778 YYSIZE_T yynewbytes; \
779 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
780 Stack = &yyptr->Stack_alloc; \
781 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
782 yyptr += yynewbytes / sizeof (*yyptr); \
788 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
789 /* Copy COUNT objects from SRC to DST. The source and destination do
792 # if defined __GNUC__ && 1 < __GNUC__
793 # define YYCOPY(Dst, Src, Count) \
794 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
796 # define YYCOPY(Dst, Src, Count) \
800 for (yyi = 0; yyi < (Count); yyi++) \
801 (Dst)[yyi] = (Src)[yyi]; \
806 #endif /* !YYCOPY_NEEDED */
808 /* YYFINAL -- State number of the termination state. */
810 /* YYLAST -- Last index in YYTABLE. */
813 /* YYNTOKENS -- Number of terminals. */
814 #define YYNTOKENS 203
815 /* YYNNTS -- Number of nonterminals. */
817 /* YYNRULES -- Number of rules. */
819 /* YYNSTATES -- Number of states. */
820 #define YYNSTATES 423
822 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
823 by yylex, with out-of-bounds checking. */
825 #define YYMAXUTOK 452
827 #define YYTRANSLATE(YYX) \
828 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
830 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
831 as returned by yylex, without out-of-bounds checking. */
832 static const yytype_uint8 yytranslate[] =
834 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
835 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
836 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
838 199, 200, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 2, 198, 2, 2, 2, 2, 2, 2, 2, 2,
841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 2, 2, 201, 2, 202, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
860 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
861 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
862 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
863 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
864 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
865 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
866 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
867 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
868 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
869 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
870 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
871 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
872 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
873 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
874 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
875 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
876 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
877 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
878 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
883 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
884 static const yytype_uint16 yyrline[] =
886 0, 370, 370, 374, 375, 376, 391, 392, 393, 394,
887 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
888 412, 422, 423, 424, 425, 426, 430, 431, 436, 441,
889 443, 449, 450, 458, 459, 460, 464, 469, 470, 471,
890 472, 473, 474, 475, 476, 480, 482, 487, 488, 489,
891 490, 491, 492, 496, 501, 510, 520, 521, 531, 533,
892 535, 537, 548, 555, 557, 562, 564, 566, 568, 570,
893 579, 585, 586, 594, 596, 608, 609, 610, 611, 612,
894 621, 626, 631, 639, 641, 643, 648, 649, 650, 651,
895 652, 653, 657, 658, 659, 660, 669, 671, 680, 690,
896 695, 703, 704, 705, 706, 707, 708, 709, 710, 715,
897 716, 724, 734, 743, 758, 763, 764, 768, 769, 773,
898 774, 775, 776, 777, 778, 779, 788, 792, 796, 804,
899 812, 820, 835, 850, 863, 864, 872, 873, 874, 875,
900 876, 877, 878, 879, 880, 881, 882, 883, 884, 885,
901 886, 890, 895, 903, 908, 909, 910, 914, 919, 927,
902 932, 933, 934, 935, 936, 937, 938, 939, 947, 957,
903 962, 970, 972, 974, 983, 985, 990, 991, 995, 996,
904 997, 998, 1006, 1011, 1016, 1024, 1029, 1030, 1031, 1040,
905 1042, 1047, 1052, 1060, 1062, 1079, 1080, 1081, 1082, 1083,
906 1084, 1088, 1089, 1090, 1091, 1092, 1093, 1101, 1106, 1111,
907 1119, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132,
908 1133, 1142, 1143, 1144, 1151, 1158, 1165, 1181, 1200, 1202,
909 1204, 1206, 1208, 1210, 1217, 1222, 1223, 1224, 1228, 1232,
910 1241, 1242, 1246, 1247, 1248, 1252, 1263, 1277, 1289, 1294,
911 1296, 1301, 1302, 1310, 1312, 1320, 1325, 1333, 1358, 1365,
912 1375, 1376, 1380, 1381, 1382, 1383, 1387, 1388, 1389, 1393,
913 1398, 1403, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1427,
914 1432, 1440, 1445, 1453, 1455, 1459, 1464, 1469, 1477, 1482,
915 1490, 1499, 1500, 1504, 1505, 1514, 1532, 1536, 1541, 1549,
916 1554, 1555, 1559, 1564, 1572, 1577, 1582, 1587, 1592, 1600,
917 1605, 1610, 1618, 1623, 1624, 1625, 1626, 1627
921 #if YYDEBUG || YYERROR_VERBOSE || 1
922 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
923 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
924 static const char *const yytname[] =
926 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
927 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
928 "T_Bclient", "T_Beacon", "T_Broadcast", "T_Broadcastclient",
929 "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling",
930 "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats",
931 "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", "T_Discard",
932 "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Dscp",
933 "T_Ellipsis", "T_Enable", "T_End", "T_False", "T_File", "T_Filegen",
934 "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4", "T_Flake",
935 "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff", "T_Iburst",
936 "T_Ident", "T_Ignore", "T_Incalloc", "T_Incmem", "T_Initalloc",
937 "T_Initmem", "T_Includefile", "T_Integer", "T_Interface", "T_Intrange",
938 "T_Io", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel",
939 "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile",
940 "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
941 "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
942 "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
943 "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
944 "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
945 "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month",
946 "T_Mru", "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify",
947 "T_Nomrulist", "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery",
948 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
949 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic",
950 "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool",
951 "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
952 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
953 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
954 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
955 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
956 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
957 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
958 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto",
959 "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version",
960 "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
961 "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
962 "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
963 "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
964 "$accept", "configuration", "command_list", "command", "server_command",
965 "client_type", "address", "ip_address", "address_fam", "option_list",
966 "option", "option_flag", "option_flag_keyword", "option_int",
967 "option_int_keyword", "option_str", "option_str_keyword",
968 "unpeer_command", "unpeer_keyword", "other_mode_command",
969 "authentication_command", "crypto_command_list", "crypto_command",
970 "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
971 "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
972 "monitoring_command", "stats_list", "stat", "filegen_option_list",
973 "filegen_option", "link_nolink", "enable_disable", "filegen_type",
974 "access_control_command", "ac_flag_list", "access_control_flag",
975 "discard_option_list", "discard_option", "discard_option_keyword",
976 "mru_option_list", "mru_option", "mru_option_keyword", "fudge_command",
977 "fudge_factor_list", "fudge_factor", "fudge_factor_dbl_keyword",
978 "fudge_factor_bool_keyword", "rlimit_command", "rlimit_option_list",
979 "rlimit_option", "rlimit_option_keyword", "system_option_command",
980 "system_option_list", "system_option", "system_option_flag_keyword",
981 "system_option_local_flag_keyword", "tinker_command",
982 "tinker_option_list", "tinker_option", "tinker_option_keyword",
983 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
984 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
985 "variable_assign", "t_default_or_zero", "trap_option_list",
986 "trap_option", "log_config_list", "log_config_command",
987 "interface_command", "interface_nic", "nic_rule_class",
988 "nic_rule_action", "reset_command", "counter_set_list",
989 "counter_set_keyword", "integer_list", "integer_list_range",
990 "integer_list_range_elt", "integer_range", "string_list", "address_list",
991 "boolean", "number", "simulate_command", "sim_conf_start",
992 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
993 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
994 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
995 "sim_act_keyword", YY_NULLPTR
1000 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1001 (internal) symbol number NUM (which must be that of a token). */
1002 static const yytype_uint16 yytoknum[] =
1004 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1005 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1006 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1007 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1008 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1009 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1010 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1011 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1012 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1013 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1014 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1015 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1016 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1017 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1018 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1019 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1020 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1021 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1022 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1023 445, 446, 447, 448, 449, 450, 451, 452, 61, 40,
1028 #define YYPACT_NINF -189
1030 #define yypact_value_is_default(Yystate) \
1031 (!!((Yystate) == (-189)))
1033 #define YYTABLE_NINF -7
1035 #define yytable_value_is_error(Yytable_value) \
1038 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1040 static const yytype_int16 yypact[] =
1042 20, -174, -32, -189, -189, -189, -29, -189, 315, 3,
1043 -133, -189, 315, -189, 119, -48, -189, -126, -189, -118,
1044 -115, -189, -189, -113, -189, -189, -48, -5, 374, -48,
1045 -189, -189, -105, -189, -100, -189, -189, 1, 81, 46,
1046 2, -31, -189, -189, -90, 119, -88, -189, 148, 380,
1047 -81, -53, 23, -189, -189, -189, 87, 207, -106, -189,
1048 -48, -189, -48, -189, -189, -189, -189, -189, -189, -189,
1049 -189, -189, -189, -9, 29, -62, -61, -189, -7, -189,
1050 -189, -102, -189, -189, -189, 32, -189, -189, -189, -189,
1051 -189, -189, -189, -189, -189, -189, -189, -189, 315, -189,
1052 -189, -189, -189, -189, -189, 3, -189, 42, 78, -189,
1053 315, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1054 -189, -189, -189, 112, -189, -39, 367, -189, -189, -189,
1055 -113, -189, -189, -48, -189, -189, -189, -189, -189, -189,
1056 -189, -189, -189, 374, -189, 60, -48, -189, -189, -34,
1057 -189, -189, -189, -189, -189, -189, -189, -189, 81, -189,
1058 -189, 97, 102, -189, -189, 44, -189, -189, -189, -189,
1059 -31, -189, 71, -63, -189, 119, -189, -189, -189, -189,
1060 -189, -189, -189, -189, -189, -189, -189, -189, 148, -189,
1061 -9, -189, -189, -36, -189, -189, -189, -189, -189, -189,
1062 -189, -189, 380, -189, 75, -9, -189, -189, 76, -53,
1063 -189, -189, -189, 77, -189, -43, -189, -189, -189, -189,
1064 -189, -189, -189, -189, -189, -189, -189, -189, 0, -150,
1065 -189, -189, -189, -189, -189, 89, -189, -6, -189, -189,
1066 -189, -189, 39, 13, -189, -189, -189, -189, 15, 99,
1067 -189, -189, 112, -189, -9, -36, -189, -189, -189, -189,
1068 -189, -189, -189, -189, 475, -189, -189, 475, 475, -81,
1069 -189, -189, 18, -189, -189, -189, -189, -189, -189, -189,
1070 -189, -189, -189, -58, 144, -189, -189, -189, 353, -189,
1071 -189, -189, -189, -189, -189, -189, -189, -96, -3, -13,
1072 -189, -189, -189, -189, 27, -189, -189, 11, -189, -189,
1073 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1074 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1075 -189, -189, -189, 475, 475, -189, 163, -81, 133, -189,
1076 141, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1077 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1078 -52, -189, 45, 5, 19, -125, -189, 8, -189, -9,
1079 -189, -189, -189, -189, -189, -189, -189, -189, -189, 475,
1080 -189, -189, -189, -189, 14, -189, -189, -189, -48, -189,
1081 -189, -189, 22, -189, -189, -189, 21, 24, -9, 36,
1082 -164, -189, 33, -9, -189, -189, -189, 10, 69, -189,
1083 -189, -189, -189, -189, 31, 48, 40, -189, 52, -189,
1087 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1088 Performed when YYTABLE does not specify something else to do. Zero
1089 means the default is an error. */
1090 static const yytype_uint16 yydefact[] =
1092 0, 0, 0, 24, 58, 235, 0, 71, 0, 0,
1093 247, 238, 0, 228, 0, 0, 240, 0, 260, 0,
1094 0, 241, 239, 0, 242, 25, 0, 0, 0, 0,
1095 261, 236, 0, 23, 0, 243, 22, 0, 0, 0,
1096 0, 0, 244, 21, 0, 0, 0, 237, 0, 0,
1097 0, 0, 0, 56, 57, 296, 0, 2, 0, 7,
1098 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1099 16, 17, 18, 0, 0, 0, 0, 221, 0, 222,
1100 19, 0, 5, 62, 63, 64, 195, 196, 197, 198,
1101 201, 199, 200, 202, 203, 204, 205, 206, 190, 192,
1102 193, 194, 154, 155, 156, 126, 152, 0, 245, 229,
1103 189, 101, 102, 103, 104, 108, 105, 106, 107, 109,
1104 29, 30, 28, 0, 26, 0, 6, 65, 66, 257,
1105 230, 256, 289, 59, 61, 160, 161, 162, 163, 164,
1106 165, 166, 167, 127, 158, 0, 60, 70, 287, 231,
1107 67, 272, 273, 274, 275, 276, 277, 278, 269, 271,
1108 134, 29, 30, 134, 134, 26, 68, 188, 186, 187,
1109 182, 184, 0, 0, 232, 96, 100, 97, 211, 212,
1110 213, 214, 215, 216, 217, 218, 219, 220, 207, 209,
1111 0, 91, 86, 0, 87, 95, 93, 94, 92, 90,
1112 88, 89, 80, 82, 0, 0, 251, 283, 0, 69,
1113 282, 284, 280, 234, 1, 0, 4, 31, 55, 294,
1114 293, 223, 224, 225, 226, 268, 267, 266, 0, 0,
1115 79, 75, 76, 77, 78, 0, 72, 0, 191, 151,
1116 153, 246, 98, 0, 178, 179, 180, 181, 0, 0,
1117 176, 177, 168, 170, 0, 0, 27, 227, 255, 288,
1118 157, 159, 286, 270, 130, 134, 134, 133, 128, 0,
1119 183, 185, 0, 99, 208, 210, 292, 290, 291, 85,
1120 81, 83, 84, 233, 0, 281, 279, 3, 20, 262,
1121 263, 264, 259, 265, 258, 300, 301, 0, 0, 0,
1122 74, 73, 118, 117, 0, 115, 116, 0, 110, 113,
1123 114, 174, 175, 173, 169, 171, 172, 136, 137, 138,
1124 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1125 149, 150, 135, 131, 132, 134, 250, 0, 0, 252,
1126 0, 37, 38, 39, 54, 47, 49, 48, 51, 40,
1127 41, 42, 43, 50, 52, 44, 32, 33, 36, 34,
1128 0, 35, 0, 0, 0, 0, 303, 0, 298, 0,
1129 111, 125, 121, 123, 119, 120, 122, 124, 112, 129,
1130 249, 248, 254, 253, 0, 45, 46, 53, 0, 297,
1131 295, 302, 0, 299, 285, 306, 0, 0, 0, 0,
1132 0, 308, 0, 0, 304, 307, 305, 0, 0, 313,
1133 314, 315, 316, 317, 0, 0, 0, 309, 0, 311,
1137 /* YYPGOTO[NTERM-NUM]. */
1138 static const yytype_int16 yypgoto[] =
1140 -189, -189, -189, -41, -189, -189, -15, -38, -189, -189,
1141 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1142 -189, -189, -189, -189, -189, -189, 16, -189, -189, -189,
1143 -189, -35, -189, -189, -189, -189, -189, -189, -157, -189,
1144 -189, 138, -189, -189, 106, -189, -189, -189, -2, -189,
1145 -189, -189, -189, 83, -189, -189, 239, -79, -189, -189,
1146 -189, -189, 66, -189, -189, -189, -189, -189, -189, -189,
1147 -189, -189, -189, -189, -189, 126, -189, -189, -189, -189,
1148 -189, -189, 101, -189, -189, 51, -189, -189, 242, 17,
1149 -188, -189, -189, -189, -24, -189, -189, -97, -189, -189,
1150 -189, -123, -189, -130, -189
1153 /* YYDEFGOTO[NTERM-NUM]. */
1154 static const yytype_int16 yydefgoto[] =
1156 -1, 56, 57, 58, 59, 60, 132, 124, 125, 288,
1157 356, 357, 358, 359, 360, 361, 362, 61, 62, 63,
1158 64, 85, 236, 237, 65, 202, 203, 204, 205, 66,
1159 175, 119, 242, 308, 309, 310, 378, 67, 264, 332,
1160 105, 106, 107, 143, 144, 145, 68, 252, 253, 254,
1161 255, 69, 170, 171, 172, 70, 98, 99, 100, 101,
1162 71, 188, 189, 190, 72, 73, 74, 75, 76, 109,
1163 174, 381, 283, 339, 130, 131, 77, 78, 294, 228,
1164 79, 158, 159, 213, 209, 210, 211, 149, 133, 279,
1165 221, 80, 81, 297, 298, 299, 365, 366, 397, 367,
1166 400, 401, 414, 415, 416
1169 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1170 positive, shift that token. If negative, reduce the rule whose
1171 number is the opposite. If YYTABLE_NINF, syntax error. */
1172 static const yytype_int16 yytable[] =
1174 123, 165, 275, 276, 337, 289, 267, 268, 207, 385,
1175 176, 167, 206, 82, 102, 371, 215, 282, 120, 238,
1176 121, 1, 363, 219, 164, 277, 108, 225, 399, 83,
1177 2, 238, 84, 126, 3, 4, 5, 372, 404, 295,
1178 296, 127, 6, 7, 128, 217, 129, 218, 226, 8,
1179 9, 363, 220, 10, 147, 11, 134, 12, 13, 148,
1180 230, 14, 150, 166, 168, 290, 315, 291, 302, 173,
1181 15, 177, 227, 160, 16, 338, 303, 390, 122, 304,
1182 17, 216, 18, 231, 212, 257, 232, 214, 151, 152,
1183 222, 19, 20, 295, 296, 21, 22, 223, 224, 229,
1184 23, 24, 103, 240, 25, 26, 153, 104, 333, 334,
1185 241, 122, 161, 27, 162, 243, 373, 305, 259, 169,
1186 256, 261, 386, 374, 265, 262, 28, 29, 30, 266,
1187 269, 259, 271, 31, 278, 272, 281, 284, 286, 111,
1188 273, 375, 32, 112, 287, 154, 208, 33, 306, 34,
1189 300, 35, 36, 301, 178, 244, 245, 246, 247, 292,
1190 313, 37, 38, 39, 40, 41, 42, 43, 44, 233,
1191 234, 45, 311, 46, 312, 155, 235, 336, 379, 179,
1192 340, 393, 47, 293, 368, 369, 370, 48, 49, 50,
1193 380, 51, 52, 376, 383, 163, 377, 180, 53, 54,
1194 181, 113, 384, 388, 387, 122, 389, -6, 55, 392,
1195 402, 408, 307, 396, 394, 407, 399, 2, 280, 398,
1196 406, 3, 4, 5, 409, 410, 411, 412, 413, 6,
1197 7, 335, 422, 417, 403, 419, 8, 9, 420, 421,
1198 10, 156, 11, 239, 12, 13, 157, 114, 14, 260,
1199 314, 110, 248, 270, 274, 115, 258, 15, 116, 263,
1200 285, 16, 409, 410, 411, 412, 413, 17, 391, 18,
1201 249, 146, 316, 364, 182, 250, 251, 405, 19, 20,
1202 117, 0, 21, 22, 418, 118, 0, 23, 24, 0,
1203 0, 25, 26, 0, 0, 0, 0, 0, 0, 382,
1204 27, 0, 183, 184, 185, 186, 0, 0, 0, 0,
1205 187, 0, 0, 28, 29, 30, 0, 0, 0, 0,
1206 31, 0, 0, 86, 0, 0, 0, 87, 0, 32,
1207 0, 0, 0, 88, 33, 0, 34, 0, 35, 36,
1208 0, 0, 0, 0, 0, 0, 0, 0, 37, 38,
1209 39, 40, 41, 42, 43, 44, 0, 0, 45, 0,
1210 46, 0, 341, 0, 0, 0, 0, 0, 0, 47,
1211 342, 0, 0, 395, 48, 49, 50, 2, 51, 52,
1212 0, 3, 4, 5, 89, 53, 54, 0, 0, 6,
1213 7, 0, 0, 191, -6, 55, 8, 9, 0, 192,
1214 10, 193, 11, 0, 12, 13, 343, 344, 14, 0,
1215 0, 0, 0, 0, 0, 0, 0, 15, 90, 91,
1216 0, 16, 0, 345, 0, 0, 0, 17, 194, 18,
1217 135, 136, 137, 138, 0, 92, 0, 0, 19, 20,
1218 93, 0, 21, 22, 0, 346, 0, 23, 24, 0,
1219 0, 25, 26, 347, 0, 348, 0, 0, 0, 0,
1220 27, 139, 0, 140, 0, 141, 0, 94, 195, 349,
1221 196, 142, 0, 28, 29, 30, 197, 0, 198, 0,
1222 31, 199, 0, 0, 0, 0, 0, 350, 351, 32,
1223 95, 96, 97, 0, 33, 0, 34, 0, 35, 36,
1224 0, 0, 0, 200, 201, 0, 0, 0, 37, 38,
1225 39, 40, 41, 42, 43, 44, 0, 0, 45, 0,
1226 46, 0, 317, 352, 0, 353, 0, 0, 0, 47,
1227 318, 0, 0, 354, 48, 49, 50, 355, 51, 52,
1228 0, 0, 0, 0, 0, 53, 54, 0, 319, 320,
1229 0, 0, 321, 0, 0, 55, 0, 0, 322, 0,
1230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1232 0, 0, 0, 0, 0, 323, 324, 0, 0, 325,
1233 326, 0, 327, 328, 329, 0, 330, 0, 0, 0,
1234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1235 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1238 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1242 static const yytype_int16 yycheck[] =
1244 15, 39, 190, 39, 62, 5, 163, 164, 61, 61,
1245 45, 42, 50, 187, 11, 4, 57, 205, 66, 98,
1246 68, 1, 147, 32, 39, 61, 159, 34, 192, 61,
1247 10, 110, 61, 159, 14, 15, 16, 26, 202, 189,
1248 190, 159, 22, 23, 159, 60, 159, 62, 55, 29,
1249 30, 147, 61, 33, 159, 35, 61, 37, 38, 159,
1250 28, 41, 61, 61, 95, 65, 254, 67, 29, 159,
1251 50, 159, 79, 27, 54, 133, 37, 202, 159, 40,
1252 60, 187, 62, 51, 61, 126, 54, 0, 7, 8,
1253 61, 71, 72, 189, 190, 75, 76, 159, 159, 201,
1254 80, 81, 99, 61, 84, 85, 25, 104, 265, 266,
1255 32, 159, 66, 93, 68, 3, 105, 78, 133, 150,
1256 159, 61, 174, 112, 27, 159, 106, 107, 108, 27,
1257 86, 146, 61, 113, 170, 198, 61, 61, 61, 20,
1258 175, 130, 122, 24, 187, 64, 199, 127, 109, 129,
1259 61, 131, 132, 159, 6, 43, 44, 45, 46, 159,
1260 61, 141, 142, 143, 144, 145, 146, 147, 148, 137,
1261 138, 151, 159, 153, 159, 94, 144, 159, 335, 31,
1262 36, 369, 162, 183, 187, 198, 159, 167, 168, 169,
1263 27, 171, 172, 182, 61, 149, 185, 49, 178, 179,
1264 52, 82, 61, 198, 159, 159, 187, 187, 188, 201,
1265 398, 201, 173, 191, 200, 403, 192, 10, 202, 198,
1266 187, 14, 15, 16, 193, 194, 195, 196, 197, 22,
1267 23, 269, 420, 202, 198, 187, 29, 30, 198, 187,
1268 33, 160, 35, 105, 37, 38, 165, 128, 41, 143,
1269 252, 12, 140, 170, 188, 136, 130, 50, 139, 158,
1270 209, 54, 193, 194, 195, 196, 197, 60, 365, 62,
1271 158, 29, 255, 297, 126, 163, 164, 400, 71, 72,
1272 161, -1, 75, 76, 414, 166, -1, 80, 81, -1,
1273 -1, 84, 85, -1, -1, -1, -1, -1, -1, 337,
1274 93, -1, 154, 155, 156, 157, -1, -1, -1, -1,
1275 162, -1, -1, 106, 107, 108, -1, -1, -1, -1,
1276 113, -1, -1, 8, -1, -1, -1, 12, -1, 122,
1277 -1, -1, -1, 18, 127, -1, 129, -1, 131, 132,
1278 -1, -1, -1, -1, -1, -1, -1, -1, 141, 142,
1279 143, 144, 145, 146, 147, 148, -1, -1, 151, -1,
1280 153, -1, 9, -1, -1, -1, -1, -1, -1, 162,
1281 17, -1, -1, 388, 167, 168, 169, 10, 171, 172,
1282 -1, 14, 15, 16, 69, 178, 179, -1, -1, 22,
1283 23, -1, -1, 13, 187, 188, 29, 30, -1, 19,
1284 33, 21, 35, -1, 37, 38, 53, 54, 41, -1,
1285 -1, -1, -1, -1, -1, -1, -1, 50, 103, 104,
1286 -1, 54, -1, 70, -1, -1, -1, 60, 48, 62,
1287 56, 57, 58, 59, -1, 120, -1, -1, 71, 72,
1288 125, -1, 75, 76, -1, 92, -1, 80, 81, -1,
1289 -1, 84, 85, 100, -1, 102, -1, -1, -1, -1,
1290 93, 87, -1, 89, -1, 91, -1, 152, 88, 116,
1291 90, 97, -1, 106, 107, 108, 96, -1, 98, -1,
1292 113, 101, -1, -1, -1, -1, -1, 134, 135, 122,
1293 175, 176, 177, -1, 127, -1, 129, -1, 131, 132,
1294 -1, -1, -1, 123, 124, -1, -1, -1, 141, 142,
1295 143, 144, 145, 146, 147, 148, -1, -1, 151, -1,
1296 153, -1, 47, 170, -1, 172, -1, -1, -1, 162,
1297 55, -1, -1, 180, 167, 168, 169, 184, 171, 172,
1298 -1, -1, -1, -1, -1, 178, 179, -1, 73, 74,
1299 -1, -1, 77, -1, -1, 188, -1, -1, 83, -1,
1300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1302 -1, -1, -1, -1, -1, 110, 111, -1, -1, 114,
1303 115, -1, 117, 118, 119, -1, 121, -1, -1, -1,
1304 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1306 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1309 -1, -1, -1, -1, -1, 180
1312 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1313 symbol of state STATE-NUM. */
1314 static const yytype_uint16 yystos[] =
1316 0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
1317 33, 35, 37, 38, 41, 50, 54, 60, 62, 71,
1318 72, 75, 76, 80, 81, 84, 85, 93, 106, 107,
1319 108, 113, 122, 127, 129, 131, 132, 141, 142, 143,
1320 144, 145, 146, 147, 148, 151, 153, 162, 167, 168,
1321 169, 171, 172, 178, 179, 188, 204, 205, 206, 207,
1322 208, 220, 221, 222, 223, 227, 232, 240, 249, 254,
1323 258, 263, 267, 268, 269, 270, 271, 279, 280, 283,
1324 294, 295, 187, 61, 61, 224, 8, 12, 18, 69,
1325 103, 104, 120, 125, 152, 175, 176, 177, 259, 260,
1326 261, 262, 11, 99, 104, 243, 244, 245, 159, 272,
1327 259, 20, 24, 82, 128, 136, 139, 161, 166, 234,
1328 66, 68, 159, 209, 210, 211, 159, 159, 159, 159,
1329 277, 278, 209, 291, 61, 56, 57, 58, 59, 87,
1330 89, 91, 97, 246, 247, 248, 291, 159, 159, 290,
1331 61, 7, 8, 25, 64, 94, 160, 165, 284, 285,
1332 27, 66, 68, 149, 209, 210, 61, 42, 95, 150,
1333 255, 256, 257, 159, 273, 233, 234, 159, 6, 31,
1334 49, 52, 126, 154, 155, 156, 157, 162, 264, 265,
1335 266, 13, 19, 21, 48, 88, 90, 96, 98, 101,
1336 123, 124, 228, 229, 230, 231, 210, 61, 199, 287,
1337 288, 289, 61, 286, 0, 206, 187, 209, 209, 32,
1338 61, 293, 61, 159, 159, 34, 55, 79, 282, 201,
1339 28, 51, 54, 137, 138, 144, 225, 226, 260, 244,
1340 61, 32, 235, 3, 43, 44, 45, 46, 140, 158,
1341 163, 164, 250, 251, 252, 253, 159, 206, 278, 209,
1342 247, 61, 159, 285, 241, 27, 27, 241, 241, 86,
1343 256, 61, 198, 234, 265, 293, 39, 61, 170, 292,
1344 229, 61, 293, 275, 61, 288, 61, 187, 212, 5,
1345 65, 67, 159, 183, 281, 189, 190, 296, 297, 298,
1346 61, 159, 29, 37, 40, 78, 109, 173, 236, 237,
1347 238, 159, 159, 61, 251, 293, 292, 47, 55, 73,
1348 74, 77, 83, 110, 111, 114, 115, 117, 118, 119,
1349 121, 180, 242, 241, 241, 210, 159, 62, 133, 276,
1350 36, 9, 17, 53, 54, 70, 92, 100, 102, 116,
1351 134, 135, 170, 172, 180, 184, 213, 214, 215, 216,
1352 217, 218, 219, 147, 297, 299, 300, 302, 187, 198,
1353 159, 4, 26, 105, 112, 130, 182, 185, 239, 241,
1354 27, 274, 210, 61, 61, 61, 174, 159, 198, 187,
1355 202, 300, 201, 293, 200, 209, 191, 301, 198, 192,
1356 303, 304, 293, 198, 202, 304, 187, 293, 201, 193,
1357 194, 195, 196, 197, 305, 306, 307, 202, 306, 187,
1361 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1362 static const yytype_uint16 yyr1[] =
1364 0, 203, 204, 205, 205, 205, 206, 206, 206, 206,
1365 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
1366 207, 208, 208, 208, 208, 208, 209, 209, 210, 211,
1367 211, 212, 212, 213, 213, 213, 214, 215, 215, 215,
1368 215, 215, 215, 215, 215, 216, 216, 217, 217, 217,
1369 217, 217, 217, 218, 219, 220, 221, 221, 222, 222,
1370 222, 222, 223, 223, 223, 223, 223, 223, 223, 223,
1371 223, 224, 224, 225, 225, 226, 226, 226, 226, 226,
1372 227, 228, 228, 229, 229, 229, 230, 230, 230, 230,
1373 230, 230, 231, 231, 231, 231, 232, 232, 232, 233,
1374 233, 234, 234, 234, 234, 234, 234, 234, 234, 235,
1375 235, 236, 236, 236, 236, 237, 237, 238, 238, 239,
1376 239, 239, 239, 239, 239, 239, 240, 240, 240, 240,
1377 240, 240, 240, 240, 241, 241, 242, 242, 242, 242,
1378 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
1379 242, 243, 243, 244, 245, 245, 245, 246, 246, 247,
1380 248, 248, 248, 248, 248, 248, 248, 248, 249, 250,
1381 250, 251, 251, 251, 251, 251, 252, 252, 253, 253,
1382 253, 253, 254, 255, 255, 256, 257, 257, 257, 258,
1383 258, 259, 259, 260, 260, 261, 261, 261, 261, 261,
1384 261, 262, 262, 262, 262, 262, 262, 263, 264, 264,
1385 265, 266, 266, 266, 266, 266, 266, 266, 266, 266,
1386 266, 267, 267, 267, 267, 267, 267, 267, 267, 267,
1387 267, 267, 267, 267, 267, 268, 268, 268, 269, 269,
1388 270, 270, 271, 271, 271, 272, 272, 272, 273, 274,
1389 274, 275, 275, 276, 276, 277, 277, 278, 279, 279,
1390 280, 280, 281, 281, 281, 281, 282, 282, 282, 283,
1391 284, 284, 285, 285, 285, 285, 285, 285, 285, 286,
1392 286, 287, 287, 288, 288, 289, 290, 290, 291, 291,
1393 292, 292, 292, 293, 293, 294, 295, 296, 296, 297,
1394 298, 298, 299, 299, 300, 301, 302, 303, 303, 304,
1395 305, 305, 306, 307, 307, 307, 307, 307
1398 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1399 static const yytype_uint8 yyr2[] =
1401 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1403 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1404 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1405 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1406 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1408 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1409 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1410 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
1411 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1412 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1413 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
1414 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
1415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1416 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
1417 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
1418 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
1419 1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
1420 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1421 1, 1, 1, 1, 1, 1, 1, 2, 2, 1,
1422 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1423 1, 1, 1, 2, 2, 2, 2, 3, 1, 2,
1424 2, 2, 2, 3, 2, 1, 1, 1, 1, 1,
1425 1, 1, 1, 1, 1, 1, 2, 0, 4, 1,
1426 0, 0, 2, 2, 2, 2, 1, 1, 3, 3,
1427 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1428 2, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1429 1, 2, 1, 1, 1, 5, 2, 1, 2, 1,
1430 1, 1, 1, 1, 1, 5, 1, 3, 2, 3,
1431 1, 1, 2, 1, 5, 4, 3, 2, 1, 6,
1432 3, 2, 3, 1, 1, 1, 1, 1
1436 #define yyerrok (yyerrstatus = 0)
1437 #define yyclearin (yychar = YYEMPTY)
1438 #define YYEMPTY (-2)
1441 #define YYACCEPT goto yyacceptlab
1442 #define YYABORT goto yyabortlab
1443 #define YYERROR goto yyerrorlab
1446 #define YYRECOVERING() (!!yyerrstatus)
1448 #define YYBACKUP(Token, Value) \
1450 if (yychar == YYEMPTY) \
1454 YYPOPSTACK (yylen); \
1460 yyerror (YY_("syntax error: cannot back up")); \
1465 /* Error token number */
1467 #define YYERRCODE 256
1471 /* Enable debugging if requested. */
1475 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1476 # define YYFPRINTF fprintf
1479 # define YYDPRINTF(Args) \
1485 /* This macro is provided for backward compatibility. */
1486 #ifndef YY_LOCATION_PRINT
1487 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1491 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1495 YYFPRINTF (stderr, "%s ", Title); \
1496 yy_symbol_print (stderr, \
1498 YYFPRINTF (stderr, "\n"); \
1503 /*----------------------------------------.
1504 | Print this symbol's value on YYOUTPUT. |
1505 `----------------------------------------*/
1508 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1510 FILE *yyo = yyoutput;
1515 if (yytype < YYNTOKENS)
1516 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1522 /*--------------------------------.
1523 | Print this symbol on YYOUTPUT. |
1524 `--------------------------------*/
1527 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1529 YYFPRINTF (yyoutput, "%s %s (",
1530 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1532 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1533 YYFPRINTF (yyoutput, ")");
1536 /*------------------------------------------------------------------.
1537 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1539 `------------------------------------------------------------------*/
1542 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1544 YYFPRINTF (stderr, "Stack now");
1545 for (; yybottom <= yytop; yybottom++)
1547 int yybot = *yybottom;
1548 YYFPRINTF (stderr, " %d", yybot);
1550 YYFPRINTF (stderr, "\n");
1553 # define YY_STACK_PRINT(Bottom, Top) \
1556 yy_stack_print ((Bottom), (Top)); \
1560 /*------------------------------------------------.
1561 | Report that the YYRULE is going to be reduced. |
1562 `------------------------------------------------*/
1565 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1567 unsigned long int yylno = yyrline[yyrule];
1568 int yynrhs = yyr2[yyrule];
1570 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1572 /* The symbols being reduced. */
1573 for (yyi = 0; yyi < yynrhs; yyi++)
1575 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1576 yy_symbol_print (stderr,
1577 yystos[yyssp[yyi + 1 - yynrhs]],
1578 &(yyvsp[(yyi + 1) - (yynrhs)])
1580 YYFPRINTF (stderr, "\n");
1584 # define YY_REDUCE_PRINT(Rule) \
1587 yy_reduce_print (yyssp, yyvsp, Rule); \
1590 /* Nonzero means print parse trace. It is left uninitialized so that
1591 multiple parsers can coexist. */
1593 #else /* !YYDEBUG */
1594 # define YYDPRINTF(Args)
1595 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1596 # define YY_STACK_PRINT(Bottom, Top)
1597 # define YY_REDUCE_PRINT(Rule)
1598 #endif /* !YYDEBUG */
1601 /* YYINITDEPTH -- initial size of the parser's stacks. */
1603 # define YYINITDEPTH 200
1606 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1607 if the built-in stack extension method is used).
1609 Do not make this value too large; the results are undefined if
1610 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1611 evaluated with infinite-precision integer arithmetic. */
1614 # define YYMAXDEPTH 10000
1621 # if defined __GLIBC__ && defined _STRING_H
1622 # define yystrlen strlen
1624 /* Return the length of YYSTR. */
1626 yystrlen (const char *yystr)
1629 for (yylen = 0; yystr[yylen]; yylen++)
1637 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1638 # define yystpcpy stpcpy
1640 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1643 yystpcpy (char *yydest, const char *yysrc)
1646 const char *yys = yysrc;
1648 while ((*yyd++ = *yys++) != '\0')
1657 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1658 quotes and backslashes, so that it's suitable for yyerror. The
1659 heuristic is that double-quoting is unnecessary unless the string
1660 contains an apostrophe, a comma, or backslash (other than
1661 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1662 null, do not copy; instead, return the length of what the result
1665 yytnamerr (char *yyres, const char *yystr)
1670 char const *yyp = yystr;
1677 goto do_not_strip_quotes;
1681 goto do_not_strip_quotes;
1694 do_not_strip_quotes: ;
1698 return yystrlen (yystr);
1700 return yystpcpy (yyres, yystr) - yyres;
1704 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1705 about the unexpected token YYTOKEN for the state stack whose top is
1708 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1709 not large enough to hold the message. In that case, also set
1710 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1711 required number of bytes is too large to store. */
1713 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1714 yytype_int16 *yyssp, int yytoken)
1716 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1717 YYSIZE_T yysize = yysize0;
1718 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1719 /* Internationalized format string. */
1720 const char *yyformat = YY_NULLPTR;
1721 /* Arguments of yyformat. */
1722 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1723 /* Number of reported tokens (one for the "unexpected", one per
1727 /* There are many possibilities here to consider:
1728 - If this state is a consistent state with a default action, then
1729 the only way this function was invoked is if the default action
1730 is an error action. In that case, don't check for expected
1731 tokens because there are none.
1732 - The only way there can be no lookahead present (in yychar) is if
1733 this state is a consistent state with a default action. Thus,
1734 detecting the absence of a lookahead is sufficient to determine
1735 that there is no unexpected or expected token to report. In that
1736 case, just report a simple "syntax error".
1737 - Don't assume there isn't a lookahead just because this state is a
1738 consistent state with a default action. There might have been a
1739 previous inconsistent state, consistent state with a non-default
1740 action, or user semantic action that manipulated yychar.
1741 - Of course, the expected token list depends on states to have
1742 correct lookahead information, and it depends on the parser not
1743 to perform extra reductions after fetching a lookahead from the
1744 scanner and before detecting a syntax error. Thus, state merging
1745 (from LALR or IELR) and default reductions corrupt the expected
1746 token list. However, the list is correct for canonical LR with
1747 one exception: it will still contain any token that will not be
1748 accepted due to an error action in a later state.
1750 if (yytoken != YYEMPTY)
1752 int yyn = yypact[*yyssp];
1753 yyarg[yycount++] = yytname[yytoken];
1754 if (!yypact_value_is_default (yyn))
1756 /* Start YYX at -YYN if negative to avoid negative indexes in
1757 YYCHECK. In other words, skip the first -YYN actions for
1758 this state because they are default actions. */
1759 int yyxbegin = yyn < 0 ? -yyn : 0;
1760 /* Stay within bounds of both yycheck and yytname. */
1761 int yychecklim = YYLAST - yyn + 1;
1762 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1765 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1766 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1767 && !yytable_value_is_error (yytable[yyx + yyn]))
1769 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1775 yyarg[yycount++] = yytname[yyx];
1777 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1778 if (! (yysize <= yysize1
1779 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1789 # define YYCASE_(N, S) \
1793 YYCASE_(0, YY_("syntax error"));
1794 YYCASE_(1, YY_("syntax error, unexpected %s"));
1795 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1796 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1797 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1798 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1803 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1804 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1809 if (*yymsg_alloc < yysize)
1811 *yymsg_alloc = 2 * yysize;
1812 if (! (yysize <= *yymsg_alloc
1813 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1814 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1818 /* Avoid sprintf, as that infringes on the user's name space.
1819 Don't have undefined behavior even if the translation
1820 produced a string with the wrong number of "%s"s. */
1824 while ((*yyp = *yyformat) != '\0')
1825 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1827 yyp += yytnamerr (yyp, yyarg[yyi++]);
1838 #endif /* YYERROR_VERBOSE */
1840 /*-----------------------------------------------.
1841 | Release the memory associated to this symbol. |
1842 `-----------------------------------------------*/
1845 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1850 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1852 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1854 YY_IGNORE_MAYBE_UNINITIALIZED_END
1860 /* The lookahead symbol. */
1863 /* The semantic value of the lookahead symbol. */
1865 /* Number of syntax errors so far. */
1877 /* Number of tokens to shift before error messages enabled. */
1880 /* The stacks and their tools:
1881 'yyss': related to states.
1882 'yyvs': related to semantic values.
1884 Refer to the stacks through separate pointers, to allow yyoverflow
1885 to reallocate them elsewhere. */
1887 /* The state stack. */
1888 yytype_int16 yyssa[YYINITDEPTH];
1890 yytype_int16 *yyssp;
1892 /* The semantic value stack. */
1893 YYSTYPE yyvsa[YYINITDEPTH];
1897 YYSIZE_T yystacksize;
1901 /* Lookahead token as an internal (translated) token number. */
1903 /* The variables used to return semantic value and location from the
1908 /* Buffer for error messages, and its allocated size. */
1910 char *yymsg = yymsgbuf;
1911 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1914 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1916 /* The number of symbols on the RHS of the reduced rule.
1917 Keep to zero when no symbol should be popped. */
1920 yyssp = yyss = yyssa;
1921 yyvsp = yyvs = yyvsa;
1922 yystacksize = YYINITDEPTH;
1924 YYDPRINTF ((stderr, "Starting parse\n"));
1929 yychar = YYEMPTY; /* Cause a token to be read. */
1932 /*------------------------------------------------------------.
1933 | yynewstate -- Push a new state, which is found in yystate. |
1934 `------------------------------------------------------------*/
1936 /* In all cases, when you get here, the value and location stacks
1937 have just been pushed. So pushing a state here evens the stacks. */
1943 if (yyss + yystacksize - 1 <= yyssp)
1945 /* Get the current used size of the three stacks, in elements. */
1946 YYSIZE_T yysize = yyssp - yyss + 1;
1950 /* Give user a chance to reallocate the stack. Use copies of
1951 these so that the &'s don't force the real ones into
1953 YYSTYPE *yyvs1 = yyvs;
1954 yytype_int16 *yyss1 = yyss;
1956 /* Each stack pointer address is followed by the size of the
1957 data in use in that stack, in bytes. This used to be a
1958 conditional around just the two extra args, but that might
1959 be undefined if yyoverflow is a macro. */
1960 yyoverflow (YY_("memory exhausted"),
1961 &yyss1, yysize * sizeof (*yyssp),
1962 &yyvs1, yysize * sizeof (*yyvsp),
1968 #else /* no yyoverflow */
1969 # ifndef YYSTACK_RELOCATE
1970 goto yyexhaustedlab;
1972 /* Extend the stack our own way. */
1973 if (YYMAXDEPTH <= yystacksize)
1974 goto yyexhaustedlab;
1976 if (YYMAXDEPTH < yystacksize)
1977 yystacksize = YYMAXDEPTH;
1980 yytype_int16 *yyss1 = yyss;
1981 union yyalloc *yyptr =
1982 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1984 goto yyexhaustedlab;
1985 YYSTACK_RELOCATE (yyss_alloc, yyss);
1986 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1987 # undef YYSTACK_RELOCATE
1989 YYSTACK_FREE (yyss1);
1992 #endif /* no yyoverflow */
1994 yyssp = yyss + yysize - 1;
1995 yyvsp = yyvs + yysize - 1;
1997 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1998 (unsigned long int) yystacksize));
2000 if (yyss + yystacksize - 1 <= yyssp)
2004 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2006 if (yystate == YYFINAL)
2016 /* Do appropriate processing given the current state. Read a
2017 lookahead token if we need one and don't already have one. */
2019 /* First try to decide what to do without reference to lookahead token. */
2020 yyn = yypact[yystate];
2021 if (yypact_value_is_default (yyn))
2024 /* Not known => get a lookahead token if don't already have one. */
2026 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2027 if (yychar == YYEMPTY)
2029 YYDPRINTF ((stderr, "Reading a token: "));
2033 if (yychar <= YYEOF)
2035 yychar = yytoken = YYEOF;
2036 YYDPRINTF ((stderr, "Now at end of input.\n"));
2040 yytoken = YYTRANSLATE (yychar);
2041 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2044 /* If the proper action on seeing token YYTOKEN is to reduce or to
2045 detect an error, take that action. */
2047 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2052 if (yytable_value_is_error (yyn))
2058 /* Count tokens shifted since error; after three, turn off error
2063 /* Shift the lookahead token. */
2064 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2066 /* Discard the shifted token. */
2070 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2072 YY_IGNORE_MAYBE_UNINITIALIZED_END
2077 /*-----------------------------------------------------------.
2078 | yydefault -- do the default action for the current state. |
2079 `-----------------------------------------------------------*/
2081 yyn = yydefact[yystate];
2087 /*-----------------------------.
2088 | yyreduce -- Do a reduction. |
2089 `-----------------------------*/
2091 /* yyn is the number of a rule to reduce with. */
2094 /* If YYLEN is nonzero, implement the default value of the action:
2097 Otherwise, the following line sets YYVAL to garbage.
2098 This behavior is undocumented and Bison
2099 users should not rely upon it. Assigning to YYVAL
2100 unconditionally makes the parser a bit smaller, and it avoids a
2101 GCC warning that YYVAL may be used uninitialized. */
2102 yyval = yyvsp[1-yylen];
2105 YY_REDUCE_PRINT (yyn);
2109 #line 377 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2111 /* I will need to incorporate much more fine grained
2112 * error messages. The following should suffice for
2115 struct FILE_INFO * ip_ctx = lex_current();
2117 "syntax error in %s line %d, column %d",
2119 ip_ctx->errpos.nline,
2120 ip_ctx->errpos.ncol);
2122 #line 2123 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2126 #line 413 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2130 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2131 APPEND_G_FIFO(cfgt.peers, my_node);
2133 #line 2134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2137 #line 432 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2138 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2139 #line 2140 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2143 #line 437 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2144 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2145 #line 2146 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2149 #line 442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2150 { (yyval.Integer) = AF_INET; }
2151 #line 2152 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2155 #line 444 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2156 { (yyval.Integer) = AF_INET6; }
2157 #line 2158 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2161 #line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2162 { (yyval.Attr_val_fifo) = NULL; }
2163 #line 2164 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2167 #line 451 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2169 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2170 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2172 #line 2173 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2176 #line 465 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2177 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2178 #line 2179 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2182 #line 481 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2183 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2184 #line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2188 #line 483 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2189 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2190 #line 2191 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2194 #line 497 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2195 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2196 #line 2197 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2200 #line 511 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2202 unpeer_node *my_node;
2204 my_node = create_unpeer_node((yyvsp[0].Address_node));
2206 APPEND_G_FIFO(cfgt.unpeers, my_node);
2208 #line 2209 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2212 #line 532 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2213 { cfgt.broadcastclient = 1; }
2214 #line 2215 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2218 #line 534 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2219 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2220 #line 2221 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2224 #line 536 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2225 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2226 #line 2227 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2230 #line 538 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2231 { cfgt.mdnstries = (yyvsp[0].Integer); }
2232 #line 2233 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2236 #line 549 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2240 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2241 APPEND_G_FIFO(cfgt.vars, atrv);
2243 #line 2244 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2247 #line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2248 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2249 #line 2250 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2253 #line 558 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2255 cfgt.auth.cryptosw++;
2256 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2258 #line 2259 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2262 #line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2263 { cfgt.auth.keys = (yyvsp[0].String); }
2264 #line 2265 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2268 #line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2269 { cfgt.auth.keysdir = (yyvsp[0].String); }
2270 #line 2271 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2274 #line 567 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2275 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2276 #line 2277 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2280 #line 569 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2281 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2282 #line 2283 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2286 #line 571 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2288 cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
2290 // if (!cfgt.auth.trusted_key_list)
2291 // cfgt.auth.trusted_key_list = $2;
2293 // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
2295 #line 2296 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2299 #line 580 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2300 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2301 #line 2302 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2305 #line 585 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2306 { (yyval.Attr_val_fifo) = NULL; }
2307 #line 2308 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2311 #line 587 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2313 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2314 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2316 #line 2317 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2320 #line 595 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2321 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2322 #line 2323 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2326 #line 597 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2328 (yyval.Attr_val) = NULL;
2329 cfgt.auth.revoke = (yyvsp[0].Integer);
2330 msyslog(LOG_WARNING,
2331 "'crypto revoke %d' is deprecated, "
2332 "please use 'revoke %d' instead.",
2333 cfgt.auth.revoke, cfgt.auth.revoke);
2335 #line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2339 #line 622 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2340 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2341 #line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2345 #line 627 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2347 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2348 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2350 #line 2351 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2354 #line 632 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2356 (yyval.Attr_val_fifo) = NULL;
2357 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2359 #line 2360 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2363 #line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2364 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2365 #line 2366 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2369 #line 642 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2370 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2371 #line 2372 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2375 #line 644 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2376 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2377 #line 2378 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2381 #line 670 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2382 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2383 #line 2384 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2387 #line 672 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2389 if (lex_from_file()) {
2390 cfgt.stats_dir = (yyvsp[0].String);
2392 YYFREE((yyvsp[0].String));
2393 yyerror("statsdir remote configuration ignored");
2396 #line 2397 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2400 #line 681 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2404 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2405 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2407 #line 2408 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2411 #line 691 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2413 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2414 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2416 #line 2417 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2420 #line 696 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2422 (yyval.Int_fifo) = NULL;
2423 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2425 #line 2426 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2429 #line 715 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2430 { (yyval.Attr_val_fifo) = NULL; }
2431 #line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2435 #line 717 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2437 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2438 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2440 #line 2441 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2444 #line 725 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2446 if (lex_from_file()) {
2447 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2449 (yyval.Attr_val) = NULL;
2450 YYFREE((yyvsp[0].String));
2451 yyerror("filegen file remote config ignored");
2454 #line 2455 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2458 #line 735 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2460 if (lex_from_file()) {
2461 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2463 (yyval.Attr_val) = NULL;
2464 yyerror("filegen type remote config ignored");
2467 #line 2468 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2471 #line 744 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2475 if (lex_from_file()) {
2476 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2478 (yyval.Attr_val) = NULL;
2479 if (T_Link == (yyvsp[0].Integer))
2480 err = "filegen link remote config ignored";
2482 err = "filegen nolink remote config ignored";
2486 #line 2487 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2490 #line 759 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2491 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2492 #line 2493 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2496 #line 789 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2498 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2500 #line 2501 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2504 #line 793 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2506 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2508 #line 2509 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2512 #line 797 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2516 rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
2517 lex_current()->curpos.nline);
2518 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2520 #line 2521 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2524 #line 805 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2528 rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
2529 lex_current()->curpos.nline);
2530 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2532 #line 2533 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2536 #line 813 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2540 rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
2541 lex_current()->curpos.nline);
2542 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2544 #line 2545 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2548 #line 821 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2552 rn = create_restrict_node(
2553 create_address_node(
2556 create_address_node(
2559 (yyvsp[0].Int_fifo),
2560 lex_current()->curpos.nline);
2561 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2563 #line 2564 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2567 #line 836 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2571 rn = create_restrict_node(
2572 create_address_node(
2575 create_address_node(
2578 (yyvsp[0].Int_fifo),
2579 lex_current()->curpos.nline);
2580 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2582 #line 2583 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2586 #line 851 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2590 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
2591 rn = create_restrict_node(
2592 NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2593 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2595 #line 2596 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2599 #line 863 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2600 { (yyval.Int_fifo) = NULL; }
2601 #line 2602 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2605 #line 865 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2607 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2608 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2610 #line 2611 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2614 #line 891 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2616 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2617 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2619 #line 2620 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2623 #line 896 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2625 (yyval.Attr_val_fifo) = NULL;
2626 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2628 #line 2629 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2632 #line 904 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2633 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2634 #line 2635 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2638 #line 915 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2640 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2641 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2643 #line 2644 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2647 #line 920 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2649 (yyval.Attr_val_fifo) = NULL;
2650 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2652 #line 2653 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2656 #line 928 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2657 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2658 #line 2659 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2662 #line 948 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2664 addr_opts_node *aon;
2666 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2667 APPEND_G_FIFO(cfgt.fudge, aon);
2669 #line 2670 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2673 #line 958 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2675 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2676 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2678 #line 2679 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2682 #line 963 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2684 (yyval.Attr_val_fifo) = NULL;
2685 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2687 #line 2688 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2691 #line 971 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2692 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2693 #line 2694 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2697 #line 973 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2698 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2699 #line 2700 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2703 #line 975 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2705 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2706 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2708 (yyval.Attr_val) = NULL;
2709 yyerror("fudge factor: stratum value not in [0..16], ignored");
2712 #line 2713 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2716 #line 984 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2717 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2718 #line 2719 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2722 #line 986 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2723 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2724 #line 2725 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2728 #line 1007 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2729 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2730 #line 2731 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2734 #line 1012 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2736 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2737 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2739 #line 2740 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2743 #line 1017 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2745 (yyval.Attr_val_fifo) = NULL;
2746 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2748 #line 2749 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2752 #line 1025 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2753 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2754 #line 2755 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2758 #line 1041 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2759 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2760 #line 2761 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2764 #line 1043 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2765 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2766 #line 2767 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2770 #line 1048 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2772 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2773 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2775 #line 2776 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2779 #line 1053 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2781 (yyval.Attr_val_fifo) = NULL;
2782 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2784 #line 2785 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2788 #line 1061 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2789 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2790 #line 2791 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2794 #line 1063 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2796 if (lex_from_file()) {
2797 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2801 (yyval.Attr_val) = NULL;
2802 snprintf(err_str, sizeof(err_str),
2803 "enable/disable %s remote configuration ignored",
2804 keyword((yyvsp[0].Integer)));
2808 #line 2809 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2812 #line 1102 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2813 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2814 #line 2815 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2818 #line 1107 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2820 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2821 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2823 #line 2824 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2827 #line 1112 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2829 (yyval.Attr_val_fifo) = NULL;
2830 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2832 #line 2833 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2836 #line 1120 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2837 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2838 #line 2839 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2842 #line 1145 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2846 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2847 APPEND_G_FIFO(cfgt.vars, av);
2849 #line 2850 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2853 #line 1152 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2857 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2858 APPEND_G_FIFO(cfgt.vars, av);
2860 #line 2861 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2864 #line 1159 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2868 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2869 APPEND_G_FIFO(cfgt.vars, av);
2871 #line 2872 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2875 #line 1166 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2877 char error_text[64];
2880 if (lex_from_file()) {
2881 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2882 APPEND_G_FIFO(cfgt.vars, av);
2884 YYFREE((yyvsp[0].String));
2885 snprintf(error_text, sizeof(error_text),
2886 "%s remote config ignored",
2887 keyword((yyvsp[-1].Integer)));
2888 yyerror(error_text);
2891 #line 2892 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2895 #line 1182 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2897 if (!lex_from_file()) {
2898 YYFREE((yyvsp[-1].String)); /* avoid leak */
2899 yyerror("remote includefile ignored");
2902 if (lex_level() > MAXINCLUDELEVEL) {
2903 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2904 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2906 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
2907 if (!lex_push_file(path, "r")) {
2908 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
2909 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
2912 YYFREE((yyvsp[-1].String)); /* avoid leak */
2914 #line 2915 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2918 #line 1201 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2919 { lex_flush_stack(); }
2920 #line 2921 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2924 #line 1203 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2925 { /* see drift_parm below for actions */ }
2926 #line 2927 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2930 #line 1205 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2931 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2932 #line 2933 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2936 #line 1207 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2937 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2938 #line 2939 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2942 #line 1209 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2943 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2944 #line 2945 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2948 #line 1211 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2950 addr_opts_node *aon;
2952 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2953 APPEND_G_FIFO(cfgt.trap, aon);
2955 #line 2956 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2959 #line 1218 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2960 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
2961 #line 2962 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2965 #line 1233 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2968 yyerror("Built without LEAP_SMEAR support.");
2971 #line 2972 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2975 #line 1253 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2977 if (lex_from_file()) {
2979 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
2980 APPEND_G_FIFO(cfgt.vars, av);
2982 YYFREE((yyvsp[0].String));
2983 yyerror("driftfile remote configuration ignored");
2986 #line 2987 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2990 #line 1264 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2992 if (lex_from_file()) {
2994 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
2995 APPEND_G_FIFO(cfgt.vars, av);
2996 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
2997 APPEND_G_FIFO(cfgt.vars, av);
2999 YYFREE((yyvsp[-1].String));
3000 yyerror("driftfile remote configuration ignored");
3003 #line 3004 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3007 #line 1277 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3009 if (lex_from_file()) {
3011 av = create_attr_sval(T_Driftfile, estrdup(""));
3012 APPEND_G_FIFO(cfgt.vars, av);
3014 yyerror("driftfile remote configuration ignored");
3017 #line 3018 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3021 #line 1290 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3022 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3023 #line 3024 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3027 #line 1296 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3028 { (yyval.Integer) = 0; }
3029 #line 3030 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3033 #line 1301 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3034 { (yyval.Attr_val_fifo) = NULL; }
3035 #line 3036 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3039 #line 1303 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3041 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3042 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3044 #line 3045 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3048 #line 1311 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3049 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3050 #line 3051 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3054 #line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3056 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3057 destroy_address_node((yyvsp[0].Address_node));
3059 #line 3060 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3063 #line 1321 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3065 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3066 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3068 #line 3069 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3072 #line 1326 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3074 (yyval.Attr_val_fifo) = NULL;
3075 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3077 #line 3078 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3081 #line 1334 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3086 switch ((yyvsp[0].String)[0]) {
3091 prefix = (yyvsp[0].String)[0];
3092 type = (yyvsp[0].String) + 1;
3097 type = (yyvsp[0].String);
3100 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3101 YYFREE((yyvsp[0].String));
3103 #line 3104 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3107 #line 1359 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3111 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3112 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3114 #line 3115 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3118 #line 1366 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3122 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3123 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3125 #line 3126 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3129 #line 1394 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3130 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3131 #line 3132 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3135 #line 1399 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3137 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3138 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3140 #line 3141 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3144 #line 1404 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3146 (yyval.Int_fifo) = NULL;
3147 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3149 #line 3150 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3153 #line 1428 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3155 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3156 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3158 #line 3159 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3162 #line 1433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3164 (yyval.Attr_val_fifo) = NULL;
3165 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3167 #line 3168 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3171 #line 1441 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3173 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3174 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3176 #line 3177 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3180 #line 1446 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3182 (yyval.Attr_val_fifo) = NULL;
3183 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3185 #line 3186 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3189 #line 1454 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3190 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3191 #line 3192 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3195 #line 1460 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3196 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3197 #line 3198 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3201 #line 1465 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3203 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3204 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3206 #line 3207 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3210 #line 1470 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3212 (yyval.String_fifo) = NULL;
3213 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3215 #line 3216 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3219 #line 1478 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3221 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3222 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3224 #line 3225 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3228 #line 1483 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3230 (yyval.Address_fifo) = NULL;
3231 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3233 #line 3234 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3237 #line 1491 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3239 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3240 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3241 (yyval.Integer) = 1;
3243 (yyval.Integer) = (yyvsp[0].Integer);
3246 #line 3247 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3250 #line 1499 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3251 { (yyval.Integer) = 1; }
3252 #line 3253 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3256 #line 1500 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3257 { (yyval.Integer) = 0; }
3258 #line 3259 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3262 #line 1504 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3263 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3264 #line 3265 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3268 #line 1515 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3272 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3273 APPEND_G_FIFO(cfgt.sim_details, sn);
3275 /* Revert from ; to \n for end-of-command */
3276 old_config_style = 1;
3278 #line 3279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3282 #line 1532 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3283 { old_config_style = 0; }
3284 #line 3285 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3288 #line 1537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3290 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3291 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3293 #line 3294 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3297 #line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3299 (yyval.Attr_val_fifo) = NULL;
3300 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3302 #line 3303 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3306 #line 1550 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3307 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3308 #line 3309 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3312 #line 1560 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3314 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3315 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3317 #line 3318 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3321 #line 1565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3323 (yyval.Sim_server_fifo) = NULL;
3324 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3326 #line 3327 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3330 #line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3331 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3332 #line 3333 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3336 #line 1578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3337 { (yyval.Double) = (yyvsp[-1].Double); }
3338 #line 3339 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3342 #line 1583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3343 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3344 #line 3345 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3348 #line 1588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3350 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3351 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3353 #line 3354 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3357 #line 1593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3359 (yyval.Sim_script_fifo) = NULL;
3360 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3362 #line 3363 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3366 #line 1601 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3367 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3368 #line 3369 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3372 #line 1606 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3374 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3375 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3377 #line 3378 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3381 #line 1611 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3383 (yyval.Attr_val_fifo) = NULL;
3384 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3386 #line 3387 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3390 #line 1619 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3391 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3392 #line 3393 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3396 #line 3397 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3399 /* User semantic actions sometimes alter yychar, and that requires
3400 that yytoken be updated with the new translation. We take the
3401 approach of translating immediately before every use of yytoken.
3402 One alternative is translating here after every semantic action,
3403 but that translation would be missed if the semantic action invokes
3404 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3405 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3406 incorrect destructor might then be invoked immediately. In the
3407 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3408 to an incorrect destructor call or verbose syntax error message
3409 before the lookahead is translated. */
3410 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3414 YY_STACK_PRINT (yyss, yyssp);
3418 /* Now 'shift' the result of the reduction. Determine what state
3419 that goes to, based on the state we popped back to and the rule
3420 number reduced by. */
3424 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3425 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3426 yystate = yytable[yystate];
3428 yystate = yydefgoto[yyn - YYNTOKENS];
3433 /*--------------------------------------.
3434 | yyerrlab -- here on detecting error. |
3435 `--------------------------------------*/
3437 /* Make sure we have latest lookahead translation. See comments at
3438 user semantic actions for why this is necessary. */
3439 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3441 /* If not already recovering from an error, report this error. */
3445 #if ! YYERROR_VERBOSE
3446 yyerror (YY_("syntax error"));
3448 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3451 char const *yymsgp = YY_("syntax error");
3452 int yysyntax_error_status;
3453 yysyntax_error_status = YYSYNTAX_ERROR;
3454 if (yysyntax_error_status == 0)
3456 else if (yysyntax_error_status == 1)
3458 if (yymsg != yymsgbuf)
3459 YYSTACK_FREE (yymsg);
3460 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3464 yymsg_alloc = sizeof yymsgbuf;
3465 yysyntax_error_status = 2;
3469 yysyntax_error_status = YYSYNTAX_ERROR;
3474 if (yysyntax_error_status == 2)
3475 goto yyexhaustedlab;
3477 # undef YYSYNTAX_ERROR
3483 if (yyerrstatus == 3)
3485 /* If just tried and failed to reuse lookahead token after an
3486 error, discard it. */
3488 if (yychar <= YYEOF)
3490 /* Return failure if at end of input. */
3491 if (yychar == YYEOF)
3496 yydestruct ("Error: discarding",
3502 /* Else will try to reuse lookahead token after shifting the error
3507 /*---------------------------------------------------.
3508 | yyerrorlab -- error raised explicitly by YYERROR. |
3509 `---------------------------------------------------*/
3512 /* Pacify compilers like GCC when the user code never invokes
3513 YYERROR and the label yyerrorlab therefore never appears in user
3515 if (/*CONSTCOND*/ 0)
3518 /* Do not reclaim the symbols of the rule whose action triggered
3522 YY_STACK_PRINT (yyss, yyssp);
3527 /*-------------------------------------------------------------.
3528 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3529 `-------------------------------------------------------------*/
3531 yyerrstatus = 3; /* Each real token shifted decrements this. */
3535 yyn = yypact[yystate];
3536 if (!yypact_value_is_default (yyn))
3539 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3547 /* Pop the current state because it cannot handle the error token. */
3552 yydestruct ("Error: popping",
3553 yystos[yystate], yyvsp);
3556 YY_STACK_PRINT (yyss, yyssp);
3559 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3561 YY_IGNORE_MAYBE_UNINITIALIZED_END
3564 /* Shift the error token. */
3565 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3571 /*-------------------------------------.
3572 | yyacceptlab -- YYACCEPT comes here. |
3573 `-------------------------------------*/
3578 /*-----------------------------------.
3579 | yyabortlab -- YYABORT comes here. |
3580 `-----------------------------------*/
3585 #if !defined yyoverflow || YYERROR_VERBOSE
3586 /*-------------------------------------------------.
3587 | yyexhaustedlab -- memory exhaustion comes here. |
3588 `-------------------------------------------------*/
3590 yyerror (YY_("memory exhausted"));
3596 if (yychar != YYEMPTY)
3598 /* Make sure we have latest lookahead translation. See comments at
3599 user semantic actions for why this is necessary. */
3600 yytoken = YYTRANSLATE (yychar);
3601 yydestruct ("Cleanup: discarding lookahead",
3604 /* Do not reclaim the symbols of the rule whose action triggered
3605 this YYABORT or YYACCEPT. */
3607 YY_STACK_PRINT (yyss, yyssp);
3608 while (yyssp != yyss)
3610 yydestruct ("Cleanup: popping",
3611 yystos[*yyssp], yyvsp);
3616 YYSTACK_FREE (yyss);
3619 if (yymsg != yymsgbuf)
3620 YYSTACK_FREE (yymsg);
3624 #line 1630 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
3633 struct FILE_INFO * ip_ctx;
3635 ip_ctx = lex_current();
3636 ip_ctx->errpos = ip_ctx->tokpos;
3638 msyslog(LOG_ERR, "line %d column %d %s",
3639 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3640 if (!lex_from_file()) {
3641 /* Save the error message in the correct buffer */
3642 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3643 MAXLINE - remote_config.err_pos,
3645 ip_ctx->errpos.ncol, msg);
3647 /* Increment the value of err_pos */
3649 remote_config.err_pos += retval;
3651 /* Increment the number of errors */
3652 ++remote_config.no_errors;
3658 * token_name - convert T_ token integers to text
3659 * example: token_name(T_Server) returns "T_Server"
3666 return yytname[YYTRANSLATE(token)];
3670 /* Initial Testing function -- ignore */
3672 int main(int argc, char *argv[])
3674 ip_file = FOPEN(argv[1], "r");
3676 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);