1 /* A Bison parser, made by GNU Bison 3.0.4. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "3.0.4"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 #line 11 "ntp_parser.y" /* yacc.c:339 */
73 #include "ntp_machine.h"
74 #include "ntp_stdlib.h"
75 #include "ntp_filegen.h"
76 #include "ntp_scanner.h"
77 #include "ntp_config.h"
78 #include "ntp_crypto.h"
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 "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
147 T_Broadcastclient = 271,
148 T_Broadcastdelay = 272,
208 T_Leapsmearinterval = 332,
216 T_Manycastclient = 340,
217 T_Manycastserver = 341,
239 T_Multicastclient = 363,
254 T_NtpSignDsocket = 378,
278 T_Saveconfigdir = 402,
313 T_WanderThreshold = 437,
322 T_Sim_Duration = 446,
323 T_Server_Offset = 447,
337 #define T_Allpeers 262
339 #define T_Autokey 264
340 #define T_Automax 265
341 #define T_Average 266
342 #define T_Bclient 267
343 #define T_Bcpollbstep 268
345 #define T_Broadcast 270
346 #define T_Broadcastclient 271
347 #define T_Broadcastdelay 272
349 #define T_Calibrate 274
350 #define T_Ceiling 275
351 #define T_Clockstats 276
353 #define T_ControlKey 278
355 #define T_Cryptostats 280
358 #define T_Default 283
360 #define T_Disable 285
361 #define T_Discard 286
362 #define T_Dispersion 287
364 #define T_Driftfile 289
367 #define T_Ellipsis 292
372 #define T_Filegen 297
373 #define T_Filenum 298
383 #define T_Huffpuff 308
387 #define T_Incalloc 312
389 #define T_Initalloc 314
390 #define T_Initmem 315
391 #define T_Includefile 316
392 #define T_Integer 317
393 #define T_Interface 318
394 #define T_Intrange 319
397 #define T_Ipv4_flag 322
399 #define T_Ipv6_flag 324
403 #define T_Keysdir 328
406 #define T_Leapfile 331
407 #define T_Leapsmearinterval 332
408 #define T_Limited 333
411 #define T_Logconfig 336
412 #define T_Logfile 337
413 #define T_Loopstats 338
414 #define T_Lowpriotrap 339
415 #define T_Manycastclient 340
416 #define T_Manycastserver 341
419 #define T_Maxclock 344
420 #define T_Maxdepth 345
421 #define T_Maxdist 346
423 #define T_Maxpoll 348
424 #define T_Mdnstries 349
426 #define T_Memlock 351
427 #define T_Minclock 352
428 #define T_Mindepth 353
429 #define T_Mindist 354
430 #define T_Minimum 355
431 #define T_Minpoll 356
432 #define T_Minsane 357
435 #define T_Monitor 360
438 #define T_Multicastclient 363
441 #define T_Nomodify 366
442 #define T_Nomrulist 367
444 #define T_Nonvolatile 369
446 #define T_Noquery 371
447 #define T_Noselect 372
448 #define T_Noserve 373
450 #define T_Notrust 375
452 #define T_Ntpport 377
453 #define T_NtpSignDsocket 378
455 #define T_Orphanwait 380
456 #define T_PCEdigest 381
459 #define T_Peerstats 384
462 #define T_Pidfile 387
465 #define T_Preempt 390
467 #define T_Protostats 392
469 #define T_Randfile 394
470 #define T_Rawstats 395
472 #define T_Requestkey 397
474 #define T_Restrict 399
477 #define T_Saveconfigdir 402
481 #define T_Stacksize 406
482 #define T_Statistics 407
484 #define T_Statsdir 409
486 #define T_Stepback 411
487 #define T_Stepfwd 412
488 #define T_Stepout 413
489 #define T_Stratum 414
492 #define T_Sysstats 417
497 #define T_Timingstats 422
502 #define T_Trustedkey 427
506 #define T_UEcrypto 431
507 #define T_UEcryptonak 432
508 #define T_UEdigest 433
509 #define T_Unconfig 434
511 #define T_Version 436
512 #define T_WanderThreshold 437
514 #define T_Wildcard 439
519 #define T_Simulate 444
520 #define T_Beep_Delay 445
521 #define T_Sim_Duration 446
522 #define T_Server_Offset 447
523 #define T_Duration 448
524 #define T_Freq_Offset 449
527 #define T_Prop_Delay 452
528 #define T_Proc_Delay 453
531 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
535 #line 51 "ntp_parser.y" /* yacc.c:355 */
541 gen_fifo * Generic_fifo;
543 attr_val_fifo * Attr_val_fifo;
545 string_fifo * String_fifo;
546 address_node * Address_node;
547 address_fifo * Address_fifo;
548 setvar_node * Set_var;
549 server_info * Sim_server;
550 server_info_fifo * Sim_server_fifo;
551 script_info * Sim_script;
552 script_info_fifo * Sim_script_fifo;
554 #line 555 "ntp_parser.c" /* yacc.c:355 */
557 typedef union YYSTYPE YYSTYPE;
558 # define YYSTYPE_IS_TRIVIAL 1
559 # define YYSTYPE_IS_DECLARED 1
563 extern YYSTYPE yylval;
567 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
569 /* Copy the second part of user declarations. */
571 #line 572 "ntp_parser.c" /* yacc.c:358 */
578 typedef YYTYPE_UINT8 yytype_uint8;
580 typedef unsigned char yytype_uint8;
584 typedef YYTYPE_INT8 yytype_int8;
586 typedef signed char yytype_int8;
590 typedef YYTYPE_UINT16 yytype_uint16;
592 typedef unsigned short int yytype_uint16;
596 typedef YYTYPE_INT16 yytype_int16;
598 typedef short int yytype_int16;
602 # ifdef __SIZE_TYPE__
603 # define YYSIZE_T __SIZE_TYPE__
604 # elif defined size_t
605 # define YYSIZE_T size_t
606 # elif ! defined YYSIZE_T
607 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
608 # define YYSIZE_T size_t
610 # define YYSIZE_T unsigned int
614 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
617 # if defined YYENABLE_NLS && YYENABLE_NLS
619 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
620 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
624 # define YY_(Msgid) Msgid
629 # if (defined __GNUC__ \
630 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
631 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
632 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
634 # define YY_ATTRIBUTE(Spec) /* empty */
638 #ifndef YY_ATTRIBUTE_PURE
639 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
642 #ifndef YY_ATTRIBUTE_UNUSED
643 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
646 #if !defined _Noreturn \
647 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
648 # if defined _MSC_VER && 1200 <= _MSC_VER
649 # define _Noreturn __declspec (noreturn)
651 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
655 /* Suppress unused-variable warnings by "using" E. */
656 #if ! defined lint || defined __GNUC__
657 # define YYUSE(E) ((void) (E))
659 # define YYUSE(E) /* empty */
662 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
663 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
664 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
665 _Pragma ("GCC diagnostic push") \
666 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
667 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
668 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
669 _Pragma ("GCC diagnostic pop")
671 # define YY_INITIAL_VALUE(Value) Value
673 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
674 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
675 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
677 #ifndef YY_INITIAL_VALUE
678 # define YY_INITIAL_VALUE(Value) /* Nothing. */
682 #if ! defined yyoverflow || YYERROR_VERBOSE
684 /* The parser invokes alloca or malloc; define the necessary symbols. */
686 # ifdef YYSTACK_USE_ALLOCA
687 # if YYSTACK_USE_ALLOCA
689 # define YYSTACK_ALLOC __builtin_alloca
690 # elif defined __BUILTIN_VA_ARG_INCR
691 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
693 # define YYSTACK_ALLOC __alloca
694 # elif defined _MSC_VER
695 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
696 # define alloca _alloca
698 # define YYSTACK_ALLOC alloca
699 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
700 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
701 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
702 # ifndef EXIT_SUCCESS
703 # define EXIT_SUCCESS 0
710 # ifdef YYSTACK_ALLOC
711 /* Pacify GCC's 'empty if-body' warning. */
712 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
713 # ifndef YYSTACK_ALLOC_MAXIMUM
714 /* The OS might guarantee only one guard page at the bottom of the stack,
715 and a page size can be as small as 4096 bytes. So we cannot safely
716 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
717 to allow for a few compiler-allocated temporary stack slots. */
718 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
721 # define YYSTACK_ALLOC YYMALLOC
722 # define YYSTACK_FREE YYFREE
723 # ifndef YYSTACK_ALLOC_MAXIMUM
724 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
726 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
727 && ! ((defined YYMALLOC || defined malloc) \
728 && (defined YYFREE || defined free)))
729 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
730 # ifndef EXIT_SUCCESS
731 # define EXIT_SUCCESS 0
735 # define YYMALLOC malloc
736 # if ! defined malloc && ! defined EXIT_SUCCESS
737 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
742 # if ! defined free && ! defined EXIT_SUCCESS
743 void free (void *); /* INFRINGES ON USER NAME SPACE */
747 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
750 #if (! defined yyoverflow \
751 && (! defined __cplusplus \
752 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
754 /* A type that is properly aligned for any stack member. */
757 yytype_int16 yyss_alloc;
761 /* The size of the maximum gap between one aligned stack and the next. */
762 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
764 /* The size of an array large to enough to hold all stacks, each with
766 # define YYSTACK_BYTES(N) \
767 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
768 + YYSTACK_GAP_MAXIMUM)
770 # define YYCOPY_NEEDED 1
772 /* Relocate STACK from its old location to the new one. The
773 local variables YYSIZE and YYSTACKSIZE give the old and new number of
774 elements in the stack, and YYPTR gives the new location of the
775 stack. Advance YYPTR to a properly aligned location for the next
777 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
780 YYSIZE_T yynewbytes; \
781 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
782 Stack = &yyptr->Stack_alloc; \
783 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
784 yyptr += yynewbytes / sizeof (*yyptr); \
790 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
791 /* Copy COUNT objects from SRC to DST. The source and destination do
794 # if defined __GNUC__ && 1 < __GNUC__
795 # define YYCOPY(Dst, Src, Count) \
796 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
798 # define YYCOPY(Dst, Src, Count) \
802 for (yyi = 0; yyi < (Count); yyi++) \
803 (Dst)[yyi] = (Src)[yyi]; \
808 #endif /* !YYCOPY_NEEDED */
810 /* YYFINAL -- State number of the termination state. */
812 /* YYLAST -- Last index in YYTABLE. */
815 /* YYNTOKENS -- Number of terminals. */
816 #define YYNTOKENS 204
817 /* YYNNTS -- Number of nonterminals. */
819 /* YYNRULES -- Number of rules. */
821 /* YYNSTATES -- Number of states. */
822 #define YYNSTATES 424
824 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
825 by yylex, with out-of-bounds checking. */
827 #define YYMAXUTOK 453
829 #define YYTRANSLATE(YYX) \
830 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
832 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
833 as returned by yylex, without out-of-bounds checking. */
834 static const yytype_uint8 yytranslate[] =
836 0, 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 200, 201, 2, 2, 2, 2, 2, 2, 2, 2,
841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
842 2, 199, 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, 202, 2, 203, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
862 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
863 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
864 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
865 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
866 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
867 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
868 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
869 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
870 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
871 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
872 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
873 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
874 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
875 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
876 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
877 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
878 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
879 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
880 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
885 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
886 static const yytype_uint16 yyrline[] =
888 0, 371, 371, 375, 376, 377, 392, 393, 394, 395,
889 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
890 413, 423, 424, 425, 426, 427, 431, 432, 437, 442,
891 444, 450, 451, 459, 460, 461, 465, 470, 471, 472,
892 473, 474, 475, 476, 477, 481, 483, 488, 489, 490,
893 491, 492, 493, 497, 502, 511, 521, 522, 532, 534,
894 536, 538, 549, 556, 558, 563, 565, 567, 569, 571,
895 580, 586, 587, 595, 597, 609, 610, 611, 612, 613,
896 622, 627, 632, 640, 642, 644, 649, 650, 651, 652,
897 653, 654, 655, 656, 657, 661, 662, 671, 673, 682,
898 692, 697, 705, 706, 707, 708, 709, 710, 711, 712,
899 717, 718, 726, 736, 745, 760, 765, 766, 770, 771,
900 775, 776, 777, 778, 779, 780, 781, 790, 794, 798,
901 806, 814, 822, 837, 852, 865, 866, 874, 875, 876,
902 877, 878, 879, 880, 881, 882, 883, 884, 885, 886,
903 887, 888, 892, 897, 905, 910, 911, 912, 916, 921,
904 929, 934, 935, 936, 937, 938, 939, 940, 941, 949,
905 959, 964, 972, 974, 976, 985, 987, 992, 993, 997,
906 998, 999, 1000, 1008, 1013, 1018, 1026, 1031, 1032, 1033,
907 1042, 1044, 1049, 1054, 1062, 1064, 1081, 1082, 1083, 1084,
908 1085, 1086, 1090, 1091, 1092, 1093, 1094, 1095, 1103, 1108,
909 1113, 1121, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133,
910 1134, 1135, 1144, 1145, 1146, 1153, 1160, 1167, 1183, 1202,
911 1204, 1206, 1208, 1210, 1212, 1219, 1224, 1225, 1226, 1230,
912 1234, 1243, 1244, 1248, 1249, 1250, 1254, 1265, 1279, 1291,
913 1296, 1298, 1303, 1304, 1312, 1314, 1322, 1327, 1335, 1360,
914 1367, 1377, 1378, 1382, 1383, 1384, 1385, 1389, 1390, 1391,
915 1395, 1400, 1405, 1413, 1414, 1415, 1416, 1417, 1418, 1419,
916 1429, 1434, 1442, 1447, 1455, 1457, 1461, 1466, 1471, 1479,
917 1484, 1492, 1501, 1502, 1506, 1507, 1516, 1534, 1538, 1543,
918 1551, 1556, 1557, 1561, 1566, 1574, 1579, 1584, 1589, 1594,
919 1602, 1607, 1612, 1620, 1625, 1626, 1627, 1628, 1629
923 #if YYDEBUG || YYERROR_VERBOSE || 1
924 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
925 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
926 static const char *const yytname[] =
928 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
929 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
930 "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast",
931 "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate",
932 "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto",
933 "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable",
934 "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop",
935 "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_False", "T_File",
936 "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4",
937 "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff",
938 "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc", "T_Incmem",
939 "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer", "T_Interface",
940 "T_Intrange", "T_Io", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag",
941 "T_Kernel", "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp",
942 "T_Leapfile", "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen",
943 "T_Logconfig", "T_Logfile", "T_Loopstats", "T_Lowpriotrap",
944 "T_Manycastclient", "T_Manycastserver", "T_Mask", "T_Maxage",
945 "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem", "T_Maxpoll",
946 "T_Mdnstries", "T_Mem", "T_Memlock", "T_Minclock", "T_Mindepth",
947 "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
948 "T_Monitor", "T_Month", "T_Mru", "T_Multicastclient", "T_Nic",
949 "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile",
950 "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
951 "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
952 "T_Orphanwait", "T_PCEdigest", "T_Panic", "T_Peer", "T_Peerstats",
953 "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port", "T_Preempt",
954 "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile", "T_Rawstats",
955 "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict", "T_Revoke",
956 "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar", "T_Source",
957 "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir", "T_Step",
958 "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
959 "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats",
960 "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl",
961 "T_Type", "T_U_int", "T_UEcrypto", "T_UEcryptonak", "T_UEdigest",
962 "T_Unconfig", "T_Unpeer", "T_Version", "T_WanderThreshold", "T_Week",
963 "T_Wildcard", "T_Xleave", "T_Year", "T_Flag", "T_EOC", "T_Simulate",
964 "T_Beep_Delay", "T_Sim_Duration", "T_Server_Offset", "T_Duration",
965 "T_Freq_Offset", "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay",
966 "'='", "'('", "')'", "'{'", "'}'", "$accept", "configuration",
967 "command_list", "command", "server_command", "client_type", "address",
968 "ip_address", "address_fam", "option_list", "option", "option_flag",
969 "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
970 "option_str_keyword", "unpeer_command", "unpeer_keyword",
971 "other_mode_command", "authentication_command", "crypto_command_list",
972 "crypto_command", "crypto_str_keyword", "orphan_mode_command",
973 "tos_option_list", "tos_option", "tos_option_int_keyword",
974 "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
975 "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
976 "filegen_type", "access_control_command", "ac_flag_list",
977 "access_control_flag", "discard_option_list", "discard_option",
978 "discard_option_keyword", "mru_option_list", "mru_option",
979 "mru_option_keyword", "fudge_command", "fudge_factor_list",
980 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
981 "rlimit_command", "rlimit_option_list", "rlimit_option",
982 "rlimit_option_keyword", "system_option_command", "system_option_list",
983 "system_option", "system_option_flag_keyword",
984 "system_option_local_flag_keyword", "tinker_command",
985 "tinker_option_list", "tinker_option", "tinker_option_keyword",
986 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
987 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
988 "variable_assign", "t_default_or_zero", "trap_option_list",
989 "trap_option", "log_config_list", "log_config_command",
990 "interface_command", "interface_nic", "nic_rule_class",
991 "nic_rule_action", "reset_command", "counter_set_list",
992 "counter_set_keyword", "integer_list", "integer_list_range",
993 "integer_list_range_elt", "integer_range", "string_list", "address_list",
994 "boolean", "number", "simulate_command", "sim_conf_start",
995 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
996 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
997 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
998 "sim_act_keyword", YY_NULLPTR
1003 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1004 (internal) symbol number NUM (which must be that of a token). */
1005 static const yytype_uint16 yytoknum[] =
1007 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1008 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1009 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1010 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1011 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1012 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1013 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1014 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1015 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1016 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1017 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1018 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1019 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1020 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1021 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1022 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1023 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1024 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1025 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1026 445, 446, 447, 448, 449, 450, 451, 452, 453, 61,
1031 #define YYPACT_NINF -189
1033 #define yypact_value_is_default(Yystate) \
1034 (!!((Yystate) == (-189)))
1036 #define YYTABLE_NINF -7
1038 #define yytable_value_is_error(Yytable_value) \
1041 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1043 static const yytype_int16 yypact[] =
1045 18, -177, -45, -189, -189, -189, -40, -189, 32, 5,
1046 -129, -189, 32, -189, 204, -44, -189, -117, -189, -110,
1047 -101, -189, -189, -97, -189, -189, -44, -4, 495, -44,
1048 -189, -189, -96, -189, -94, -189, -189, 8, 54, 258,
1049 10, -28, -189, -189, -89, 204, -86, -189, 270, 529,
1050 -85, -56, 14, -189, -189, -189, 83, 207, -95, -189,
1051 -44, -189, -44, -189, -189, -189, -189, -189, -189, -189,
1052 -189, -189, -189, -7, 24, -73, -68, -189, -3, -189,
1053 -189, -106, -189, -189, -189, 313, -189, -189, -189, -189,
1054 -189, -189, -189, -189, -189, -189, -189, -189, 32, -189,
1055 -189, -189, -189, -189, -189, 5, -189, 35, 65, -189,
1056 32, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1057 -189, -189, -189, 110, -189, -59, 368, -189, -189, -189,
1058 -97, -189, -189, -44, -189, -189, -189, -189, -189, -189,
1059 -189, -189, -189, 495, -189, 44, -44, -189, -189, -51,
1060 -189, -189, -189, -189, -189, -189, -189, -189, 54, -189,
1061 -189, 86, 89, -189, -189, 33, -189, -189, -189, -189,
1062 -28, -189, 49, -75, -189, 204, -189, -189, -189, -189,
1063 -189, -189, -189, -189, -189, -189, -189, -189, 270, -189,
1064 -7, -189, -189, -189, -33, -189, -189, -189, -189, -189,
1065 -189, -189, -189, 529, -189, 66, -7, -189, -189, 67,
1066 -56, -189, -189, -189, 68, -189, -53, -189, -189, -189,
1067 -189, -189, -189, -189, -189, -189, -189, -189, -189, 16,
1068 -153, -189, -189, -189, -189, -189, 77, -189, -18, -189,
1069 -189, -189, -189, 226, -13, -189, -189, -189, -189, -8,
1070 97, -189, -189, 110, -189, -7, -33, -189, -189, -189,
1071 -189, -189, -189, -189, -189, 449, -189, -189, 449, 449,
1072 -85, -189, -189, 11, -189, -189, -189, -189, -189, -189,
1073 -189, -189, -189, -189, -49, 108, -189, -189, -189, 125,
1074 -189, -189, -189, -189, -189, -189, -189, -189, -102, -20,
1075 -30, -189, -189, -189, -189, 13, -189, -189, 9, -189,
1076 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1077 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1078 -189, -189, -189, -189, 449, 449, -189, 146, -85, 113,
1079 -189, 116, -189, -189, -189, -189, -189, -189, -189, -189,
1080 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1081 -189, -54, -189, 23, -10, 6, -138, -189, -9, -189,
1082 -7, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1083 449, -189, -189, -189, -189, -17, -189, -189, -189, -44,
1084 -189, -189, -189, 20, -189, -189, -189, 0, 21, -7,
1085 22, -173, -189, 25, -7, -189, -189, -189, 17, 7,
1086 -189, -189, -189, -189, -189, 217, 39, 36, -189, 46,
1087 -189, -7, -189, -189
1090 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1091 Performed when YYTABLE does not specify something else to do. Zero
1092 means the default is an error. */
1093 static const yytype_uint16 yydefact[] =
1095 0, 0, 0, 24, 58, 236, 0, 71, 0, 0,
1096 248, 239, 0, 229, 0, 0, 241, 0, 261, 0,
1097 0, 242, 240, 0, 243, 25, 0, 0, 0, 0,
1098 262, 237, 0, 23, 0, 244, 22, 0, 0, 0,
1099 0, 0, 245, 21, 0, 0, 0, 238, 0, 0,
1100 0, 0, 0, 56, 57, 297, 0, 2, 0, 7,
1101 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1102 16, 17, 18, 0, 0, 0, 0, 222, 0, 223,
1103 19, 0, 5, 62, 63, 64, 196, 197, 198, 199,
1104 202, 200, 201, 203, 204, 205, 206, 207, 191, 193,
1105 194, 195, 155, 156, 157, 127, 153, 0, 246, 230,
1106 190, 102, 103, 104, 105, 109, 106, 107, 108, 110,
1107 29, 30, 28, 0, 26, 0, 6, 65, 66, 258,
1108 231, 257, 290, 59, 61, 161, 162, 163, 164, 165,
1109 166, 167, 168, 128, 159, 0, 60, 70, 288, 232,
1110 67, 273, 274, 275, 276, 277, 278, 279, 270, 272,
1111 135, 29, 30, 135, 135, 26, 68, 189, 187, 188,
1112 183, 185, 0, 0, 233, 97, 101, 98, 212, 213,
1113 214, 215, 216, 217, 218, 219, 220, 221, 208, 210,
1114 0, 86, 87, 88, 0, 89, 90, 96, 91, 95,
1115 92, 93, 94, 80, 82, 0, 0, 252, 284, 0,
1116 69, 283, 285, 281, 235, 1, 0, 4, 31, 55,
1117 295, 294, 224, 225, 226, 227, 269, 268, 267, 0,
1118 0, 79, 75, 76, 77, 78, 0, 72, 0, 192,
1119 152, 154, 247, 99, 0, 179, 180, 181, 182, 0,
1120 0, 177, 178, 169, 171, 0, 0, 27, 228, 256,
1121 289, 158, 160, 287, 271, 131, 135, 135, 134, 129,
1122 0, 184, 186, 0, 100, 209, 211, 293, 291, 292,
1123 85, 81, 83, 84, 234, 0, 282, 280, 3, 20,
1124 263, 264, 265, 260, 266, 259, 301, 302, 0, 0,
1125 0, 74, 73, 119, 118, 0, 116, 117, 0, 111,
1126 114, 115, 175, 176, 174, 170, 172, 173, 137, 138,
1127 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1128 149, 150, 151, 136, 132, 133, 135, 251, 0, 0,
1129 253, 0, 37, 38, 39, 54, 47, 49, 48, 51,
1130 40, 41, 42, 43, 50, 52, 44, 32, 33, 36,
1131 34, 0, 35, 0, 0, 0, 0, 304, 0, 299,
1132 0, 112, 126, 122, 124, 120, 121, 123, 125, 113,
1133 130, 250, 249, 255, 254, 0, 45, 46, 53, 0,
1134 298, 296, 303, 0, 300, 286, 307, 0, 0, 0,
1135 0, 0, 309, 0, 0, 305, 308, 306, 0, 0,
1136 314, 315, 316, 317, 318, 0, 0, 0, 310, 0,
1140 /* YYPGOTO[NTERM-NUM]. */
1141 static const yytype_int16 yypgoto[] =
1143 -189, -189, -189, -48, -189, -189, -15, -38, -189, -189,
1144 -189, -189, -189, -189, -189, -189, -189, -189, -189, -189,
1145 -189, -189, -189, -189, -189, -189, 37, -189, -189, -189,
1146 -189, -42, -189, -189, -189, -189, -189, -189, -159, -189,
1147 -189, 131, -189, -189, 96, -189, -189, -189, -6, -189,
1148 -189, -189, -189, 74, -189, -189, 236, -71, -189, -189,
1149 -189, -189, 62, -189, -189, -189, -189, -189, -189, -189,
1150 -189, -189, -189, -189, -189, 122, -189, -189, -189, -189,
1151 -189, -189, 95, -189, -189, 45, -189, -189, 225, 1,
1152 -188, -189, -189, -189, -39, -189, -189, -103, -189, -189,
1153 -189, -136, -189, -149, -189
1156 /* YYDEFGOTO[NTERM-NUM]. */
1157 static const yytype_int16 yydefgoto[] =
1159 -1, 56, 57, 58, 59, 60, 132, 124, 125, 289,
1160 357, 358, 359, 360, 361, 362, 363, 61, 62, 63,
1161 64, 85, 237, 238, 65, 203, 204, 205, 206, 66,
1162 175, 119, 243, 309, 310, 311, 379, 67, 265, 333,
1163 105, 106, 107, 143, 144, 145, 68, 253, 254, 255,
1164 256, 69, 170, 171, 172, 70, 98, 99, 100, 101,
1165 71, 188, 189, 190, 72, 73, 74, 75, 76, 109,
1166 174, 382, 284, 340, 130, 131, 77, 78, 295, 229,
1167 79, 158, 159, 214, 210, 211, 212, 149, 133, 280,
1168 222, 80, 81, 298, 299, 300, 366, 367, 398, 368,
1169 401, 402, 415, 416, 417
1172 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1173 positive, shift that token. If negative, reduce the rule whose
1174 number is the opposite. If YYTABLE_NINF, syntax error. */
1175 static const yytype_int16 yytable[] =
1177 123, 165, 276, 176, 268, 269, 208, 277, 386, 216,
1178 364, 82, 207, 372, 338, 167, 102, 83, 283, 1,
1179 400, 290, 84, 120, 164, 121, 220, 239, 2, 278,
1180 405, 108, 226, 3, 4, 5, 373, 296, 297, 239,
1181 86, 6, 7, 126, 87, 218, 364, 219, 8, 9,
1182 127, 88, 10, 227, 11, 221, 12, 13, 134, 128,
1183 14, 151, 152, 129, 147, 391, 148, 316, 168, 15,
1184 150, 173, 166, 16, 177, 122, 213, 228, 258, 17,
1185 153, 18, 291, 215, 292, 339, 223, 224, 296, 297,
1186 19, 20, 225, 217, 21, 22, 230, 241, 242, 23,
1187 24, 257, 89, 25, 26, 103, 262, 334, 335, 263,
1188 104, 272, 27, 244, 266, 374, 122, 267, 260, 154,
1189 270, 387, 375, 169, 273, 28, 29, 30, 282, 285,
1190 287, 260, 31, 274, 342, 288, 90, 91, 279, 301,
1191 376, 32, 302, 343, 209, 341, 33, 312, 34, 155,
1192 35, 36, 313, 92, 245, 246, 247, 248, 93, 314,
1193 37, 38, 39, 40, 41, 42, 43, 44, 369, 370,
1194 45, 337, 46, 371, 381, 384, 293, 380, 385, 344,
1195 345, 47, 394, 388, 395, 94, 48, 49, 50, 389,
1196 51, 52, 377, 393, 390, 378, 346, 53, 54, 399,
1197 294, 410, 411, 412, 413, 414, -6, 55, 95, 96,
1198 97, 403, 397, 407, 400, 156, 408, 2, 347, 409,
1199 157, 404, 3, 4, 5, 111, 348, 420, 349, 112,
1200 6, 7, 336, 423, 422, 421, 240, 8, 9, 261,
1201 281, 10, 350, 11, 271, 12, 13, 315, 110, 14,
1202 275, 249, 259, 264, 146, 286, 303, 317, 15, 365,
1203 351, 352, 16, 392, 304, 406, 419, 305, 17, 250,
1204 18, 0, 0, 0, 251, 252, 178, 0, 0, 19,
1205 20, 0, 0, 21, 22, 0, 160, 113, 23, 24,
1206 0, 0, 25, 26, 0, 0, 353, 0, 354, 0,
1207 383, 27, 179, 0, 0, 306, 355, 0, 0, 0,
1208 356, 0, 0, 0, 28, 29, 30, 0, 0, 0,
1209 180, 31, 0, 181, 0, 161, 0, 162, 0, 0,
1210 32, 0, 0, 114, 0, 33, 307, 34, 0, 35,
1211 36, 115, 231, 0, 116, 0, 0, 0, 0, 37,
1212 38, 39, 40, 41, 42, 43, 44, 0, 0, 45,
1213 0, 46, 0, 0, 0, 232, 117, 0, 233, 0,
1214 47, 118, 0, 0, 396, 48, 49, 50, 2, 51,
1215 52, 0, 0, 3, 4, 5, 53, 54, 0, 0,
1216 0, 6, 7, 0, 0, -6, 55, 182, 8, 9,
1217 308, 0, 10, 0, 11, 0, 12, 13, 163, 0,
1218 14, 410, 411, 412, 413, 414, 0, 0, 122, 15,
1219 418, 0, 0, 16, 0, 183, 184, 185, 186, 17,
1220 0, 18, 0, 187, 0, 0, 0, 0, 0, 0,
1221 19, 20, 0, 0, 21, 22, 0, 0, 0, 23,
1222 24, 234, 235, 25, 26, 0, 0, 0, 236, 0,
1223 0, 0, 27, 0, 0, 0, 0, 0, 0, 0,
1224 0, 0, 0, 0, 0, 28, 29, 30, 0, 0,
1225 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
1226 0, 32, 0, 0, 0, 0, 33, 318, 34, 0,
1227 35, 36, 0, 0, 0, 319, 0, 0, 0, 0,
1228 37, 38, 39, 40, 41, 42, 43, 44, 0, 0,
1229 45, 0, 46, 320, 321, 0, 0, 322, 0, 0,
1230 0, 47, 0, 323, 0, 0, 48, 49, 50, 0,
1231 51, 52, 191, 192, 0, 0, 0, 53, 54, 193,
1232 0, 194, 135, 136, 137, 138, 0, 55, 0, 0,
1233 324, 325, 0, 0, 326, 327, 0, 328, 329, 330,
1234 0, 331, 0, 0, 0, 0, 0, 0, 195, 0,
1235 0, 0, 0, 139, 0, 140, 0, 141, 0, 0,
1236 0, 0, 0, 142, 0, 0, 0, 0, 0, 0,
1237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1238 0, 0, 0, 0, 0, 0, 0, 0, 196, 0,
1239 197, 0, 0, 0, 0, 0, 198, 0, 199, 0,
1240 332, 200, 0, 0, 0, 0, 0, 0, 0, 0,
1241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1245 static const yytype_int16 yycheck[] =
1247 15, 39, 190, 45, 163, 164, 62, 40, 62, 57,
1248 148, 188, 50, 4, 63, 43, 11, 62, 206, 1,
1249 193, 5, 62, 67, 39, 69, 33, 98, 10, 62,
1250 203, 160, 35, 15, 16, 17, 27, 190, 191, 110,
1251 8, 23, 24, 160, 12, 60, 148, 62, 30, 31,
1252 160, 19, 34, 56, 36, 62, 38, 39, 62, 160,
1253 42, 7, 8, 160, 160, 203, 160, 255, 96, 51,
1254 62, 160, 62, 55, 160, 160, 62, 80, 126, 61,
1255 26, 63, 66, 0, 68, 134, 62, 160, 190, 191,
1256 72, 73, 160, 188, 76, 77, 202, 62, 33, 81,
1257 82, 160, 70, 85, 86, 100, 62, 266, 267, 160,
1258 105, 62, 94, 3, 28, 106, 160, 28, 133, 65,
1259 87, 175, 113, 151, 199, 107, 108, 109, 62, 62,
1260 62, 146, 114, 175, 9, 188, 104, 105, 171, 62,
1261 131, 123, 160, 18, 200, 37, 128, 160, 130, 95,
1262 132, 133, 160, 121, 44, 45, 46, 47, 126, 62,
1263 142, 143, 144, 145, 146, 147, 148, 149, 188, 199,
1264 152, 160, 154, 160, 28, 62, 160, 336, 62, 54,
1265 55, 163, 370, 160, 201, 153, 168, 169, 170, 199,
1266 172, 173, 183, 202, 188, 186, 71, 179, 180, 199,
1267 184, 194, 195, 196, 197, 198, 188, 189, 176, 177,
1268 178, 399, 192, 188, 193, 161, 404, 10, 93, 202,
1269 166, 199, 15, 16, 17, 21, 101, 188, 103, 25,
1270 23, 24, 270, 421, 188, 199, 105, 30, 31, 143,
1271 203, 34, 117, 36, 170, 38, 39, 253, 12, 42,
1272 188, 141, 130, 158, 29, 210, 30, 256, 51, 298,
1273 135, 136, 55, 366, 38, 401, 415, 41, 61, 159,
1274 63, -1, -1, -1, 164, 165, 6, -1, -1, 72,
1275 73, -1, -1, 76, 77, -1, 28, 83, 81, 82,
1276 -1, -1, 85, 86, -1, -1, 171, -1, 173, -1,
1277 338, 94, 32, -1, -1, 79, 181, -1, -1, -1,
1278 185, -1, -1, -1, 107, 108, 109, -1, -1, -1,
1279 50, 114, -1, 53, -1, 67, -1, 69, -1, -1,
1280 123, -1, -1, 129, -1, 128, 110, 130, -1, 132,
1281 133, 137, 29, -1, 140, -1, -1, -1, -1, 142,
1282 143, 144, 145, 146, 147, 148, 149, -1, -1, 152,
1283 -1, 154, -1, -1, -1, 52, 162, -1, 55, -1,
1284 163, 167, -1, -1, 389, 168, 169, 170, 10, 172,
1285 173, -1, -1, 15, 16, 17, 179, 180, -1, -1,
1286 -1, 23, 24, -1, -1, 188, 189, 127, 30, 31,
1287 174, -1, 34, -1, 36, -1, 38, 39, 150, -1,
1288 42, 194, 195, 196, 197, 198, -1, -1, 160, 51,
1289 203, -1, -1, 55, -1, 155, 156, 157, 158, 61,
1290 -1, 63, -1, 163, -1, -1, -1, -1, -1, -1,
1291 72, 73, -1, -1, 76, 77, -1, -1, -1, 81,
1292 82, 138, 139, 85, 86, -1, -1, -1, 145, -1,
1293 -1, -1, 94, -1, -1, -1, -1, -1, -1, -1,
1294 -1, -1, -1, -1, -1, 107, 108, 109, -1, -1,
1295 -1, -1, 114, -1, -1, -1, -1, -1, -1, -1,
1296 -1, 123, -1, -1, -1, -1, 128, 48, 130, -1,
1297 132, 133, -1, -1, -1, 56, -1, -1, -1, -1,
1298 142, 143, 144, 145, 146, 147, 148, 149, -1, -1,
1299 152, -1, 154, 74, 75, -1, -1, 78, -1, -1,
1300 -1, 163, -1, 84, -1, -1, 168, 169, 170, -1,
1301 172, 173, 13, 14, -1, -1, -1, 179, 180, 20,
1302 -1, 22, 57, 58, 59, 60, -1, 189, -1, -1,
1303 111, 112, -1, -1, 115, 116, -1, 118, 119, 120,
1304 -1, 122, -1, -1, -1, -1, -1, -1, 49, -1,
1305 -1, -1, -1, 88, -1, 90, -1, 92, -1, -1,
1306 -1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
1307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1308 -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
1309 91, -1, -1, -1, -1, -1, 97, -1, 99, -1,
1310 181, 102, -1, -1, -1, -1, -1, -1, -1, -1,
1311 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1312 -1, -1, -1, 124, 125
1315 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1316 symbol of state STATE-NUM. */
1317 static const yytype_uint16 yystos[] =
1319 0, 1, 10, 15, 16, 17, 23, 24, 30, 31,
1320 34, 36, 38, 39, 42, 51, 55, 61, 63, 72,
1321 73, 76, 77, 81, 82, 85, 86, 94, 107, 108,
1322 109, 114, 123, 128, 130, 132, 133, 142, 143, 144,
1323 145, 146, 147, 148, 149, 152, 154, 163, 168, 169,
1324 170, 172, 173, 179, 180, 189, 205, 206, 207, 208,
1325 209, 221, 222, 223, 224, 228, 233, 241, 250, 255,
1326 259, 264, 268, 269, 270, 271, 272, 280, 281, 284,
1327 295, 296, 188, 62, 62, 225, 8, 12, 19, 70,
1328 104, 105, 121, 126, 153, 176, 177, 178, 260, 261,
1329 262, 263, 11, 100, 105, 244, 245, 246, 160, 273,
1330 260, 21, 25, 83, 129, 137, 140, 162, 167, 235,
1331 67, 69, 160, 210, 211, 212, 160, 160, 160, 160,
1332 278, 279, 210, 292, 62, 57, 58, 59, 60, 88,
1333 90, 92, 98, 247, 248, 249, 292, 160, 160, 291,
1334 62, 7, 8, 26, 65, 95, 161, 166, 285, 286,
1335 28, 67, 69, 150, 210, 211, 62, 43, 96, 151,
1336 256, 257, 258, 160, 274, 234, 235, 160, 6, 32,
1337 50, 53, 127, 155, 156, 157, 158, 163, 265, 266,
1338 267, 13, 14, 20, 22, 49, 89, 91, 97, 99,
1339 102, 124, 125, 229, 230, 231, 232, 211, 62, 200,
1340 288, 289, 290, 62, 287, 0, 207, 188, 210, 210,
1341 33, 62, 294, 62, 160, 160, 35, 56, 80, 283,
1342 202, 29, 52, 55, 138, 139, 145, 226, 227, 261,
1343 245, 62, 33, 236, 3, 44, 45, 46, 47, 141,
1344 159, 164, 165, 251, 252, 253, 254, 160, 207, 279,
1345 210, 248, 62, 160, 286, 242, 28, 28, 242, 242,
1346 87, 257, 62, 199, 235, 266, 294, 40, 62, 171,
1347 293, 230, 62, 294, 276, 62, 289, 62, 188, 213,
1348 5, 66, 68, 160, 184, 282, 190, 191, 297, 298,
1349 299, 62, 160, 30, 38, 41, 79, 110, 174, 237,
1350 238, 239, 160, 160, 62, 252, 294, 293, 48, 56,
1351 74, 75, 78, 84, 111, 112, 115, 116, 118, 119,
1352 120, 122, 181, 243, 242, 242, 211, 160, 63, 134,
1353 277, 37, 9, 18, 54, 55, 71, 93, 101, 103,
1354 117, 135, 136, 171, 173, 181, 185, 214, 215, 216,
1355 217, 218, 219, 220, 148, 298, 300, 301, 303, 188,
1356 199, 160, 4, 27, 106, 113, 131, 183, 186, 240,
1357 242, 28, 275, 211, 62, 62, 62, 175, 160, 199,
1358 188, 203, 301, 202, 294, 201, 210, 192, 302, 199,
1359 193, 304, 305, 294, 199, 203, 305, 188, 294, 202,
1360 194, 195, 196, 197, 198, 306, 307, 308, 203, 307,
1364 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1365 static const yytype_uint16 yyr1[] =
1367 0, 204, 205, 206, 206, 206, 207, 207, 207, 207,
1368 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
1369 208, 209, 209, 209, 209, 209, 210, 210, 211, 212,
1370 212, 213, 213, 214, 214, 214, 215, 216, 216, 216,
1371 216, 216, 216, 216, 216, 217, 217, 218, 218, 218,
1372 218, 218, 218, 219, 220, 221, 222, 222, 223, 223,
1373 223, 223, 224, 224, 224, 224, 224, 224, 224, 224,
1374 224, 225, 225, 226, 226, 227, 227, 227, 227, 227,
1375 228, 229, 229, 230, 230, 230, 231, 231, 231, 231,
1376 231, 231, 231, 231, 231, 232, 232, 233, 233, 233,
1377 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1378 236, 236, 237, 237, 237, 237, 238, 238, 239, 239,
1379 240, 240, 240, 240, 240, 240, 240, 241, 241, 241,
1380 241, 241, 241, 241, 241, 242, 242, 243, 243, 243,
1381 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1382 243, 243, 244, 244, 245, 246, 246, 246, 247, 247,
1383 248, 249, 249, 249, 249, 249, 249, 249, 249, 250,
1384 251, 251, 252, 252, 252, 252, 252, 253, 253, 254,
1385 254, 254, 254, 255, 256, 256, 257, 258, 258, 258,
1386 259, 259, 260, 260, 261, 261, 262, 262, 262, 262,
1387 262, 262, 263, 263, 263, 263, 263, 263, 264, 265,
1388 265, 266, 267, 267, 267, 267, 267, 267, 267, 267,
1389 267, 267, 268, 268, 268, 268, 268, 268, 268, 268,
1390 268, 268, 268, 268, 268, 268, 269, 269, 269, 270,
1391 270, 271, 271, 272, 272, 272, 273, 273, 273, 274,
1392 275, 275, 276, 276, 277, 277, 278, 278, 279, 280,
1393 280, 281, 281, 282, 282, 282, 282, 283, 283, 283,
1394 284, 285, 285, 286, 286, 286, 286, 286, 286, 286,
1395 287, 287, 288, 288, 289, 289, 290, 291, 291, 292,
1396 292, 293, 293, 293, 294, 294, 295, 296, 297, 297,
1397 298, 299, 299, 300, 300, 301, 302, 303, 304, 304,
1398 305, 306, 306, 307, 308, 308, 308, 308, 308
1401 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1402 static const yytype_uint8 yyr2[] =
1404 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1406 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1407 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1408 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1409 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1411 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1412 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1413 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
1414 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1415 0, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1416 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
1417 5, 3, 4, 4, 3, 0, 2, 1, 1, 1,
1418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1419 1, 1, 2, 1, 2, 1, 1, 1, 2, 1,
1420 2, 1, 1, 1, 1, 1, 1, 1, 1, 3,
1421 2, 1, 2, 2, 2, 2, 2, 1, 1, 1,
1422 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1423 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1424 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1425 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1426 1, 1, 1, 1, 2, 2, 2, 2, 3, 1,
1427 2, 2, 2, 2, 3, 2, 1, 1, 1, 1,
1428 1, 1, 1, 1, 1, 1, 1, 2, 0, 4,
1429 1, 0, 0, 2, 2, 2, 2, 1, 1, 3,
1430 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1431 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1432 2, 1, 2, 1, 1, 1, 5, 2, 1, 2,
1433 1, 1, 1, 1, 1, 1, 5, 1, 3, 2,
1434 3, 1, 1, 2, 1, 5, 4, 3, 2, 1,
1435 6, 3, 2, 3, 1, 1, 1, 1, 1
1439 #define yyerrok (yyerrstatus = 0)
1440 #define yyclearin (yychar = YYEMPTY)
1441 #define YYEMPTY (-2)
1444 #define YYACCEPT goto yyacceptlab
1445 #define YYABORT goto yyabortlab
1446 #define YYERROR goto yyerrorlab
1449 #define YYRECOVERING() (!!yyerrstatus)
1451 #define YYBACKUP(Token, Value) \
1453 if (yychar == YYEMPTY) \
1457 YYPOPSTACK (yylen); \
1463 yyerror (YY_("syntax error: cannot back up")); \
1468 /* Error token number */
1470 #define YYERRCODE 256
1474 /* Enable debugging if requested. */
1478 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1479 # define YYFPRINTF fprintf
1482 # define YYDPRINTF(Args) \
1488 /* This macro is provided for backward compatibility. */
1489 #ifndef YY_LOCATION_PRINT
1490 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1494 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1498 YYFPRINTF (stderr, "%s ", Title); \
1499 yy_symbol_print (stderr, \
1501 YYFPRINTF (stderr, "\n"); \
1506 /*----------------------------------------.
1507 | Print this symbol's value on YYOUTPUT. |
1508 `----------------------------------------*/
1511 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1513 FILE *yyo = yyoutput;
1518 if (yytype < YYNTOKENS)
1519 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1525 /*--------------------------------.
1526 | Print this symbol on YYOUTPUT. |
1527 `--------------------------------*/
1530 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1532 YYFPRINTF (yyoutput, "%s %s (",
1533 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1535 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1536 YYFPRINTF (yyoutput, ")");
1539 /*------------------------------------------------------------------.
1540 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1542 `------------------------------------------------------------------*/
1545 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1547 YYFPRINTF (stderr, "Stack now");
1548 for (; yybottom <= yytop; yybottom++)
1550 int yybot = *yybottom;
1551 YYFPRINTF (stderr, " %d", yybot);
1553 YYFPRINTF (stderr, "\n");
1556 # define YY_STACK_PRINT(Bottom, Top) \
1559 yy_stack_print ((Bottom), (Top)); \
1563 /*------------------------------------------------.
1564 | Report that the YYRULE is going to be reduced. |
1565 `------------------------------------------------*/
1568 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1570 unsigned long int yylno = yyrline[yyrule];
1571 int yynrhs = yyr2[yyrule];
1573 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1575 /* The symbols being reduced. */
1576 for (yyi = 0; yyi < yynrhs; yyi++)
1578 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1579 yy_symbol_print (stderr,
1580 yystos[yyssp[yyi + 1 - yynrhs]],
1581 &(yyvsp[(yyi + 1) - (yynrhs)])
1583 YYFPRINTF (stderr, "\n");
1587 # define YY_REDUCE_PRINT(Rule) \
1590 yy_reduce_print (yyssp, yyvsp, Rule); \
1593 /* Nonzero means print parse trace. It is left uninitialized so that
1594 multiple parsers can coexist. */
1596 #else /* !YYDEBUG */
1597 # define YYDPRINTF(Args)
1598 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1599 # define YY_STACK_PRINT(Bottom, Top)
1600 # define YY_REDUCE_PRINT(Rule)
1601 #endif /* !YYDEBUG */
1604 /* YYINITDEPTH -- initial size of the parser's stacks. */
1606 # define YYINITDEPTH 200
1609 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1610 if the built-in stack extension method is used).
1612 Do not make this value too large; the results are undefined if
1613 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1614 evaluated with infinite-precision integer arithmetic. */
1617 # define YYMAXDEPTH 10000
1624 # if defined __GLIBC__ && defined _STRING_H
1625 # define yystrlen strlen
1627 /* Return the length of YYSTR. */
1629 yystrlen (const char *yystr)
1632 for (yylen = 0; yystr[yylen]; yylen++)
1640 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1641 # define yystpcpy stpcpy
1643 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1646 yystpcpy (char *yydest, const char *yysrc)
1649 const char *yys = yysrc;
1651 while ((*yyd++ = *yys++) != '\0')
1660 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1661 quotes and backslashes, so that it's suitable for yyerror. The
1662 heuristic is that double-quoting is unnecessary unless the string
1663 contains an apostrophe, a comma, or backslash (other than
1664 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1665 null, do not copy; instead, return the length of what the result
1668 yytnamerr (char *yyres, const char *yystr)
1673 char const *yyp = yystr;
1680 goto do_not_strip_quotes;
1684 goto do_not_strip_quotes;
1697 do_not_strip_quotes: ;
1701 return yystrlen (yystr);
1703 return yystpcpy (yyres, yystr) - yyres;
1707 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1708 about the unexpected token YYTOKEN for the state stack whose top is
1711 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1712 not large enough to hold the message. In that case, also set
1713 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1714 required number of bytes is too large to store. */
1716 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1717 yytype_int16 *yyssp, int yytoken)
1719 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1720 YYSIZE_T yysize = yysize0;
1721 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1722 /* Internationalized format string. */
1723 const char *yyformat = YY_NULLPTR;
1724 /* Arguments of yyformat. */
1725 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1726 /* Number of reported tokens (one for the "unexpected", one per
1730 /* There are many possibilities here to consider:
1731 - If this state is a consistent state with a default action, then
1732 the only way this function was invoked is if the default action
1733 is an error action. In that case, don't check for expected
1734 tokens because there are none.
1735 - The only way there can be no lookahead present (in yychar) is if
1736 this state is a consistent state with a default action. Thus,
1737 detecting the absence of a lookahead is sufficient to determine
1738 that there is no unexpected or expected token to report. In that
1739 case, just report a simple "syntax error".
1740 - Don't assume there isn't a lookahead just because this state is a
1741 consistent state with a default action. There might have been a
1742 previous inconsistent state, consistent state with a non-default
1743 action, or user semantic action that manipulated yychar.
1744 - Of course, the expected token list depends on states to have
1745 correct lookahead information, and it depends on the parser not
1746 to perform extra reductions after fetching a lookahead from the
1747 scanner and before detecting a syntax error. Thus, state merging
1748 (from LALR or IELR) and default reductions corrupt the expected
1749 token list. However, the list is correct for canonical LR with
1750 one exception: it will still contain any token that will not be
1751 accepted due to an error action in a later state.
1753 if (yytoken != YYEMPTY)
1755 int yyn = yypact[*yyssp];
1756 yyarg[yycount++] = yytname[yytoken];
1757 if (!yypact_value_is_default (yyn))
1759 /* Start YYX at -YYN if negative to avoid negative indexes in
1760 YYCHECK. In other words, skip the first -YYN actions for
1761 this state because they are default actions. */
1762 int yyxbegin = yyn < 0 ? -yyn : 0;
1763 /* Stay within bounds of both yycheck and yytname. */
1764 int yychecklim = YYLAST - yyn + 1;
1765 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1768 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1769 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1770 && !yytable_value_is_error (yytable[yyx + yyn]))
1772 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1778 yyarg[yycount++] = yytname[yyx];
1780 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1781 if (! (yysize <= yysize1
1782 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1792 # define YYCASE_(N, S) \
1796 YYCASE_(0, YY_("syntax error"));
1797 YYCASE_(1, YY_("syntax error, unexpected %s"));
1798 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1799 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1800 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1801 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1806 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1807 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1812 if (*yymsg_alloc < yysize)
1814 *yymsg_alloc = 2 * yysize;
1815 if (! (yysize <= *yymsg_alloc
1816 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1817 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1821 /* Avoid sprintf, as that infringes on the user's name space.
1822 Don't have undefined behavior even if the translation
1823 produced a string with the wrong number of "%s"s. */
1827 while ((*yyp = *yyformat) != '\0')
1828 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1830 yyp += yytnamerr (yyp, yyarg[yyi++]);
1841 #endif /* YYERROR_VERBOSE */
1843 /*-----------------------------------------------.
1844 | Release the memory associated to this symbol. |
1845 `-----------------------------------------------*/
1848 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1853 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1855 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1857 YY_IGNORE_MAYBE_UNINITIALIZED_END
1863 /* The lookahead symbol. */
1866 /* The semantic value of the lookahead symbol. */
1868 /* Number of syntax errors so far. */
1880 /* Number of tokens to shift before error messages enabled. */
1883 /* The stacks and their tools:
1884 'yyss': related to states.
1885 'yyvs': related to semantic values.
1887 Refer to the stacks through separate pointers, to allow yyoverflow
1888 to reallocate them elsewhere. */
1890 /* The state stack. */
1891 yytype_int16 yyssa[YYINITDEPTH];
1893 yytype_int16 *yyssp;
1895 /* The semantic value stack. */
1896 YYSTYPE yyvsa[YYINITDEPTH];
1900 YYSIZE_T yystacksize;
1904 /* Lookahead token as an internal (translated) token number. */
1906 /* The variables used to return semantic value and location from the
1911 /* Buffer for error messages, and its allocated size. */
1913 char *yymsg = yymsgbuf;
1914 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1917 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1919 /* The number of symbols on the RHS of the reduced rule.
1920 Keep to zero when no symbol should be popped. */
1923 yyssp = yyss = yyssa;
1924 yyvsp = yyvs = yyvsa;
1925 yystacksize = YYINITDEPTH;
1927 YYDPRINTF ((stderr, "Starting parse\n"));
1932 yychar = YYEMPTY; /* Cause a token to be read. */
1935 /*------------------------------------------------------------.
1936 | yynewstate -- Push a new state, which is found in yystate. |
1937 `------------------------------------------------------------*/
1939 /* In all cases, when you get here, the value and location stacks
1940 have just been pushed. So pushing a state here evens the stacks. */
1946 if (yyss + yystacksize - 1 <= yyssp)
1948 /* Get the current used size of the three stacks, in elements. */
1949 YYSIZE_T yysize = yyssp - yyss + 1;
1953 /* Give user a chance to reallocate the stack. Use copies of
1954 these so that the &'s don't force the real ones into
1956 YYSTYPE *yyvs1 = yyvs;
1957 yytype_int16 *yyss1 = yyss;
1959 /* Each stack pointer address is followed by the size of the
1960 data in use in that stack, in bytes. This used to be a
1961 conditional around just the two extra args, but that might
1962 be undefined if yyoverflow is a macro. */
1963 yyoverflow (YY_("memory exhausted"),
1964 &yyss1, yysize * sizeof (*yyssp),
1965 &yyvs1, yysize * sizeof (*yyvsp),
1971 #else /* no yyoverflow */
1972 # ifndef YYSTACK_RELOCATE
1973 goto yyexhaustedlab;
1975 /* Extend the stack our own way. */
1976 if (YYMAXDEPTH <= yystacksize)
1977 goto yyexhaustedlab;
1979 if (YYMAXDEPTH < yystacksize)
1980 yystacksize = YYMAXDEPTH;
1983 yytype_int16 *yyss1 = yyss;
1984 union yyalloc *yyptr =
1985 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1987 goto yyexhaustedlab;
1988 YYSTACK_RELOCATE (yyss_alloc, yyss);
1989 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1990 # undef YYSTACK_RELOCATE
1992 YYSTACK_FREE (yyss1);
1995 #endif /* no yyoverflow */
1997 yyssp = yyss + yysize - 1;
1998 yyvsp = yyvs + yysize - 1;
2000 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2001 (unsigned long int) yystacksize));
2003 if (yyss + yystacksize - 1 <= yyssp)
2007 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2009 if (yystate == YYFINAL)
2019 /* Do appropriate processing given the current state. Read a
2020 lookahead token if we need one and don't already have one. */
2022 /* First try to decide what to do without reference to lookahead token. */
2023 yyn = yypact[yystate];
2024 if (yypact_value_is_default (yyn))
2027 /* Not known => get a lookahead token if don't already have one. */
2029 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2030 if (yychar == YYEMPTY)
2032 YYDPRINTF ((stderr, "Reading a token: "));
2036 if (yychar <= YYEOF)
2038 yychar = yytoken = YYEOF;
2039 YYDPRINTF ((stderr, "Now at end of input.\n"));
2043 yytoken = YYTRANSLATE (yychar);
2044 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2047 /* If the proper action on seeing token YYTOKEN is to reduce or to
2048 detect an error, take that action. */
2050 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2055 if (yytable_value_is_error (yyn))
2061 /* Count tokens shifted since error; after three, turn off error
2066 /* Shift the lookahead token. */
2067 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2069 /* Discard the shifted token. */
2073 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2075 YY_IGNORE_MAYBE_UNINITIALIZED_END
2080 /*-----------------------------------------------------------.
2081 | yydefault -- do the default action for the current state. |
2082 `-----------------------------------------------------------*/
2084 yyn = yydefact[yystate];
2090 /*-----------------------------.
2091 | yyreduce -- Do a reduction. |
2092 `-----------------------------*/
2094 /* yyn is the number of a rule to reduce with. */
2097 /* If YYLEN is nonzero, implement the default value of the action:
2100 Otherwise, the following line sets YYVAL to garbage.
2101 This behavior is undocumented and Bison
2102 users should not rely upon it. Assigning to YYVAL
2103 unconditionally makes the parser a bit smaller, and it avoids a
2104 GCC warning that YYVAL may be used uninitialized. */
2105 yyval = yyvsp[1-yylen];
2108 YY_REDUCE_PRINT (yyn);
2112 #line 378 "ntp_parser.y" /* yacc.c:1646 */
2114 /* I will need to incorporate much more fine grained
2115 * error messages. The following should suffice for
2118 struct FILE_INFO * ip_ctx = lex_current();
2120 "syntax error in %s line %d, column %d",
2122 ip_ctx->errpos.nline,
2123 ip_ctx->errpos.ncol);
2125 #line 2126 "ntp_parser.c" /* yacc.c:1646 */
2129 #line 414 "ntp_parser.y" /* yacc.c:1646 */
2133 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2134 APPEND_G_FIFO(cfgt.peers, my_node);
2136 #line 2137 "ntp_parser.c" /* yacc.c:1646 */
2140 #line 433 "ntp_parser.y" /* yacc.c:1646 */
2141 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
2142 #line 2143 "ntp_parser.c" /* yacc.c:1646 */
2146 #line 438 "ntp_parser.y" /* yacc.c:1646 */
2147 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
2148 #line 2149 "ntp_parser.c" /* yacc.c:1646 */
2152 #line 443 "ntp_parser.y" /* yacc.c:1646 */
2153 { (yyval.Integer) = AF_INET; }
2154 #line 2155 "ntp_parser.c" /* yacc.c:1646 */
2158 #line 445 "ntp_parser.y" /* yacc.c:1646 */
2159 { (yyval.Integer) = AF_INET6; }
2160 #line 2161 "ntp_parser.c" /* yacc.c:1646 */
2164 #line 450 "ntp_parser.y" /* yacc.c:1646 */
2165 { (yyval.Attr_val_fifo) = NULL; }
2166 #line 2167 "ntp_parser.c" /* yacc.c:1646 */
2170 #line 452 "ntp_parser.y" /* yacc.c:1646 */
2172 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2173 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2175 #line 2176 "ntp_parser.c" /* yacc.c:1646 */
2179 #line 466 "ntp_parser.y" /* yacc.c:1646 */
2180 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2181 #line 2182 "ntp_parser.c" /* yacc.c:1646 */
2185 #line 482 "ntp_parser.y" /* yacc.c:1646 */
2186 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2187 #line 2188 "ntp_parser.c" /* yacc.c:1646 */
2191 #line 484 "ntp_parser.y" /* yacc.c:1646 */
2192 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2193 #line 2194 "ntp_parser.c" /* yacc.c:1646 */
2197 #line 498 "ntp_parser.y" /* yacc.c:1646 */
2198 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2199 #line 2200 "ntp_parser.c" /* yacc.c:1646 */
2203 #line 512 "ntp_parser.y" /* yacc.c:1646 */
2205 unpeer_node *my_node;
2207 my_node = create_unpeer_node((yyvsp[0].Address_node));
2209 APPEND_G_FIFO(cfgt.unpeers, my_node);
2211 #line 2212 "ntp_parser.c" /* yacc.c:1646 */
2215 #line 533 "ntp_parser.y" /* yacc.c:1646 */
2216 { cfgt.broadcastclient = 1; }
2217 #line 2218 "ntp_parser.c" /* yacc.c:1646 */
2221 #line 535 "ntp_parser.y" /* yacc.c:1646 */
2222 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
2223 #line 2224 "ntp_parser.c" /* yacc.c:1646 */
2227 #line 537 "ntp_parser.y" /* yacc.c:1646 */
2228 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
2229 #line 2230 "ntp_parser.c" /* yacc.c:1646 */
2233 #line 539 "ntp_parser.y" /* yacc.c:1646 */
2234 { cfgt.mdnstries = (yyvsp[0].Integer); }
2235 #line 2236 "ntp_parser.c" /* yacc.c:1646 */
2239 #line 550 "ntp_parser.y" /* yacc.c:1646 */
2243 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2244 APPEND_G_FIFO(cfgt.vars, atrv);
2246 #line 2247 "ntp_parser.c" /* yacc.c:1646 */
2250 #line 557 "ntp_parser.y" /* yacc.c:1646 */
2251 { cfgt.auth.control_key = (yyvsp[0].Integer); }
2252 #line 2253 "ntp_parser.c" /* yacc.c:1646 */
2256 #line 559 "ntp_parser.y" /* yacc.c:1646 */
2258 cfgt.auth.cryptosw++;
2259 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
2261 #line 2262 "ntp_parser.c" /* yacc.c:1646 */
2265 #line 564 "ntp_parser.y" /* yacc.c:1646 */
2266 { cfgt.auth.keys = (yyvsp[0].String); }
2267 #line 2268 "ntp_parser.c" /* yacc.c:1646 */
2271 #line 566 "ntp_parser.y" /* yacc.c:1646 */
2272 { cfgt.auth.keysdir = (yyvsp[0].String); }
2273 #line 2274 "ntp_parser.c" /* yacc.c:1646 */
2277 #line 568 "ntp_parser.y" /* yacc.c:1646 */
2278 { cfgt.auth.request_key = (yyvsp[0].Integer); }
2279 #line 2280 "ntp_parser.c" /* yacc.c:1646 */
2283 #line 570 "ntp_parser.y" /* yacc.c:1646 */
2284 { cfgt.auth.revoke = (yyvsp[0].Integer); }
2285 #line 2286 "ntp_parser.c" /* yacc.c:1646 */
2289 #line 572 "ntp_parser.y" /* yacc.c:1646 */
2291 cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
2293 // if (!cfgt.auth.trusted_key_list)
2294 // cfgt.auth.trusted_key_list = $2;
2296 // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
2298 #line 2299 "ntp_parser.c" /* yacc.c:1646 */
2302 #line 581 "ntp_parser.y" /* yacc.c:1646 */
2303 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
2304 #line 2305 "ntp_parser.c" /* yacc.c:1646 */
2308 #line 586 "ntp_parser.y" /* yacc.c:1646 */
2309 { (yyval.Attr_val_fifo) = NULL; }
2310 #line 2311 "ntp_parser.c" /* yacc.c:1646 */
2314 #line 588 "ntp_parser.y" /* yacc.c:1646 */
2316 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2317 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2319 #line 2320 "ntp_parser.c" /* yacc.c:1646 */
2323 #line 596 "ntp_parser.y" /* yacc.c:1646 */
2324 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2325 #line 2326 "ntp_parser.c" /* yacc.c:1646 */
2329 #line 598 "ntp_parser.y" /* yacc.c:1646 */
2331 (yyval.Attr_val) = NULL;
2332 cfgt.auth.revoke = (yyvsp[0].Integer);
2333 msyslog(LOG_WARNING,
2334 "'crypto revoke %d' is deprecated, "
2335 "please use 'revoke %d' instead.",
2336 cfgt.auth.revoke, cfgt.auth.revoke);
2338 #line 2339 "ntp_parser.c" /* yacc.c:1646 */
2342 #line 623 "ntp_parser.y" /* yacc.c:1646 */
2343 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
2344 #line 2345 "ntp_parser.c" /* yacc.c:1646 */
2348 #line 628 "ntp_parser.y" /* yacc.c:1646 */
2350 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2351 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2353 #line 2354 "ntp_parser.c" /* yacc.c:1646 */
2357 #line 633 "ntp_parser.y" /* yacc.c:1646 */
2359 (yyval.Attr_val_fifo) = NULL;
2360 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2362 #line 2363 "ntp_parser.c" /* yacc.c:1646 */
2366 #line 641 "ntp_parser.y" /* yacc.c:1646 */
2367 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2368 #line 2369 "ntp_parser.c" /* yacc.c:1646 */
2372 #line 643 "ntp_parser.y" /* yacc.c:1646 */
2373 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2374 #line 2375 "ntp_parser.c" /* yacc.c:1646 */
2378 #line 645 "ntp_parser.y" /* yacc.c:1646 */
2379 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
2380 #line 2381 "ntp_parser.c" /* yacc.c:1646 */
2384 #line 672 "ntp_parser.y" /* yacc.c:1646 */
2385 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
2386 #line 2387 "ntp_parser.c" /* yacc.c:1646 */
2390 #line 674 "ntp_parser.y" /* yacc.c:1646 */
2392 if (lex_from_file()) {
2393 cfgt.stats_dir = (yyvsp[0].String);
2395 YYFREE((yyvsp[0].String));
2396 yyerror("statsdir remote configuration ignored");
2399 #line 2400 "ntp_parser.c" /* yacc.c:1646 */
2403 #line 683 "ntp_parser.y" /* yacc.c:1646 */
2407 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
2408 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2410 #line 2411 "ntp_parser.c" /* yacc.c:1646 */
2414 #line 693 "ntp_parser.y" /* yacc.c:1646 */
2416 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2417 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2419 #line 2420 "ntp_parser.c" /* yacc.c:1646 */
2423 #line 698 "ntp_parser.y" /* yacc.c:1646 */
2425 (yyval.Int_fifo) = NULL;
2426 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2428 #line 2429 "ntp_parser.c" /* yacc.c:1646 */
2432 #line 717 "ntp_parser.y" /* yacc.c:1646 */
2433 { (yyval.Attr_val_fifo) = NULL; }
2434 #line 2435 "ntp_parser.c" /* yacc.c:1646 */
2438 #line 719 "ntp_parser.y" /* yacc.c:1646 */
2440 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2441 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2443 #line 2444 "ntp_parser.c" /* yacc.c:1646 */
2447 #line 727 "ntp_parser.y" /* yacc.c:1646 */
2449 if (lex_from_file()) {
2450 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2452 (yyval.Attr_val) = NULL;
2453 YYFREE((yyvsp[0].String));
2454 yyerror("filegen file remote config ignored");
2457 #line 2458 "ntp_parser.c" /* yacc.c:1646 */
2461 #line 737 "ntp_parser.y" /* yacc.c:1646 */
2463 if (lex_from_file()) {
2464 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2466 (yyval.Attr_val) = NULL;
2467 yyerror("filegen type remote config ignored");
2470 #line 2471 "ntp_parser.c" /* yacc.c:1646 */
2474 #line 746 "ntp_parser.y" /* yacc.c:1646 */
2478 if (lex_from_file()) {
2479 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2481 (yyval.Attr_val) = NULL;
2482 if (T_Link == (yyvsp[0].Integer))
2483 err = "filegen link remote config ignored";
2485 err = "filegen nolink remote config ignored";
2489 #line 2490 "ntp_parser.c" /* yacc.c:1646 */
2493 #line 761 "ntp_parser.y" /* yacc.c:1646 */
2494 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2495 #line 2496 "ntp_parser.c" /* yacc.c:1646 */
2499 #line 791 "ntp_parser.y" /* yacc.c:1646 */
2501 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
2503 #line 2504 "ntp_parser.c" /* yacc.c:1646 */
2507 #line 795 "ntp_parser.y" /* yacc.c:1646 */
2509 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
2511 #line 2512 "ntp_parser.c" /* yacc.c:1646 */
2515 #line 799 "ntp_parser.y" /* yacc.c:1646 */
2519 rn = create_restrict_node((yyvsp[-1].Address_node), NULL, (yyvsp[0].Int_fifo),
2520 lex_current()->curpos.nline);
2521 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2523 #line 2524 "ntp_parser.c" /* yacc.c:1646 */
2527 #line 807 "ntp_parser.y" /* yacc.c:1646 */
2531 rn = create_restrict_node((yyvsp[-3].Address_node), (yyvsp[-1].Address_node), (yyvsp[0].Int_fifo),
2532 lex_current()->curpos.nline);
2533 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2535 #line 2536 "ntp_parser.c" /* yacc.c:1646 */
2539 #line 815 "ntp_parser.y" /* yacc.c:1646 */
2543 rn = create_restrict_node(NULL, NULL, (yyvsp[0].Int_fifo),
2544 lex_current()->curpos.nline);
2545 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2547 #line 2548 "ntp_parser.c" /* yacc.c:1646 */
2551 #line 823 "ntp_parser.y" /* yacc.c:1646 */
2555 rn = create_restrict_node(
2556 create_address_node(
2559 create_address_node(
2562 (yyvsp[0].Int_fifo),
2563 lex_current()->curpos.nline);
2564 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2566 #line 2567 "ntp_parser.c" /* yacc.c:1646 */
2570 #line 838 "ntp_parser.y" /* yacc.c:1646 */
2574 rn = create_restrict_node(
2575 create_address_node(
2578 create_address_node(
2581 (yyvsp[0].Int_fifo),
2582 lex_current()->curpos.nline);
2583 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2585 #line 2586 "ntp_parser.c" /* yacc.c:1646 */
2589 #line 853 "ntp_parser.y" /* yacc.c:1646 */
2593 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-1].Integer)));
2594 rn = create_restrict_node(
2595 NULL, NULL, (yyvsp[0].Int_fifo), lex_current()->curpos.nline);
2596 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2598 #line 2599 "ntp_parser.c" /* yacc.c:1646 */
2602 #line 865 "ntp_parser.y" /* yacc.c:1646 */
2603 { (yyval.Int_fifo) = NULL; }
2604 #line 2605 "ntp_parser.c" /* yacc.c:1646 */
2608 #line 867 "ntp_parser.y" /* yacc.c:1646 */
2610 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
2611 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
2613 #line 2614 "ntp_parser.c" /* yacc.c:1646 */
2617 #line 893 "ntp_parser.y" /* yacc.c:1646 */
2619 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2620 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2622 #line 2623 "ntp_parser.c" /* yacc.c:1646 */
2626 #line 898 "ntp_parser.y" /* yacc.c:1646 */
2628 (yyval.Attr_val_fifo) = NULL;
2629 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2631 #line 2632 "ntp_parser.c" /* yacc.c:1646 */
2635 #line 906 "ntp_parser.y" /* yacc.c:1646 */
2636 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2637 #line 2638 "ntp_parser.c" /* yacc.c:1646 */
2641 #line 917 "ntp_parser.y" /* yacc.c:1646 */
2643 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2644 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2646 #line 2647 "ntp_parser.c" /* yacc.c:1646 */
2650 #line 922 "ntp_parser.y" /* yacc.c:1646 */
2652 (yyval.Attr_val_fifo) = NULL;
2653 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2655 #line 2656 "ntp_parser.c" /* yacc.c:1646 */
2659 #line 930 "ntp_parser.y" /* yacc.c:1646 */
2660 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2661 #line 2662 "ntp_parser.c" /* yacc.c:1646 */
2665 #line 950 "ntp_parser.y" /* yacc.c:1646 */
2667 addr_opts_node *aon;
2669 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2670 APPEND_G_FIFO(cfgt.fudge, aon);
2672 #line 2673 "ntp_parser.c" /* yacc.c:1646 */
2676 #line 960 "ntp_parser.y" /* yacc.c:1646 */
2678 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2679 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2681 #line 2682 "ntp_parser.c" /* yacc.c:1646 */
2685 #line 965 "ntp_parser.y" /* yacc.c:1646 */
2687 (yyval.Attr_val_fifo) = NULL;
2688 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2690 #line 2691 "ntp_parser.c" /* yacc.c:1646 */
2694 #line 973 "ntp_parser.y" /* yacc.c:1646 */
2695 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2696 #line 2697 "ntp_parser.c" /* yacc.c:1646 */
2700 #line 975 "ntp_parser.y" /* yacc.c:1646 */
2701 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2702 #line 2703 "ntp_parser.c" /* yacc.c:1646 */
2706 #line 977 "ntp_parser.y" /* yacc.c:1646 */
2708 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) {
2709 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2711 (yyval.Attr_val) = NULL;
2712 yyerror("fudge factor: stratum value not in [0..16], ignored");
2715 #line 2716 "ntp_parser.c" /* yacc.c:1646 */
2719 #line 986 "ntp_parser.y" /* yacc.c:1646 */
2720 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2721 #line 2722 "ntp_parser.c" /* yacc.c:1646 */
2725 #line 988 "ntp_parser.y" /* yacc.c:1646 */
2726 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
2727 #line 2728 "ntp_parser.c" /* yacc.c:1646 */
2731 #line 1009 "ntp_parser.y" /* yacc.c:1646 */
2732 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
2733 #line 2734 "ntp_parser.c" /* yacc.c:1646 */
2737 #line 1014 "ntp_parser.y" /* yacc.c:1646 */
2739 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2740 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2742 #line 2743 "ntp_parser.c" /* yacc.c:1646 */
2746 #line 1019 "ntp_parser.y" /* yacc.c:1646 */
2748 (yyval.Attr_val_fifo) = NULL;
2749 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2751 #line 2752 "ntp_parser.c" /* yacc.c:1646 */
2755 #line 1027 "ntp_parser.y" /* yacc.c:1646 */
2756 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
2757 #line 2758 "ntp_parser.c" /* yacc.c:1646 */
2761 #line 1043 "ntp_parser.y" /* yacc.c:1646 */
2762 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
2763 #line 2764 "ntp_parser.c" /* yacc.c:1646 */
2767 #line 1045 "ntp_parser.y" /* yacc.c:1646 */
2768 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
2769 #line 2770 "ntp_parser.c" /* yacc.c:1646 */
2773 #line 1050 "ntp_parser.y" /* yacc.c:1646 */
2775 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2776 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2778 #line 2779 "ntp_parser.c" /* yacc.c:1646 */
2782 #line 1055 "ntp_parser.y" /* yacc.c:1646 */
2784 (yyval.Attr_val_fifo) = NULL;
2785 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2787 #line 2788 "ntp_parser.c" /* yacc.c:1646 */
2791 #line 1063 "ntp_parser.y" /* yacc.c:1646 */
2792 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
2793 #line 2794 "ntp_parser.c" /* yacc.c:1646 */
2797 #line 1065 "ntp_parser.y" /* yacc.c:1646 */
2799 if (lex_from_file()) {
2800 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
2804 (yyval.Attr_val) = NULL;
2805 snprintf(err_str, sizeof(err_str),
2806 "enable/disable %s remote configuration ignored",
2807 keyword((yyvsp[0].Integer)));
2811 #line 2812 "ntp_parser.c" /* yacc.c:1646 */
2815 #line 1104 "ntp_parser.y" /* yacc.c:1646 */
2816 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
2817 #line 2818 "ntp_parser.c" /* yacc.c:1646 */
2821 #line 1109 "ntp_parser.y" /* yacc.c:1646 */
2823 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
2824 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2826 #line 2827 "ntp_parser.c" /* yacc.c:1646 */
2830 #line 1114 "ntp_parser.y" /* yacc.c:1646 */
2832 (yyval.Attr_val_fifo) = NULL;
2833 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
2835 #line 2836 "ntp_parser.c" /* yacc.c:1646 */
2839 #line 1122 "ntp_parser.y" /* yacc.c:1646 */
2840 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
2841 #line 2842 "ntp_parser.c" /* yacc.c:1646 */
2845 #line 1147 "ntp_parser.y" /* yacc.c:1646 */
2849 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
2850 APPEND_G_FIFO(cfgt.vars, av);
2852 #line 2853 "ntp_parser.c" /* yacc.c:1646 */
2856 #line 1154 "ntp_parser.y" /* yacc.c:1646 */
2860 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
2861 APPEND_G_FIFO(cfgt.vars, av);
2863 #line 2864 "ntp_parser.c" /* yacc.c:1646 */
2867 #line 1161 "ntp_parser.y" /* yacc.c:1646 */
2871 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2872 APPEND_G_FIFO(cfgt.vars, av);
2874 #line 2875 "ntp_parser.c" /* yacc.c:1646 */
2878 #line 1168 "ntp_parser.y" /* yacc.c:1646 */
2880 char error_text[64];
2883 if (lex_from_file()) {
2884 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
2885 APPEND_G_FIFO(cfgt.vars, av);
2887 YYFREE((yyvsp[0].String));
2888 snprintf(error_text, sizeof(error_text),
2889 "%s remote config ignored",
2890 keyword((yyvsp[-1].Integer)));
2891 yyerror(error_text);
2894 #line 2895 "ntp_parser.c" /* yacc.c:1646 */
2898 #line 1184 "ntp_parser.y" /* yacc.c:1646 */
2900 if (!lex_from_file()) {
2901 YYFREE((yyvsp[-1].String)); /* avoid leak */
2902 yyerror("remote includefile ignored");
2905 if (lex_level() > MAXINCLUDELEVEL) {
2906 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
2907 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
2909 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */
2910 if (!lex_push_file(path, "r")) {
2911 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
2912 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
2915 YYFREE((yyvsp[-1].String)); /* avoid leak */
2917 #line 2918 "ntp_parser.c" /* yacc.c:1646 */
2921 #line 1203 "ntp_parser.y" /* yacc.c:1646 */
2922 { lex_flush_stack(); }
2923 #line 2924 "ntp_parser.c" /* yacc.c:1646 */
2927 #line 1205 "ntp_parser.y" /* yacc.c:1646 */
2928 { /* see drift_parm below for actions */ }
2929 #line 2930 "ntp_parser.c" /* yacc.c:1646 */
2933 #line 1207 "ntp_parser.y" /* yacc.c:1646 */
2934 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
2935 #line 2936 "ntp_parser.c" /* yacc.c:1646 */
2939 #line 1209 "ntp_parser.y" /* yacc.c:1646 */
2940 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
2941 #line 2942 "ntp_parser.c" /* yacc.c:1646 */
2945 #line 1211 "ntp_parser.y" /* yacc.c:1646 */
2946 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
2947 #line 2948 "ntp_parser.c" /* yacc.c:1646 */
2951 #line 1213 "ntp_parser.y" /* yacc.c:1646 */
2953 addr_opts_node *aon;
2955 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
2956 APPEND_G_FIFO(cfgt.trap, aon);
2958 #line 2959 "ntp_parser.c" /* yacc.c:1646 */
2962 #line 1220 "ntp_parser.y" /* yacc.c:1646 */
2963 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
2964 #line 2965 "ntp_parser.c" /* yacc.c:1646 */
2968 #line 1235 "ntp_parser.y" /* yacc.c:1646 */
2971 yyerror("Built without LEAP_SMEAR support.");
2974 #line 2975 "ntp_parser.c" /* yacc.c:1646 */
2978 #line 1255 "ntp_parser.y" /* yacc.c:1646 */
2980 if (lex_from_file()) {
2982 av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
2983 APPEND_G_FIFO(cfgt.vars, av);
2985 YYFREE((yyvsp[0].String));
2986 yyerror("driftfile remote configuration ignored");
2989 #line 2990 "ntp_parser.c" /* yacc.c:1646 */
2993 #line 1266 "ntp_parser.y" /* yacc.c:1646 */
2995 if (lex_from_file()) {
2997 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String));
2998 APPEND_G_FIFO(cfgt.vars, av);
2999 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
3000 APPEND_G_FIFO(cfgt.vars, av);
3002 YYFREE((yyvsp[-1].String));
3003 yyerror("driftfile remote configuration ignored");
3006 #line 3007 "ntp_parser.c" /* yacc.c:1646 */
3010 #line 1279 "ntp_parser.y" /* yacc.c:1646 */
3012 if (lex_from_file()) {
3014 av = create_attr_sval(T_Driftfile, estrdup(""));
3015 APPEND_G_FIFO(cfgt.vars, av);
3017 yyerror("driftfile remote configuration ignored");
3020 #line 3021 "ntp_parser.c" /* yacc.c:1646 */
3024 #line 1292 "ntp_parser.y" /* yacc.c:1646 */
3025 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
3026 #line 3027 "ntp_parser.c" /* yacc.c:1646 */
3030 #line 1298 "ntp_parser.y" /* yacc.c:1646 */
3031 { (yyval.Integer) = 0; }
3032 #line 3033 "ntp_parser.c" /* yacc.c:1646 */
3036 #line 1303 "ntp_parser.y" /* yacc.c:1646 */
3037 { (yyval.Attr_val_fifo) = NULL; }
3038 #line 3039 "ntp_parser.c" /* yacc.c:1646 */
3042 #line 1305 "ntp_parser.y" /* yacc.c:1646 */
3044 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3045 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3047 #line 3048 "ntp_parser.c" /* yacc.c:1646 */
3051 #line 1313 "ntp_parser.y" /* yacc.c:1646 */
3052 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
3053 #line 3054 "ntp_parser.c" /* yacc.c:1646 */
3057 #line 1315 "ntp_parser.y" /* yacc.c:1646 */
3059 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
3060 destroy_address_node((yyvsp[0].Address_node));
3062 #line 3063 "ntp_parser.c" /* yacc.c:1646 */
3066 #line 1323 "ntp_parser.y" /* yacc.c:1646 */
3068 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3069 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3071 #line 3072 "ntp_parser.c" /* yacc.c:1646 */
3075 #line 1328 "ntp_parser.y" /* yacc.c:1646 */
3077 (yyval.Attr_val_fifo) = NULL;
3078 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3080 #line 3081 "ntp_parser.c" /* yacc.c:1646 */
3084 #line 1336 "ntp_parser.y" /* yacc.c:1646 */
3089 switch ((yyvsp[0].String)[0]) {
3094 prefix = (yyvsp[0].String)[0];
3095 type = (yyvsp[0].String) + 1;
3100 type = (yyvsp[0].String);
3103 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3104 YYFREE((yyvsp[0].String));
3106 #line 3107 "ntp_parser.c" /* yacc.c:1646 */
3110 #line 1361 "ntp_parser.y" /* yacc.c:1646 */
3114 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
3115 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3117 #line 3118 "ntp_parser.c" /* yacc.c:1646 */
3121 #line 1368 "ntp_parser.y" /* yacc.c:1646 */
3125 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
3126 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3128 #line 3129 "ntp_parser.c" /* yacc.c:1646 */
3132 #line 1396 "ntp_parser.y" /* yacc.c:1646 */
3133 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
3134 #line 3135 "ntp_parser.c" /* yacc.c:1646 */
3138 #line 1401 "ntp_parser.y" /* yacc.c:1646 */
3140 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
3141 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3143 #line 3144 "ntp_parser.c" /* yacc.c:1646 */
3147 #line 1406 "ntp_parser.y" /* yacc.c:1646 */
3149 (yyval.Int_fifo) = NULL;
3150 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
3152 #line 3153 "ntp_parser.c" /* yacc.c:1646 */
3156 #line 1430 "ntp_parser.y" /* yacc.c:1646 */
3158 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3159 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3161 #line 3162 "ntp_parser.c" /* yacc.c:1646 */
3165 #line 1435 "ntp_parser.y" /* yacc.c:1646 */
3167 (yyval.Attr_val_fifo) = NULL;
3168 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
3170 #line 3171 "ntp_parser.c" /* yacc.c:1646 */
3174 #line 1443 "ntp_parser.y" /* yacc.c:1646 */
3176 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
3177 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3179 #line 3180 "ntp_parser.c" /* yacc.c:1646 */
3183 #line 1448 "ntp_parser.y" /* yacc.c:1646 */
3185 (yyval.Attr_val_fifo) = NULL;
3186 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
3188 #line 3189 "ntp_parser.c" /* yacc.c:1646 */
3192 #line 1456 "ntp_parser.y" /* yacc.c:1646 */
3193 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
3194 #line 3195 "ntp_parser.c" /* yacc.c:1646 */
3198 #line 1462 "ntp_parser.y" /* yacc.c:1646 */
3199 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
3200 #line 3201 "ntp_parser.c" /* yacc.c:1646 */
3204 #line 1467 "ntp_parser.y" /* yacc.c:1646 */
3206 (yyval.String_fifo) = (yyvsp[-1].String_fifo);
3207 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3209 #line 3210 "ntp_parser.c" /* yacc.c:1646 */
3213 #line 1472 "ntp_parser.y" /* yacc.c:1646 */
3215 (yyval.String_fifo) = NULL;
3216 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
3218 #line 3219 "ntp_parser.c" /* yacc.c:1646 */
3222 #line 1480 "ntp_parser.y" /* yacc.c:1646 */
3224 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
3225 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3227 #line 3228 "ntp_parser.c" /* yacc.c:1646 */
3231 #line 1485 "ntp_parser.y" /* yacc.c:1646 */
3233 (yyval.Address_fifo) = NULL;
3234 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
3236 #line 3237 "ntp_parser.c" /* yacc.c:1646 */
3240 #line 1493 "ntp_parser.y" /* yacc.c:1646 */
3242 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
3243 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3244 (yyval.Integer) = 1;
3246 (yyval.Integer) = (yyvsp[0].Integer);
3249 #line 3250 "ntp_parser.c" /* yacc.c:1646 */
3253 #line 1501 "ntp_parser.y" /* yacc.c:1646 */
3254 { (yyval.Integer) = 1; }
3255 #line 3256 "ntp_parser.c" /* yacc.c:1646 */
3259 #line 1502 "ntp_parser.y" /* yacc.c:1646 */
3260 { (yyval.Integer) = 0; }
3261 #line 3262 "ntp_parser.c" /* yacc.c:1646 */
3265 #line 1506 "ntp_parser.y" /* yacc.c:1646 */
3266 { (yyval.Double) = (double)(yyvsp[0].Integer); }
3267 #line 3268 "ntp_parser.c" /* yacc.c:1646 */
3271 #line 1517 "ntp_parser.y" /* yacc.c:1646 */
3275 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo));
3276 APPEND_G_FIFO(cfgt.sim_details, sn);
3278 /* Revert from ; to \n for end-of-command */
3279 old_config_style = 1;
3281 #line 3282 "ntp_parser.c" /* yacc.c:1646 */
3285 #line 1534 "ntp_parser.y" /* yacc.c:1646 */
3286 { old_config_style = 0; }
3287 #line 3288 "ntp_parser.c" /* yacc.c:1646 */
3291 #line 1539 "ntp_parser.y" /* yacc.c:1646 */
3293 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3294 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3296 #line 3297 "ntp_parser.c" /* yacc.c:1646 */
3300 #line 1544 "ntp_parser.y" /* yacc.c:1646 */
3302 (yyval.Attr_val_fifo) = NULL;
3303 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3305 #line 3306 "ntp_parser.c" /* yacc.c:1646 */
3309 #line 1552 "ntp_parser.y" /* yacc.c:1646 */
3310 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3311 #line 3312 "ntp_parser.c" /* yacc.c:1646 */
3315 #line 1562 "ntp_parser.y" /* yacc.c:1646 */
3317 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
3318 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3320 #line 3321 "ntp_parser.c" /* yacc.c:1646 */
3324 #line 1567 "ntp_parser.y" /* yacc.c:1646 */
3326 (yyval.Sim_server_fifo) = NULL;
3327 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
3329 #line 3330 "ntp_parser.c" /* yacc.c:1646 */
3333 #line 1575 "ntp_parser.y" /* yacc.c:1646 */
3334 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
3335 #line 3336 "ntp_parser.c" /* yacc.c:1646 */
3339 #line 1580 "ntp_parser.y" /* yacc.c:1646 */
3340 { (yyval.Double) = (yyvsp[-1].Double); }
3341 #line 3342 "ntp_parser.c" /* yacc.c:1646 */
3345 #line 1585 "ntp_parser.y" /* yacc.c:1646 */
3346 { (yyval.Address_node) = (yyvsp[0].Address_node); }
3347 #line 3348 "ntp_parser.c" /* yacc.c:1646 */
3351 #line 1590 "ntp_parser.y" /* yacc.c:1646 */
3353 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
3354 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3356 #line 3357 "ntp_parser.c" /* yacc.c:1646 */
3360 #line 1595 "ntp_parser.y" /* yacc.c:1646 */
3362 (yyval.Sim_script_fifo) = NULL;
3363 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
3365 #line 3366 "ntp_parser.c" /* yacc.c:1646 */
3369 #line 1603 "ntp_parser.y" /* yacc.c:1646 */
3370 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
3371 #line 3372 "ntp_parser.c" /* yacc.c:1646 */
3375 #line 1608 "ntp_parser.y" /* yacc.c:1646 */
3377 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
3378 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3380 #line 3381 "ntp_parser.c" /* yacc.c:1646 */
3384 #line 1613 "ntp_parser.y" /* yacc.c:1646 */
3386 (yyval.Attr_val_fifo) = NULL;
3387 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
3389 #line 3390 "ntp_parser.c" /* yacc.c:1646 */
3393 #line 1621 "ntp_parser.y" /* yacc.c:1646 */
3394 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
3395 #line 3396 "ntp_parser.c" /* yacc.c:1646 */
3399 #line 3400 "ntp_parser.c" /* yacc.c:1646 */
3402 /* User semantic actions sometimes alter yychar, and that requires
3403 that yytoken be updated with the new translation. We take the
3404 approach of translating immediately before every use of yytoken.
3405 One alternative is translating here after every semantic action,
3406 but that translation would be missed if the semantic action invokes
3407 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3408 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3409 incorrect destructor might then be invoked immediately. In the
3410 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3411 to an incorrect destructor call or verbose syntax error message
3412 before the lookahead is translated. */
3413 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3417 YY_STACK_PRINT (yyss, yyssp);
3421 /* Now 'shift' the result of the reduction. Determine what state
3422 that goes to, based on the state we popped back to and the rule
3423 number reduced by. */
3427 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3428 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3429 yystate = yytable[yystate];
3431 yystate = yydefgoto[yyn - YYNTOKENS];
3436 /*--------------------------------------.
3437 | yyerrlab -- here on detecting error. |
3438 `--------------------------------------*/
3440 /* Make sure we have latest lookahead translation. See comments at
3441 user semantic actions for why this is necessary. */
3442 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3444 /* If not already recovering from an error, report this error. */
3448 #if ! YYERROR_VERBOSE
3449 yyerror (YY_("syntax error"));
3451 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3454 char const *yymsgp = YY_("syntax error");
3455 int yysyntax_error_status;
3456 yysyntax_error_status = YYSYNTAX_ERROR;
3457 if (yysyntax_error_status == 0)
3459 else if (yysyntax_error_status == 1)
3461 if (yymsg != yymsgbuf)
3462 YYSTACK_FREE (yymsg);
3463 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3467 yymsg_alloc = sizeof yymsgbuf;
3468 yysyntax_error_status = 2;
3472 yysyntax_error_status = YYSYNTAX_ERROR;
3477 if (yysyntax_error_status == 2)
3478 goto yyexhaustedlab;
3480 # undef YYSYNTAX_ERROR
3486 if (yyerrstatus == 3)
3488 /* If just tried and failed to reuse lookahead token after an
3489 error, discard it. */
3491 if (yychar <= YYEOF)
3493 /* Return failure if at end of input. */
3494 if (yychar == YYEOF)
3499 yydestruct ("Error: discarding",
3505 /* Else will try to reuse lookahead token after shifting the error
3510 /*---------------------------------------------------.
3511 | yyerrorlab -- error raised explicitly by YYERROR. |
3512 `---------------------------------------------------*/
3515 /* Pacify compilers like GCC when the user code never invokes
3516 YYERROR and the label yyerrorlab therefore never appears in user
3518 if (/*CONSTCOND*/ 0)
3521 /* Do not reclaim the symbols of the rule whose action triggered
3525 YY_STACK_PRINT (yyss, yyssp);
3530 /*-------------------------------------------------------------.
3531 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3532 `-------------------------------------------------------------*/
3534 yyerrstatus = 3; /* Each real token shifted decrements this. */
3538 yyn = yypact[yystate];
3539 if (!yypact_value_is_default (yyn))
3542 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3550 /* Pop the current state because it cannot handle the error token. */
3555 yydestruct ("Error: popping",
3556 yystos[yystate], yyvsp);
3559 YY_STACK_PRINT (yyss, yyssp);
3562 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3564 YY_IGNORE_MAYBE_UNINITIALIZED_END
3567 /* Shift the error token. */
3568 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3574 /*-------------------------------------.
3575 | yyacceptlab -- YYACCEPT comes here. |
3576 `-------------------------------------*/
3581 /*-----------------------------------.
3582 | yyabortlab -- YYABORT comes here. |
3583 `-----------------------------------*/
3588 #if !defined yyoverflow || YYERROR_VERBOSE
3589 /*-------------------------------------------------.
3590 | yyexhaustedlab -- memory exhaustion comes here. |
3591 `-------------------------------------------------*/
3593 yyerror (YY_("memory exhausted"));
3599 if (yychar != YYEMPTY)
3601 /* Make sure we have latest lookahead translation. See comments at
3602 user semantic actions for why this is necessary. */
3603 yytoken = YYTRANSLATE (yychar);
3604 yydestruct ("Cleanup: discarding lookahead",
3607 /* Do not reclaim the symbols of the rule whose action triggered
3608 this YYABORT or YYACCEPT. */
3610 YY_STACK_PRINT (yyss, yyssp);
3611 while (yyssp != yyss)
3613 yydestruct ("Cleanup: popping",
3614 yystos[*yyssp], yyvsp);
3619 YYSTACK_FREE (yyss);
3622 if (yymsg != yymsgbuf)
3623 YYSTACK_FREE (yymsg);
3627 #line 1632 "ntp_parser.y" /* yacc.c:1906 */
3636 struct FILE_INFO * ip_ctx;
3638 ip_ctx = lex_current();
3639 ip_ctx->errpos = ip_ctx->tokpos;
3641 msyslog(LOG_ERR, "line %d column %d %s",
3642 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3643 if (!lex_from_file()) {
3644 /* Save the error message in the correct buffer */
3645 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3646 MAXLINE - remote_config.err_pos,
3648 ip_ctx->errpos.ncol, msg);
3650 /* Increment the value of err_pos */
3652 remote_config.err_pos += retval;
3654 /* Increment the number of errors */
3655 ++remote_config.no_errors;
3661 * token_name - convert T_ token integers to text
3662 * example: token_name(T_Server) returns "T_Server"
3669 return yytname[YYTRANSLATE(token)];
3673 /* Initial Testing function -- ignore */
3675 int main(int argc, char *argv[])
3677 ip_file = FOPEN(argv[1], "r");
3679 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);