1 /* A Bison parser, made by GNU Bison 3.0.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 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.2"
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__NTPD_NTP_PARSER_H_INCLUDED
120 # define YY_YY__NTPD_NTP_PARSER_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,
276 T_Saveconfigdir = 400,
308 T_WanderThreshold = 432,
317 T_Sim_Duration = 441,
318 T_Server_Offset = 442,
332 #define T_Allpeers 262
334 #define T_Autokey 264
335 #define T_Automax 265
336 #define T_Average 266
337 #define T_Bclient 267
339 #define T_Broadcast 269
340 #define T_Broadcastclient 270
341 #define T_Broadcastdelay 271
343 #define T_Calibrate 273
344 #define T_Ceiling 274
345 #define T_Clockstats 275
347 #define T_ControlKey 277
349 #define T_Cryptostats 279
352 #define T_Default 282
354 #define T_Disable 284
355 #define T_Discard 285
356 #define T_Dispersion 286
358 #define T_Driftfile 288
361 #define T_Ellipsis 291
366 #define T_Filegen 296
367 #define T_Filenum 297
377 #define T_Huffpuff 307
381 #define T_Incalloc 311
383 #define T_Initalloc 313
384 #define T_Initmem 314
385 #define T_Includefile 315
386 #define T_Integer 316
387 #define T_Interface 317
388 #define T_Intrange 318
391 #define T_Ipv4_flag 321
393 #define T_Ipv6_flag 323
397 #define T_Keysdir 327
400 #define T_Leapfile 330
401 #define T_Leapsmearinterval 331
402 #define T_Limited 332
405 #define T_Logconfig 335
406 #define T_Logfile 336
407 #define T_Loopstats 337
408 #define T_Lowpriotrap 338
409 #define T_Manycastclient 339
410 #define T_Manycastserver 340
413 #define T_Maxclock 343
414 #define T_Maxdepth 344
415 #define T_Maxdist 345
417 #define T_Maxpoll 347
418 #define T_Mdnstries 348
420 #define T_Memlock 350
421 #define T_Minclock 351
422 #define T_Mindepth 352
423 #define T_Mindist 353
424 #define T_Minimum 354
425 #define T_Minpoll 355
426 #define T_Minsane 356
429 #define T_Monitor 359
432 #define T_Multicastclient 362
435 #define T_Nomodify 365
436 #define T_Nomrulist 366
438 #define T_Nonvolatile 368
440 #define T_Noquery 370
441 #define T_Noselect 371
442 #define T_Noserve 372
444 #define T_Notrust 374
446 #define T_Ntpport 376
447 #define T_NtpSignDsocket 377
449 #define T_Orphanwait 379
452 #define T_Peerstats 382
455 #define T_Pidfile 385
458 #define T_Preempt 388
460 #define T_Protostats 390
462 #define T_Randfile 392
463 #define T_Rawstats 393
465 #define T_Requestkey 395
467 #define T_Restrict 397
470 #define T_Saveconfigdir 400
474 #define T_Stacksize 404
475 #define T_Statistics 405
477 #define T_Statsdir 407
479 #define T_Stepback 409
480 #define T_Stepfwd 410
481 #define T_Stepout 411
482 #define T_Stratum 412
485 #define T_Sysstats 415
490 #define T_Timingstats 420
495 #define T_Trustedkey 425
499 #define T_Unconfig 429
501 #define T_Version 431
502 #define T_WanderThreshold 432
504 #define T_Wildcard 434
509 #define T_Simulate 439
510 #define T_Beep_Delay 440
511 #define T_Sim_Duration 441
512 #define T_Server_Offset 442
513 #define T_Duration 443
514 #define T_Freq_Offset 444
517 #define T_Prop_Delay 447
518 #define T_Proc_Delay 448
521 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
522 typedef union YYSTYPE YYSTYPE;
525 #line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */
531 gen_fifo * Generic_fifo;
533 attr_val_fifo * Attr_val_fifo;
535 string_fifo * String_fifo;
536 address_node * Address_node;
537 address_fifo * Address_fifo;
538 setvar_node * Set_var;
539 server_info * Sim_server;
540 server_info_fifo * Sim_server_fifo;
541 script_info * Sim_script;
542 script_info_fifo * Sim_script_fifo;
544 #line 545 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
546 # define YYSTYPE_IS_TRIVIAL 1
547 # define YYSTYPE_IS_DECLARED 1
551 extern YYSTYPE yylval;
555 #endif /* !YY_YY__NTPD_NTP_PARSER_H_INCLUDED */
557 /* Copy the second part of user declarations. */
559 #line 560 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
566 typedef YYTYPE_UINT8 yytype_uint8;
568 typedef unsigned char yytype_uint8;
572 typedef YYTYPE_INT8 yytype_int8;
574 typedef signed char yytype_int8;
578 typedef YYTYPE_UINT16 yytype_uint16;
580 typedef unsigned short int yytype_uint16;
584 typedef YYTYPE_INT16 yytype_int16;
586 typedef short int yytype_int16;
590 # ifdef __SIZE_TYPE__
591 # define YYSIZE_T __SIZE_TYPE__
592 # elif defined size_t
593 # define YYSIZE_T size_t
594 # elif ! defined YYSIZE_T
595 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
596 # define YYSIZE_T size_t
598 # define YYSIZE_T unsigned int
602 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
605 # if defined YYENABLE_NLS && YYENABLE_NLS
607 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
608 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
612 # define YY_(Msgid) Msgid
617 # if (defined __GNUC__ \
618 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
619 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
620 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
622 # define YY_ATTRIBUTE(Spec) /* empty */
626 #ifndef YY_ATTRIBUTE_PURE
627 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
630 #ifndef YY_ATTRIBUTE_UNUSED
631 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
634 #if !defined _Noreturn \
635 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
636 # if defined _MSC_VER && 1200 <= _MSC_VER
637 # define _Noreturn __declspec (noreturn)
639 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
643 /* Suppress unused-variable warnings by "using" E. */
644 #if ! defined lint || defined __GNUC__
645 # define YYUSE(E) ((void) (E))
647 # define YYUSE(E) /* empty */
650 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
651 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
652 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
653 _Pragma ("GCC diagnostic push") \
654 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
655 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
656 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
657 _Pragma ("GCC diagnostic pop")
659 # define YY_INITIAL_VALUE(Value) Value
661 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
662 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
663 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
665 #ifndef YY_INITIAL_VALUE
666 # define YY_INITIAL_VALUE(Value) /* Nothing. */
670 #if ! defined yyoverflow || YYERROR_VERBOSE
672 /* The parser invokes alloca or malloc; define the necessary symbols. */
674 # ifdef YYSTACK_USE_ALLOCA
675 # if YYSTACK_USE_ALLOCA
677 # define YYSTACK_ALLOC __builtin_alloca
678 # elif defined __BUILTIN_VA_ARG_INCR
679 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
681 # define YYSTACK_ALLOC __alloca
682 # elif defined _MSC_VER
683 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
684 # define alloca _alloca
686 # define YYSTACK_ALLOC alloca
687 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
688 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
689 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
690 # ifndef EXIT_SUCCESS
691 # define EXIT_SUCCESS 0
698 # ifdef YYSTACK_ALLOC
699 /* Pacify GCC's 'empty if-body' warning. */
700 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
701 # ifndef YYSTACK_ALLOC_MAXIMUM
702 /* The OS might guarantee only one guard page at the bottom of the stack,
703 and a page size can be as small as 4096 bytes. So we cannot safely
704 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
705 to allow for a few compiler-allocated temporary stack slots. */
706 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
709 # define YYSTACK_ALLOC YYMALLOC
710 # define YYSTACK_FREE YYFREE
711 # ifndef YYSTACK_ALLOC_MAXIMUM
712 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
714 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
715 && ! ((defined YYMALLOC || defined malloc) \
716 && (defined YYFREE || defined free)))
717 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
718 # ifndef EXIT_SUCCESS
719 # define EXIT_SUCCESS 0
723 # define YYMALLOC malloc
724 # if ! defined malloc && ! defined EXIT_SUCCESS
725 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
730 # if ! defined free && ! defined EXIT_SUCCESS
731 void free (void *); /* INFRINGES ON USER NAME SPACE */
735 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
738 #if (! defined yyoverflow \
739 && (! defined __cplusplus \
740 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
742 /* A type that is properly aligned for any stack member. */
745 yytype_int16 yyss_alloc;
749 /* The size of the maximum gap between one aligned stack and the next. */
750 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
752 /* The size of an array large to enough to hold all stacks, each with
754 # define YYSTACK_BYTES(N) \
755 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
756 + YYSTACK_GAP_MAXIMUM)
758 # define YYCOPY_NEEDED 1
760 /* Relocate STACK from its old location to the new one. The
761 local variables YYSIZE and YYSTACKSIZE give the old and new number of
762 elements in the stack, and YYPTR gives the new location of the
763 stack. Advance YYPTR to a properly aligned location for the next
765 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
768 YYSIZE_T yynewbytes; \
769 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
770 Stack = &yyptr->Stack_alloc; \
771 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
772 yyptr += yynewbytes / sizeof (*yyptr); \
778 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
779 /* Copy COUNT objects from SRC to DST. The source and destination do
782 # if defined __GNUC__ && 1 < __GNUC__
783 # define YYCOPY(Dst, Src, Count) \
784 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
786 # define YYCOPY(Dst, Src, Count) \
790 for (yyi = 0; yyi < (Count); yyi++) \
791 (Dst)[yyi] = (Src)[yyi]; \
796 #endif /* !YYCOPY_NEEDED */
798 /* YYFINAL -- State number of the termination state. */
800 /* YYLAST -- Last index in YYTABLE. */
803 /* YYNTOKENS -- Number of terminals. */
804 #define YYNTOKENS 199
805 /* YYNNTS -- Number of nonterminals. */
807 /* YYNRULES -- Number of rules. */
809 /* YYNSTATES -- Number of states. */
810 #define YYNSTATES 419
812 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
813 by yylex, with out-of-bounds checking. */
815 #define YYMAXUTOK 448
817 #define YYTRANSLATE(YYX) \
818 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
820 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
821 as returned by yylex, without out-of-bounds checking. */
822 static const yytype_uint8 yytranslate[] =
824 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
825 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
826 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
827 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
828 195, 196, 2, 2, 2, 2, 2, 2, 2, 2,
829 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
830 2, 194, 2, 2, 2, 2, 2, 2, 2, 2,
831 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
832 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
833 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
834 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
835 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
836 2, 2, 2, 197, 2, 198, 2, 2, 2, 2,
837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 2, 2, 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, 2, 2, 2, 2, 2, 2, 2,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
850 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
851 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
852 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
853 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
854 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
855 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
856 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
857 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
858 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
859 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
860 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
861 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
862 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
863 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
864 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
865 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
866 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
867 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
868 185, 186, 187, 188, 189, 190, 191, 192, 193
872 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
873 static const yytype_uint16 yyrline[] =
875 0, 366, 366, 370, 371, 372, 387, 388, 389, 390,
876 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
877 408, 418, 419, 420, 421, 422, 426, 427, 432, 437,
878 439, 445, 446, 454, 455, 456, 460, 465, 466, 467,
879 468, 469, 470, 471, 472, 476, 478, 483, 484, 485,
880 486, 487, 488, 492, 497, 506, 516, 517, 527, 529,
881 531, 533, 544, 551, 553, 558, 560, 562, 564, 566,
882 575, 581, 582, 590, 592, 604, 605, 606, 607, 608,
883 617, 622, 627, 635, 637, 639, 644, 645, 646, 647,
884 648, 649, 653, 654, 655, 656, 665, 667, 676, 686,
885 691, 699, 700, 701, 702, 703, 704, 705, 706, 711,
886 712, 720, 730, 739, 754, 759, 760, 764, 765, 769,
887 770, 771, 772, 773, 774, 775, 784, 788, 792, 800,
888 808, 816, 831, 846, 859, 860, 868, 869, 870, 871,
889 872, 873, 874, 875, 876, 877, 878, 879, 880, 881,
890 882, 886, 891, 899, 904, 905, 906, 910, 915, 923,
891 928, 929, 930, 931, 932, 933, 934, 935, 943, 953,
892 958, 966, 968, 970, 979, 981, 986, 987, 991, 992,
893 993, 994, 1002, 1007, 1012, 1020, 1025, 1026, 1027, 1036,
894 1038, 1043, 1048, 1056, 1058, 1075, 1076, 1077, 1078, 1079,
895 1080, 1084, 1085, 1093, 1098, 1103, 1111, 1116, 1117, 1118,
896 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1134, 1135, 1136,
897 1143, 1150, 1157, 1173, 1192, 1194, 1196, 1198, 1200, 1202,
898 1209, 1214, 1215, 1216, 1220, 1224, 1233, 1234, 1238, 1239,
899 1240, 1244, 1255, 1269, 1281, 1286, 1288, 1293, 1294, 1302,
900 1304, 1312, 1317, 1325, 1350, 1357, 1367, 1368, 1372, 1373,
901 1374, 1375, 1379, 1380, 1381, 1385, 1390, 1395, 1403, 1404,
902 1405, 1406, 1407, 1408, 1409, 1419, 1424, 1432, 1437, 1445,
903 1447, 1451, 1456, 1461, 1469, 1474, 1482, 1491, 1492, 1496,
904 1497, 1506, 1524, 1528, 1533, 1541, 1546, 1547, 1551, 1556,
905 1564, 1569, 1574, 1579, 1584, 1592, 1597, 1602, 1610, 1615,
906 1616, 1617, 1618, 1619
910 #if YYDEBUG || YYERROR_VERBOSE || 1
911 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
912 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
913 static const char *const yytname[] =
915 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
916 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
917 "T_Bclient", "T_Beacon", "T_Broadcast", "T_Broadcastclient",
918 "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling",
919 "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats",
920 "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", "T_Discard",
921 "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Dscp",
922 "T_Ellipsis", "T_Enable", "T_End", "T_False", "T_File", "T_Filegen",
923 "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4", "T_Flake",
924 "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff", "T_Iburst",
925 "T_Ident", "T_Ignore", "T_Incalloc", "T_Incmem", "T_Initalloc",
926 "T_Initmem", "T_Includefile", "T_Integer", "T_Interface", "T_Intrange",
927 "T_Io", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel",
928 "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile",
929 "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
930 "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
931 "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
932 "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
933 "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
934 "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month",
935 "T_Mru", "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify",
936 "T_Nomrulist", "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery",
937 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
938 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_Panic", "T_Peer",
939 "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port",
940 "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
941 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
942 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
943 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
944 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
945 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
946 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
947 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
948 "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
949 "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
950 "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
951 "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
952 "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
953 "command", "server_command", "client_type", "address", "ip_address",
954 "address_fam", "option_list", "option", "option_flag",
955 "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
956 "option_str_keyword", "unpeer_command", "unpeer_keyword",
957 "other_mode_command", "authentication_command", "crypto_command_list",
958 "crypto_command", "crypto_str_keyword", "orphan_mode_command",
959 "tos_option_list", "tos_option", "tos_option_int_keyword",
960 "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
961 "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
962 "filegen_type", "access_control_command", "ac_flag_list",
963 "access_control_flag", "discard_option_list", "discard_option",
964 "discard_option_keyword", "mru_option_list", "mru_option",
965 "mru_option_keyword", "fudge_command", "fudge_factor_list",
966 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
967 "rlimit_command", "rlimit_option_list", "rlimit_option",
968 "rlimit_option_keyword", "system_option_command", "system_option_list",
969 "system_option", "system_option_flag_keyword",
970 "system_option_local_flag_keyword", "tinker_command",
971 "tinker_option_list", "tinker_option", "tinker_option_keyword",
972 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
973 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
974 "variable_assign", "t_default_or_zero", "trap_option_list",
975 "trap_option", "log_config_list", "log_config_command",
976 "interface_command", "interface_nic", "nic_rule_class",
977 "nic_rule_action", "reset_command", "counter_set_list",
978 "counter_set_keyword", "integer_list", "integer_list_range",
979 "integer_list_range_elt", "integer_range", "string_list", "address_list",
980 "boolean", "number", "simulate_command", "sim_conf_start",
981 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
982 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
983 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
984 "sim_act_keyword", YY_NULLPTR
989 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
990 (internal) symbol number NUM (which must be that of a token). */
991 static const yytype_uint16 yytoknum[] =
993 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
994 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
995 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
996 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
997 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
998 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
999 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1000 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1001 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1002 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1003 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1004 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1005 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1006 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1007 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1008 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1009 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1010 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1011 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1012 445, 446, 447, 448, 61, 40, 41, 123, 125
1016 #define YYPACT_NINF -185
1018 #define yypact_value_is_default(Yystate) \
1019 (!!((Yystate) == (-185)))
1021 #define YYTABLE_NINF -7
1023 #define yytable_value_is_error(Yytable_value) \
1026 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1028 static const yytype_int16 yypact[] =
1030 78, -169, -34, -185, -185, -185, -29, -185, 17, 43,
1031 -124, -185, 17, -185, -5, -27, -185, -121, -185, -112,
1032 -110, -185, -185, -100, -185, -185, -27, 0, 116, -27,
1033 -185, -185, -91, -185, -89, -185, -185, 11, 35, 30,
1034 13, 31, -185, -185, -83, -5, -78, -185, 186, 523,
1035 -76, -56, 15, -185, -185, -185, 83, 244, -99, -185,
1036 -27, -185, -27, -185, -185, -185, -185, -185, -185, -185,
1037 -185, -185, -185, -12, 24, -71, -69, -185, -11, -185,
1038 -185, -107, -185, -185, -185, 8, -185, -185, -185, -185,
1039 -185, -185, -185, -185, 17, -185, -185, -185, -185, -185,
1040 -185, 43, -185, 34, 59, -185, 17, -185, -185, -185,
1041 -185, -185, -185, -185, -185, -185, -185, -185, -185, 7,
1042 -185, -61, 407, -185, -185, -185, -100, -185, -185, -27,
1043 -185, -185, -185, -185, -185, -185, -185, -185, -185, 116,
1044 -185, 44, -27, -185, -185, -52, -185, -185, -185, -185,
1045 -185, -185, -185, -185, 35, -185, -185, 85, 96, -185,
1046 -185, 39, -185, -185, -185, -185, 31, -185, 75, -46,
1047 -185, -5, -185, -185, -185, -185, -185, -185, -185, -185,
1048 -185, -185, -185, -185, 186, -185, -12, -185, -185, -35,
1049 -185, -185, -185, -185, -185, -185, -185, -185, 523, -185,
1050 82, -12, -185, -185, 91, -56, -185, -185, -185, 100,
1051 -185, -26, -185, -185, -185, -185, -185, -185, -185, -185,
1052 -185, -185, -185, -185, -2, -130, -185, -185, -185, -185,
1053 -185, 105, -185, 9, -185, -185, -185, -185, -7, 18,
1054 -185, -185, -185, -185, 25, 121, -185, -185, 7, -185,
1055 -12, -35, -185, -185, -185, -185, -185, -185, -185, -185,
1056 391, -185, -185, 391, 391, -76, -185, -185, 29, -185,
1057 -185, -185, -185, -185, -185, -185, -185, -185, -185, -51,
1058 153, -185, -185, -185, 464, -185, -185, -185, -185, -185,
1059 -185, -185, -185, -82, 14, 1, -185, -185, -185, -185,
1060 38, -185, -185, 12, -185, -185, -185, -185, -185, -185,
1061 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1062 -185, -185, -185, -185, -185, -185, -185, -185, -185, 391,
1063 391, -185, 171, -76, 140, -185, 141, -185, -185, -185,
1064 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1065 -185, -185, -185, -185, -185, -185, -55, -185, 53, 20,
1066 33, -128, -185, 32, -185, -12, -185, -185, -185, -185,
1067 -185, -185, -185, -185, -185, 391, -185, -185, -185, -185,
1068 16, -185, -185, -185, -27, -185, -185, -185, 46, -185,
1069 -185, -185, 37, 48, -12, 40, -167, -185, 54, -12,
1070 -185, -185, -185, 45, 79, -185, -185, -185, -185, -185,
1071 98, 57, 47, -185, 60, -185, -12, -185, -185
1074 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1075 Performed when YYTABLE does not specify something else to do. Zero
1076 means the default is an error. */
1077 static const yytype_uint16 yydefact[] =
1079 0, 0, 0, 24, 58, 231, 0, 71, 0, 0,
1080 243, 234, 0, 224, 0, 0, 236, 0, 256, 0,
1081 0, 237, 235, 0, 238, 25, 0, 0, 0, 0,
1082 257, 232, 0, 23, 0, 239, 22, 0, 0, 0,
1083 0, 0, 240, 21, 0, 0, 0, 233, 0, 0,
1084 0, 0, 0, 56, 57, 292, 0, 2, 0, 7,
1085 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1086 16, 17, 18, 0, 0, 0, 0, 217, 0, 218,
1087 19, 0, 5, 62, 63, 64, 195, 196, 197, 198,
1088 201, 199, 200, 202, 190, 192, 193, 194, 154, 155,
1089 156, 126, 152, 0, 241, 225, 189, 101, 102, 103,
1090 104, 108, 105, 106, 107, 109, 29, 30, 28, 0,
1091 26, 0, 6, 65, 66, 253, 226, 252, 285, 59,
1092 61, 160, 161, 162, 163, 164, 165, 166, 167, 127,
1093 158, 0, 60, 70, 283, 227, 67, 268, 269, 270,
1094 271, 272, 273, 274, 265, 267, 134, 29, 30, 134,
1095 134, 26, 68, 188, 186, 187, 182, 184, 0, 0,
1096 228, 96, 100, 97, 207, 208, 209, 210, 211, 212,
1097 213, 214, 215, 216, 203, 205, 0, 91, 86, 0,
1098 87, 95, 93, 94, 92, 90, 88, 89, 80, 82,
1099 0, 0, 247, 279, 0, 69, 278, 280, 276, 230,
1100 1, 0, 4, 31, 55, 290, 289, 219, 220, 221,
1101 222, 264, 263, 262, 0, 0, 79, 75, 76, 77,
1102 78, 0, 72, 0, 191, 151, 153, 242, 98, 0,
1103 178, 179, 180, 181, 0, 0, 176, 177, 168, 170,
1104 0, 0, 27, 223, 251, 284, 157, 159, 282, 266,
1105 130, 134, 134, 133, 128, 0, 183, 185, 0, 99,
1106 204, 206, 288, 286, 287, 85, 81, 83, 84, 229,
1107 0, 277, 275, 3, 20, 258, 259, 260, 255, 261,
1108 254, 296, 297, 0, 0, 0, 74, 73, 118, 117,
1109 0, 115, 116, 0, 110, 113, 114, 174, 175, 173,
1110 169, 171, 172, 136, 137, 138, 139, 140, 141, 142,
1111 143, 144, 145, 146, 147, 148, 149, 150, 135, 131,
1112 132, 134, 246, 0, 0, 248, 0, 37, 38, 39,
1113 54, 47, 49, 48, 51, 40, 41, 42, 43, 50,
1114 52, 44, 32, 33, 36, 34, 0, 35, 0, 0,
1115 0, 0, 299, 0, 294, 0, 111, 125, 121, 123,
1116 119, 120, 122, 124, 112, 129, 245, 244, 250, 249,
1117 0, 45, 46, 53, 0, 293, 291, 298, 0, 295,
1118 281, 302, 0, 0, 0, 0, 0, 304, 0, 0,
1119 300, 303, 301, 0, 0, 309, 310, 311, 312, 313,
1120 0, 0, 0, 305, 0, 307, 0, 306, 308
1123 /* YYPGOTO[NTERM-NUM]. */
1124 static const yytype_int16 yypgoto[] =
1126 -185, -185, -185, -44, -185, -185, -15, -38, -185, -185,
1127 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1128 -185, -185, -185, -185, -185, -185, 28, -185, -185, -185,
1129 -185, -36, -185, -185, -185, -185, -185, -185, -152, -185,
1130 -185, 146, -185, -185, 111, -185, -185, -185, 3, -185,
1131 -185, -185, -185, 89, -185, -185, 245, -66, -185, -185,
1132 -185, -185, 72, -185, -185, -185, -185, -185, -185, -185,
1133 -185, -185, -185, -185, -185, 137, -185, -185, -185, -185,
1134 -185, -185, 110, -185, -185, 70, -185, -185, 236, 27,
1135 -184, -185, -185, -185, -17, -185, -185, -81, -185, -185,
1136 -185, -113, -185, -126, -185
1139 /* YYDEFGOTO[NTERM-NUM]. */
1140 static const yytype_int16 yydefgoto[] =
1142 -1, 56, 57, 58, 59, 60, 128, 120, 121, 284,
1143 352, 353, 354, 355, 356, 357, 358, 61, 62, 63,
1144 64, 85, 232, 233, 65, 198, 199, 200, 201, 66,
1145 171, 115, 238, 304, 305, 306, 374, 67, 260, 328,
1146 101, 102, 103, 139, 140, 141, 68, 248, 249, 250,
1147 251, 69, 166, 167, 168, 70, 94, 95, 96, 97,
1148 71, 184, 185, 186, 72, 73, 74, 75, 76, 105,
1149 170, 377, 279, 335, 126, 127, 77, 78, 290, 224,
1150 79, 154, 155, 209, 205, 206, 207, 145, 129, 275,
1151 217, 80, 81, 293, 294, 295, 361, 362, 393, 363,
1152 396, 397, 410, 411, 412
1155 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1156 positive, shift that token. If negative, reduce the rule whose
1157 number is the opposite. If YYTABLE_NINF, syntax error. */
1158 static const yytype_int16 yytable[] =
1160 119, 161, 271, 285, 272, 203, 381, 263, 264, 172,
1161 239, 333, 202, 211, 82, 107, 367, 278, 359, 108,
1162 215, 395, 298, 221, 160, 86, 273, 83, 234, 87,
1163 299, 400, 84, 300, 104, 88, 226, 122, 368, 116,
1164 234, 117, 147, 148, 222, 213, 123, 214, 124, 216,
1165 240, 241, 242, 243, 98, 291, 292, 156, 125, 227,
1166 149, 130, 228, 286, 359, 287, 311, 143, 223, 144,
1167 386, 301, 146, 163, 162, 169, 208, 109, 253, 1,
1168 173, 334, 118, 210, 212, 218, 89, 219, 2, 220,
1169 225, 237, 3, 4, 5, 236, 157, 252, 158, 150,
1170 6, 7, 302, 291, 292, 257, 258, 8, 9, 329,
1171 330, 10, 261, 11, 255, 12, 13, 369, 382, 14,
1172 90, 91, 110, 262, 370, 265, 164, 255, 15, 151,
1173 111, 118, 16, 112, 274, 269, 267, 92, 17, 204,
1174 18, 371, 99, 277, 229, 230, 244, 100, 268, 19,
1175 20, 231, 280, 21, 22, 113, 288, 283, 23, 24,
1176 114, 282, 25, 26, 245, 303, 296, 297, 93, 246,
1177 247, 27, 131, 132, 133, 134, 307, 289, 159, 375,
1178 165, 389, 309, 308, 28, 29, 30, 332, 118, 336,
1179 372, 31, 174, 373, 152, 365, 366, 364, 376, 153,
1180 32, 379, 380, 135, 33, 136, 34, 137, 35, 36,
1181 398, 383, 390, 138, 384, 403, 385, 175, 37, 38,
1182 39, 40, 41, 42, 43, 44, 276, 331, 45, 388,
1183 46, 394, 418, 392, 399, 176, 395, 402, 177, 47,
1184 415, 416, 404, 417, 48, 49, 50, 235, 51, 52,
1185 256, 310, 53, 54, 2, 266, 270, 106, 3, 4,
1186 5, -6, 55, 254, 259, 142, 6, 7, 405, 406,
1187 407, 408, 409, 8, 9, 281, 360, 10, 312, 11,
1188 387, 12, 13, 401, 414, 14, 0, 405, 406, 407,
1189 408, 409, 0, 0, 15, 378, 413, 0, 16, 0,
1190 0, 0, 0, 0, 17, 0, 18, 0, 0, 0,
1191 0, 178, 0, 0, 0, 19, 20, 0, 0, 21,
1192 22, 0, 0, 0, 23, 24, 0, 0, 25, 26,
1193 0, 0, 0, 0, 0, 0, 0, 27, 0, 179,
1194 180, 181, 182, 0, 0, 0, 0, 183, 0, 0,
1195 28, 29, 30, 0, 0, 0, 0, 31, 0, 0,
1196 0, 0, 0, 0, 0, 0, 32, 0, 0, 391,
1197 33, 0, 34, 0, 35, 36, 0, 0, 0, 0,
1198 0, 0, 0, 0, 37, 38, 39, 40, 41, 42,
1199 43, 44, 0, 0, 45, 0, 46, 0, 0, 0,
1200 0, 0, 0, 0, 0, 47, 0, 0, 0, 0,
1201 48, 49, 50, 0, 51, 52, 0, 2, 53, 54,
1202 0, 3, 4, 5, 0, 0, 0, -6, 55, 6,
1203 7, 0, 0, 0, 0, 0, 8, 9, 313, 0,
1204 10, 0, 11, 0, 12, 13, 314, 0, 14, 0,
1205 0, 0, 0, 0, 0, 0, 0, 15, 0, 0,
1206 0, 16, 0, 0, 315, 316, 0, 17, 317, 18,
1207 0, 0, 0, 337, 318, 0, 0, 0, 19, 20,
1208 0, 338, 21, 22, 0, 0, 0, 23, 24, 0,
1209 0, 25, 26, 0, 0, 0, 0, 0, 0, 0,
1210 27, 319, 320, 0, 0, 321, 322, 0, 323, 324,
1211 325, 0, 326, 28, 29, 30, 0, 339, 340, 0,
1212 31, 0, 0, 0, 0, 0, 0, 0, 0, 32,
1213 0, 0, 0, 33, 341, 34, 187, 35, 36, 0,
1214 0, 0, 188, 0, 189, 0, 0, 37, 38, 39,
1215 40, 41, 42, 43, 44, 0, 342, 45, 0, 46,
1216 0, 0, 0, 0, 343, 0, 344, 327, 47, 0,
1217 0, 190, 0, 48, 49, 50, 0, 51, 52, 0,
1218 345, 53, 54, 0, 0, 0, 0, 0, 0, 0,
1219 0, 55, 0, 0, 0, 0, 0, 346, 347, 0,
1220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1221 0, 191, 0, 192, 0, 0, 0, 0, 0, 193,
1222 0, 194, 0, 0, 195, 0, 0, 0, 0, 0,
1223 0, 0, 0, 348, 0, 349, 0, 0, 0, 0,
1224 350, 0, 0, 0, 351, 0, 196, 197
1227 static const yytype_int16 yycheck[] =
1229 15, 39, 186, 5, 39, 61, 61, 159, 160, 45,
1230 3, 62, 50, 57, 183, 20, 4, 201, 146, 24,
1231 32, 188, 29, 34, 39, 8, 61, 61, 94, 12,
1232 37, 198, 61, 40, 158, 18, 28, 158, 26, 66,
1233 106, 68, 7, 8, 55, 60, 158, 62, 158, 61,
1234 43, 44, 45, 46, 11, 185, 186, 27, 158, 51,
1235 25, 61, 54, 65, 146, 67, 250, 158, 79, 158,
1236 198, 78, 61, 42, 61, 158, 61, 82, 122, 1,
1237 158, 132, 158, 0, 183, 61, 69, 158, 10, 158,
1238 197, 32, 14, 15, 16, 61, 66, 158, 68, 64,
1239 22, 23, 109, 185, 186, 61, 158, 29, 30, 261,
1240 262, 33, 27, 35, 129, 37, 38, 105, 173, 41,
1241 103, 104, 127, 27, 112, 86, 95, 142, 50, 94,
1242 135, 158, 54, 138, 169, 171, 61, 120, 60, 195,
1243 62, 129, 99, 61, 136, 137, 139, 104, 194, 71,
1244 72, 143, 61, 75, 76, 160, 158, 183, 80, 81,
1245 165, 61, 84, 85, 157, 172, 61, 158, 151, 162,
1246 163, 93, 56, 57, 58, 59, 158, 179, 148, 331,
1247 149, 365, 61, 158, 106, 107, 108, 158, 158, 36,
1248 178, 113, 6, 181, 159, 194, 158, 183, 27, 164,
1249 122, 61, 61, 87, 126, 89, 128, 91, 130, 131,
1250 394, 158, 196, 97, 194, 399, 183, 31, 140, 141,
1251 142, 143, 144, 145, 146, 147, 198, 265, 150, 197,
1252 152, 194, 416, 187, 194, 49, 188, 183, 52, 161,
1253 183, 194, 197, 183, 166, 167, 168, 101, 170, 171,
1254 139, 248, 174, 175, 10, 166, 184, 12, 14, 15,
1255 16, 183, 184, 126, 154, 29, 22, 23, 189, 190,
1256 191, 192, 193, 29, 30, 205, 293, 33, 251, 35,
1257 361, 37, 38, 396, 410, 41, -1, 189, 190, 191,
1258 192, 193, -1, -1, 50, 333, 198, -1, 54, -1,
1259 -1, -1, -1, -1, 60, -1, 62, -1, -1, -1,
1260 -1, 125, -1, -1, -1, 71, 72, -1, -1, 75,
1261 76, -1, -1, -1, 80, 81, -1, -1, 84, 85,
1262 -1, -1, -1, -1, -1, -1, -1, 93, -1, 153,
1263 154, 155, 156, -1, -1, -1, -1, 161, -1, -1,
1264 106, 107, 108, -1, -1, -1, -1, 113, -1, -1,
1265 -1, -1, -1, -1, -1, -1, 122, -1, -1, 384,
1266 126, -1, 128, -1, 130, 131, -1, -1, -1, -1,
1267 -1, -1, -1, -1, 140, 141, 142, 143, 144, 145,
1268 146, 147, -1, -1, 150, -1, 152, -1, -1, -1,
1269 -1, -1, -1, -1, -1, 161, -1, -1, -1, -1,
1270 166, 167, 168, -1, 170, 171, -1, 10, 174, 175,
1271 -1, 14, 15, 16, -1, -1, -1, 183, 184, 22,
1272 23, -1, -1, -1, -1, -1, 29, 30, 47, -1,
1273 33, -1, 35, -1, 37, 38, 55, -1, 41, -1,
1274 -1, -1, -1, -1, -1, -1, -1, 50, -1, -1,
1275 -1, 54, -1, -1, 73, 74, -1, 60, 77, 62,
1276 -1, -1, -1, 9, 83, -1, -1, -1, 71, 72,
1277 -1, 17, 75, 76, -1, -1, -1, 80, 81, -1,
1278 -1, 84, 85, -1, -1, -1, -1, -1, -1, -1,
1279 93, 110, 111, -1, -1, 114, 115, -1, 117, 118,
1280 119, -1, 121, 106, 107, 108, -1, 53, 54, -1,
1281 113, -1, -1, -1, -1, -1, -1, -1, -1, 122,
1282 -1, -1, -1, 126, 70, 128, 13, 130, 131, -1,
1283 -1, -1, 19, -1, 21, -1, -1, 140, 141, 142,
1284 143, 144, 145, 146, 147, -1, 92, 150, -1, 152,
1285 -1, -1, -1, -1, 100, -1, 102, 176, 161, -1,
1286 -1, 48, -1, 166, 167, 168, -1, 170, 171, -1,
1287 116, 174, 175, -1, -1, -1, -1, -1, -1, -1,
1288 -1, 184, -1, -1, -1, -1, -1, 133, 134, -1,
1289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1290 -1, 88, -1, 90, -1, -1, -1, -1, -1, 96,
1291 -1, 98, -1, -1, 101, -1, -1, -1, -1, -1,
1292 -1, -1, -1, 169, -1, 171, -1, -1, -1, -1,
1293 176, -1, -1, -1, 180, -1, 123, 124
1296 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1297 symbol of state STATE-NUM. */
1298 static const yytype_uint16 yystos[] =
1300 0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
1301 33, 35, 37, 38, 41, 50, 54, 60, 62, 71,
1302 72, 75, 76, 80, 81, 84, 85, 93, 106, 107,
1303 108, 113, 122, 126, 128, 130, 131, 140, 141, 142,
1304 143, 144, 145, 146, 147, 150, 152, 161, 166, 167,
1305 168, 170, 171, 174, 175, 184, 200, 201, 202, 203,
1306 204, 216, 217, 218, 219, 223, 228, 236, 245, 250,
1307 254, 259, 263, 264, 265, 266, 267, 275, 276, 279,
1308 290, 291, 183, 61, 61, 220, 8, 12, 18, 69,
1309 103, 104, 120, 151, 255, 256, 257, 258, 11, 99,
1310 104, 239, 240, 241, 158, 268, 255, 20, 24, 82,
1311 127, 135, 138, 160, 165, 230, 66, 68, 158, 205,
1312 206, 207, 158, 158, 158, 158, 273, 274, 205, 287,
1313 61, 56, 57, 58, 59, 87, 89, 91, 97, 242,
1314 243, 244, 287, 158, 158, 286, 61, 7, 8, 25,
1315 64, 94, 159, 164, 280, 281, 27, 66, 68, 148,
1316 205, 206, 61, 42, 95, 149, 251, 252, 253, 158,
1317 269, 229, 230, 158, 6, 31, 49, 52, 125, 153,
1318 154, 155, 156, 161, 260, 261, 262, 13, 19, 21,
1319 48, 88, 90, 96, 98, 101, 123, 124, 224, 225,
1320 226, 227, 206, 61, 195, 283, 284, 285, 61, 282,
1321 0, 202, 183, 205, 205, 32, 61, 289, 61, 158,
1322 158, 34, 55, 79, 278, 197, 28, 51, 54, 136,
1323 137, 143, 221, 222, 256, 240, 61, 32, 231, 3,
1324 43, 44, 45, 46, 139, 157, 162, 163, 246, 247,
1325 248, 249, 158, 202, 274, 205, 243, 61, 158, 281,
1326 237, 27, 27, 237, 237, 86, 252, 61, 194, 230,
1327 261, 289, 39, 61, 169, 288, 225, 61, 289, 271,
1328 61, 284, 61, 183, 208, 5, 65, 67, 158, 179,
1329 277, 185, 186, 292, 293, 294, 61, 158, 29, 37,
1330 40, 78, 109, 172, 232, 233, 234, 158, 158, 61,
1331 247, 289, 288, 47, 55, 73, 74, 77, 83, 110,
1332 111, 114, 115, 117, 118, 119, 121, 176, 238, 237,
1333 237, 206, 158, 62, 132, 272, 36, 9, 17, 53,
1334 54, 70, 92, 100, 102, 116, 133, 134, 169, 171,
1335 176, 180, 209, 210, 211, 212, 213, 214, 215, 146,
1336 293, 295, 296, 298, 183, 194, 158, 4, 26, 105,
1337 112, 129, 178, 181, 235, 237, 27, 270, 206, 61,
1338 61, 61, 173, 158, 194, 183, 198, 296, 197, 289,
1339 196, 205, 187, 297, 194, 188, 299, 300, 289, 194,
1340 198, 300, 183, 289, 197, 189, 190, 191, 192, 193,
1341 301, 302, 303, 198, 302, 183, 194, 183, 289
1344 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1345 static const yytype_uint16 yyr1[] =
1347 0, 199, 200, 201, 201, 201, 202, 202, 202, 202,
1348 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
1349 203, 204, 204, 204, 204, 204, 205, 205, 206, 207,
1350 207, 208, 208, 209, 209, 209, 210, 211, 211, 211,
1351 211, 211, 211, 211, 211, 212, 212, 213, 213, 213,
1352 213, 213, 213, 214, 215, 216, 217, 217, 218, 218,
1353 218, 218, 219, 219, 219, 219, 219, 219, 219, 219,
1354 219, 220, 220, 221, 221, 222, 222, 222, 222, 222,
1355 223, 224, 224, 225, 225, 225, 226, 226, 226, 226,
1356 226, 226, 227, 227, 227, 227, 228, 228, 228, 229,
1357 229, 230, 230, 230, 230, 230, 230, 230, 230, 231,
1358 231, 232, 232, 232, 232, 233, 233, 234, 234, 235,
1359 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
1360 236, 236, 236, 236, 237, 237, 238, 238, 238, 238,
1361 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1362 238, 239, 239, 240, 241, 241, 241, 242, 242, 243,
1363 244, 244, 244, 244, 244, 244, 244, 244, 245, 246,
1364 246, 247, 247, 247, 247, 247, 248, 248, 249, 249,
1365 249, 249, 250, 251, 251, 252, 253, 253, 253, 254,
1366 254, 255, 255, 256, 256, 257, 257, 257, 257, 257,
1367 257, 258, 258, 259, 260, 260, 261, 262, 262, 262,
1368 262, 262, 262, 262, 262, 262, 262, 263, 263, 263,
1369 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
1370 263, 264, 264, 264, 265, 265, 266, 266, 267, 267,
1371 267, 268, 268, 268, 269, 270, 270, 271, 271, 272,
1372 272, 273, 273, 274, 275, 275, 276, 276, 277, 277,
1373 277, 277, 278, 278, 278, 279, 280, 280, 281, 281,
1374 281, 281, 281, 281, 281, 282, 282, 283, 283, 284,
1375 284, 285, 286, 286, 287, 287, 288, 288, 288, 289,
1376 289, 290, 291, 292, 292, 293, 294, 294, 295, 295,
1377 296, 297, 298, 299, 299, 300, 301, 301, 302, 303,
1381 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1382 static const yytype_uint8 yyr2[] =
1384 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1386 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1387 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1388 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1389 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1390 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1391 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1392 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1393 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
1394 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1395 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1396 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
1397 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
1398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1399 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
1400 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
1401 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
1402 1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
1403 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1404 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1405 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1406 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
1407 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1408 1, 1, 2, 0, 4, 1, 0, 0, 2, 2,
1409 2, 2, 1, 1, 3, 3, 1, 1, 1, 1,
1410 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1411 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1412 1, 5, 2, 1, 2, 1, 1, 1, 1, 1,
1413 1, 5, 1, 3, 2, 3, 1, 1, 2, 1,
1414 5, 4, 3, 2, 1, 6, 3, 2, 3, 1,
1419 #define yyerrok (yyerrstatus = 0)
1420 #define yyclearin (yychar = YYEMPTY)
1421 #define YYEMPTY (-2)
1424 #define YYACCEPT goto yyacceptlab
1425 #define YYABORT goto yyabortlab
1426 #define YYERROR goto yyerrorlab
1429 #define YYRECOVERING() (!!yyerrstatus)
1431 #define YYBACKUP(Token, Value) \
1433 if (yychar == YYEMPTY) \
1437 YYPOPSTACK (yylen); \
1443 yyerror (YY_("syntax error: cannot back up")); \
1448 /* Error token number */
1450 #define YYERRCODE 256
1454 /* Enable debugging if requested. */
1458 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1459 # define YYFPRINTF fprintf
1462 # define YYDPRINTF(Args) \
1468 /* This macro is provided for backward compatibility. */
1469 #ifndef YY_LOCATION_PRINT
1470 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1474 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1478 YYFPRINTF (stderr, "%s ", Title); \
1479 yy_symbol_print (stderr, \
1481 YYFPRINTF (stderr, "\n"); \
1486 /*----------------------------------------.
1487 | Print this symbol's value on YYOUTPUT. |
1488 `----------------------------------------*/
1491 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1493 FILE *yyo = yyoutput;
1498 if (yytype < YYNTOKENS)
1499 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1505 /*--------------------------------.
1506 | Print this symbol on YYOUTPUT. |
1507 `--------------------------------*/
1510 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1512 YYFPRINTF (yyoutput, "%s %s (",
1513 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1515 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1516 YYFPRINTF (yyoutput, ")");
1519 /*------------------------------------------------------------------.
1520 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1522 `------------------------------------------------------------------*/
1525 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1527 YYFPRINTF (stderr, "Stack now");
1528 for (; yybottom <= yytop; yybottom++)
1530 int yybot = *yybottom;
1531 YYFPRINTF (stderr, " %d", yybot);
1533 YYFPRINTF (stderr, "\n");
1536 # define YY_STACK_PRINT(Bottom, Top) \
1539 yy_stack_print ((Bottom), (Top)); \
1543 /*------------------------------------------------.
1544 | Report that the YYRULE is going to be reduced. |
1545 `------------------------------------------------*/
1548 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1550 unsigned long int yylno = yyrline[yyrule];
1551 int yynrhs = yyr2[yyrule];
1553 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1555 /* The symbols being reduced. */
1556 for (yyi = 0; yyi < yynrhs; yyi++)
1558 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1559 yy_symbol_print (stderr,
1560 yystos[yyssp[yyi + 1 - yynrhs]],
1561 &(yyvsp[(yyi + 1) - (yynrhs)])
1563 YYFPRINTF (stderr, "\n");
1567 # define YY_REDUCE_PRINT(Rule) \
1570 yy_reduce_print (yyssp, yyvsp, Rule); \
1573 /* Nonzero means print parse trace. It is left uninitialized so that
1574 multiple parsers can coexist. */
1576 #else /* !YYDEBUG */
1577 # define YYDPRINTF(Args)
1578 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1579 # define YY_STACK_PRINT(Bottom, Top)
1580 # define YY_REDUCE_PRINT(Rule)
1581 #endif /* !YYDEBUG */
1584 /* YYINITDEPTH -- initial size of the parser's stacks. */
1586 # define YYINITDEPTH 200
1589 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1590 if the built-in stack extension method is used).
1592 Do not make this value too large; the results are undefined if
1593 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1594 evaluated with infinite-precision integer arithmetic. */
1597 # define YYMAXDEPTH 10000
1604 # if defined __GLIBC__ && defined _STRING_H
1605 # define yystrlen strlen
1607 /* Return the length of YYSTR. */
1609 yystrlen (const char *yystr)
1612 for (yylen = 0; yystr[yylen]; yylen++)
1620 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1621 # define yystpcpy stpcpy
1623 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1626 yystpcpy (char *yydest, const char *yysrc)
1629 const char *yys = yysrc;
1631 while ((*yyd++ = *yys++) != '\0')
1640 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1641 quotes and backslashes, so that it's suitable for yyerror. The
1642 heuristic is that double-quoting is unnecessary unless the string
1643 contains an apostrophe, a comma, or backslash (other than
1644 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1645 null, do not copy; instead, return the length of what the result
1648 yytnamerr (char *yyres, const char *yystr)
1653 char const *yyp = yystr;
1660 goto do_not_strip_quotes;
1664 goto do_not_strip_quotes;
1677 do_not_strip_quotes: ;
1681 return yystrlen (yystr);
1683 return yystpcpy (yyres, yystr) - yyres;
1687 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1688 about the unexpected token YYTOKEN for the state stack whose top is
1691 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1692 not large enough to hold the message. In that case, also set
1693 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1694 required number of bytes is too large to store. */
1696 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1697 yytype_int16 *yyssp, int yytoken)
1699 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1700 YYSIZE_T yysize = yysize0;
1701 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1702 /* Internationalized format string. */
1703 const char *yyformat = YY_NULLPTR;
1704 /* Arguments of yyformat. */
1705 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1706 /* Number of reported tokens (one for the "unexpected", one per
1710 /* There are many possibilities here to consider:
1711 - If this state is a consistent state with a default action, then
1712 the only way this function was invoked is if the default action
1713 is an error action. In that case, don't check for expected
1714 tokens because there are none.
1715 - The only way there can be no lookahead present (in yychar) is if
1716 this state is a consistent state with a default action. Thus,
1717 detecting the absence of a lookahead is sufficient to determine
1718 that there is no unexpected or expected token to report. In that
1719 case, just report a simple "syntax error".
1720 - Don't assume there isn't a lookahead just because this state is a
1721 consistent state with a default action. There might have been a
1722 previous inconsistent state, consistent state with a non-default
1723 action, or user semantic action that manipulated yychar.
1724 - Of course, the expected token list depends on states to have
1725 correct lookahead information, and it depends on the parser not
1726 to perform extra reductions after fetching a lookahead from the
1727 scanner and before detecting a syntax error. Thus, state merging
1728 (from LALR or IELR) and default reductions corrupt the expected
1729 token list. However, the list is correct for canonical LR with
1730 one exception: it will still contain any token that will not be
1731 accepted due to an error action in a later state.
1733 if (yytoken != YYEMPTY)
1735 int yyn = yypact[*yyssp];
1736 yyarg[yycount++] = yytname[yytoken];
1737 if (!yypact_value_is_default (yyn))
1739 /* Start YYX at -YYN if negative to avoid negative indexes in
1740 YYCHECK. In other words, skip the first -YYN actions for
1741 this state because they are default actions. */
1742 int yyxbegin = yyn < 0 ? -yyn : 0;
1743 /* Stay within bounds of both yycheck and yytname. */
1744 int yychecklim = YYLAST - yyn + 1;
1745 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1748 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1749 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1750 && !yytable_value_is_error (yytable[yyx + yyn]))
1752 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1758 yyarg[yycount++] = yytname[yyx];
1760 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1761 if (! (yysize <= yysize1
1762 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1772 # define YYCASE_(N, S) \
1776 YYCASE_(0, YY_("syntax error"));
1777 YYCASE_(1, YY_("syntax error, unexpected %s"));
1778 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1779 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1780 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1781 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1786 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1787 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1792 if (*yymsg_alloc < yysize)
1794 *yymsg_alloc = 2 * yysize;
1795 if (! (yysize <= *yymsg_alloc
1796 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1797 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1801 /* Avoid sprintf, as that infringes on the user's name space.
1802 Don't have undefined behavior even if the translation
1803 produced a string with the wrong number of "%s"s. */
1807 while ((*yyp = *yyformat) != '\0')
1808 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1810 yyp += yytnamerr (yyp, yyarg[yyi++]);
1821 #endif /* YYERROR_VERBOSE */
1823 /*-----------------------------------------------.
1824 | Release the memory associated to this symbol. |
1825 `-----------------------------------------------*/
1828 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1833 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1835 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1837 YY_IGNORE_MAYBE_UNINITIALIZED_END
1843 /* The lookahead symbol. */
1846 /* The semantic value of the lookahead symbol. */
1848 /* Number of syntax errors so far. */
1860 /* Number of tokens to shift before error messages enabled. */
1863 /* The stacks and their tools:
1864 'yyss': related to states.
1865 'yyvs': related to semantic values.
1867 Refer to the stacks through separate pointers, to allow yyoverflow
1868 to reallocate them elsewhere. */
1870 /* The state stack. */
1871 yytype_int16 yyssa[YYINITDEPTH];
1873 yytype_int16 *yyssp;
1875 /* The semantic value stack. */
1876 YYSTYPE yyvsa[YYINITDEPTH];
1880 YYSIZE_T yystacksize;
1884 /* Lookahead token as an internal (translated) token number. */
1886 /* The variables used to return semantic value and location from the
1891 /* Buffer for error messages, and its allocated size. */
1893 char *yymsg = yymsgbuf;
1894 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1897 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1899 /* The number of symbols on the RHS of the reduced rule.
1900 Keep to zero when no symbol should be popped. */
1903 yyssp = yyss = yyssa;
1904 yyvsp = yyvs = yyvsa;
1905 yystacksize = YYINITDEPTH;
1907 YYDPRINTF ((stderr, "Starting parse\n"));
1912 yychar = YYEMPTY; /* Cause a token to be read. */
1915 /*------------------------------------------------------------.
1916 | yynewstate -- Push a new state, which is found in yystate. |
1917 `------------------------------------------------------------*/
1919 /* In all cases, when you get here, the value and location stacks
1920 have just been pushed. So pushing a state here evens the stacks. */
1926 if (yyss + yystacksize - 1 <= yyssp)
1928 /* Get the current used size of the three stacks, in elements. */
1929 YYSIZE_T yysize = yyssp - yyss + 1;
1933 /* Give user a chance to reallocate the stack. Use copies of
1934 these so that the &'s don't force the real ones into
1936 YYSTYPE *yyvs1 = yyvs;
1937 yytype_int16 *yyss1 = yyss;
1939 /* Each stack pointer address is followed by the size of the
1940 data in use in that stack, in bytes. This used to be a
1941 conditional around just the two extra args, but that might
1942 be undefined if yyoverflow is a macro. */
1943 yyoverflow (YY_("memory exhausted"),
1944 &yyss1, yysize * sizeof (*yyssp),
1945 &yyvs1, yysize * sizeof (*yyvsp),
1951 #else /* no yyoverflow */
1952 # ifndef YYSTACK_RELOCATE
1953 goto yyexhaustedlab;
1955 /* Extend the stack our own way. */
1956 if (YYMAXDEPTH <= yystacksize)
1957 goto yyexhaustedlab;
1959 if (YYMAXDEPTH < yystacksize)
1960 yystacksize = YYMAXDEPTH;
1963 yytype_int16 *yyss1 = yyss;
1964 union yyalloc *yyptr =
1965 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1967 goto yyexhaustedlab;
1968 YYSTACK_RELOCATE (yyss_alloc, yyss);
1969 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1970 # undef YYSTACK_RELOCATE
1972 YYSTACK_FREE (yyss1);
1975 #endif /* no yyoverflow */
1977 yyssp = yyss + yysize - 1;
1978 yyvsp = yyvs + yysize - 1;
1980 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1981 (unsigned long int) yystacksize));
1983 if (yyss + yystacksize - 1 <= yyssp)
1987 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1989 if (yystate == YYFINAL)
1999 /* Do appropriate processing given the current state. Read a
2000 lookahead token if we need one and don't already have one. */
2002 /* First try to decide what to do without reference to lookahead token. */
2003 yyn = yypact[yystate];
2004 if (yypact_value_is_default (yyn))
2007 /* Not known => get a lookahead token if don't already have one. */
2009 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2010 if (yychar == YYEMPTY)
2012 YYDPRINTF ((stderr, "Reading a token: "));
2016 if (yychar <= YYEOF)
2018 yychar = yytoken = YYEOF;
2019 YYDPRINTF ((stderr, "Now at end of input.\n"));
2023 yytoken = YYTRANSLATE (yychar);
2024 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2027 /* If the proper action on seeing token YYTOKEN is to reduce or to
2028 detect an error, take that action. */
2030 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2035 if (yytable_value_is_error (yyn))
2041 /* Count tokens shifted since error; after three, turn off error
2046 /* Shift the lookahead token. */
2047 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2049 /* Discard the shifted token. */
2053 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2055 YY_IGNORE_MAYBE_UNINITIALIZED_END
2060 /*-----------------------------------------------------------.
2061 | yydefault -- do the default action for the current state. |
2062 `-----------------------------------------------------------*/
2064 yyn = yydefact[yystate];
2070 /*-----------------------------.
2071 | yyreduce -- Do a reduction. |
2072 `-----------------------------*/
2074 /* yyn is the number of a rule to reduce with. */
2077 /* If YYLEN is nonzero, implement the default value of the action:
2080 Otherwise, the following line sets YYVAL to garbage.
2081 This behavior is undocumented and Bison
2082 users should not rely upon it. Assigning to YYVAL
2083 unconditionally makes the parser a bit smaller, and it avoids a
2084 GCC warning that YYVAL may be used uninitialized. */
2085 yyval = yyvsp[1-yylen];
2088 YY_REDUCE_PRINT (yyn);
2092 #line 373 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2094 /* I will need to incorporate much more fine grained
2095 * error messages. The following should suffice for
2098 struct FILE_INFO * ip_ctx = lex_current();
2100 "syntax error in %s line %d, column %d",
2102 ip_ctx->errpos.nline,
2103 ip_ctx->errpos.ncol);
2105 #line 2106 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2109 #line 409 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2113 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2114 APPEND_G_FIFO(cfgt.peers, my_node);
2116 #line 2117 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2120 #line 428 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2121 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2122 #line 2123 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2126 #line 433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2127 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2128 #line 2129 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2132 #line 438 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2133 { (yyval.Integer) = AF_INET; }
2134 #line 2135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2138 #line 440 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2139 { (yyval.Integer) = AF_INET6; }
2140 #line 2141 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2144 #line 445 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2145 { (yyval.Attr_val_fifo) = NULL; }
2146 #line 2147 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2150 #line 447 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2152 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2153 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2155 #line 2156 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2159 #line 461 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2160 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2161 #line 2162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2165 #line 477 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2166 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2167 #line 2168 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2171 #line 479 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2172 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2173 #line 2174 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2177 #line 493 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2178 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2179 #line 2180 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2183 #line 507 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2185 unpeer_node *my_node;
2187 my_node = create_unpeer_node((yyvsp[0].Address_node));
2189 APPEND_G_FIFO(cfgt.unpeers, my_node);
2191 #line 2192 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2195 #line 528 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2196 { cfgt.broadcastclient = 1; }
2197 #line 2198 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2201 #line 530 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2202 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2203 #line 2204 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2207 #line 532 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2208 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2209 #line 2210 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2213 #line 534 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2214 { cfgt.mdnstries = (yyvsp[0].Integer); }
2215 #line 2216 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2219 #line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2223 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2224 APPEND_G_FIFO(cfgt.vars, atrv);
2226 #line 2227 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2230 #line 552 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2231 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2232 #line 2233 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2236 #line 554 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2238 cfgt.auth.cryptosw++;
2239 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2241 #line 2242 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2245 #line 559 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2246 { cfgt.auth.keys = (yyvsp[0].String); }
2247 #line 2248 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2251 #line 561 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2252 { cfgt.auth.keysdir = (yyvsp[0].String); }
2253 #line 2254 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2257 #line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2258 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2259 #line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2263 #line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2264 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2265 #line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2269 #line 567 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2271 cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
2273 // if (!cfgt.auth.trusted_key_list)
2274 // cfgt.auth.trusted_key_list = $2;
2276 // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
2278 #line 2279 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2282 #line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2283 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2284 #line 2285 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2288 #line 581 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2289 { (yyval.Attr_val_fifo) = NULL; }
2290 #line 2291 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2294 #line 583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2296 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2297 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2299 #line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2303 #line 591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2304 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2305 #line 2306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2309 #line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2311 (yyval.Attr_val) = NULL;
2312 cfgt.auth.revoke = (yyvsp[0].Integer);
2313 msyslog(LOG_WARNING,
2314 "'crypto revoke %d' is deprecated, "
2315 "please use 'revoke %d' instead.",
2316 cfgt.auth.revoke, cfgt.auth.revoke);
2318 #line 2319 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2322 #line 618 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2323 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2324 #line 2325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2328 #line 623 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2330 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2331 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2333 #line 2334 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2337 #line 628 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2339 (yyval.Attr_val_fifo) = NULL;
2340 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2342 #line 2343 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2346 #line 636 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2347 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2348 #line 2349 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2352 #line 638 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2353 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2354 #line 2355 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2358 #line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2359 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2360 #line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2364 #line 666 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2365 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2366 #line 2367 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2370 #line 668 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2372 if (lex_from_file()) {
2373 cfgt.stats_dir = (yyvsp[0].String);
2375 YYFREE((yyvsp[0].String));
2376 yyerror("statsdir remote configuration ignored");
2379 #line 2380 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2383 #line 677 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2387 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2388 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2390 #line 2391 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2394 #line 687 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2396 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2397 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2399 #line 2400 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2403 #line 692 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2405 (yyval.Int_fifo) = NULL;
2406 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2408 #line 2409 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2412 #line 711 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2413 { (yyval.Attr_val_fifo) = NULL; }
2414 #line 2415 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2418 #line 713 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2420 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2421 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2423 #line 2424 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2427 #line 721 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2429 if (lex_from_file()) {
2430 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2432 (yyval.Attr_val) = NULL;
2433 YYFREE((yyvsp[0].String));
2434 yyerror("filegen file remote config ignored");
2437 #line 2438 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2441 #line 731 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2443 if (lex_from_file()) {
2444 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2446 (yyval.Attr_val) = NULL;
2447 yyerror("filegen type remote config ignored");
2450 #line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2454 #line 740 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2458 if (lex_from_file()) {
2459 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2461 (yyval.Attr_val) = NULL;
2462 if (T_Link == (yyvsp[0].Integer))
2463 err = "filegen link remote config ignored";
2465 err = "filegen nolink remote config ignored";
2469 #line 2470 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2473 #line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2474 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2475 #line 2476 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2479 #line 785 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2481 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2483 #line 2484 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2487 #line 789 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2489 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2491 #line 2492 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2495 #line 793 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2499 rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
2500 lex_current()->curpos.nline);
2501 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2503 #line 2504 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2507 #line 801 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2511 rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
2512 lex_current()->curpos.nline);
2513 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2515 #line 2516 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2519 #line 809 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2523 rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
2524 lex_current()->curpos.nline);
2525 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2527 #line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2531 #line 817 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2535 rn = create_restrict_node(
2536 create_address_node(
2539 create_address_node(
2542 (yyvsp[0].Int_fifo),
2543 lex_current()->curpos.nline);
2544 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2546 #line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2550 #line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2554 rn = create_restrict_node(
2555 create_address_node(
2558 create_address_node(
2561 (yyvsp[0].Int_fifo),
2562 lex_current()->curpos.nline);
2563 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2565 #line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2569 #line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2573 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
2574 rn = create_restrict_node(
2575 NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2576 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2578 #line 2579 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2582 #line 859 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2583 { (yyval.Int_fifo) = NULL; }
2584 #line 2585 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2588 #line 861 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2590 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2591 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2593 #line 2594 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2597 #line 887 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2599 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2600 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2602 #line 2603 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2606 #line 892 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2608 (yyval.Attr_val_fifo) = NULL;
2609 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2611 #line 2612 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2615 #line 900 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2616 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2617 #line 2618 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2621 #line 911 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2623 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2624 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2626 #line 2627 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2630 #line 916 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2632 (yyval.Attr_val_fifo) = NULL;
2633 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2635 #line 2636 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2639 #line 924 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2640 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2641 #line 2642 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2645 #line 944 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2647 addr_opts_node *aon;
2649 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2650 APPEND_G_FIFO(cfgt.fudge, aon);
2652 #line 2653 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2656 #line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2658 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2659 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2661 #line 2662 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2665 #line 959 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2667 (yyval.Attr_val_fifo) = NULL;
2668 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2670 #line 2671 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2674 #line 967 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2675 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2676 #line 2677 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2680 #line 969 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2681 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2682 #line 2683 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2686 #line 971 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2688 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2689 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2691 (yyval.Attr_val) = NULL;
2692 yyerror("fudge factor: stratum value not in [0..16], ignored");
2695 #line 2696 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2699 #line 980 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2700 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2701 #line 2702 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2705 #line 982 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2706 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2707 #line 2708 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2711 #line 1003 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2712 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2713 #line 2714 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2717 #line 1008 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2719 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2720 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2722 #line 2723 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2726 #line 1013 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2728 (yyval.Attr_val_fifo) = NULL;
2729 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2731 #line 2732 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2735 #line 1021 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2736 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2737 #line 2738 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2741 #line 1037 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2742 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2743 #line 2744 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2747 #line 1039 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2748 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2749 #line 2750 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2753 #line 1044 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2755 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2756 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2758 #line 2759 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2762 #line 1049 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2764 (yyval.Attr_val_fifo) = NULL;
2765 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2767 #line 2768 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2771 #line 1057 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2772 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2773 #line 2774 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2777 #line 1059 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2779 if (lex_from_file()) {
2780 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2784 (yyval.Attr_val) = NULL;
2785 snprintf(err_str, sizeof(err_str),
2786 "enable/disable %s remote configuration ignored",
2787 keyword((yyvsp[0].Integer)));
2791 #line 2792 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2795 #line 1094 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2796 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2797 #line 2798 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2801 #line 1099 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2803 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2804 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2806 #line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2810 #line 1104 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2812 (yyval.Attr_val_fifo) = NULL;
2813 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2815 #line 2816 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2819 #line 1112 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2820 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2821 #line 2822 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2825 #line 1137 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2829 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2830 APPEND_G_FIFO(cfgt.vars, av);
2832 #line 2833 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2836 #line 1144 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2840 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2841 APPEND_G_FIFO(cfgt.vars, av);
2843 #line 2844 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2847 #line 1151 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2851 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2852 APPEND_G_FIFO(cfgt.vars, av);
2854 #line 2855 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2858 #line 1158 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2860 char error_text[64];
2863 if (lex_from_file()) {
2864 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2865 APPEND_G_FIFO(cfgt.vars, av);
2867 YYFREE((yyvsp[0].String));
2868 snprintf(error_text, sizeof(error_text),
2869 "%s remote config ignored",
2870 keyword((yyvsp[-1].Integer)));
2871 yyerror(error_text);
2874 #line 2875 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2878 #line 1174 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2880 if (!lex_from_file()) {
2881 YYFREE((yyvsp[-1].String)); /* avoid leak */
2882 yyerror("remote includefile ignored");
2885 if (lex_level() > MAXINCLUDELEVEL) {
2886 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2887 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2889 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
2890 if (!lex_push_file(path, "r")) {
2891 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
2892 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
2895 YYFREE((yyvsp[-1].String)); /* avoid leak */
2897 #line 2898 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2901 #line 1193 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2902 { lex_flush_stack(); }
2903 #line 2904 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2907 #line 1195 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2908 { /* see drift_parm below for actions */ }
2909 #line 2910 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2913 #line 1197 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2914 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2915 #line 2916 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2919 #line 1199 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2920 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2921 #line 2922 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2925 #line 1201 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2926 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2927 #line 2928 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2931 #line 1203 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2933 addr_opts_node *aon;
2935 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2936 APPEND_G_FIFO(cfgt.trap, aon);
2938 #line 2939 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2942 #line 1210 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2943 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
2944 #line 2945 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2948 #line 1225 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2951 yyerror("Built without LEAP_SMEAR support.");
2954 #line 2955 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2958 #line 1245 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2960 if (lex_from_file()) {
2962 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
2963 APPEND_G_FIFO(cfgt.vars, av);
2965 YYFREE((yyvsp[0].String));
2966 yyerror("driftfile remote configuration ignored");
2969 #line 2970 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2973 #line 1256 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2975 if (lex_from_file()) {
2977 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
2978 APPEND_G_FIFO(cfgt.vars, av);
2979 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
2980 APPEND_G_FIFO(cfgt.vars, av);
2982 YYFREE((yyvsp[-1].String));
2983 yyerror("driftfile remote configuration ignored");
2986 #line 2987 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
2990 #line 1269 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
2992 if (lex_from_file()) {
2994 av = create_attr_sval(T_Driftfile, estrdup(""));
2995 APPEND_G_FIFO(cfgt.vars, av);
2997 yyerror("driftfile remote configuration ignored");
3000 #line 3001 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3004 #line 1282 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3005 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3006 #line 3007 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3010 #line 1288 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3011 { (yyval.Integer) = 0; }
3012 #line 3013 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3016 #line 1293 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3017 { (yyval.Attr_val_fifo) = NULL; }
3018 #line 3019 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3022 #line 1295 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3024 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3025 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3027 #line 3028 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3031 #line 1303 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3032 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3033 #line 3034 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3037 #line 1305 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3039 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3040 destroy_address_node((yyvsp[0].Address_node));
3042 #line 3043 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3046 #line 1313 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3048 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3049 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3051 #line 3052 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3055 #line 1318 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3057 (yyval.Attr_val_fifo) = NULL;
3058 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3060 #line 3061 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3064 #line 1326 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3069 switch ((yyvsp[0].String)[0]) {
3074 prefix = (yyvsp[0].String)[0];
3075 type = (yyvsp[0].String) + 1;
3080 type = (yyvsp[0].String);
3083 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3084 YYFREE((yyvsp[0].String));
3086 #line 3087 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3090 #line 1351 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3094 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3095 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3097 #line 3098 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3101 #line 1358 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3105 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3106 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3108 #line 3109 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3112 #line 1386 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3113 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3114 #line 3115 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3118 #line 1391 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3120 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3121 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3123 #line 3124 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3127 #line 1396 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3129 (yyval.Int_fifo) = NULL;
3130 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3132 #line 3133 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3136 #line 1420 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3138 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3139 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3141 #line 3142 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3145 #line 1425 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3147 (yyval.Attr_val_fifo) = NULL;
3148 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3150 #line 3151 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3154 #line 1433 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3156 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3157 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3159 #line 3160 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3163 #line 1438 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3165 (yyval.Attr_val_fifo) = NULL;
3166 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3168 #line 3169 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3172 #line 1446 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3173 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3174 #line 3175 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3178 #line 1452 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3179 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3180 #line 3181 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3184 #line 1457 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3186 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3187 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3189 #line 3190 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3193 #line 1462 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3195 (yyval.String_fifo) = NULL;
3196 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3198 #line 3199 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3202 #line 1470 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3204 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3205 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3207 #line 3208 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3211 #line 1475 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3213 (yyval.Address_fifo) = NULL;
3214 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3216 #line 3217 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3220 #line 1483 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3222 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3223 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3224 (yyval.Integer) = 1;
3226 (yyval.Integer) = (yyvsp[0].Integer);
3229 #line 3230 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3233 #line 1491 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3234 { (yyval.Integer) = 1; }
3235 #line 3236 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3239 #line 1492 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3240 { (yyval.Integer) = 0; }
3241 #line 3242 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3245 #line 1496 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3246 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3247 #line 3248 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3251 #line 1507 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3255 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3256 APPEND_G_FIFO(cfgt.sim_details, sn);
3258 /* Revert from ; to \n for end-of-command */
3259 old_config_style = 1;
3261 #line 3262 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3265 #line 1524 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3266 { old_config_style = 0; }
3267 #line 3268 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3271 #line 1529 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3273 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3274 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3276 #line 3277 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3280 #line 1534 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3282 (yyval.Attr_val_fifo) = NULL;
3283 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3285 #line 3286 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3289 #line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3290 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3291 #line 3292 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3295 #line 1552 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3297 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3298 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3300 #line 3301 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3304 #line 1557 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3306 (yyval.Sim_server_fifo) = NULL;
3307 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3309 #line 3310 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3313 #line 1565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3314 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3315 #line 3316 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3319 #line 1570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3320 { (yyval.Double) = (yyvsp[-1].Double); }
3321 #line 3322 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3325 #line 1575 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3326 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3327 #line 3328 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3331 #line 1580 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3333 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3334 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3336 #line 3337 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3340 #line 1585 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3342 (yyval.Sim_script_fifo) = NULL;
3343 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3345 #line 3346 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3349 #line 1593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3350 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3351 #line 3352 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3355 #line 1598 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3357 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3358 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3360 #line 3361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3364 #line 1603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3366 (yyval.Attr_val_fifo) = NULL;
3367 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3369 #line 3370 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3373 #line 1611 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */
3374 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3375 #line 3376 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3379 #line 3380 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
3382 /* User semantic actions sometimes alter yychar, and that requires
3383 that yytoken be updated with the new translation. We take the
3384 approach of translating immediately before every use of yytoken.
3385 One alternative is translating here after every semantic action,
3386 but that translation would be missed if the semantic action invokes
3387 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3388 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3389 incorrect destructor might then be invoked immediately. In the
3390 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3391 to an incorrect destructor call or verbose syntax error message
3392 before the lookahead is translated. */
3393 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3397 YY_STACK_PRINT (yyss, yyssp);
3401 /* Now 'shift' the result of the reduction. Determine what state
3402 that goes to, based on the state we popped back to and the rule
3403 number reduced by. */
3407 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3408 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3409 yystate = yytable[yystate];
3411 yystate = yydefgoto[yyn - YYNTOKENS];
3416 /*--------------------------------------.
3417 | yyerrlab -- here on detecting error. |
3418 `--------------------------------------*/
3420 /* Make sure we have latest lookahead translation. See comments at
3421 user semantic actions for why this is necessary. */
3422 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3424 /* If not already recovering from an error, report this error. */
3428 #if ! YYERROR_VERBOSE
3429 yyerror (YY_("syntax error"));
3431 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3434 char const *yymsgp = YY_("syntax error");
3435 int yysyntax_error_status;
3436 yysyntax_error_status = YYSYNTAX_ERROR;
3437 if (yysyntax_error_status == 0)
3439 else if (yysyntax_error_status == 1)
3441 if (yymsg != yymsgbuf)
3442 YYSTACK_FREE (yymsg);
3443 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3447 yymsg_alloc = sizeof yymsgbuf;
3448 yysyntax_error_status = 2;
3452 yysyntax_error_status = YYSYNTAX_ERROR;
3457 if (yysyntax_error_status == 2)
3458 goto yyexhaustedlab;
3460 # undef YYSYNTAX_ERROR
3466 if (yyerrstatus == 3)
3468 /* If just tried and failed to reuse lookahead token after an
3469 error, discard it. */
3471 if (yychar <= YYEOF)
3473 /* Return failure if at end of input. */
3474 if (yychar == YYEOF)
3479 yydestruct ("Error: discarding",
3485 /* Else will try to reuse lookahead token after shifting the error
3490 /*---------------------------------------------------.
3491 | yyerrorlab -- error raised explicitly by YYERROR. |
3492 `---------------------------------------------------*/
3495 /* Pacify compilers like GCC when the user code never invokes
3496 YYERROR and the label yyerrorlab therefore never appears in user
3498 if (/*CONSTCOND*/ 0)
3501 /* Do not reclaim the symbols of the rule whose action triggered
3505 YY_STACK_PRINT (yyss, yyssp);
3510 /*-------------------------------------------------------------.
3511 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3512 `-------------------------------------------------------------*/
3514 yyerrstatus = 3; /* Each real token shifted decrements this. */
3518 yyn = yypact[yystate];
3519 if (!yypact_value_is_default (yyn))
3522 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3530 /* Pop the current state because it cannot handle the error token. */
3535 yydestruct ("Error: popping",
3536 yystos[yystate], yyvsp);
3539 YY_STACK_PRINT (yyss, yyssp);
3542 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3544 YY_IGNORE_MAYBE_UNINITIALIZED_END
3547 /* Shift the error token. */
3548 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3554 /*-------------------------------------.
3555 | yyacceptlab -- YYACCEPT comes here. |
3556 `-------------------------------------*/
3561 /*-----------------------------------.
3562 | yyabortlab -- YYABORT comes here. |
3563 `-----------------------------------*/
3568 #if !defined yyoverflow || YYERROR_VERBOSE
3569 /*-------------------------------------------------.
3570 | yyexhaustedlab -- memory exhaustion comes here. |
3571 `-------------------------------------------------*/
3573 yyerror (YY_("memory exhausted"));
3579 if (yychar != YYEMPTY)
3581 /* Make sure we have latest lookahead translation. See comments at
3582 user semantic actions for why this is necessary. */
3583 yytoken = YYTRANSLATE (yychar);
3584 yydestruct ("Cleanup: discarding lookahead",
3587 /* Do not reclaim the symbols of the rule whose action triggered
3588 this YYABORT or YYACCEPT. */
3590 YY_STACK_PRINT (yyss, yyssp);
3591 while (yyssp != yyss)
3593 yydestruct ("Cleanup: popping",
3594 yystos[*yyssp], yyvsp);
3599 YYSTACK_FREE (yyss);
3602 if (yymsg != yymsgbuf)
3603 YYSTACK_FREE (yymsg);
3607 #line 1622 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */
3616 struct FILE_INFO * ip_ctx;
3618 ip_ctx = lex_current();
3619 ip_ctx->errpos = ip_ctx->tokpos;
3621 msyslog(LOG_ERR, "line %d column %d %s",
3622 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3623 if (!lex_from_file()) {
3624 /* Save the error message in the correct buffer */
3625 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3626 MAXLINE - remote_config.err_pos,
3628 ip_ctx->errpos.ncol, msg);
3630 /* Increment the value of err_pos */
3632 remote_config.err_pos += retval;
3634 /* Increment the number of errors */
3635 ++remote_config.no_errors;
3641 * token_name - convert T_ token integers to text
3642 * example: token_name(T_Server) returns "T_Server"
3649 return yytname[YYTRANSLATE(token)];
3653 /* Initial Testing function -- ignore */
3655 int main(int argc, char *argv[])
3657 ip_file = FOPEN(argv[1], "r");
3659 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);