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 14 "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(struct FILE_INFO *ip_file, const char *msg);
94 # define ONLY_SIM(a) (a)
96 # define ONLY_SIM(a) NULL
99 #line 100 "ntp_parser.c" /* yacc.c:339 */
102 # if defined __cplusplus && 201103L <= __cplusplus
103 # define YY_NULLPTR nullptr
105 # define YY_NULLPTR 0
109 /* Enabling verbose error messages. */
110 #ifdef YYERROR_VERBOSE
111 # undef YYERROR_VERBOSE
112 # define YYERROR_VERBOSE 1
114 # define YYERROR_VERBOSE 0
117 /* In a future release of Bison, this section will be replaced
118 by #include "y.tab.h". */
119 #ifndef YY_YY_Y_TAB_H_INCLUDED
120 # define YY_YY_Y_TAB_H_INCLUDED
146 T_Broadcastclient = 270,
147 T_Broadcastdelay = 271,
213 T_Manycastclient = 337,
214 T_Manycastserver = 338,
236 T_Multicastclient = 360,
251 T_NtpSignDsocket = 375,
274 T_Saveconfigdir = 398,
306 T_WanderThreshold = 430,
315 T_Sim_Duration = 439,
316 T_Server_Offset = 440,
330 #define T_Allpeers 262
332 #define T_Autokey 264
333 #define T_Automax 265
334 #define T_Average 266
335 #define T_Bclient 267
337 #define T_Broadcast 269
338 #define T_Broadcastclient 270
339 #define T_Broadcastdelay 271
341 #define T_Calibrate 273
342 #define T_Ceiling 274
343 #define T_Clockstats 275
345 #define T_ControlKey 277
347 #define T_Cryptostats 279
350 #define T_Default 282
352 #define T_Disable 284
353 #define T_Discard 285
354 #define T_Dispersion 286
356 #define T_Driftfile 288
358 #define T_Ellipsis 290
363 #define T_Filegen 295
364 #define T_Filenum 296
374 #define T_Huffpuff 306
378 #define T_Incalloc 310
380 #define T_Initalloc 312
381 #define T_Initmem 313
382 #define T_Includefile 314
383 #define T_Integer 315
384 #define T_Interface 316
385 #define T_Intrange 317
388 #define T_Ipv4_flag 320
390 #define T_Ipv6_flag 322
394 #define T_Keysdir 326
397 #define T_Leapfile 329
398 #define T_Limited 330
401 #define T_Logconfig 333
402 #define T_Logfile 334
403 #define T_Loopstats 335
404 #define T_Lowpriotrap 336
405 #define T_Manycastclient 337
406 #define T_Manycastserver 338
409 #define T_Maxclock 341
410 #define T_Maxdepth 342
411 #define T_Maxdist 343
413 #define T_Maxpoll 345
414 #define T_Mdnstries 346
416 #define T_Memlock 348
417 #define T_Minclock 349
418 #define T_Mindepth 350
419 #define T_Mindist 351
420 #define T_Minimum 352
421 #define T_Minpoll 353
422 #define T_Minsane 354
425 #define T_Monitor 357
428 #define T_Multicastclient 360
431 #define T_Nomodify 363
432 #define T_Nomrulist 364
434 #define T_Nonvolatile 366
436 #define T_Noquery 368
437 #define T_Noselect 369
438 #define T_Noserve 370
440 #define T_Notrust 372
442 #define T_Ntpport 374
443 #define T_NtpSignDsocket 375
445 #define T_Orphanwait 377
448 #define T_Peerstats 380
451 #define T_Pidfile 383
454 #define T_Preempt 386
456 #define T_Protostats 388
458 #define T_Randfile 390
459 #define T_Rawstats 391
461 #define T_Requestkey 393
463 #define T_Restrict 395
466 #define T_Saveconfigdir 398
470 #define T_Stacksize 402
471 #define T_Statistics 403
473 #define T_Statsdir 405
475 #define T_Stepback 407
476 #define T_Stepfwd 408
477 #define T_Stepout 409
478 #define T_Stratum 410
481 #define T_Sysstats 413
486 #define T_Timingstats 418
491 #define T_Trustedkey 423
495 #define T_Unconfig 427
497 #define T_Version 429
498 #define T_WanderThreshold 430
500 #define T_Wildcard 432
505 #define T_Simulate 437
506 #define T_Beep_Delay 438
507 #define T_Sim_Duration 439
508 #define T_Server_Offset 440
509 #define T_Duration 441
510 #define T_Freq_Offset 442
513 #define T_Prop_Delay 445
514 #define T_Proc_Delay 446
517 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
518 typedef union YYSTYPE YYSTYPE;
521 #line 54 "ntp_parser.y" /* yacc.c:355 */
527 gen_fifo * Generic_fifo;
529 attr_val_fifo * Attr_val_fifo;
531 string_fifo * String_fifo;
532 address_node * Address_node;
533 address_fifo * Address_fifo;
534 setvar_node * Set_var;
535 server_info * Sim_server;
536 server_info_fifo * Sim_server_fifo;
537 script_info * Sim_script;
538 script_info_fifo * Sim_script_fifo;
540 #line 541 "ntp_parser.c" /* yacc.c:355 */
542 # define YYSTYPE_IS_TRIVIAL 1
543 # define YYSTYPE_IS_DECLARED 1
547 extern YYSTYPE yylval;
549 int yyparse (struct FILE_INFO *ip_file);
551 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
553 /* Copy the second part of user declarations. */
555 #line 556 "ntp_parser.c" /* yacc.c:358 */
562 typedef YYTYPE_UINT8 yytype_uint8;
564 typedef unsigned char yytype_uint8;
568 typedef YYTYPE_INT8 yytype_int8;
570 typedef signed char yytype_int8;
574 typedef YYTYPE_UINT16 yytype_uint16;
576 typedef unsigned short int yytype_uint16;
580 typedef YYTYPE_INT16 yytype_int16;
582 typedef short int yytype_int16;
586 # ifdef __SIZE_TYPE__
587 # define YYSIZE_T __SIZE_TYPE__
588 # elif defined size_t
589 # define YYSIZE_T size_t
590 # elif ! defined YYSIZE_T
591 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
592 # define YYSIZE_T size_t
594 # define YYSIZE_T unsigned int
598 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
601 # if defined YYENABLE_NLS && YYENABLE_NLS
603 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
604 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
608 # define YY_(Msgid) Msgid
613 # if (defined __GNUC__ \
614 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
615 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
616 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
618 # define YY_ATTRIBUTE(Spec) /* empty */
622 #ifndef YY_ATTRIBUTE_PURE
623 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
626 #ifndef YY_ATTRIBUTE_UNUSED
627 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
630 #if !defined _Noreturn \
631 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
632 # if defined _MSC_VER && 1200 <= _MSC_VER
633 # define _Noreturn __declspec (noreturn)
635 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
639 /* Suppress unused-variable warnings by "using" E. */
640 #if ! defined lint || defined __GNUC__
641 # define YYUSE(E) ((void) (E))
643 # define YYUSE(E) /* empty */
646 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
647 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
648 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
649 _Pragma ("GCC diagnostic push") \
650 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
651 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
652 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
653 _Pragma ("GCC diagnostic pop")
655 # define YY_INITIAL_VALUE(Value) Value
657 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
658 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
659 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
661 #ifndef YY_INITIAL_VALUE
662 # define YY_INITIAL_VALUE(Value) /* Nothing. */
666 #if ! defined yyoverflow || YYERROR_VERBOSE
668 /* The parser invokes alloca or malloc; define the necessary symbols. */
670 # ifdef YYSTACK_USE_ALLOCA
671 # if YYSTACK_USE_ALLOCA
673 # define YYSTACK_ALLOC __builtin_alloca
674 # elif defined __BUILTIN_VA_ARG_INCR
675 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
677 # define YYSTACK_ALLOC __alloca
678 # elif defined _MSC_VER
679 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
680 # define alloca _alloca
682 # define YYSTACK_ALLOC alloca
683 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
684 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
685 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
686 # ifndef EXIT_SUCCESS
687 # define EXIT_SUCCESS 0
694 # ifdef YYSTACK_ALLOC
695 /* Pacify GCC's 'empty if-body' warning. */
696 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
697 # ifndef YYSTACK_ALLOC_MAXIMUM
698 /* The OS might guarantee only one guard page at the bottom of the stack,
699 and a page size can be as small as 4096 bytes. So we cannot safely
700 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
701 to allow for a few compiler-allocated temporary stack slots. */
702 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
705 # define YYSTACK_ALLOC YYMALLOC
706 # define YYSTACK_FREE YYFREE
707 # ifndef YYSTACK_ALLOC_MAXIMUM
708 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
710 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
711 && ! ((defined YYMALLOC || defined malloc) \
712 && (defined YYFREE || defined free)))
713 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
714 # ifndef EXIT_SUCCESS
715 # define EXIT_SUCCESS 0
719 # define YYMALLOC malloc
720 # if ! defined malloc && ! defined EXIT_SUCCESS
721 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
726 # if ! defined free && ! defined EXIT_SUCCESS
727 void free (void *); /* INFRINGES ON USER NAME SPACE */
731 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
734 #if (! defined yyoverflow \
735 && (! defined __cplusplus \
736 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
738 /* A type that is properly aligned for any stack member. */
741 yytype_int16 yyss_alloc;
745 /* The size of the maximum gap between one aligned stack and the next. */
746 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
748 /* The size of an array large to enough to hold all stacks, each with
750 # define YYSTACK_BYTES(N) \
751 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
752 + YYSTACK_GAP_MAXIMUM)
754 # define YYCOPY_NEEDED 1
756 /* Relocate STACK from its old location to the new one. The
757 local variables YYSIZE and YYSTACKSIZE give the old and new number of
758 elements in the stack, and YYPTR gives the new location of the
759 stack. Advance YYPTR to a properly aligned location for the next
761 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
764 YYSIZE_T yynewbytes; \
765 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
766 Stack = &yyptr->Stack_alloc; \
767 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
768 yyptr += yynewbytes / sizeof (*yyptr); \
774 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
775 /* Copy COUNT objects from SRC to DST. The source and destination do
778 # if defined __GNUC__ && 1 < __GNUC__
779 # define YYCOPY(Dst, Src, Count) \
780 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
782 # define YYCOPY(Dst, Src, Count) \
786 for (yyi = 0; yyi < (Count); yyi++) \
787 (Dst)[yyi] = (Src)[yyi]; \
792 #endif /* !YYCOPY_NEEDED */
794 /* YYFINAL -- State number of the termination state. */
796 /* YYLAST -- Last index in YYTABLE. */
799 /* YYNTOKENS -- Number of terminals. */
800 #define YYNTOKENS 197
801 /* YYNNTS -- Number of nonterminals. */
803 /* YYNRULES -- Number of rules. */
805 /* YYNSTATES -- Number of states. */
806 #define YYNSTATES 415
808 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
809 by yylex, with out-of-bounds checking. */
811 #define YYMAXUTOK 446
813 #define YYTRANSLATE(YYX) \
814 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
816 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
817 as returned by yylex, without out-of-bounds checking. */
818 static const yytype_uint8 yytranslate[] =
820 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
821 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
822 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
823 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
824 193, 194, 2, 2, 2, 2, 2, 2, 2, 2,
825 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
826 2, 192, 2, 2, 2, 2, 2, 2, 2, 2,
827 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
828 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
829 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
830 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
831 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
832 2, 2, 2, 195, 2, 196, 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, 2, 2, 2, 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, 1, 2, 3, 4,
846 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
847 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
848 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
849 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
850 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
851 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
852 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
853 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
854 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
855 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
856 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
857 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
858 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
859 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
860 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
861 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
862 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
863 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
864 185, 186, 187, 188, 189, 190, 191
868 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
869 static const yytype_uint16 yyrline[] =
871 0, 366, 366, 370, 371, 372, 386, 387, 388, 389,
872 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
873 407, 417, 418, 419, 420, 421, 425, 426, 431, 436,
874 438, 444, 445, 453, 454, 455, 459, 464, 465, 466,
875 467, 468, 469, 470, 471, 475, 477, 482, 483, 484,
876 485, 486, 487, 491, 496, 505, 515, 516, 526, 528,
877 530, 532, 543, 550, 552, 557, 559, 561, 563, 565,
878 574, 580, 581, 589, 591, 603, 604, 605, 606, 607,
879 616, 621, 626, 634, 636, 638, 643, 644, 645, 646,
880 647, 648, 652, 653, 654, 655, 664, 666, 675, 685,
881 690, 698, 699, 700, 701, 702, 703, 704, 705, 710,
882 711, 719, 729, 738, 753, 758, 759, 763, 764, 768,
883 769, 770, 771, 772, 773, 774, 783, 787, 791, 799,
884 807, 815, 830, 845, 858, 859, 867, 868, 869, 870,
885 871, 872, 873, 874, 875, 876, 877, 878, 879, 880,
886 881, 885, 890, 898, 903, 904, 905, 909, 914, 922,
887 927, 928, 929, 930, 931, 932, 933, 934, 942, 952,
888 957, 965, 967, 969, 971, 973, 978, 979, 983, 984,
889 985, 986, 994, 999, 1004, 1012, 1017, 1018, 1019, 1028,
890 1030, 1035, 1040, 1048, 1050, 1067, 1068, 1069, 1070, 1071,
891 1072, 1076, 1077, 1085, 1090, 1095, 1103, 1108, 1109, 1110,
892 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1126, 1127, 1128,
893 1135, 1142, 1158, 1177, 1182, 1184, 1186, 1188, 1190, 1197,
894 1202, 1203, 1204, 1208, 1209, 1210, 1214, 1215, 1219, 1226,
895 1236, 1245, 1250, 1252, 1257, 1258, 1266, 1268, 1276, 1281,
896 1289, 1314, 1321, 1331, 1332, 1336, 1337, 1338, 1339, 1343,
897 1344, 1345, 1349, 1354, 1359, 1367, 1368, 1369, 1370, 1371,
898 1372, 1373, 1383, 1388, 1396, 1401, 1409, 1411, 1415, 1420,
899 1425, 1433, 1438, 1446, 1455, 1456, 1460, 1461, 1470, 1488,
900 1492, 1497, 1505, 1510, 1511, 1515, 1520, 1528, 1533, 1538,
901 1543, 1548, 1556, 1561, 1566, 1574, 1579, 1580, 1581, 1582,
906 #if YYDEBUG || YYERROR_VERBOSE || 1
907 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
908 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
909 static const char *const yytname[] =
911 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
912 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
913 "T_Bclient", "T_Beacon", "T_Broadcast", "T_Broadcastclient",
914 "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling",
915 "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats",
916 "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", "T_Discard",
917 "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Ellipsis",
918 "T_Enable", "T_End", "T_False", "T_File", "T_Filegen", "T_Filenum",
919 "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4", "T_Flake", "T_Floor",
920 "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff", "T_Iburst", "T_Ident",
921 "T_Ignore", "T_Incalloc", "T_Incmem", "T_Initalloc", "T_Initmem",
922 "T_Includefile", "T_Integer", "T_Interface", "T_Intrange", "T_Io",
923 "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key",
924 "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Limited",
925 "T_Link", "T_Listen", "T_Logconfig", "T_Logfile", "T_Loopstats",
926 "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver", "T_Mask",
927 "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem",
928 "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock", "T_Minclock",
929 "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane",
930 "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
931 "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
932 "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery", "T_Noselect",
933 "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
934 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_Panic", "T_Peer",
935 "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port",
936 "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
937 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
938 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
939 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
940 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
941 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
942 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
943 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
944 "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
945 "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
946 "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
947 "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
948 "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
949 "command", "server_command", "client_type", "address", "ip_address",
950 "address_fam", "option_list", "option", "option_flag",
951 "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
952 "option_str_keyword", "unpeer_command", "unpeer_keyword",
953 "other_mode_command", "authentication_command", "crypto_command_list",
954 "crypto_command", "crypto_str_keyword", "orphan_mode_command",
955 "tos_option_list", "tos_option", "tos_option_int_keyword",
956 "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
957 "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
958 "filegen_type", "access_control_command", "ac_flag_list",
959 "access_control_flag", "discard_option_list", "discard_option",
960 "discard_option_keyword", "mru_option_list", "mru_option",
961 "mru_option_keyword", "fudge_command", "fudge_factor_list",
962 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
963 "rlimit_command", "rlimit_option_list", "rlimit_option",
964 "rlimit_option_keyword", "system_option_command", "system_option_list",
965 "system_option", "system_option_flag_keyword",
966 "system_option_local_flag_keyword", "tinker_command",
967 "tinker_option_list", "tinker_option", "tinker_option_keyword",
968 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
969 "misc_cmd_str_lcl_keyword", "drift_parm", "variable_assign",
970 "t_default_or_zero", "trap_option_list", "trap_option",
971 "log_config_list", "log_config_command", "interface_command",
972 "interface_nic", "nic_rule_class", "nic_rule_action", "reset_command",
973 "counter_set_list", "counter_set_keyword", "integer_list",
974 "integer_list_range", "integer_list_range_elt", "integer_range",
975 "string_list", "address_list", "boolean", "number", "simulate_command",
976 "sim_conf_start", "sim_init_statement_list", "sim_init_statement",
977 "sim_init_keyword", "sim_server_list", "sim_server", "sim_server_offset",
978 "sim_server_name", "sim_act_list", "sim_act", "sim_act_stmt_list",
979 "sim_act_stmt", "sim_act_keyword", YY_NULLPTR
984 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
985 (internal) symbol number NUM (which must be that of a token). */
986 static const yytype_uint16 yytoknum[] =
988 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
989 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
990 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
991 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
992 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
993 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
994 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
995 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
996 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
997 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
998 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
999 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1000 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1001 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1002 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1003 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1004 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1005 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1006 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1007 445, 446, 61, 40, 41, 123, 125
1011 #define YYPACT_NINF -182
1013 #define yypact_value_is_default(Yystate) \
1014 (!!((Yystate) == (-182)))
1016 #define YYTABLE_NINF -7
1018 #define yytable_value_is_error(Yytable_value) \
1021 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1023 static const yytype_int16 yypact[] =
1025 18, -161, -18, -182, -182, -182, -10, -182, 189, 11,
1026 -103, 189, -182, 7, -49, -182, -100, -182, -97, -90,
1027 -182, -84, -182, -182, -49, 13, 365, -49, -182, -182,
1028 -81, -182, -80, -182, -182, 20, 86, 104, 21, -33,
1029 -182, -182, -73, 7, -72, -182, 51, 500, -71, -54,
1030 26, -182, -182, -182, 90, 205, -83, -182, -49, -182,
1031 -49, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1032 -182, -8, -65, -51, -182, -9, -182, -182, -91, -182,
1033 -182, -182, -15, -182, -182, -182, -182, -182, -182, -182,
1034 -182, 189, -182, -182, -182, -182, -182, -182, 11, -182,
1035 46, 85, -182, 189, -182, -182, -182, -182, -182, -182,
1036 -182, -182, -182, -182, -182, -182, 92, -182, -35, 366,
1037 -182, -182, -182, -84, -182, -182, -49, -182, -182, -182,
1038 -182, -182, -182, -182, -182, -182, 365, -182, 68, -49,
1039 -182, -182, -23, -182, -182, -182, -182, -182, -182, -182,
1040 -182, 86, -182, -182, 114, 121, -182, -182, 67, -182,
1041 -182, -182, -182, -33, -182, 93, -28, -182, 7, -182,
1042 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1043 -182, 51, -182, -8, -182, -182, -17, -182, -182, -182,
1044 -182, -182, -182, -182, -182, 500, -182, 107, -8, -182,
1045 -182, 112, -54, -182, -182, -182, 113, -182, 8, -182,
1046 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1047 -2, -147, -182, -182, -182, -182, -182, 128, -182, 25,
1048 -182, -182, -182, -182, 116, 37, -182, -182, -182, -182,
1049 38, 135, -182, -182, 92, -182, -8, -17, -182, -182,
1050 -182, -182, -182, -182, -182, -182, 445, -182, -182, 445,
1051 445, -71, -182, -182, 40, -182, -182, -182, -182, -182,
1052 -182, -182, -182, -182, -182, -52, 163, -182, -182, -182,
1053 261, -182, -182, -182, -182, -182, -182, -182, -182, -114,
1054 27, 14, -182, -182, -182, -182, 55, -182, -182, 0,
1055 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1056 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1057 -182, -182, -182, -182, -182, 445, 445, -182, 185, -71,
1058 153, -182, 156, -182, -182, -182, -182, -182, -182, -182,
1059 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1060 -182, -182, -53, -182, 61, 30, 43, -133, -182, 23,
1061 -182, -8, -182, -182, -182, -182, -182, -182, -182, -182,
1062 -182, 445, -182, -182, -182, -182, 32, -182, -182, -182,
1063 -49, -182, -182, -182, 45, -182, -182, -182, 41, 50,
1064 -8, 47, -157, -182, 56, -8, -182, -182, -182, 49,
1065 130, -182, -182, -182, -182, -182, 110, 59, 54, -182,
1066 70, -182, -8, -182, -182
1069 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1070 Performed when YYTABLE does not specify something else to do. Zero
1071 means the default is an error. */
1072 static const yytype_uint16 yydefact[] =
1074 0, 0, 0, 24, 58, 230, 0, 71, 0, 0,
1075 240, 0, 223, 0, 0, 233, 0, 253, 0, 0,
1076 234, 0, 236, 25, 0, 0, 0, 0, 254, 231,
1077 0, 23, 0, 235, 22, 0, 0, 0, 0, 0,
1078 237, 21, 0, 0, 0, 232, 0, 0, 0, 0,
1079 0, 56, 57, 289, 0, 2, 0, 7, 0, 8,
1080 0, 9, 10, 13, 11, 12, 14, 15, 16, 17,
1081 18, 0, 0, 0, 217, 0, 218, 19, 0, 5,
1082 62, 63, 64, 195, 196, 197, 198, 201, 199, 200,
1083 202, 190, 192, 193, 194, 154, 155, 156, 126, 152,
1084 0, 238, 224, 189, 101, 102, 103, 104, 108, 105,
1085 106, 107, 109, 29, 30, 28, 0, 26, 0, 6,
1086 65, 66, 250, 225, 249, 282, 59, 61, 160, 161,
1087 162, 163, 164, 165, 166, 167, 127, 158, 0, 60,
1088 70, 280, 226, 67, 265, 266, 267, 268, 269, 270,
1089 271, 262, 264, 134, 29, 30, 134, 134, 26, 68,
1090 188, 186, 187, 182, 184, 0, 0, 227, 96, 100,
1091 97, 207, 208, 209, 210, 211, 212, 213, 214, 215,
1092 216, 203, 205, 0, 91, 86, 0, 87, 95, 93,
1093 94, 92, 90, 88, 89, 80, 82, 0, 0, 244,
1094 276, 0, 69, 275, 277, 273, 229, 1, 0, 4,
1095 31, 55, 287, 286, 219, 220, 221, 261, 260, 259,
1096 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
1097 191, 151, 153, 239, 98, 0, 178, 179, 180, 181,
1098 0, 0, 176, 177, 168, 170, 0, 0, 27, 222,
1099 248, 281, 157, 159, 279, 263, 130, 134, 134, 133,
1100 128, 0, 183, 185, 0, 99, 204, 206, 285, 283,
1101 284, 85, 81, 83, 84, 228, 0, 274, 272, 3,
1102 20, 255, 256, 257, 252, 258, 251, 293, 294, 0,
1103 0, 0, 74, 73, 118, 117, 0, 115, 116, 0,
1104 110, 113, 114, 174, 175, 173, 169, 171, 172, 136,
1105 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1106 147, 148, 149, 150, 135, 131, 132, 134, 243, 0,
1107 0, 245, 0, 37, 38, 39, 54, 47, 49, 48,
1108 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
1109 36, 34, 0, 35, 0, 0, 0, 0, 296, 0,
1110 291, 0, 111, 125, 121, 123, 119, 120, 122, 124,
1111 112, 129, 242, 241, 247, 246, 0, 45, 46, 53,
1112 0, 290, 288, 295, 0, 292, 278, 299, 0, 0,
1113 0, 0, 0, 301, 0, 0, 297, 300, 298, 0,
1114 0, 306, 307, 308, 309, 310, 0, 0, 0, 302,
1118 /* YYPGOTO[NTERM-NUM]. */
1119 static const yytype_int16 yypgoto[] =
1121 -182, -182, -182, -45, -182, -182, -14, -36, -182, -182,
1122 -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
1123 -182, -182, -182, -182, -182, -182, 60, -182, -182, -182,
1124 -182, -38, -182, -182, -182, -182, -182, -182, -142, -182,
1125 -182, 134, -182, -182, 120, -182, -182, -182, 5, -182,
1126 -182, -182, -182, 96, -182, -182, 250, -42, -182, -182,
1127 -182, -182, 81, -182, -182, -182, -182, -182, -182, -182,
1128 -182, -182, -182, -182, 140, -182, -182, -182, -182, -182,
1129 -182, 117, -182, -182, 63, -182, -182, 240, 22, -181,
1130 -182, -182, -182, -16, -182, -182, -86, -182, -182, -182,
1131 -120, -182, -132, -182
1134 /* YYDEFGOTO[NTERM-NUM]. */
1135 static const yytype_int16 yydefgoto[] =
1137 -1, 54, 55, 56, 57, 58, 125, 117, 118, 280,
1138 348, 349, 350, 351, 352, 353, 354, 59, 60, 61,
1139 62, 82, 228, 229, 63, 195, 196, 197, 198, 64,
1140 168, 112, 234, 300, 301, 302, 370, 65, 256, 324,
1141 98, 99, 100, 136, 137, 138, 66, 244, 245, 246,
1142 247, 67, 163, 164, 165, 68, 91, 92, 93, 94,
1143 69, 181, 182, 183, 70, 71, 72, 73, 102, 167,
1144 373, 275, 331, 123, 124, 74, 75, 286, 220, 76,
1145 151, 152, 206, 202, 203, 204, 142, 126, 271, 214,
1146 77, 78, 289, 290, 291, 357, 358, 389, 359, 392,
1150 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1151 positive, shift that token. If negative, reduce the rule whose
1152 number is the opposite. If YYTABLE_NINF, syntax error. */
1153 static const yytype_int16 yytable[] =
1155 116, 158, 267, 281, 363, 169, 200, 377, 160, 329,
1156 208, 355, 199, 222, 259, 260, 113, 274, 114, 1,
1157 79, 268, 95, 157, 212, 217, 364, 104, 2, 391,
1158 355, 105, 3, 4, 5, 223, 287, 288, 224, 396,
1159 6, 7, 80, 269, 210, 218, 211, 8, 9, 230,
1160 81, 10, 213, 101, 11, 12, 119, 171, 13, 120,
1161 161, 230, 282, 382, 283, 307, 121, 14, 219, 287,
1162 288, 15, 122, 127, 249, 140, 141, 16, 330, 17,
1163 143, 159, 172, 166, 170, 115, 205, 106, 18, 19,
1164 207, 215, 20, 144, 145, 235, 21, 22, 209, 173,
1165 23, 24, 174, 365, 221, 216, 232, 115, 96, 25,
1166 366, 146, 251, 97, 162, 325, 326, 233, 378, 225,
1167 226, 248, 26, 27, 28, 251, 227, 367, 253, 29,
1168 265, 153, 107, 254, 236, 237, 238, 239, 30, 201,
1169 108, 257, 31, 109, 32, 294, 33, 34, 258, 147,
1170 270, 261, 295, 263, 284, 296, 35, 36, 37, 38,
1171 39, 40, 41, 42, 264, 110, 43, 273, 44, 154,
1172 111, 155, 276, 278, 175, 285, 368, 45, 148, 369,
1173 385, 293, 46, 47, 48, 371, 49, 50, 292, 279,
1174 51, 52, 297, 303, 304, 305, 328, 83, 332, -6,
1175 53, 84, 176, 177, 178, 179, 361, 85, 360, 394,
1176 180, 362, 372, 375, 399, 2, 376, 379, 384, 3,
1177 4, 5, 380, 298, 381, 327, 386, 6, 7, 240,
1178 388, 414, 231, 390, 8, 9, 391, 398, 10, 395,
1179 411, 11, 12, 149, 400, 13, 412, 241, 150, 306,
1180 156, 413, 242, 243, 14, 272, 252, 86, 15, 262,
1181 115, 103, 266, 250, 16, 277, 17, 139, 255, 308,
1182 333, 383, 397, 356, 410, 18, 19, 0, 334, 20,
1183 0, 0, 0, 21, 22, 0, 299, 23, 24, 0,
1184 87, 88, 0, 374, 0, 0, 25, 401, 402, 403,
1185 404, 405, 0, 0, 0, 0, 409, 89, 0, 26,
1186 27, 28, 0, 335, 336, 0, 29, 401, 402, 403,
1187 404, 405, 0, 0, 0, 30, 0, 0, 0, 31,
1188 337, 32, 0, 33, 34, 0, 0, 0, 90, 0,
1189 0, 0, 0, 35, 36, 37, 38, 39, 40, 41,
1190 42, 338, 0, 43, 0, 44, 0, 0, 0, 339,
1191 0, 340, 0, 0, 45, 0, 387, 0, 0, 46,
1192 47, 48, 0, 49, 50, 341, 2, 51, 52, 0,
1193 3, 4, 5, 0, 0, 0, -6, 53, 6, 7,
1194 0, 0, 342, 343, 0, 8, 9, 0, 0, 10,
1195 0, 0, 11, 12, 0, 0, 13, 0, 0, 0,
1196 0, 0, 0, 0, 0, 14, 0, 0, 0, 15,
1197 128, 129, 130, 131, 0, 16, 0, 17, 344, 0,
1198 345, 0, 0, 0, 0, 346, 18, 19, 0, 347,
1199 20, 0, 0, 0, 21, 22, 0, 0, 23, 24,
1200 132, 0, 133, 0, 134, 0, 0, 25, 0, 0,
1201 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1202 26, 27, 28, 0, 0, 0, 0, 29, 0, 0,
1203 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
1204 31, 309, 32, 0, 33, 34, 0, 0, 0, 310,
1205 0, 0, 0, 0, 35, 36, 37, 38, 39, 40,
1206 41, 42, 0, 184, 43, 0, 44, 311, 312, 185,
1207 313, 186, 0, 0, 0, 45, 314, 0, 0, 0,
1208 46, 47, 48, 0, 49, 50, 0, 0, 51, 52,
1209 0, 0, 0, 0, 0, 0, 0, 187, 53, 0,
1210 0, 0, 0, 315, 316, 0, 0, 317, 318, 0,
1211 319, 320, 321, 0, 322, 0, 0, 0, 0, 0,
1212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1213 0, 0, 0, 0, 0, 0, 188, 0, 189, 0,
1214 0, 0, 0, 0, 190, 0, 191, 0, 0, 192,
1215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1216 0, 0, 0, 0, 0, 0, 0, 0, 0, 323,
1220 static const yytype_int16 yycheck[] =
1222 14, 37, 183, 5, 4, 43, 60, 60, 41, 61,
1223 55, 144, 48, 28, 156, 157, 65, 198, 67, 1,
1224 181, 38, 11, 37, 32, 34, 26, 20, 10, 186,
1225 144, 24, 14, 15, 16, 50, 183, 184, 53, 196,
1226 22, 23, 60, 60, 58, 54, 60, 29, 30, 91,
1227 60, 33, 60, 156, 36, 37, 156, 6, 40, 156,
1228 93, 103, 64, 196, 66, 246, 156, 49, 77, 183,
1229 184, 53, 156, 60, 119, 156, 156, 59, 130, 61,
1230 60, 60, 31, 156, 156, 156, 60, 80, 70, 71,
1231 0, 156, 74, 7, 8, 3, 78, 79, 181, 48,
1232 82, 83, 51, 103, 195, 156, 60, 156, 97, 91,
1233 110, 25, 126, 102, 147, 257, 258, 32, 171, 134,
1234 135, 156, 104, 105, 106, 139, 141, 127, 60, 111,
1235 168, 27, 125, 156, 42, 43, 44, 45, 120, 193,
1236 133, 27, 124, 136, 126, 29, 128, 129, 27, 63,
1237 167, 84, 36, 60, 156, 39, 138, 139, 140, 141,
1238 142, 143, 144, 145, 192, 158, 148, 60, 150, 65,
1239 163, 67, 60, 60, 123, 177, 176, 159, 92, 179,
1240 361, 156, 164, 165, 166, 327, 168, 169, 60, 181,
1241 172, 173, 76, 156, 156, 60, 156, 8, 35, 181,
1242 182, 12, 151, 152, 153, 154, 192, 18, 181, 390,
1243 159, 156, 27, 60, 395, 10, 60, 156, 195, 14,
1244 15, 16, 192, 107, 181, 261, 194, 22, 23, 137,
1245 185, 412, 98, 192, 29, 30, 186, 181, 33, 192,
1246 181, 36, 37, 157, 195, 40, 192, 155, 162, 244,
1247 146, 181, 160, 161, 49, 195, 136, 68, 53, 163,
1248 156, 11, 181, 123, 59, 202, 61, 27, 151, 247,
1249 9, 357, 392, 289, 406, 70, 71, -1, 17, 74,
1250 -1, -1, -1, 78, 79, -1, 170, 82, 83, -1,
1251 101, 102, -1, 329, -1, -1, 91, 187, 188, 189,
1252 190, 191, -1, -1, -1, -1, 196, 118, -1, 104,
1253 105, 106, -1, 52, 53, -1, 111, 187, 188, 189,
1254 190, 191, -1, -1, -1, 120, -1, -1, -1, 124,
1255 69, 126, -1, 128, 129, -1, -1, -1, 149, -1,
1256 -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
1257 145, 90, -1, 148, -1, 150, -1, -1, -1, 98,
1258 -1, 100, -1, -1, 159, -1, 380, -1, -1, 164,
1259 165, 166, -1, 168, 169, 114, 10, 172, 173, -1,
1260 14, 15, 16, -1, -1, -1, 181, 182, 22, 23,
1261 -1, -1, 131, 132, -1, 29, 30, -1, -1, 33,
1262 -1, -1, 36, 37, -1, -1, 40, -1, -1, -1,
1263 -1, -1, -1, -1, -1, 49, -1, -1, -1, 53,
1264 55, 56, 57, 58, -1, 59, -1, 61, 167, -1,
1265 169, -1, -1, -1, -1, 174, 70, 71, -1, 178,
1266 74, -1, -1, -1, 78, 79, -1, -1, 82, 83,
1267 85, -1, 87, -1, 89, -1, -1, 91, -1, -1,
1268 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1269 104, 105, 106, -1, -1, -1, -1, 111, -1, -1,
1270 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
1271 124, 46, 126, -1, 128, 129, -1, -1, -1, 54,
1272 -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
1273 144, 145, -1, 13, 148, -1, 150, 72, 73, 19,
1274 75, 21, -1, -1, -1, 159, 81, -1, -1, -1,
1275 164, 165, 166, -1, 168, 169, -1, -1, 172, 173,
1276 -1, -1, -1, -1, -1, -1, -1, 47, 182, -1,
1277 -1, -1, -1, 108, 109, -1, -1, 112, 113, -1,
1278 115, 116, 117, -1, 119, -1, -1, -1, -1, -1,
1279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1280 -1, -1, -1, -1, -1, -1, 86, -1, 88, -1,
1281 -1, -1, -1, -1, 94, -1, 96, -1, -1, 99,
1282 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1283 -1, -1, -1, -1, -1, -1, -1, -1, -1, 174,
1287 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1288 symbol of state STATE-NUM. */
1289 static const yytype_uint16 yystos[] =
1291 0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
1292 33, 36, 37, 40, 49, 53, 59, 61, 70, 71,
1293 74, 78, 79, 82, 83, 91, 104, 105, 106, 111,
1294 120, 124, 126, 128, 129, 138, 139, 140, 141, 142,
1295 143, 144, 145, 148, 150, 159, 164, 165, 166, 168,
1296 169, 172, 173, 182, 198, 199, 200, 201, 202, 214,
1297 215, 216, 217, 221, 226, 234, 243, 248, 252, 257,
1298 261, 262, 263, 264, 272, 273, 276, 287, 288, 181,
1299 60, 60, 218, 8, 12, 18, 68, 101, 102, 118,
1300 149, 253, 254, 255, 256, 11, 97, 102, 237, 238,
1301 239, 156, 265, 253, 20, 24, 80, 125, 133, 136,
1302 158, 163, 228, 65, 67, 156, 203, 204, 205, 156,
1303 156, 156, 156, 270, 271, 203, 284, 60, 55, 56,
1304 57, 58, 85, 87, 89, 95, 240, 241, 242, 284,
1305 156, 156, 283, 60, 7, 8, 25, 63, 92, 157,
1306 162, 277, 278, 27, 65, 67, 146, 203, 204, 60,
1307 41, 93, 147, 249, 250, 251, 156, 266, 227, 228,
1308 156, 6, 31, 48, 51, 123, 151, 152, 153, 154,
1309 159, 258, 259, 260, 13, 19, 21, 47, 86, 88,
1310 94, 96, 99, 121, 122, 222, 223, 224, 225, 204,
1311 60, 193, 280, 281, 282, 60, 279, 0, 200, 181,
1312 203, 203, 32, 60, 286, 156, 156, 34, 54, 77,
1313 275, 195, 28, 50, 53, 134, 135, 141, 219, 220,
1314 254, 238, 60, 32, 229, 3, 42, 43, 44, 45,
1315 137, 155, 160, 161, 244, 245, 246, 247, 156, 200,
1316 271, 203, 241, 60, 156, 278, 235, 27, 27, 235,
1317 235, 84, 250, 60, 192, 228, 259, 286, 38, 60,
1318 167, 285, 223, 60, 286, 268, 60, 281, 60, 181,
1319 206, 5, 64, 66, 156, 177, 274, 183, 184, 289,
1320 290, 291, 60, 156, 29, 36, 39, 76, 107, 170,
1321 230, 231, 232, 156, 156, 60, 245, 286, 285, 46,
1322 54, 72, 73, 75, 81, 108, 109, 112, 113, 115,
1323 116, 117, 119, 174, 236, 235, 235, 204, 156, 61,
1324 130, 269, 35, 9, 17, 52, 53, 69, 90, 98,
1325 100, 114, 131, 132, 167, 169, 174, 178, 207, 208,
1326 209, 210, 211, 212, 213, 144, 290, 292, 293, 295,
1327 181, 192, 156, 4, 26, 103, 110, 127, 176, 179,
1328 233, 235, 27, 267, 204, 60, 60, 60, 171, 156,
1329 192, 181, 196, 293, 195, 286, 194, 203, 185, 294,
1330 192, 186, 296, 297, 286, 192, 196, 297, 181, 286,
1331 195, 187, 188, 189, 190, 191, 298, 299, 300, 196,
1332 299, 181, 192, 181, 286
1335 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1336 static const yytype_uint16 yyr1[] =
1338 0, 197, 198, 199, 199, 199, 200, 200, 200, 200,
1339 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
1340 201, 202, 202, 202, 202, 202, 203, 203, 204, 205,
1341 205, 206, 206, 207, 207, 207, 208, 209, 209, 209,
1342 209, 209, 209, 209, 209, 210, 210, 211, 211, 211,
1343 211, 211, 211, 212, 213, 214, 215, 215, 216, 216,
1344 216, 216, 217, 217, 217, 217, 217, 217, 217, 217,
1345 217, 218, 218, 219, 219, 220, 220, 220, 220, 220,
1346 221, 222, 222, 223, 223, 223, 224, 224, 224, 224,
1347 224, 224, 225, 225, 225, 225, 226, 226, 226, 227,
1348 227, 228, 228, 228, 228, 228, 228, 228, 228, 229,
1349 229, 230, 230, 230, 230, 231, 231, 232, 232, 233,
1350 233, 233, 233, 233, 233, 233, 234, 234, 234, 234,
1351 234, 234, 234, 234, 235, 235, 236, 236, 236, 236,
1352 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1353 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
1354 242, 242, 242, 242, 242, 242, 242, 242, 243, 244,
1355 244, 245, 245, 245, 245, 245, 246, 246, 247, 247,
1356 247, 247, 248, 249, 249, 250, 251, 251, 251, 252,
1357 252, 253, 253, 254, 254, 255, 255, 255, 255, 255,
1358 255, 256, 256, 257, 258, 258, 259, 260, 260, 260,
1359 260, 260, 260, 260, 260, 260, 260, 261, 261, 261,
1360 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
1361 262, 262, 262, 263, 263, 263, 264, 264, 265, 265,
1362 265, 266, 267, 267, 268, 268, 269, 269, 270, 270,
1363 271, 272, 272, 273, 273, 274, 274, 274, 274, 275,
1364 275, 275, 276, 277, 277, 278, 278, 278, 278, 278,
1365 278, 278, 279, 279, 280, 280, 281, 281, 282, 283,
1366 283, 284, 284, 285, 285, 285, 286, 286, 287, 288,
1367 289, 289, 290, 291, 291, 292, 292, 293, 294, 295,
1368 296, 296, 297, 298, 298, 299, 300, 300, 300, 300,
1372 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1373 static const yytype_uint8 yyr2[] =
1375 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1377 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1378 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1379 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1380 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1381 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1382 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1383 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1384 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
1385 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1386 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1387 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
1388 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
1389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1390 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
1391 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
1392 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
1393 1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
1394 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1395 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1396 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1397 2, 2, 3, 1, 2, 2, 2, 2, 3, 2,
1398 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1399 0, 4, 1, 0, 0, 2, 2, 2, 2, 1,
1400 1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1401 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
1402 1, 1, 2, 1, 2, 1, 1, 1, 5, 2,
1403 1, 2, 1, 1, 1, 1, 1, 1, 5, 1,
1404 3, 2, 3, 1, 1, 2, 1, 5, 4, 3,
1405 2, 1, 6, 3, 2, 3, 1, 1, 1, 1,
1410 #define yyerrok (yyerrstatus = 0)
1411 #define yyclearin (yychar = YYEMPTY)
1412 #define YYEMPTY (-2)
1415 #define YYACCEPT goto yyacceptlab
1416 #define YYABORT goto yyabortlab
1417 #define YYERROR goto yyerrorlab
1420 #define YYRECOVERING() (!!yyerrstatus)
1422 #define YYBACKUP(Token, Value) \
1424 if (yychar == YYEMPTY) \
1428 YYPOPSTACK (yylen); \
1434 yyerror (ip_file, YY_("syntax error: cannot back up")); \
1439 /* Error token number */
1441 #define YYERRCODE 256
1445 /* Enable debugging if requested. */
1449 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1450 # define YYFPRINTF fprintf
1453 # define YYDPRINTF(Args) \
1459 /* This macro is provided for backward compatibility. */
1460 #ifndef YY_LOCATION_PRINT
1461 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1465 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1469 YYFPRINTF (stderr, "%s ", Title); \
1470 yy_symbol_print (stderr, \
1471 Type, Value, ip_file); \
1472 YYFPRINTF (stderr, "\n"); \
1477 /*----------------------------------------.
1478 | Print this symbol's value on YYOUTPUT. |
1479 `----------------------------------------*/
1482 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct FILE_INFO *ip_file)
1484 FILE *yyo = yyoutput;
1490 if (yytype < YYNTOKENS)
1491 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1497 /*--------------------------------.
1498 | Print this symbol on YYOUTPUT. |
1499 `--------------------------------*/
1502 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct FILE_INFO *ip_file)
1504 YYFPRINTF (yyoutput, "%s %s (",
1505 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1507 yy_symbol_value_print (yyoutput, yytype, yyvaluep, ip_file);
1508 YYFPRINTF (yyoutput, ")");
1511 /*------------------------------------------------------------------.
1512 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1514 `------------------------------------------------------------------*/
1517 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1519 YYFPRINTF (stderr, "Stack now");
1520 for (; yybottom <= yytop; yybottom++)
1522 int yybot = *yybottom;
1523 YYFPRINTF (stderr, " %d", yybot);
1525 YYFPRINTF (stderr, "\n");
1528 # define YY_STACK_PRINT(Bottom, Top) \
1531 yy_stack_print ((Bottom), (Top)); \
1535 /*------------------------------------------------.
1536 | Report that the YYRULE is going to be reduced. |
1537 `------------------------------------------------*/
1540 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct FILE_INFO *ip_file)
1542 unsigned long int yylno = yyrline[yyrule];
1543 int yynrhs = yyr2[yyrule];
1545 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1547 /* The symbols being reduced. */
1548 for (yyi = 0; yyi < yynrhs; yyi++)
1550 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1551 yy_symbol_print (stderr,
1552 yystos[yyssp[yyi + 1 - yynrhs]],
1553 &(yyvsp[(yyi + 1) - (yynrhs)])
1555 YYFPRINTF (stderr, "\n");
1559 # define YY_REDUCE_PRINT(Rule) \
1562 yy_reduce_print (yyssp, yyvsp, Rule, ip_file); \
1565 /* Nonzero means print parse trace. It is left uninitialized so that
1566 multiple parsers can coexist. */
1568 #else /* !YYDEBUG */
1569 # define YYDPRINTF(Args)
1570 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1571 # define YY_STACK_PRINT(Bottom, Top)
1572 # define YY_REDUCE_PRINT(Rule)
1573 #endif /* !YYDEBUG */
1576 /* YYINITDEPTH -- initial size of the parser's stacks. */
1578 # define YYINITDEPTH 200
1581 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1582 if the built-in stack extension method is used).
1584 Do not make this value too large; the results are undefined if
1585 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1586 evaluated with infinite-precision integer arithmetic. */
1589 # define YYMAXDEPTH 10000
1596 # if defined __GLIBC__ && defined _STRING_H
1597 # define yystrlen strlen
1599 /* Return the length of YYSTR. */
1601 yystrlen (const char *yystr)
1604 for (yylen = 0; yystr[yylen]; yylen++)
1612 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1613 # define yystpcpy stpcpy
1615 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1618 yystpcpy (char *yydest, const char *yysrc)
1621 const char *yys = yysrc;
1623 while ((*yyd++ = *yys++) != '\0')
1632 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1633 quotes and backslashes, so that it's suitable for yyerror. The
1634 heuristic is that double-quoting is unnecessary unless the string
1635 contains an apostrophe, a comma, or backslash (other than
1636 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1637 null, do not copy; instead, return the length of what the result
1640 yytnamerr (char *yyres, const char *yystr)
1645 char const *yyp = yystr;
1652 goto do_not_strip_quotes;
1656 goto do_not_strip_quotes;
1669 do_not_strip_quotes: ;
1673 return yystrlen (yystr);
1675 return yystpcpy (yyres, yystr) - yyres;
1679 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1680 about the unexpected token YYTOKEN for the state stack whose top is
1683 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1684 not large enough to hold the message. In that case, also set
1685 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1686 required number of bytes is too large to store. */
1688 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1689 yytype_int16 *yyssp, int yytoken)
1691 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1692 YYSIZE_T yysize = yysize0;
1693 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1694 /* Internationalized format string. */
1695 const char *yyformat = YY_NULLPTR;
1696 /* Arguments of yyformat. */
1697 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1698 /* Number of reported tokens (one for the "unexpected", one per
1702 /* There are many possibilities here to consider:
1703 - If this state is a consistent state with a default action, then
1704 the only way this function was invoked is if the default action
1705 is an error action. In that case, don't check for expected
1706 tokens because there are none.
1707 - The only way there can be no lookahead present (in yychar) is if
1708 this state is a consistent state with a default action. Thus,
1709 detecting the absence of a lookahead is sufficient to determine
1710 that there is no unexpected or expected token to report. In that
1711 case, just report a simple "syntax error".
1712 - Don't assume there isn't a lookahead just because this state is a
1713 consistent state with a default action. There might have been a
1714 previous inconsistent state, consistent state with a non-default
1715 action, or user semantic action that manipulated yychar.
1716 - Of course, the expected token list depends on states to have
1717 correct lookahead information, and it depends on the parser not
1718 to perform extra reductions after fetching a lookahead from the
1719 scanner and before detecting a syntax error. Thus, state merging
1720 (from LALR or IELR) and default reductions corrupt the expected
1721 token list. However, the list is correct for canonical LR with
1722 one exception: it will still contain any token that will not be
1723 accepted due to an error action in a later state.
1725 if (yytoken != YYEMPTY)
1727 int yyn = yypact[*yyssp];
1728 yyarg[yycount++] = yytname[yytoken];
1729 if (!yypact_value_is_default (yyn))
1731 /* Start YYX at -YYN if negative to avoid negative indexes in
1732 YYCHECK. In other words, skip the first -YYN actions for
1733 this state because they are default actions. */
1734 int yyxbegin = yyn < 0 ? -yyn : 0;
1735 /* Stay within bounds of both yycheck and yytname. */
1736 int yychecklim = YYLAST - yyn + 1;
1737 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1740 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1741 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1742 && !yytable_value_is_error (yytable[yyx + yyn]))
1744 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1750 yyarg[yycount++] = yytname[yyx];
1752 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1753 if (! (yysize <= yysize1
1754 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1764 # define YYCASE_(N, S) \
1768 YYCASE_(0, YY_("syntax error"));
1769 YYCASE_(1, YY_("syntax error, unexpected %s"));
1770 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1771 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1772 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1773 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1778 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1779 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1784 if (*yymsg_alloc < yysize)
1786 *yymsg_alloc = 2 * yysize;
1787 if (! (yysize <= *yymsg_alloc
1788 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1789 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1793 /* Avoid sprintf, as that infringes on the user's name space.
1794 Don't have undefined behavior even if the translation
1795 produced a string with the wrong number of "%s"s. */
1799 while ((*yyp = *yyformat) != '\0')
1800 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1802 yyp += yytnamerr (yyp, yyarg[yyi++]);
1813 #endif /* YYERROR_VERBOSE */
1815 /*-----------------------------------------------.
1816 | Release the memory associated to this symbol. |
1817 `-----------------------------------------------*/
1820 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct FILE_INFO *ip_file)
1826 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1828 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1830 YY_IGNORE_MAYBE_UNINITIALIZED_END
1836 /* The lookahead symbol. */
1839 /* The semantic value of the lookahead symbol. */
1841 /* Number of syntax errors so far. */
1850 yyparse (struct FILE_INFO *ip_file)
1853 /* Number of tokens to shift before error messages enabled. */
1856 /* The stacks and their tools:
1857 'yyss': related to states.
1858 'yyvs': related to semantic values.
1860 Refer to the stacks through separate pointers, to allow yyoverflow
1861 to reallocate them elsewhere. */
1863 /* The state stack. */
1864 yytype_int16 yyssa[YYINITDEPTH];
1866 yytype_int16 *yyssp;
1868 /* The semantic value stack. */
1869 YYSTYPE yyvsa[YYINITDEPTH];
1873 YYSIZE_T yystacksize;
1877 /* Lookahead token as an internal (translated) token number. */
1879 /* The variables used to return semantic value and location from the
1884 /* Buffer for error messages, and its allocated size. */
1886 char *yymsg = yymsgbuf;
1887 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1890 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1892 /* The number of symbols on the RHS of the reduced rule.
1893 Keep to zero when no symbol should be popped. */
1896 yyssp = yyss = yyssa;
1897 yyvsp = yyvs = yyvsa;
1898 yystacksize = YYINITDEPTH;
1900 YYDPRINTF ((stderr, "Starting parse\n"));
1905 yychar = YYEMPTY; /* Cause a token to be read. */
1908 /*------------------------------------------------------------.
1909 | yynewstate -- Push a new state, which is found in yystate. |
1910 `------------------------------------------------------------*/
1912 /* In all cases, when you get here, the value and location stacks
1913 have just been pushed. So pushing a state here evens the stacks. */
1919 if (yyss + yystacksize - 1 <= yyssp)
1921 /* Get the current used size of the three stacks, in elements. */
1922 YYSIZE_T yysize = yyssp - yyss + 1;
1926 /* Give user a chance to reallocate the stack. Use copies of
1927 these so that the &'s don't force the real ones into
1929 YYSTYPE *yyvs1 = yyvs;
1930 yytype_int16 *yyss1 = yyss;
1932 /* Each stack pointer address is followed by the size of the
1933 data in use in that stack, in bytes. This used to be a
1934 conditional around just the two extra args, but that might
1935 be undefined if yyoverflow is a macro. */
1936 yyoverflow (YY_("memory exhausted"),
1937 &yyss1, yysize * sizeof (*yyssp),
1938 &yyvs1, yysize * sizeof (*yyvsp),
1944 #else /* no yyoverflow */
1945 # ifndef YYSTACK_RELOCATE
1946 goto yyexhaustedlab;
1948 /* Extend the stack our own way. */
1949 if (YYMAXDEPTH <= yystacksize)
1950 goto yyexhaustedlab;
1952 if (YYMAXDEPTH < yystacksize)
1953 yystacksize = YYMAXDEPTH;
1956 yytype_int16 *yyss1 = yyss;
1957 union yyalloc *yyptr =
1958 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1960 goto yyexhaustedlab;
1961 YYSTACK_RELOCATE (yyss_alloc, yyss);
1962 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1963 # undef YYSTACK_RELOCATE
1965 YYSTACK_FREE (yyss1);
1968 #endif /* no yyoverflow */
1970 yyssp = yyss + yysize - 1;
1971 yyvsp = yyvs + yysize - 1;
1973 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1974 (unsigned long int) yystacksize));
1976 if (yyss + yystacksize - 1 <= yyssp)
1980 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1982 if (yystate == YYFINAL)
1992 /* Do appropriate processing given the current state. Read a
1993 lookahead token if we need one and don't already have one. */
1995 /* First try to decide what to do without reference to lookahead token. */
1996 yyn = yypact[yystate];
1997 if (yypact_value_is_default (yyn))
2000 /* Not known => get a lookahead token if don't already have one. */
2002 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2003 if (yychar == YYEMPTY)
2005 YYDPRINTF ((stderr, "Reading a token: "));
2006 yychar = yylex (ip_file);
2009 if (yychar <= YYEOF)
2011 yychar = yytoken = YYEOF;
2012 YYDPRINTF ((stderr, "Now at end of input.\n"));
2016 yytoken = YYTRANSLATE (yychar);
2017 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2020 /* If the proper action on seeing token YYTOKEN is to reduce or to
2021 detect an error, take that action. */
2023 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2028 if (yytable_value_is_error (yyn))
2034 /* Count tokens shifted since error; after three, turn off error
2039 /* Shift the lookahead token. */
2040 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2042 /* Discard the shifted token. */
2046 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2048 YY_IGNORE_MAYBE_UNINITIALIZED_END
2053 /*-----------------------------------------------------------.
2054 | yydefault -- do the default action for the current state. |
2055 `-----------------------------------------------------------*/
2057 yyn = yydefact[yystate];
2063 /*-----------------------------.
2064 | yyreduce -- Do a reduction. |
2065 `-----------------------------*/
2067 /* yyn is the number of a rule to reduce with. */
2070 /* If YYLEN is nonzero, implement the default value of the action:
2073 Otherwise, the following line sets YYVAL to garbage.
2074 This behavior is undocumented and Bison
2075 users should not rely upon it. Assigning to YYVAL
2076 unconditionally makes the parser a bit smaller, and it avoids a
2077 GCC warning that YYVAL may be used uninitialized. */
2078 yyval = yyvsp[1-yylen];
2081 YY_REDUCE_PRINT (yyn);
2085 #line 373 "ntp_parser.y" /* yacc.c:1646 */
2087 /* I will need to incorporate much more fine grained
2088 * error messages. The following should suffice for
2092 "syntax error in %s line %d, column %d",
2094 ip_file->err_line_no,
2095 ip_file->err_col_no);
2097 #line 2098 "ntp_parser.c" /* yacc.c:1646 */
2101 #line 408 "ntp_parser.y" /* yacc.c:1646 */
2105 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2106 APPEND_G_FIFO(cfgt.peers, my_node);
2108 #line 2109 "ntp_parser.c" /* yacc.c:1646 */
2112 #line 427 "ntp_parser.y" /* yacc.c:1646 */
2113 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2114 #line 2115 "ntp_parser.c" /* yacc.c:1646 */
2118 #line 432 "ntp_parser.y" /* yacc.c:1646 */
2119 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2120 #line 2121 "ntp_parser.c" /* yacc.c:1646 */
2124 #line 437 "ntp_parser.y" /* yacc.c:1646 */
2125 { (yyval.Integer) = AF_INET; }
2126 #line 2127 "ntp_parser.c" /* yacc.c:1646 */
2130 #line 439 "ntp_parser.y" /* yacc.c:1646 */
2131 { (yyval.Integer) = AF_INET6; }
2132 #line 2133 "ntp_parser.c" /* yacc.c:1646 */
2136 #line 444 "ntp_parser.y" /* yacc.c:1646 */
2137 { (yyval.Attr_val_fifo) = NULL; }
2138 #line 2139 "ntp_parser.c" /* yacc.c:1646 */
2142 #line 446 "ntp_parser.y" /* yacc.c:1646 */
2144 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2145 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2147 #line 2148 "ntp_parser.c" /* yacc.c:1646 */
2151 #line 460 "ntp_parser.y" /* yacc.c:1646 */
2152 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2153 #line 2154 "ntp_parser.c" /* yacc.c:1646 */
2157 #line 476 "ntp_parser.y" /* yacc.c:1646 */
2158 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2159 #line 2160 "ntp_parser.c" /* yacc.c:1646 */
2163 #line 478 "ntp_parser.y" /* yacc.c:1646 */
2164 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2165 #line 2166 "ntp_parser.c" /* yacc.c:1646 */
2169 #line 492 "ntp_parser.y" /* yacc.c:1646 */
2170 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2171 #line 2172 "ntp_parser.c" /* yacc.c:1646 */
2175 #line 506 "ntp_parser.y" /* yacc.c:1646 */
2177 unpeer_node *my_node;
2179 my_node = create_unpeer_node((yyvsp[0].Address_node));
2181 APPEND_G_FIFO(cfgt.unpeers, my_node);
2183 #line 2184 "ntp_parser.c" /* yacc.c:1646 */
2187 #line 527 "ntp_parser.y" /* yacc.c:1646 */
2188 { cfgt.broadcastclient = 1; }
2189 #line 2190 "ntp_parser.c" /* yacc.c:1646 */
2193 #line 529 "ntp_parser.y" /* yacc.c:1646 */
2194 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2195 #line 2196 "ntp_parser.c" /* yacc.c:1646 */
2199 #line 531 "ntp_parser.y" /* yacc.c:1646 */
2200 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2201 #line 2202 "ntp_parser.c" /* yacc.c:1646 */
2205 #line 533 "ntp_parser.y" /* yacc.c:1646 */
2206 { cfgt.mdnstries = (yyvsp[0].Integer); }
2207 #line 2208 "ntp_parser.c" /* yacc.c:1646 */
2211 #line 544 "ntp_parser.y" /* yacc.c:1646 */
2215 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2216 APPEND_G_FIFO(cfgt.vars, atrv);
2218 #line 2219 "ntp_parser.c" /* yacc.c:1646 */
2222 #line 551 "ntp_parser.y" /* yacc.c:1646 */
2223 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2224 #line 2225 "ntp_parser.c" /* yacc.c:1646 */
2228 #line 553 "ntp_parser.y" /* yacc.c:1646 */
2230 cfgt.auth.cryptosw++;
2231 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2233 #line 2234 "ntp_parser.c" /* yacc.c:1646 */
2237 #line 558 "ntp_parser.y" /* yacc.c:1646 */
2238 { cfgt.auth.keys = (yyvsp[0].String); }
2239 #line 2240 "ntp_parser.c" /* yacc.c:1646 */
2243 #line 560 "ntp_parser.y" /* yacc.c:1646 */
2244 { cfgt.auth.keysdir = (yyvsp[0].String); }
2245 #line 2246 "ntp_parser.c" /* yacc.c:1646 */
2249 #line 562 "ntp_parser.y" /* yacc.c:1646 */
2250 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2251 #line 2252 "ntp_parser.c" /* yacc.c:1646 */
2255 #line 564 "ntp_parser.y" /* yacc.c:1646 */
2256 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2257 #line 2258 "ntp_parser.c" /* yacc.c:1646 */
2261 #line 566 "ntp_parser.y" /* yacc.c:1646 */
2263 cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
2265 // if (!cfgt.auth.trusted_key_list)
2266 // cfgt.auth.trusted_key_list = $2;
2268 // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
2270 #line 2271 "ntp_parser.c" /* yacc.c:1646 */
2274 #line 575 "ntp_parser.y" /* yacc.c:1646 */
2275 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2276 #line 2277 "ntp_parser.c" /* yacc.c:1646 */
2280 #line 580 "ntp_parser.y" /* yacc.c:1646 */
2281 { (yyval.Attr_val_fifo) = NULL; }
2282 #line 2283 "ntp_parser.c" /* yacc.c:1646 */
2286 #line 582 "ntp_parser.y" /* yacc.c:1646 */
2288 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2289 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2291 #line 2292 "ntp_parser.c" /* yacc.c:1646 */
2295 #line 590 "ntp_parser.y" /* yacc.c:1646 */
2296 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2297 #line 2298 "ntp_parser.c" /* yacc.c:1646 */
2301 #line 592 "ntp_parser.y" /* yacc.c:1646 */
2303 (yyval.Attr_val) = NULL;
2304 cfgt.auth.revoke = (yyvsp[0].Integer);
2305 msyslog(LOG_WARNING,
2306 "'crypto revoke %d' is deprecated, "
2307 "please use 'revoke %d' instead.",
2308 cfgt.auth.revoke, cfgt.auth.revoke);
2310 #line 2311 "ntp_parser.c" /* yacc.c:1646 */
2314 #line 617 "ntp_parser.y" /* yacc.c:1646 */
2315 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2316 #line 2317 "ntp_parser.c" /* yacc.c:1646 */
2320 #line 622 "ntp_parser.y" /* yacc.c:1646 */
2322 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2323 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2325 #line 2326 "ntp_parser.c" /* yacc.c:1646 */
2329 #line 627 "ntp_parser.y" /* yacc.c:1646 */
2331 (yyval.Attr_val_fifo) = NULL;
2332 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2334 #line 2335 "ntp_parser.c" /* yacc.c:1646 */
2338 #line 635 "ntp_parser.y" /* yacc.c:1646 */
2339 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2340 #line 2341 "ntp_parser.c" /* yacc.c:1646 */
2344 #line 637 "ntp_parser.y" /* yacc.c:1646 */
2345 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2346 #line 2347 "ntp_parser.c" /* yacc.c:1646 */
2350 #line 639 "ntp_parser.y" /* yacc.c:1646 */
2351 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2352 #line 2353 "ntp_parser.c" /* yacc.c:1646 */
2356 #line 665 "ntp_parser.y" /* yacc.c:1646 */
2357 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2358 #line 2359 "ntp_parser.c" /* yacc.c:1646 */
2362 #line 667 "ntp_parser.y" /* yacc.c:1646 */
2364 if (input_from_file) {
2365 cfgt.stats_dir = (yyvsp[0].String);
2367 YYFREE((yyvsp[0].String));
2368 yyerror(ip_file, "statsdir remote configuration ignored");
2371 #line 2372 "ntp_parser.c" /* yacc.c:1646 */
2375 #line 676 "ntp_parser.y" /* yacc.c:1646 */
2379 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2380 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2382 #line 2383 "ntp_parser.c" /* yacc.c:1646 */
2386 #line 686 "ntp_parser.y" /* yacc.c:1646 */
2388 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2389 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2391 #line 2392 "ntp_parser.c" /* yacc.c:1646 */
2395 #line 691 "ntp_parser.y" /* yacc.c:1646 */
2397 (yyval.Int_fifo) = NULL;
2398 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2400 #line 2401 "ntp_parser.c" /* yacc.c:1646 */
2404 #line 710 "ntp_parser.y" /* yacc.c:1646 */
2405 { (yyval.Attr_val_fifo) = NULL; }
2406 #line 2407 "ntp_parser.c" /* yacc.c:1646 */
2410 #line 712 "ntp_parser.y" /* yacc.c:1646 */
2412 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2413 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2415 #line 2416 "ntp_parser.c" /* yacc.c:1646 */
2419 #line 720 "ntp_parser.y" /* yacc.c:1646 */
2421 if (input_from_file) {
2422 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2424 (yyval.Attr_val) = NULL;
2425 YYFREE((yyvsp[0].String));
2426 yyerror(ip_file, "filegen file remote config ignored");
2429 #line 2430 "ntp_parser.c" /* yacc.c:1646 */
2433 #line 730 "ntp_parser.y" /* yacc.c:1646 */
2435 if (input_from_file) {
2436 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2438 (yyval.Attr_val) = NULL;
2439 yyerror(ip_file, "filegen type remote config ignored");
2442 #line 2443 "ntp_parser.c" /* yacc.c:1646 */
2446 #line 739 "ntp_parser.y" /* yacc.c:1646 */
2450 if (input_from_file) {
2451 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2453 (yyval.Attr_val) = NULL;
2454 if (T_Link == (yyvsp[0].Integer))
2455 err = "filegen link remote config ignored";
2457 err = "filegen nolink remote config ignored";
2458 yyerror(ip_file, err);
2461 #line 2462 "ntp_parser.c" /* yacc.c:1646 */
2465 #line 754 "ntp_parser.y" /* yacc.c:1646 */
2466 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2467 #line 2468 "ntp_parser.c" /* yacc.c:1646 */
2471 #line 784 "ntp_parser.y" /* yacc.c:1646 */
2473 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2475 #line 2476 "ntp_parser.c" /* yacc.c:1646 */
2479 #line 788 "ntp_parser.y" /* yacc.c:1646 */
2481 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2483 #line 2484 "ntp_parser.c" /* yacc.c:1646 */
2487 #line 792 "ntp_parser.y" /* yacc.c:1646 */
2491 rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
2493 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2495 #line 2496 "ntp_parser.c" /* yacc.c:1646 */
2499 #line 800 "ntp_parser.y" /* yacc.c:1646 */
2503 rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
2505 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2507 #line 2508 "ntp_parser.c" /* yacc.c:1646 */
2511 #line 808 "ntp_parser.y" /* yacc.c:1646 */
2515 rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
2517 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2519 #line 2520 "ntp_parser.c" /* yacc.c:1646 */
2523 #line 816 "ntp_parser.y" /* yacc.c:1646 */
2527 rn = create_restrict_node(
2528 create_address_node(
2531 create_address_node(
2534 (yyvsp[0].Int_fifo),
2536 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2538 #line 2539 "ntp_parser.c" /* yacc.c:1646 */
2542 #line 831 "ntp_parser.y" /* yacc.c:1646 */
2546 rn = create_restrict_node(
2547 create_address_node(
2550 create_address_node(
2553 (yyvsp[0].Int_fifo),
2555 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2557 #line 2558 "ntp_parser.c" /* yacc.c:1646 */
2561 #line 846 "ntp_parser.y" /* yacc.c:1646 */
2565 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
2566 rn = create_restrict_node(
2567 NULL, NULL, (yyvsp[0].Int_fifo), ip_file->line_no);
2568 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2570 #line 2571 "ntp_parser.c" /* yacc.c:1646 */
2574 #line 858 "ntp_parser.y" /* yacc.c:1646 */
2575 { (yyval.Int_fifo) = NULL; }
2576 #line 2577 "ntp_parser.c" /* yacc.c:1646 */
2580 #line 860 "ntp_parser.y" /* yacc.c:1646 */
2582 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2583 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2585 #line 2586 "ntp_parser.c" /* yacc.c:1646 */
2589 #line 886 "ntp_parser.y" /* yacc.c:1646 */
2591 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2592 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2594 #line 2595 "ntp_parser.c" /* yacc.c:1646 */
2598 #line 891 "ntp_parser.y" /* yacc.c:1646 */
2600 (yyval.Attr_val_fifo) = NULL;
2601 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2603 #line 2604 "ntp_parser.c" /* yacc.c:1646 */
2607 #line 899 "ntp_parser.y" /* yacc.c:1646 */
2608 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2609 #line 2610 "ntp_parser.c" /* yacc.c:1646 */
2613 #line 910 "ntp_parser.y" /* yacc.c:1646 */
2615 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2616 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2618 #line 2619 "ntp_parser.c" /* yacc.c:1646 */
2622 #line 915 "ntp_parser.y" /* yacc.c:1646 */
2624 (yyval.Attr_val_fifo) = NULL;
2625 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2627 #line 2628 "ntp_parser.c" /* yacc.c:1646 */
2631 #line 923 "ntp_parser.y" /* yacc.c:1646 */
2632 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2633 #line 2634 "ntp_parser.c" /* yacc.c:1646 */
2637 #line 943 "ntp_parser.y" /* yacc.c:1646 */
2639 addr_opts_node *aon;
2641 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2642 APPEND_G_FIFO(cfgt.fudge, aon);
2644 #line 2645 "ntp_parser.c" /* yacc.c:1646 */
2648 #line 953 "ntp_parser.y" /* yacc.c:1646 */
2650 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2651 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2653 #line 2654 "ntp_parser.c" /* yacc.c:1646 */
2657 #line 958 "ntp_parser.y" /* yacc.c:1646 */
2659 (yyval.Attr_val_fifo) = NULL;
2660 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2662 #line 2663 "ntp_parser.c" /* yacc.c:1646 */
2666 #line 966 "ntp_parser.y" /* yacc.c:1646 */
2667 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2668 #line 2669 "ntp_parser.c" /* yacc.c:1646 */
2672 #line 968 "ntp_parser.y" /* yacc.c:1646 */
2673 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2674 #line 2675 "ntp_parser.c" /* yacc.c:1646 */
2678 #line 970 "ntp_parser.y" /* yacc.c:1646 */
2679 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2680 #line 2681 "ntp_parser.c" /* yacc.c:1646 */
2684 #line 972 "ntp_parser.y" /* yacc.c:1646 */
2685 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2686 #line 2687 "ntp_parser.c" /* yacc.c:1646 */
2690 #line 974 "ntp_parser.y" /* yacc.c:1646 */
2691 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2692 #line 2693 "ntp_parser.c" /* yacc.c:1646 */
2696 #line 995 "ntp_parser.y" /* yacc.c:1646 */
2697 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2698 #line 2699 "ntp_parser.c" /* yacc.c:1646 */
2702 #line 1000 "ntp_parser.y" /* yacc.c:1646 */
2704 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2705 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2707 #line 2708 "ntp_parser.c" /* yacc.c:1646 */
2711 #line 1005 "ntp_parser.y" /* yacc.c:1646 */
2713 (yyval.Attr_val_fifo) = NULL;
2714 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2716 #line 2717 "ntp_parser.c" /* yacc.c:1646 */
2720 #line 1013 "ntp_parser.y" /* yacc.c:1646 */
2721 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2722 #line 2723 "ntp_parser.c" /* yacc.c:1646 */
2726 #line 1029 "ntp_parser.y" /* yacc.c:1646 */
2727 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2728 #line 2729 "ntp_parser.c" /* yacc.c:1646 */
2732 #line 1031 "ntp_parser.y" /* yacc.c:1646 */
2733 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2734 #line 2735 "ntp_parser.c" /* yacc.c:1646 */
2738 #line 1036 "ntp_parser.y" /* yacc.c:1646 */
2740 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2741 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2743 #line 2744 "ntp_parser.c" /* yacc.c:1646 */
2747 #line 1041 "ntp_parser.y" /* yacc.c:1646 */
2749 (yyval.Attr_val_fifo) = NULL;
2750 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2752 #line 2753 "ntp_parser.c" /* yacc.c:1646 */
2756 #line 1049 "ntp_parser.y" /* yacc.c:1646 */
2757 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2758 #line 2759 "ntp_parser.c" /* yacc.c:1646 */
2762 #line 1051 "ntp_parser.y" /* yacc.c:1646 */
2764 if (input_from_file) {
2765 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2769 (yyval.Attr_val) = NULL;
2770 snprintf(err_str, sizeof(err_str),
2771 "enable/disable %s remote configuration ignored",
2772 keyword((yyvsp[0].Integer)));
2773 yyerror(ip_file, err_str);
2776 #line 2777 "ntp_parser.c" /* yacc.c:1646 */
2780 #line 1086 "ntp_parser.y" /* yacc.c:1646 */
2781 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2782 #line 2783 "ntp_parser.c" /* yacc.c:1646 */
2786 #line 1091 "ntp_parser.y" /* yacc.c:1646 */
2788 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2789 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2791 #line 2792 "ntp_parser.c" /* yacc.c:1646 */
2795 #line 1096 "ntp_parser.y" /* yacc.c:1646 */
2797 (yyval.Attr_val_fifo) = NULL;
2798 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2800 #line 2801 "ntp_parser.c" /* yacc.c:1646 */
2804 #line 1104 "ntp_parser.y" /* yacc.c:1646 */
2805 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2806 #line 2807 "ntp_parser.c" /* yacc.c:1646 */
2810 #line 1129 "ntp_parser.y" /* yacc.c:1646 */
2814 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2815 APPEND_G_FIFO(cfgt.vars, av);
2817 #line 2818 "ntp_parser.c" /* yacc.c:1646 */
2821 #line 1136 "ntp_parser.y" /* yacc.c:1646 */
2825 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2826 APPEND_G_FIFO(cfgt.vars, av);
2828 #line 2829 "ntp_parser.c" /* yacc.c:1646 */
2832 #line 1143 "ntp_parser.y" /* yacc.c:1646 */
2834 char error_text[64];
2837 if (input_from_file) {
2838 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2839 APPEND_G_FIFO(cfgt.vars, av);
2841 YYFREE((yyvsp[0].String));
2842 snprintf(error_text, sizeof(error_text),
2843 "%s remote config ignored",
2844 keyword((yyvsp[-1].Integer)));
2845 yyerror(ip_file, error_text);
2848 #line 2849 "ntp_parser.c" /* yacc.c:1646 */
2852 #line 1159 "ntp_parser.y" /* yacc.c:1646 */
2854 if (!input_from_file) {
2855 yyerror(ip_file, "remote includefile ignored");
2858 if (curr_include_level >= MAXINCLUDELEVEL) {
2859 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2860 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2862 fp[curr_include_level + 1] = F_OPEN(FindConfig((yyvsp[-1].String)), "r");
2863 if (fp[curr_include_level + 1] == NULL) {
2864 fprintf(stderr, "getconfig: Couldn't open <%s>\n", FindConfig((yyvsp[-1].String)));
2865 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", FindConfig((yyvsp[-1].String)));
2867 ip_file = fp[++curr_include_level];
2871 #line 2872 "ntp_parser.c" /* yacc.c:1646 */
2875 #line 1178 "ntp_parser.y" /* yacc.c:1646 */
2877 while (curr_include_level != -1)
2878 FCLOSE(fp[curr_include_level--]);
2880 #line 2881 "ntp_parser.c" /* yacc.c:1646 */
2884 #line 1183 "ntp_parser.y" /* yacc.c:1646 */
2885 { /* see drift_parm below for actions */ }
2886 #line 2887 "ntp_parser.c" /* yacc.c:1646 */
2890 #line 1185 "ntp_parser.y" /* yacc.c:1646 */
2891 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2892 #line 2893 "ntp_parser.c" /* yacc.c:1646 */
2896 #line 1187 "ntp_parser.y" /* yacc.c:1646 */
2897 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2898 #line 2899 "ntp_parser.c" /* yacc.c:1646 */
2902 #line 1189 "ntp_parser.y" /* yacc.c:1646 */
2903 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2904 #line 2905 "ntp_parser.c" /* yacc.c:1646 */
2908 #line 1191 "ntp_parser.y" /* yacc.c:1646 */
2910 addr_opts_node *aon;
2912 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2913 APPEND_G_FIFO(cfgt.trap, aon);
2915 #line 2916 "ntp_parser.c" /* yacc.c:1646 */
2919 #line 1198 "ntp_parser.y" /* yacc.c:1646 */
2920 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
2921 #line 2922 "ntp_parser.c" /* yacc.c:1646 */
2925 #line 1220 "ntp_parser.y" /* yacc.c:1646 */
2929 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
2930 APPEND_G_FIFO(cfgt.vars, av);
2932 #line 2933 "ntp_parser.c" /* yacc.c:1646 */
2936 #line 1227 "ntp_parser.y" /* yacc.c:1646 */
2940 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
2941 APPEND_G_FIFO(cfgt.vars, av);
2942 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
2943 APPEND_G_FIFO(cfgt.vars, av);
2945 #line 2946 "ntp_parser.c" /* yacc.c:1646 */
2949 #line 1236 "ntp_parser.y" /* yacc.c:1646 */
2953 av = create_attr_sval(T_Driftfile, "");
2954 APPEND_G_FIFO(cfgt.vars, av);
2956 #line 2957 "ntp_parser.c" /* yacc.c:1646 */
2960 #line 1246 "ntp_parser.y" /* yacc.c:1646 */
2961 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
2962 #line 2963 "ntp_parser.c" /* yacc.c:1646 */
2966 #line 1252 "ntp_parser.y" /* yacc.c:1646 */
2967 { (yyval.Integer) = 0; }
2968 #line 2969 "ntp_parser.c" /* yacc.c:1646 */
2972 #line 1257 "ntp_parser.y" /* yacc.c:1646 */
2973 { (yyval.Attr_val_fifo) = NULL; }
2974 #line 2975 "ntp_parser.c" /* yacc.c:1646 */
2978 #line 1259 "ntp_parser.y" /* yacc.c:1646 */
2980 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2981 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2983 #line 2984 "ntp_parser.c" /* yacc.c:1646 */
2987 #line 1267 "ntp_parser.y" /* yacc.c:1646 */
2988 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2989 #line 2990 "ntp_parser.c" /* yacc.c:1646 */
2993 #line 1269 "ntp_parser.y" /* yacc.c:1646 */
2995 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
2996 destroy_address_node((yyvsp[0].Address_node));
2998 #line 2999 "ntp_parser.c" /* yacc.c:1646 */
3002 #line 1277 "ntp_parser.y" /* yacc.c:1646 */
3004 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3005 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3007 #line 3008 "ntp_parser.c" /* yacc.c:1646 */
3011 #line 1282 "ntp_parser.y" /* yacc.c:1646 */
3013 (yyval.Attr_val_fifo) = NULL;
3014 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3016 #line 3017 "ntp_parser.c" /* yacc.c:1646 */
3020 #line 1290 "ntp_parser.y" /* yacc.c:1646 */
3025 switch ((yyvsp[0].String)[0]) {
3030 prefix = (yyvsp[0].String)[0];
3031 type = (yyvsp[0].String) + 1;
3036 type = (yyvsp[0].String);
3039 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3040 YYFREE((yyvsp[0].String));
3042 #line 3043 "ntp_parser.c" /* yacc.c:1646 */
3046 #line 1315 "ntp_parser.y" /* yacc.c:1646 */
3050 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3051 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3053 #line 3054 "ntp_parser.c" /* yacc.c:1646 */
3057 #line 1322 "ntp_parser.y" /* yacc.c:1646 */
3061 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3062 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3064 #line 3065 "ntp_parser.c" /* yacc.c:1646 */
3068 #line 1350 "ntp_parser.y" /* yacc.c:1646 */
3069 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3070 #line 3071 "ntp_parser.c" /* yacc.c:1646 */
3074 #line 1355 "ntp_parser.y" /* yacc.c:1646 */
3076 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3077 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3079 #line 3080 "ntp_parser.c" /* yacc.c:1646 */
3083 #line 1360 "ntp_parser.y" /* yacc.c:1646 */
3085 (yyval.Int_fifo) = NULL;
3086 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3088 #line 3089 "ntp_parser.c" /* yacc.c:1646 */
3092 #line 1384 "ntp_parser.y" /* yacc.c:1646 */
3094 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3095 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3097 #line 3098 "ntp_parser.c" /* yacc.c:1646 */
3101 #line 1389 "ntp_parser.y" /* yacc.c:1646 */
3103 (yyval.Attr_val_fifo) = NULL;
3104 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3106 #line 3107 "ntp_parser.c" /* yacc.c:1646 */
3110 #line 1397 "ntp_parser.y" /* yacc.c:1646 */
3112 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3113 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3115 #line 3116 "ntp_parser.c" /* yacc.c:1646 */
3119 #line 1402 "ntp_parser.y" /* yacc.c:1646 */
3121 (yyval.Attr_val_fifo) = NULL;
3122 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3124 #line 3125 "ntp_parser.c" /* yacc.c:1646 */
3128 #line 1410 "ntp_parser.y" /* yacc.c:1646 */
3129 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3130 #line 3131 "ntp_parser.c" /* yacc.c:1646 */
3134 #line 1416 "ntp_parser.y" /* yacc.c:1646 */
3135 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3136 #line 3137 "ntp_parser.c" /* yacc.c:1646 */
3140 #line 1421 "ntp_parser.y" /* yacc.c:1646 */
3142 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3143 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3145 #line 3146 "ntp_parser.c" /* yacc.c:1646 */
3149 #line 1426 "ntp_parser.y" /* yacc.c:1646 */
3151 (yyval.String_fifo) = NULL;
3152 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3154 #line 3155 "ntp_parser.c" /* yacc.c:1646 */
3158 #line 1434 "ntp_parser.y" /* yacc.c:1646 */
3160 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3161 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3163 #line 3164 "ntp_parser.c" /* yacc.c:1646 */
3167 #line 1439 "ntp_parser.y" /* yacc.c:1646 */
3169 (yyval.Address_fifo) = NULL;
3170 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3172 #line 3173 "ntp_parser.c" /* yacc.c:1646 */
3176 #line 1447 "ntp_parser.y" /* yacc.c:1646 */
3178 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3179 yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
3180 (yyval.Integer) = 1;
3182 (yyval.Integer) = (yyvsp[0].Integer);
3185 #line 3186 "ntp_parser.c" /* yacc.c:1646 */
3189 #line 1455 "ntp_parser.y" /* yacc.c:1646 */
3190 { (yyval.Integer) = 1; }
3191 #line 3192 "ntp_parser.c" /* yacc.c:1646 */
3195 #line 1456 "ntp_parser.y" /* yacc.c:1646 */
3196 { (yyval.Integer) = 0; }
3197 #line 3198 "ntp_parser.c" /* yacc.c:1646 */
3201 #line 1460 "ntp_parser.y" /* yacc.c:1646 */
3202 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3203 #line 3204 "ntp_parser.c" /* yacc.c:1646 */
3207 #line 1471 "ntp_parser.y" /* yacc.c:1646 */
3211 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3212 APPEND_G_FIFO(cfgt.sim_details, sn);
3214 /* Revert from ; to \n for end-of-command */
3215 old_config_style = 1;
3217 #line 3218 "ntp_parser.c" /* yacc.c:1646 */
3221 #line 1488 "ntp_parser.y" /* yacc.c:1646 */
3222 { old_config_style = 0; }
3223 #line 3224 "ntp_parser.c" /* yacc.c:1646 */
3227 #line 1493 "ntp_parser.y" /* yacc.c:1646 */
3229 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3230 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3232 #line 3233 "ntp_parser.c" /* yacc.c:1646 */
3236 #line 1498 "ntp_parser.y" /* yacc.c:1646 */
3238 (yyval.Attr_val_fifo) = NULL;
3239 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3241 #line 3242 "ntp_parser.c" /* yacc.c:1646 */
3245 #line 1506 "ntp_parser.y" /* yacc.c:1646 */
3246 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3247 #line 3248 "ntp_parser.c" /* yacc.c:1646 */
3251 #line 1516 "ntp_parser.y" /* yacc.c:1646 */
3253 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3254 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3256 #line 3257 "ntp_parser.c" /* yacc.c:1646 */
3260 #line 1521 "ntp_parser.y" /* yacc.c:1646 */
3262 (yyval.Sim_server_fifo) = NULL;
3263 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3265 #line 3266 "ntp_parser.c" /* yacc.c:1646 */
3269 #line 1529 "ntp_parser.y" /* yacc.c:1646 */
3270 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3271 #line 3272 "ntp_parser.c" /* yacc.c:1646 */
3275 #line 1534 "ntp_parser.y" /* yacc.c:1646 */
3276 { (yyval.Double) = (yyvsp[-1].Double); }
3277 #line 3278 "ntp_parser.c" /* yacc.c:1646 */
3281 #line 1539 "ntp_parser.y" /* yacc.c:1646 */
3282 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3283 #line 3284 "ntp_parser.c" /* yacc.c:1646 */
3287 #line 1544 "ntp_parser.y" /* yacc.c:1646 */
3289 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3290 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3292 #line 3293 "ntp_parser.c" /* yacc.c:1646 */
3296 #line 1549 "ntp_parser.y" /* yacc.c:1646 */
3298 (yyval.Sim_script_fifo) = NULL;
3299 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3301 #line 3302 "ntp_parser.c" /* yacc.c:1646 */
3305 #line 1557 "ntp_parser.y" /* yacc.c:1646 */
3306 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3307 #line 3308 "ntp_parser.c" /* yacc.c:1646 */
3311 #line 1562 "ntp_parser.y" /* yacc.c:1646 */
3313 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3314 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3316 #line 3317 "ntp_parser.c" /* yacc.c:1646 */
3320 #line 1567 "ntp_parser.y" /* yacc.c:1646 */
3322 (yyval.Attr_val_fifo) = NULL;
3323 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3325 #line 3326 "ntp_parser.c" /* yacc.c:1646 */
3329 #line 1575 "ntp_parser.y" /* yacc.c:1646 */
3330 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3331 #line 3332 "ntp_parser.c" /* yacc.c:1646 */
3335 #line 3336 "ntp_parser.c" /* yacc.c:1646 */
3338 /* User semantic actions sometimes alter yychar, and that requires
3339 that yytoken be updated with the new translation. We take the
3340 approach of translating immediately before every use of yytoken.
3341 One alternative is translating here after every semantic action,
3342 but that translation would be missed if the semantic action invokes
3343 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3344 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3345 incorrect destructor might then be invoked immediately. In the
3346 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3347 to an incorrect destructor call or verbose syntax error message
3348 before the lookahead is translated. */
3349 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3353 YY_STACK_PRINT (yyss, yyssp);
3357 /* Now 'shift' the result of the reduction. Determine what state
3358 that goes to, based on the state we popped back to and the rule
3359 number reduced by. */
3363 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3364 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3365 yystate = yytable[yystate];
3367 yystate = yydefgoto[yyn - YYNTOKENS];
3372 /*--------------------------------------.
3373 | yyerrlab -- here on detecting error. |
3374 `--------------------------------------*/
3376 /* Make sure we have latest lookahead translation. See comments at
3377 user semantic actions for why this is necessary. */
3378 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3380 /* If not already recovering from an error, report this error. */
3384 #if ! YYERROR_VERBOSE
3385 yyerror (ip_file, YY_("syntax error"));
3387 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3390 char const *yymsgp = YY_("syntax error");
3391 int yysyntax_error_status;
3392 yysyntax_error_status = YYSYNTAX_ERROR;
3393 if (yysyntax_error_status == 0)
3395 else if (yysyntax_error_status == 1)
3397 if (yymsg != yymsgbuf)
3398 YYSTACK_FREE (yymsg);
3399 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3403 yymsg_alloc = sizeof yymsgbuf;
3404 yysyntax_error_status = 2;
3408 yysyntax_error_status = YYSYNTAX_ERROR;
3412 yyerror (ip_file, yymsgp);
3413 if (yysyntax_error_status == 2)
3414 goto yyexhaustedlab;
3416 # undef YYSYNTAX_ERROR
3422 if (yyerrstatus == 3)
3424 /* If just tried and failed to reuse lookahead token after an
3425 error, discard it. */
3427 if (yychar <= YYEOF)
3429 /* Return failure if at end of input. */
3430 if (yychar == YYEOF)
3435 yydestruct ("Error: discarding",
3436 yytoken, &yylval, ip_file);
3441 /* Else will try to reuse lookahead token after shifting the error
3446 /*---------------------------------------------------.
3447 | yyerrorlab -- error raised explicitly by YYERROR. |
3448 `---------------------------------------------------*/
3451 /* Pacify compilers like GCC when the user code never invokes
3452 YYERROR and the label yyerrorlab therefore never appears in user
3454 if (/*CONSTCOND*/ 0)
3457 /* Do not reclaim the symbols of the rule whose action triggered
3461 YY_STACK_PRINT (yyss, yyssp);
3466 /*-------------------------------------------------------------.
3467 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3468 `-------------------------------------------------------------*/
3470 yyerrstatus = 3; /* Each real token shifted decrements this. */
3474 yyn = yypact[yystate];
3475 if (!yypact_value_is_default (yyn))
3478 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3486 /* Pop the current state because it cannot handle the error token. */
3491 yydestruct ("Error: popping",
3492 yystos[yystate], yyvsp, ip_file);
3495 YY_STACK_PRINT (yyss, yyssp);
3498 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3500 YY_IGNORE_MAYBE_UNINITIALIZED_END
3503 /* Shift the error token. */
3504 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3510 /*-------------------------------------.
3511 | yyacceptlab -- YYACCEPT comes here. |
3512 `-------------------------------------*/
3517 /*-----------------------------------.
3518 | yyabortlab -- YYABORT comes here. |
3519 `-----------------------------------*/
3524 #if !defined yyoverflow || YYERROR_VERBOSE
3525 /*-------------------------------------------------.
3526 | yyexhaustedlab -- memory exhaustion comes here. |
3527 `-------------------------------------------------*/
3529 yyerror (ip_file, YY_("memory exhausted"));
3535 if (yychar != YYEMPTY)
3537 /* Make sure we have latest lookahead translation. See comments at
3538 user semantic actions for why this is necessary. */
3539 yytoken = YYTRANSLATE (yychar);
3540 yydestruct ("Cleanup: discarding lookahead",
3541 yytoken, &yylval, ip_file);
3543 /* Do not reclaim the symbols of the rule whose action triggered
3544 this YYABORT or YYACCEPT. */
3546 YY_STACK_PRINT (yyss, yyssp);
3547 while (yyssp != yyss)
3549 yydestruct ("Cleanup: popping",
3550 yystos[*yyssp], yyvsp, ip_file);
3555 YYSTACK_FREE (yyss);
3558 if (yymsg != yymsgbuf)
3559 YYSTACK_FREE (yymsg);
3563 #line 1586 "ntp_parser.y" /* yacc.c:1906 */
3568 struct FILE_INFO *ip_file,
3574 ip_file->err_line_no = ip_file->prev_token_line_no;
3575 ip_file->err_col_no = ip_file->prev_token_col_no;
3578 "line %d column %d %s",
3579 ip_file->err_line_no,
3580 ip_file->err_col_no,
3582 if (!input_from_file) {
3583 /* Save the error message in the correct buffer */
3584 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3585 MAXLINE - remote_config.err_pos,
3587 ip_file->err_col_no, msg);
3589 /* Increment the value of err_pos */
3591 remote_config.err_pos += retval;
3593 /* Increment the number of errors */
3594 ++remote_config.no_errors;
3600 * token_name - convert T_ token integers to text
3601 * example: token_name(T_Server) returns "T_Server"
3608 return yytname[YYTRANSLATE(token)];
3612 /* Initial Testing function -- ignore */
3614 int main(int argc, char *argv[])
3616 ip_file = FOPEN(argv[1], "r");
3618 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);