1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.7.12-4996"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 /* Line 371 of yacc.c */
66 #line 11 "../../ntpd/ntp_parser.y"
74 #include "ntp_machine.h"
75 #include "ntp_stdlib.h"
76 #include "ntp_filegen.h"
77 #include "ntp_scanner.h"
78 #include "ntp_config.h"
79 #include "ntp_crypto.h"
81 #include "ntpsim.h" /* HMS: Do we really want this all the time? */
82 /* SK: It might be a good idea to always
83 include the simulator code. That way
84 someone can use the same configuration file
85 for both the simulator and the daemon
88 #define YYMALLOC emalloc
90 #define YYERROR_VERBOSE
91 #define YYMAXDEPTH 1000 /* stop the madness sooner */
92 void yyerror(const char *msg);
95 # define ONLY_SIM(a) (a)
97 # define ONLY_SIM(a) NULL
100 /* Line 371 of yacc.c */
101 #line 102 "ntp_parser.c"
104 # if defined __cplusplus && 201103L <= __cplusplus
105 # define YY_NULL nullptr
111 /* Enabling verbose error messages. */
112 #ifdef YYERROR_VERBOSE
113 # undef YYERROR_VERBOSE
114 # define YYERROR_VERBOSE 1
116 # define YYERROR_VERBOSE 0
119 /* In a future release of Bison, this section will be replaced
120 by #include "y.tab.h". */
121 #ifndef YY_YY_NTP_PARSER_H_INCLUDED
122 # define YY_YY_NTP_PARSER_H_INCLUDED
123 /* Enabling traces. */
134 /* Put the tokens into the symbol table, so that GDB and other debuggers
149 T_Broadcastclient = 270,
150 T_Broadcastdelay = 271,
210 T_Leapsmearinterval = 331,
218 T_Manycastclient = 339,
219 T_Manycastserver = 340,
241 T_Multicastclient = 362,
256 T_NtpSignDsocket = 377,
279 T_Saveconfigdir = 400,
311 T_WanderThreshold = 432,
320 T_Sim_Duration = 441,
321 T_Server_Offset = 442,
335 #define T_Allpeers 262
337 #define T_Autokey 264
338 #define T_Automax 265
339 #define T_Average 266
340 #define T_Bclient 267
342 #define T_Broadcast 269
343 #define T_Broadcastclient 270
344 #define T_Broadcastdelay 271
346 #define T_Calibrate 273
347 #define T_Ceiling 274
348 #define T_Clockstats 275
350 #define T_ControlKey 277
352 #define T_Cryptostats 279
355 #define T_Default 282
357 #define T_Disable 284
358 #define T_Discard 285
359 #define T_Dispersion 286
361 #define T_Driftfile 288
364 #define T_Ellipsis 291
369 #define T_Filegen 296
370 #define T_Filenum 297
380 #define T_Huffpuff 307
384 #define T_Incalloc 311
386 #define T_Initalloc 313
387 #define T_Initmem 314
388 #define T_Includefile 315
389 #define T_Integer 316
390 #define T_Interface 317
391 #define T_Intrange 318
394 #define T_Ipv4_flag 321
396 #define T_Ipv6_flag 323
400 #define T_Keysdir 327
403 #define T_Leapfile 330
404 #define T_Leapsmearinterval 331
405 #define T_Limited 332
408 #define T_Logconfig 335
409 #define T_Logfile 336
410 #define T_Loopstats 337
411 #define T_Lowpriotrap 338
412 #define T_Manycastclient 339
413 #define T_Manycastserver 340
416 #define T_Maxclock 343
417 #define T_Maxdepth 344
418 #define T_Maxdist 345
420 #define T_Maxpoll 347
421 #define T_Mdnstries 348
423 #define T_Memlock 350
424 #define T_Minclock 351
425 #define T_Mindepth 352
426 #define T_Mindist 353
427 #define T_Minimum 354
428 #define T_Minpoll 355
429 #define T_Minsane 356
432 #define T_Monitor 359
435 #define T_Multicastclient 362
438 #define T_Nomodify 365
439 #define T_Nomrulist 366
441 #define T_Nonvolatile 368
443 #define T_Noquery 370
444 #define T_Noselect 371
445 #define T_Noserve 372
447 #define T_Notrust 374
449 #define T_Ntpport 376
450 #define T_NtpSignDsocket 377
452 #define T_Orphanwait 379
455 #define T_Peerstats 382
458 #define T_Pidfile 385
461 #define T_Preempt 388
463 #define T_Protostats 390
465 #define T_Randfile 392
466 #define T_Rawstats 393
468 #define T_Requestkey 395
470 #define T_Restrict 397
473 #define T_Saveconfigdir 400
477 #define T_Stacksize 404
478 #define T_Statistics 405
480 #define T_Statsdir 407
482 #define T_Stepback 409
483 #define T_Stepfwd 410
484 #define T_Stepout 411
485 #define T_Stratum 412
488 #define T_Sysstats 415
493 #define T_Timingstats 420
498 #define T_Trustedkey 425
502 #define T_Unconfig 429
504 #define T_Version 431
505 #define T_WanderThreshold 432
507 #define T_Wildcard 434
512 #define T_Simulate 439
513 #define T_Beep_Delay 440
514 #define T_Sim_Duration 441
515 #define T_Server_Offset 442
516 #define T_Duration 443
517 #define T_Freq_Offset 444
520 #define T_Prop_Delay 447
521 #define T_Proc_Delay 448
525 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
526 typedef union YYSTYPE
528 /* Line 387 of yacc.c */
529 #line 51 "../../ntpd/ntp_parser.y"
535 gen_fifo * Generic_fifo;
537 attr_val_fifo * Attr_val_fifo;
539 string_fifo * String_fifo;
540 address_node * Address_node;
541 address_fifo * Address_fifo;
542 setvar_node * Set_var;
543 server_info * Sim_server;
544 server_info_fifo * Sim_server_fifo;
545 script_info * Sim_script;
546 script_info_fifo * Sim_script_fifo;
549 /* Line 387 of yacc.c */
550 #line 551 "ntp_parser.c"
552 # define YYSTYPE_IS_TRIVIAL 1
553 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
554 # define YYSTYPE_IS_DECLARED 1
557 extern YYSTYPE yylval;
560 #if defined __STDC__ || defined __cplusplus
561 int yyparse (void *YYPARSE_PARAM);
565 #else /* ! YYPARSE_PARAM */
566 #if defined __STDC__ || defined __cplusplus
571 #endif /* ! YYPARSE_PARAM */
573 #endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
575 /* Copy the second part of user declarations. */
577 /* Line 390 of yacc.c */
578 #line 579 "ntp_parser.c"
585 typedef YYTYPE_UINT8 yytype_uint8;
587 typedef unsigned char yytype_uint8;
591 typedef YYTYPE_INT8 yytype_int8;
592 #elif (defined __STDC__ || defined __C99__FUNC__ \
593 || defined __cplusplus || defined _MSC_VER)
594 typedef signed char yytype_int8;
596 typedef short int yytype_int8;
600 typedef YYTYPE_UINT16 yytype_uint16;
602 typedef unsigned short int yytype_uint16;
606 typedef YYTYPE_INT16 yytype_int16;
608 typedef short int yytype_int16;
612 # ifdef __SIZE_TYPE__
613 # define YYSIZE_T __SIZE_TYPE__
614 # elif defined size_t
615 # define YYSIZE_T size_t
616 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
617 || defined __cplusplus || defined _MSC_VER)
618 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
619 # define YYSIZE_T size_t
621 # define YYSIZE_T unsigned int
625 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
628 # if defined YYENABLE_NLS && YYENABLE_NLS
630 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
631 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
635 # define YY_(Msgid) Msgid
639 #ifndef __attribute__
640 /* This feature is available in gcc versions 2.5 and later. */
641 # if (! defined __GNUC__ || __GNUC__ < 2 \
642 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
643 # define __attribute__(Spec) /* empty */
647 /* Suppress unused-variable warnings by "using" E. */
648 #if ! defined lint || defined __GNUC__
649 # define YYUSE(E) ((void) (E))
651 # define YYUSE(E) /* empty */
655 /* Identity function, used to suppress warnings about constant conditions. */
659 #if (defined __STDC__ || defined __C99__FUNC__ \
660 || defined __cplusplus || defined _MSC_VER)
673 #if ! defined yyoverflow || YYERROR_VERBOSE
675 /* The parser invokes alloca or malloc; define the necessary symbols. */
677 # ifdef YYSTACK_USE_ALLOCA
678 # if YYSTACK_USE_ALLOCA
680 # define YYSTACK_ALLOC __builtin_alloca
681 # elif defined __BUILTIN_VA_ARG_INCR
682 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
684 # define YYSTACK_ALLOC __alloca
685 # elif defined _MSC_VER
686 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
687 # define alloca _alloca
689 # define YYSTACK_ALLOC alloca
690 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
691 || defined __cplusplus || defined _MSC_VER)
692 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
693 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
694 # ifndef EXIT_SUCCESS
695 # define EXIT_SUCCESS 0
702 # ifdef YYSTACK_ALLOC
703 /* Pacify GCC's `empty if-body' warning. */
704 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
705 # ifndef YYSTACK_ALLOC_MAXIMUM
706 /* The OS might guarantee only one guard page at the bottom of the stack,
707 and a page size can be as small as 4096 bytes. So we cannot safely
708 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
709 to allow for a few compiler-allocated temporary stack slots. */
710 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
713 # define YYSTACK_ALLOC YYMALLOC
714 # define YYSTACK_FREE YYFREE
715 # ifndef YYSTACK_ALLOC_MAXIMUM
716 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
718 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
719 && ! ((defined YYMALLOC || defined malloc) \
720 && (defined YYFREE || defined free)))
721 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
722 # ifndef EXIT_SUCCESS
723 # define EXIT_SUCCESS 0
727 # define YYMALLOC malloc
728 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
729 || defined __cplusplus || defined _MSC_VER)
730 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
735 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
736 || defined __cplusplus || defined _MSC_VER)
737 void free (void *); /* INFRINGES ON USER NAME SPACE */
741 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
744 #if (! defined yyoverflow \
745 && (! defined __cplusplus \
746 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
748 /* A type that is properly aligned for any stack member. */
751 yytype_int16 yyss_alloc;
755 /* The size of the maximum gap between one aligned stack and the next. */
756 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
758 /* The size of an array large to enough to hold all stacks, each with
760 # define YYSTACK_BYTES(N) \
761 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
762 + YYSTACK_GAP_MAXIMUM)
764 # define YYCOPY_NEEDED 1
766 /* Relocate STACK from its old location to the new one. The
767 local variables YYSIZE and YYSTACKSIZE give the old and new number of
768 elements in the stack, and YYPTR gives the new location of the
769 stack. Advance YYPTR to a properly aligned location for the next
771 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
774 YYSIZE_T yynewbytes; \
775 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
776 Stack = &yyptr->Stack_alloc; \
777 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
778 yyptr += yynewbytes / sizeof (*yyptr); \
784 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
785 /* Copy COUNT objects from SRC to DST. The source and destination do
788 # if defined __GNUC__ && 1 < __GNUC__
789 # define YYCOPY(Dst, Src, Count) \
790 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
792 # define YYCOPY(Dst, Src, Count) \
796 for (yyi = 0; yyi < (Count); yyi++) \
797 (Dst)[yyi] = (Src)[yyi]; \
802 #endif /* !YYCOPY_NEEDED */
804 /* YYFINAL -- State number of the termination state. */
806 /* YYLAST -- Last index in YYTABLE. */
809 /* YYNTOKENS -- Number of terminals. */
810 #define YYNTOKENS 199
811 /* YYNNTS -- Number of nonterminals. */
813 /* YYNRULES -- Number of rules. */
815 /* YYNRULES -- Number of states. */
816 #define YYNSTATES 419
818 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
820 #define YYMAXUTOK 448
822 #define YYTRANSLATE(YYX) \
823 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
825 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
826 static const yytype_uint8 yytranslate[] =
828 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
829 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
830 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
831 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
832 195, 196, 2, 2, 2, 2, 2, 2, 2, 2,
833 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
834 2, 194, 2, 2, 2, 2, 2, 2, 2, 2,
835 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
836 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 2, 2, 2, 197, 2, 198, 2, 2, 2, 2,
841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 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, 1, 2, 3, 4,
854 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
855 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
856 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
857 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
858 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
859 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
860 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
861 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
862 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
863 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
864 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
865 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
866 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
867 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
868 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
869 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
870 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
871 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
872 185, 186, 187, 188, 189, 190, 191, 192, 193
876 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
878 static const yytype_uint16 yyprhs[] =
880 0, 0, 3, 5, 9, 12, 15, 16, 18, 20,
881 22, 24, 26, 28, 30, 32, 34, 36, 38, 40,
882 42, 46, 48, 50, 52, 54, 56, 58, 61, 63,
883 65, 67, 68, 71, 73, 75, 77, 79, 81, 83,
884 85, 87, 89, 91, 93, 95, 98, 101, 103, 105,
885 107, 109, 111, 113, 116, 118, 121, 123, 125, 127,
886 130, 133, 136, 139, 142, 145, 148, 151, 154, 157,
887 160, 163, 164, 167, 170, 173, 175, 177, 179, 181,
888 183, 186, 189, 191, 194, 197, 200, 202, 204, 206,
889 208, 210, 212, 214, 216, 218, 220, 223, 226, 230,
890 233, 235, 237, 239, 241, 243, 245, 247, 249, 251,
891 252, 255, 258, 261, 263, 265, 267, 269, 271, 273,
892 275, 277, 279, 281, 283, 285, 287, 290, 293, 297,
893 303, 307, 312, 317, 321, 322, 325, 327, 329, 331,
894 333, 335, 337, 339, 341, 343, 345, 347, 349, 351,
895 353, 355, 358, 360, 363, 365, 367, 369, 372, 374,
896 377, 379, 381, 383, 385, 387, 389, 391, 393, 397,
897 400, 402, 405, 408, 411, 414, 417, 419, 421, 423,
898 425, 427, 429, 432, 435, 437, 440, 442, 444, 446,
899 449, 452, 455, 457, 459, 461, 463, 465, 467, 469,
900 471, 473, 475, 477, 480, 483, 485, 488, 490, 492,
901 494, 496, 498, 500, 502, 504, 506, 508, 510, 512,
902 515, 518, 521, 524, 528, 530, 533, 536, 539, 542,
903 546, 549, 551, 553, 555, 557, 559, 561, 563, 565,
904 567, 569, 571, 574, 575, 580, 582, 583, 584, 587,
905 590, 593, 596, 598, 600, 604, 608, 610, 612, 614,
906 616, 618, 620, 622, 624, 626, 629, 632, 634, 636,
907 638, 640, 642, 644, 646, 648, 651, 653, 656, 658,
908 660, 662, 668, 671, 673, 676, 678, 680, 682, 684,
909 686, 688, 694, 696, 700, 703, 707, 709, 711, 714,
910 716, 722, 727, 731, 734, 736, 743, 747, 750, 754,
914 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
915 static const yytype_int16 yyrhs[] =
917 200, 0, -1, 201, -1, 201, 202, 183, -1, 202,
918 183, -1, 1, 183, -1, -1, 203, -1, 216, -1,
919 218, -1, 219, -1, 228, -1, 236, -1, 223, -1,
920 245, -1, 250, -1, 254, -1, 259, -1, 263, -1,
921 290, -1, 204, 205, 208, -1, 146, -1, 131, -1,
922 126, -1, 14, -1, 84, -1, 206, -1, 207, 158,
923 -1, 158, -1, 66, -1, 68, -1, -1, 208, 209,
924 -1, 210, -1, 212, -1, 214, -1, 211, -1, 9,
925 -1, 17, -1, 53, -1, 116, -1, 133, -1, 134,
926 -1, 169, -1, 180, -1, 213, 61, -1, 213, 173,
927 -1, 70, -1, 100, -1, 92, -1, 171, -1, 102,
928 -1, 176, -1, 215, 158, -1, 54, -1, 217, 205,
929 -1, 174, -1, 175, -1, 15, -1, 85, 287, -1,
930 107, 287, -1, 93, 61, -1, 10, 61, -1, 22,
931 61, -1, 23, 220, -1, 71, 158, -1, 72, 158,
932 -1, 140, 61, -1, 143, 61, -1, 170, 283, -1,
933 122, 158, -1, -1, 220, 221, -1, 222, 158, -1,
934 143, 61, -1, 51, -1, 54, -1, 136, -1, 137,
935 -1, 28, -1, 167, 224, -1, 224, 225, -1, 225,
936 -1, 226, 61, -1, 227, 289, -1, 21, 288, -1,
937 19, -1, 48, -1, 123, -1, 124, -1, 101, -1,
938 13, -1, 98, -1, 90, -1, 96, -1, 88, -1,
939 150, 229, -1, 152, 158, -1, 41, 230, 231, -1,
940 229, 230, -1, 230, -1, 20, -1, 24, -1, 82,
941 -1, 127, -1, 138, -1, 160, -1, 165, -1, 135,
942 -1, -1, 231, 232, -1, 40, 158, -1, 172, 235,
943 -1, 233, -1, 234, -1, 78, -1, 109, -1, 37,
944 -1, 29, -1, 112, -1, 129, -1, 26, -1, 178,
945 -1, 105, -1, 181, -1, 4, -1, 30, 239, -1,
946 106, 242, -1, 142, 205, 237, -1, 142, 206, 86,
947 206, 237, -1, 142, 27, 237, -1, 142, 66, 27,
948 237, -1, 142, 68, 27, 237, -1, 142, 148, 237,
949 -1, -1, 237, 238, -1, 47, -1, 55, -1, 73,
950 -1, 74, -1, 77, -1, 83, -1, 110, -1, 111,
951 -1, 114, -1, 115, -1, 117, -1, 118, -1, 119,
952 -1, 121, -1, 176, -1, 239, 240, -1, 240, -1,
953 241, 61, -1, 11, -1, 99, -1, 104, -1, 242,
954 243, -1, 243, -1, 244, 61, -1, 56, -1, 57,
955 -1, 58, -1, 59, -1, 87, -1, 89, -1, 91,
956 -1, 97, -1, 50, 205, 246, -1, 246, 247, -1,
957 247, -1, 248, 289, -1, 249, 288, -1, 157, 61,
958 -1, 3, 158, -1, 139, 158, -1, 162, -1, 163,
959 -1, 43, -1, 44, -1, 45, -1, 46, -1, 144,
960 251, -1, 251, 252, -1, 252, -1, 253, 61, -1,
961 95, -1, 149, -1, 42, -1, 37, 255, -1, 29,
962 255, -1, 255, 256, -1, 256, -1, 257, -1, 258,
963 -1, 8, -1, 12, -1, 18, -1, 69, -1, 104,
964 -1, 120, -1, 103, -1, 151, -1, 166, 260, -1,
965 260, 261, -1, 261, -1, 262, 289, -1, 6, -1,
966 31, -1, 49, -1, 52, -1, 125, -1, 153, -1,
967 154, -1, 155, -1, 156, -1, 161, -1, 275, -1,
968 279, -1, 264, 289, -1, 265, 61, -1, 266, 158,
969 -1, 267, 158, -1, 60, 158, 202, -1, 38, -1,
970 33, 268, -1, 80, 273, -1, 128, 286, -1, 147,
971 269, -1, 168, 206, 271, -1, 171, 282, -1, 16,
972 -1, 113, -1, 161, -1, 35, -1, 76, -1, 54,
973 -1, 75, -1, 130, -1, 81, -1, 145, -1, 158,
974 -1, 158, 32, -1, -1, 158, 194, 158, 270, -1,
975 27, -1, -1, -1, 271, 272, -1, 132, 61, -1,
976 62, 206, -1, 273, 274, -1, 274, -1, 158, -1,
977 276, 278, 277, -1, 276, 278, 158, -1, 62, -1,
978 108, -1, 5, -1, 65, -1, 67, -1, 179, -1,
979 79, -1, 55, -1, 34, -1, 141, 280, -1, 280,
980 281, -1, 281, -1, 7, -1, 8, -1, 25, -1,
981 64, -1, 94, -1, 159, -1, 164, -1, 282, 61,
982 -1, 61, -1, 283, 284, -1, 284, -1, 61, -1,
983 285, -1, 195, 61, 36, 61, 196, -1, 286, 158,
984 -1, 158, -1, 287, 205, -1, 205, -1, 61, -1,
985 169, -1, 39, -1, 61, -1, 32, -1, 291, 197,
986 292, 295, 198, -1, 184, -1, 292, 293, 183, -1,
987 293, 183, -1, 294, 194, 289, -1, 185, -1, 186,
988 -1, 295, 296, -1, 296, -1, 298, 197, 297, 299,
989 198, -1, 187, 194, 289, 183, -1, 146, 194, 205,
990 -1, 299, 300, -1, 300, -1, 188, 194, 289, 197,
991 301, 198, -1, 301, 302, 183, -1, 302, 183, -1,
992 303, 194, 289, -1, 189, -1, 190, -1, 191, -1,
996 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
997 static const yytype_uint16 yyrline[] =
999 0, 366, 366, 370, 371, 372, 387, 388, 389, 390,
1000 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
1001 408, 418, 419, 420, 421, 422, 426, 427, 432, 437,
1002 439, 445, 446, 454, 455, 456, 460, 465, 466, 467,
1003 468, 469, 470, 471, 472, 476, 478, 483, 484, 485,
1004 486, 487, 488, 492, 497, 506, 516, 517, 527, 529,
1005 531, 533, 544, 551, 553, 558, 560, 562, 564, 566,
1006 575, 581, 582, 590, 592, 604, 605, 606, 607, 608,
1007 617, 622, 627, 635, 637, 639, 644, 645, 646, 647,
1008 648, 649, 653, 654, 655, 656, 665, 667, 676, 686,
1009 691, 699, 700, 701, 702, 703, 704, 705, 706, 711,
1010 712, 720, 730, 739, 754, 759, 760, 764, 765, 769,
1011 770, 771, 772, 773, 774, 775, 784, 788, 792, 800,
1012 808, 816, 831, 846, 859, 860, 868, 869, 870, 871,
1013 872, 873, 874, 875, 876, 877, 878, 879, 880, 881,
1014 882, 886, 891, 899, 904, 905, 906, 910, 915, 923,
1015 928, 929, 930, 931, 932, 933, 934, 935, 943, 953,
1016 958, 966, 968, 970, 972, 974, 979, 980, 984, 985,
1017 986, 987, 995, 1000, 1005, 1013, 1018, 1019, 1020, 1029,
1018 1031, 1036, 1041, 1049, 1051, 1068, 1069, 1070, 1071, 1072,
1019 1073, 1077, 1078, 1086, 1091, 1096, 1104, 1109, 1110, 1111,
1020 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1127, 1128, 1129,
1021 1136, 1143, 1150, 1166, 1185, 1187, 1189, 1191, 1193, 1195,
1022 1202, 1207, 1208, 1209, 1213, 1217, 1226, 1227, 1228, 1232,
1023 1233, 1237, 1244, 1254, 1263, 1268, 1270, 1275, 1276, 1284,
1024 1286, 1294, 1299, 1307, 1332, 1339, 1349, 1350, 1354, 1355,
1025 1356, 1357, 1361, 1362, 1363, 1367, 1372, 1377, 1385, 1386,
1026 1387, 1388, 1389, 1390, 1391, 1401, 1406, 1414, 1419, 1427,
1027 1429, 1433, 1438, 1443, 1451, 1456, 1464, 1473, 1474, 1478,
1028 1479, 1488, 1506, 1510, 1515, 1523, 1528, 1529, 1533, 1538,
1029 1546, 1551, 1556, 1561, 1566, 1574, 1579, 1584, 1592, 1597,
1030 1598, 1599, 1600, 1601
1034 #if YYDEBUG || YYERROR_VERBOSE || 1
1035 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1036 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1037 static const char *const yytname[] =
1039 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan",
1040 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average",
1041 "T_Bclient", "T_Beacon", "T_Broadcast", "T_Broadcastclient",
1042 "T_Broadcastdelay", "T_Burst", "T_Calibrate", "T_Ceiling",
1043 "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", "T_Cryptostats",
1044 "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", "T_Discard",
1045 "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", "T_Dscp",
1046 "T_Ellipsis", "T_Enable", "T_End", "T_False", "T_File", "T_Filegen",
1047 "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", "T_Flag4", "T_Flake",
1048 "T_Floor", "T_Freq", "T_Fudge", "T_Host", "T_Huffpuff", "T_Iburst",
1049 "T_Ident", "T_Ignore", "T_Incalloc", "T_Incmem", "T_Initalloc",
1050 "T_Initmem", "T_Includefile", "T_Integer", "T_Interface", "T_Intrange",
1051 "T_Io", "T_Ipv4", "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel",
1052 "T_Key", "T_Keys", "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile",
1053 "T_Leapsmearinterval", "T_Limited", "T_Link", "T_Listen", "T_Logconfig",
1054 "T_Logfile", "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient",
1055 "T_Manycastserver", "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth",
1056 "T_Maxdist", "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem",
1057 "T_Memlock", "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum",
1058 "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month",
1059 "T_Mru", "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify",
1060 "T_Nomrulist", "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery",
1061 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
1062 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_Panic", "T_Peer",
1063 "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port",
1064 "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
1065 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
1066 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
1067 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
1068 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
1069 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
1070 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
1071 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
1072 "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
1073 "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
1074 "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
1075 "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
1076 "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
1077 "command", "server_command", "client_type", "address", "ip_address",
1078 "address_fam", "option_list", "option", "option_flag",
1079 "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
1080 "option_str_keyword", "unpeer_command", "unpeer_keyword",
1081 "other_mode_command", "authentication_command", "crypto_command_list",
1082 "crypto_command", "crypto_str_keyword", "orphan_mode_command",
1083 "tos_option_list", "tos_option", "tos_option_int_keyword",
1084 "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
1085 "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
1086 "filegen_type", "access_control_command", "ac_flag_list",
1087 "access_control_flag", "discard_option_list", "discard_option",
1088 "discard_option_keyword", "mru_option_list", "mru_option",
1089 "mru_option_keyword", "fudge_command", "fudge_factor_list",
1090 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
1091 "rlimit_command", "rlimit_option_list", "rlimit_option",
1092 "rlimit_option_keyword", "system_option_command", "system_option_list",
1093 "system_option", "system_option_flag_keyword",
1094 "system_option_local_flag_keyword", "tinker_command",
1095 "tinker_option_list", "tinker_option", "tinker_option_keyword",
1096 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword",
1097 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm",
1098 "variable_assign", "t_default_or_zero", "trap_option_list",
1099 "trap_option", "log_config_list", "log_config_command",
1100 "interface_command", "interface_nic", "nic_rule_class",
1101 "nic_rule_action", "reset_command", "counter_set_list",
1102 "counter_set_keyword", "integer_list", "integer_list_range",
1103 "integer_list_range_elt", "integer_range", "string_list", "address_list",
1104 "boolean", "number", "simulate_command", "sim_conf_start",
1105 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword",
1106 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name",
1107 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt",
1108 "sim_act_keyword", YY_NULL
1113 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1115 static const yytype_uint16 yytoknum[] =
1117 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1118 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1119 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1120 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1121 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1122 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1123 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1124 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1125 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1126 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1127 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1128 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1129 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1130 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1131 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1132 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1133 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1134 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
1135 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
1136 445, 446, 447, 448, 61, 40, 41, 123, 125
1140 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1141 static const yytype_uint16 yyr1[] =
1143 0, 199, 200, 201, 201, 201, 202, 202, 202, 202,
1144 202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
1145 203, 204, 204, 204, 204, 204, 205, 205, 206, 207,
1146 207, 208, 208, 209, 209, 209, 210, 211, 211, 211,
1147 211, 211, 211, 211, 211, 212, 212, 213, 213, 213,
1148 213, 213, 213, 214, 215, 216, 217, 217, 218, 218,
1149 218, 218, 219, 219, 219, 219, 219, 219, 219, 219,
1150 219, 220, 220, 221, 221, 222, 222, 222, 222, 222,
1151 223, 224, 224, 225, 225, 225, 226, 226, 226, 226,
1152 226, 226, 227, 227, 227, 227, 228, 228, 228, 229,
1153 229, 230, 230, 230, 230, 230, 230, 230, 230, 231,
1154 231, 232, 232, 232, 232, 233, 233, 234, 234, 235,
1155 235, 235, 235, 235, 235, 235, 236, 236, 236, 236,
1156 236, 236, 236, 236, 237, 237, 238, 238, 238, 238,
1157 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1158 238, 239, 239, 240, 241, 241, 241, 242, 242, 243,
1159 244, 244, 244, 244, 244, 244, 244, 244, 245, 246,
1160 246, 247, 247, 247, 247, 247, 248, 248, 249, 249,
1161 249, 249, 250, 251, 251, 252, 253, 253, 253, 254,
1162 254, 255, 255, 256, 256, 257, 257, 257, 257, 257,
1163 257, 258, 258, 259, 260, 260, 261, 262, 262, 262,
1164 262, 262, 262, 262, 262, 262, 262, 263, 263, 263,
1165 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
1166 263, 264, 264, 264, 265, 265, 266, 266, 266, 267,
1167 267, 268, 268, 268, 269, 270, 270, 271, 271, 272,
1168 272, 273, 273, 274, 275, 275, 276, 276, 277, 277,
1169 277, 277, 278, 278, 278, 279, 280, 280, 281, 281,
1170 281, 281, 281, 281, 281, 282, 282, 283, 283, 284,
1171 284, 285, 286, 286, 287, 287, 288, 288, 288, 289,
1172 289, 290, 291, 292, 292, 293, 294, 294, 295, 295,
1173 296, 297, 298, 299, 299, 300, 301, 301, 302, 303,
1177 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1178 static const yytype_uint8 yyr2[] =
1180 0, 2, 1, 3, 2, 2, 0, 1, 1, 1,
1181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1182 3, 1, 1, 1, 1, 1, 1, 2, 1, 1,
1183 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
1184 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1185 1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
1186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1187 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
1188 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
1189 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
1190 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1191 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1192 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
1193 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
1194 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1195 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
1196 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
1197 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
1198 1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
1199 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1200 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1201 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1202 2, 2, 2, 3, 1, 2, 2, 2, 2, 3,
1203 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1204 1, 1, 2, 0, 4, 1, 0, 0, 2, 2,
1205 2, 2, 1, 1, 3, 3, 1, 1, 1, 1,
1206 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1207 1, 1, 1, 1, 1, 2, 1, 2, 1, 1,
1208 1, 5, 2, 1, 2, 1, 1, 1, 1, 1,
1209 1, 5, 1, 3, 2, 3, 1, 1, 2, 1,
1210 5, 4, 3, 2, 1, 6, 3, 2, 3, 1,
1214 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1215 Performed when YYTABLE doesn't specify something else to do. Zero
1216 means the default is an error. */
1217 static const yytype_uint16 yydefact[] =
1219 0, 0, 0, 24, 58, 231, 0, 71, 0, 0,
1220 243, 234, 0, 224, 0, 0, 236, 0, 256, 0,
1221 0, 237, 235, 0, 239, 25, 0, 0, 0, 0,
1222 257, 232, 0, 23, 0, 238, 22, 0, 0, 0,
1223 0, 0, 240, 21, 0, 0, 0, 233, 0, 0,
1224 0, 0, 0, 56, 57, 292, 0, 2, 0, 7,
1225 0, 8, 0, 9, 10, 13, 11, 12, 14, 15,
1226 16, 17, 18, 0, 0, 0, 0, 217, 0, 218,
1227 19, 0, 5, 62, 63, 64, 195, 196, 197, 198,
1228 201, 199, 200, 202, 190, 192, 193, 194, 154, 155,
1229 156, 126, 152, 0, 241, 225, 189, 101, 102, 103,
1230 104, 108, 105, 106, 107, 109, 29, 30, 28, 0,
1231 26, 0, 6, 65, 66, 253, 226, 252, 285, 59,
1232 61, 160, 161, 162, 163, 164, 165, 166, 167, 127,
1233 158, 0, 60, 70, 283, 227, 67, 268, 269, 270,
1234 271, 272, 273, 274, 265, 267, 134, 29, 30, 134,
1235 134, 26, 68, 188, 186, 187, 182, 184, 0, 0,
1236 228, 96, 100, 97, 207, 208, 209, 210, 211, 212,
1237 213, 214, 215, 216, 203, 205, 0, 91, 86, 0,
1238 87, 95, 93, 94, 92, 90, 88, 89, 80, 82,
1239 0, 0, 247, 279, 0, 69, 278, 280, 276, 230,
1240 1, 0, 4, 31, 55, 290, 289, 219, 220, 221,
1241 222, 264, 263, 262, 0, 0, 79, 75, 76, 77,
1242 78, 0, 72, 0, 191, 151, 153, 242, 98, 0,
1243 178, 179, 180, 181, 0, 0, 176, 177, 168, 170,
1244 0, 0, 27, 223, 251, 284, 157, 159, 282, 266,
1245 130, 134, 134, 133, 128, 0, 183, 185, 0, 99,
1246 204, 206, 288, 286, 287, 85, 81, 83, 84, 229,
1247 0, 277, 275, 3, 20, 258, 259, 260, 255, 261,
1248 254, 296, 297, 0, 0, 0, 74, 73, 118, 117,
1249 0, 115, 116, 0, 110, 113, 114, 174, 175, 173,
1250 169, 171, 172, 136, 137, 138, 139, 140, 141, 142,
1251 143, 144, 145, 146, 147, 148, 149, 150, 135, 131,
1252 132, 134, 246, 0, 0, 248, 0, 37, 38, 39,
1253 54, 47, 49, 48, 51, 40, 41, 42, 43, 50,
1254 52, 44, 32, 33, 36, 34, 0, 35, 0, 0,
1255 0, 0, 299, 0, 294, 0, 111, 125, 121, 123,
1256 119, 120, 122, 124, 112, 129, 245, 244, 250, 249,
1257 0, 45, 46, 53, 0, 293, 291, 298, 0, 295,
1258 281, 302, 0, 0, 0, 0, 0, 304, 0, 0,
1259 300, 303, 301, 0, 0, 309, 310, 311, 312, 313,
1260 0, 0, 0, 305, 0, 307, 0, 306, 308
1263 /* YYDEFGOTO[NTERM-NUM]. */
1264 static const yytype_int16 yydefgoto[] =
1266 -1, 56, 57, 58, 59, 60, 128, 120, 121, 284,
1267 352, 353, 354, 355, 356, 357, 358, 61, 62, 63,
1268 64, 85, 232, 233, 65, 198, 199, 200, 201, 66,
1269 171, 115, 238, 304, 305, 306, 374, 67, 260, 328,
1270 101, 102, 103, 139, 140, 141, 68, 248, 249, 250,
1271 251, 69, 166, 167, 168, 70, 94, 95, 96, 97,
1272 71, 184, 185, 186, 72, 73, 74, 75, 76, 105,
1273 170, 377, 279, 335, 126, 127, 77, 78, 290, 224,
1274 79, 154, 155, 209, 205, 206, 207, 145, 129, 275,
1275 217, 80, 81, 293, 294, 295, 361, 362, 393, 363,
1276 396, 397, 410, 411, 412
1279 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1281 #define YYPACT_NINF -185
1282 static const yytype_int16 yypact[] =
1284 78, -169, -34, -185, -185, -185, -29, -185, 17, 43,
1285 -124, -185, 17, -185, -5, -27, -185, -121, -185, -112,
1286 -110, -185, -185, -100, -185, -185, -27, 0, 116, -27,
1287 -185, -185, -91, -185, -89, -185, -185, 11, 35, 30,
1288 13, 31, -185, -185, -83, -5, -78, -185, 186, 523,
1289 -76, -56, 15, -185, -185, -185, 83, 244, -99, -185,
1290 -27, -185, -27, -185, -185, -185, -185, -185, -185, -185,
1291 -185, -185, -185, -12, 24, -71, -69, -185, -11, -185,
1292 -185, -107, -185, -185, -185, 8, -185, -185, -185, -185,
1293 -185, -185, -185, -185, 17, -185, -185, -185, -185, -185,
1294 -185, 43, -185, 34, 59, -185, 17, -185, -185, -185,
1295 -185, -185, -185, -185, -185, -185, -185, -185, -185, 7,
1296 -185, -61, 407, -185, -185, -185, -100, -185, -185, -27,
1297 -185, -185, -185, -185, -185, -185, -185, -185, -185, 116,
1298 -185, 44, -27, -185, -185, -52, -185, -185, -185, -185,
1299 -185, -185, -185, -185, 35, -185, -185, 85, 96, -185,
1300 -185, 39, -185, -185, -185, -185, 31, -185, 75, -46,
1301 -185, -5, -185, -185, -185, -185, -185, -185, -185, -185,
1302 -185, -185, -185, -185, 186, -185, -12, -185, -185, -35,
1303 -185, -185, -185, -185, -185, -185, -185, -185, 523, -185,
1304 82, -12, -185, -185, 91, -56, -185, -185, -185, 100,
1305 -185, -26, -185, -185, -185, -185, -185, -185, -185, -185,
1306 -185, -185, -185, -185, -2, -130, -185, -185, -185, -185,
1307 -185, 105, -185, 9, -185, -185, -185, -185, -7, 18,
1308 -185, -185, -185, -185, 25, 121, -185, -185, 7, -185,
1309 -12, -35, -185, -185, -185, -185, -185, -185, -185, -185,
1310 391, -185, -185, 391, 391, -76, -185, -185, 29, -185,
1311 -185, -185, -185, -185, -185, -185, -185, -185, -185, -51,
1312 153, -185, -185, -185, 464, -185, -185, -185, -185, -185,
1313 -185, -185, -185, -82, 14, 1, -185, -185, -185, -185,
1314 38, -185, -185, 12, -185, -185, -185, -185, -185, -185,
1315 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1316 -185, -185, -185, -185, -185, -185, -185, -185, -185, 391,
1317 391, -185, 171, -76, 140, -185, 141, -185, -185, -185,
1318 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1319 -185, -185, -185, -185, -185, -185, -55, -185, 53, 20,
1320 33, -128, -185, 32, -185, -12, -185, -185, -185, -185,
1321 -185, -185, -185, -185, -185, 391, -185, -185, -185, -185,
1322 16, -185, -185, -185, -27, -185, -185, -185, 46, -185,
1323 -185, -185, 37, 48, -12, 40, -167, -185, 54, -12,
1324 -185, -185, -185, 45, 79, -185, -185, -185, -185, -185,
1325 98, 57, 47, -185, 60, -185, -12, -185, -185
1328 /* YYPGOTO[NTERM-NUM]. */
1329 static const yytype_int16 yypgoto[] =
1331 -185, -185, -185, -44, -185, -185, -15, -38, -185, -185,
1332 -185, -185, -185, -185, -185, -185, -185, -185, -185, -185,
1333 -185, -185, -185, -185, -185, -185, 28, -185, -185, -185,
1334 -185, -36, -185, -185, -185, -185, -185, -185, -152, -185,
1335 -185, 146, -185, -185, 111, -185, -185, -185, 3, -185,
1336 -185, -185, -185, 89, -185, -185, 245, -66, -185, -185,
1337 -185, -185, 72, -185, -185, -185, -185, -185, -185, -185,
1338 -185, -185, -185, -185, -185, 137, -185, -185, -185, -185,
1339 -185, -185, 110, -185, -185, 70, -185, -185, 236, 27,
1340 -184, -185, -185, -185, -17, -185, -185, -81, -185, -185,
1341 -185, -113, -185, -126, -185
1344 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1345 positive, shift that token. If negative, reduce the rule which
1346 number is the opposite. If YYTABLE_NINF, syntax error. */
1347 #define YYTABLE_NINF -7
1348 static const yytype_int16 yytable[] =
1350 119, 161, 271, 285, 272, 203, 381, 263, 264, 172,
1351 239, 333, 202, 211, 82, 107, 367, 278, 359, 108,
1352 215, 395, 298, 221, 160, 86, 273, 83, 234, 87,
1353 299, 400, 84, 300, 104, 88, 226, 122, 368, 116,
1354 234, 117, 147, 148, 222, 213, 123, 214, 124, 216,
1355 240, 241, 242, 243, 98, 291, 292, 156, 125, 227,
1356 149, 130, 228, 286, 359, 287, 311, 143, 223, 144,
1357 386, 301, 146, 163, 162, 169, 208, 109, 253, 1,
1358 173, 334, 118, 210, 212, 218, 89, 219, 2, 220,
1359 225, 237, 3, 4, 5, 236, 157, 252, 158, 150,
1360 6, 7, 302, 291, 292, 257, 258, 8, 9, 329,
1361 330, 10, 261, 11, 255, 12, 13, 369, 382, 14,
1362 90, 91, 110, 262, 370, 265, 164, 255, 15, 151,
1363 111, 118, 16, 112, 274, 269, 267, 92, 17, 204,
1364 18, 371, 99, 277, 229, 230, 244, 100, 268, 19,
1365 20, 231, 280, 21, 22, 113, 288, 283, 23, 24,
1366 114, 282, 25, 26, 245, 303, 296, 297, 93, 246,
1367 247, 27, 131, 132, 133, 134, 307, 289, 159, 375,
1368 165, 389, 309, 308, 28, 29, 30, 332, 118, 336,
1369 372, 31, 174, 373, 152, 365, 366, 364, 376, 153,
1370 32, 379, 380, 135, 33, 136, 34, 137, 35, 36,
1371 398, 383, 390, 138, 384, 403, 385, 175, 37, 38,
1372 39, 40, 41, 42, 43, 44, 276, 331, 45, 388,
1373 46, 394, 418, 392, 399, 176, 395, 402, 177, 47,
1374 415, 416, 404, 417, 48, 49, 50, 235, 51, 52,
1375 256, 310, 53, 54, 2, 266, 270, 106, 3, 4,
1376 5, -6, 55, 254, 259, 142, 6, 7, 405, 406,
1377 407, 408, 409, 8, 9, 281, 360, 10, 312, 11,
1378 387, 12, 13, 401, 414, 14, 0, 405, 406, 407,
1379 408, 409, 0, 0, 15, 378, 413, 0, 16, 0,
1380 0, 0, 0, 0, 17, 0, 18, 0, 0, 0,
1381 0, 178, 0, 0, 0, 19, 20, 0, 0, 21,
1382 22, 0, 0, 0, 23, 24, 0, 0, 25, 26,
1383 0, 0, 0, 0, 0, 0, 0, 27, 0, 179,
1384 180, 181, 182, 0, 0, 0, 0, 183, 0, 0,
1385 28, 29, 30, 0, 0, 0, 0, 31, 0, 0,
1386 0, 0, 0, 0, 0, 0, 32, 0, 0, 391,
1387 33, 0, 34, 0, 35, 36, 0, 0, 0, 0,
1388 0, 0, 0, 0, 37, 38, 39, 40, 41, 42,
1389 43, 44, 0, 0, 45, 0, 46, 0, 0, 0,
1390 0, 0, 0, 0, 0, 47, 0, 0, 0, 0,
1391 48, 49, 50, 0, 51, 52, 0, 2, 53, 54,
1392 0, 3, 4, 5, 0, 0, 0, -6, 55, 6,
1393 7, 0, 0, 0, 0, 0, 8, 9, 313, 0,
1394 10, 0, 11, 0, 12, 13, 314, 0, 14, 0,
1395 0, 0, 0, 0, 0, 0, 0, 15, 0, 0,
1396 0, 16, 0, 0, 315, 316, 0, 17, 317, 18,
1397 0, 0, 0, 337, 318, 0, 0, 0, 19, 20,
1398 0, 338, 21, 22, 0, 0, 0, 23, 24, 0,
1399 0, 25, 26, 0, 0, 0, 0, 0, 0, 0,
1400 27, 319, 320, 0, 0, 321, 322, 0, 323, 324,
1401 325, 0, 326, 28, 29, 30, 0, 339, 340, 0,
1402 31, 0, 0, 0, 0, 0, 0, 0, 0, 32,
1403 0, 0, 0, 33, 341, 34, 187, 35, 36, 0,
1404 0, 0, 188, 0, 189, 0, 0, 37, 38, 39,
1405 40, 41, 42, 43, 44, 0, 342, 45, 0, 46,
1406 0, 0, 0, 0, 343, 0, 344, 327, 47, 0,
1407 0, 190, 0, 48, 49, 50, 0, 51, 52, 0,
1408 345, 53, 54, 0, 0, 0, 0, 0, 0, 0,
1409 0, 55, 0, 0, 0, 0, 0, 346, 347, 0,
1410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1411 0, 191, 0, 192, 0, 0, 0, 0, 0, 193,
1412 0, 194, 0, 0, 195, 0, 0, 0, 0, 0,
1413 0, 0, 0, 348, 0, 349, 0, 0, 0, 0,
1414 350, 0, 0, 0, 351, 0, 196, 197
1417 #define yypact_value_is_default(Yystate) \
1418 (!!((Yystate) == (-185)))
1420 #define yytable_value_is_error(Yytable_value) \
1423 static const yytype_int16 yycheck[] =
1425 15, 39, 186, 5, 39, 61, 61, 159, 160, 45,
1426 3, 62, 50, 57, 183, 20, 4, 201, 146, 24,
1427 32, 188, 29, 34, 39, 8, 61, 61, 94, 12,
1428 37, 198, 61, 40, 158, 18, 28, 158, 26, 66,
1429 106, 68, 7, 8, 55, 60, 158, 62, 158, 61,
1430 43, 44, 45, 46, 11, 185, 186, 27, 158, 51,
1431 25, 61, 54, 65, 146, 67, 250, 158, 79, 158,
1432 198, 78, 61, 42, 61, 158, 61, 82, 122, 1,
1433 158, 132, 158, 0, 183, 61, 69, 158, 10, 158,
1434 197, 32, 14, 15, 16, 61, 66, 158, 68, 64,
1435 22, 23, 109, 185, 186, 61, 158, 29, 30, 261,
1436 262, 33, 27, 35, 129, 37, 38, 105, 173, 41,
1437 103, 104, 127, 27, 112, 86, 95, 142, 50, 94,
1438 135, 158, 54, 138, 169, 171, 61, 120, 60, 195,
1439 62, 129, 99, 61, 136, 137, 139, 104, 194, 71,
1440 72, 143, 61, 75, 76, 160, 158, 183, 80, 81,
1441 165, 61, 84, 85, 157, 172, 61, 158, 151, 162,
1442 163, 93, 56, 57, 58, 59, 158, 179, 148, 331,
1443 149, 365, 61, 158, 106, 107, 108, 158, 158, 36,
1444 178, 113, 6, 181, 159, 194, 158, 183, 27, 164,
1445 122, 61, 61, 87, 126, 89, 128, 91, 130, 131,
1446 394, 158, 196, 97, 194, 399, 183, 31, 140, 141,
1447 142, 143, 144, 145, 146, 147, 198, 265, 150, 197,
1448 152, 194, 416, 187, 194, 49, 188, 183, 52, 161,
1449 183, 194, 197, 183, 166, 167, 168, 101, 170, 171,
1450 139, 248, 174, 175, 10, 166, 184, 12, 14, 15,
1451 16, 183, 184, 126, 154, 29, 22, 23, 189, 190,
1452 191, 192, 193, 29, 30, 205, 293, 33, 251, 35,
1453 361, 37, 38, 396, 410, 41, -1, 189, 190, 191,
1454 192, 193, -1, -1, 50, 333, 198, -1, 54, -1,
1455 -1, -1, -1, -1, 60, -1, 62, -1, -1, -1,
1456 -1, 125, -1, -1, -1, 71, 72, -1, -1, 75,
1457 76, -1, -1, -1, 80, 81, -1, -1, 84, 85,
1458 -1, -1, -1, -1, -1, -1, -1, 93, -1, 153,
1459 154, 155, 156, -1, -1, -1, -1, 161, -1, -1,
1460 106, 107, 108, -1, -1, -1, -1, 113, -1, -1,
1461 -1, -1, -1, -1, -1, -1, 122, -1, -1, 384,
1462 126, -1, 128, -1, 130, 131, -1, -1, -1, -1,
1463 -1, -1, -1, -1, 140, 141, 142, 143, 144, 145,
1464 146, 147, -1, -1, 150, -1, 152, -1, -1, -1,
1465 -1, -1, -1, -1, -1, 161, -1, -1, -1, -1,
1466 166, 167, 168, -1, 170, 171, -1, 10, 174, 175,
1467 -1, 14, 15, 16, -1, -1, -1, 183, 184, 22,
1468 23, -1, -1, -1, -1, -1, 29, 30, 47, -1,
1469 33, -1, 35, -1, 37, 38, 55, -1, 41, -1,
1470 -1, -1, -1, -1, -1, -1, -1, 50, -1, -1,
1471 -1, 54, -1, -1, 73, 74, -1, 60, 77, 62,
1472 -1, -1, -1, 9, 83, -1, -1, -1, 71, 72,
1473 -1, 17, 75, 76, -1, -1, -1, 80, 81, -1,
1474 -1, 84, 85, -1, -1, -1, -1, -1, -1, -1,
1475 93, 110, 111, -1, -1, 114, 115, -1, 117, 118,
1476 119, -1, 121, 106, 107, 108, -1, 53, 54, -1,
1477 113, -1, -1, -1, -1, -1, -1, -1, -1, 122,
1478 -1, -1, -1, 126, 70, 128, 13, 130, 131, -1,
1479 -1, -1, 19, -1, 21, -1, -1, 140, 141, 142,
1480 143, 144, 145, 146, 147, -1, 92, 150, -1, 152,
1481 -1, -1, -1, -1, 100, -1, 102, 176, 161, -1,
1482 -1, 48, -1, 166, 167, 168, -1, 170, 171, -1,
1483 116, 174, 175, -1, -1, -1, -1, -1, -1, -1,
1484 -1, 184, -1, -1, -1, -1, -1, 133, 134, -1,
1485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1486 -1, 88, -1, 90, -1, -1, -1, -1, -1, 96,
1487 -1, 98, -1, -1, 101, -1, -1, -1, -1, -1,
1488 -1, -1, -1, 169, -1, 171, -1, -1, -1, -1,
1489 176, -1, -1, -1, 180, -1, 123, 124
1492 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1493 symbol of state STATE-NUM. */
1494 static const yytype_uint16 yystos[] =
1496 0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
1497 33, 35, 37, 38, 41, 50, 54, 60, 62, 71,
1498 72, 75, 76, 80, 81, 84, 85, 93, 106, 107,
1499 108, 113, 122, 126, 128, 130, 131, 140, 141, 142,
1500 143, 144, 145, 146, 147, 150, 152, 161, 166, 167,
1501 168, 170, 171, 174, 175, 184, 200, 201, 202, 203,
1502 204, 216, 217, 218, 219, 223, 228, 236, 245, 250,
1503 254, 259, 263, 264, 265, 266, 267, 275, 276, 279,
1504 290, 291, 183, 61, 61, 220, 8, 12, 18, 69,
1505 103, 104, 120, 151, 255, 256, 257, 258, 11, 99,
1506 104, 239, 240, 241, 158, 268, 255, 20, 24, 82,
1507 127, 135, 138, 160, 165, 230, 66, 68, 158, 205,
1508 206, 207, 158, 158, 158, 158, 273, 274, 205, 287,
1509 61, 56, 57, 58, 59, 87, 89, 91, 97, 242,
1510 243, 244, 287, 158, 158, 286, 61, 7, 8, 25,
1511 64, 94, 159, 164, 280, 281, 27, 66, 68, 148,
1512 205, 206, 61, 42, 95, 149, 251, 252, 253, 158,
1513 269, 229, 230, 158, 6, 31, 49, 52, 125, 153,
1514 154, 155, 156, 161, 260, 261, 262, 13, 19, 21,
1515 48, 88, 90, 96, 98, 101, 123, 124, 224, 225,
1516 226, 227, 206, 61, 195, 283, 284, 285, 61, 282,
1517 0, 202, 183, 205, 205, 32, 61, 289, 61, 158,
1518 158, 34, 55, 79, 278, 197, 28, 51, 54, 136,
1519 137, 143, 221, 222, 256, 240, 61, 32, 231, 3,
1520 43, 44, 45, 46, 139, 157, 162, 163, 246, 247,
1521 248, 249, 158, 202, 274, 205, 243, 61, 158, 281,
1522 237, 27, 27, 237, 237, 86, 252, 61, 194, 230,
1523 261, 289, 39, 61, 169, 288, 225, 61, 289, 271,
1524 61, 284, 61, 183, 208, 5, 65, 67, 158, 179,
1525 277, 185, 186, 292, 293, 294, 61, 158, 29, 37,
1526 40, 78, 109, 172, 232, 233, 234, 158, 158, 61,
1527 247, 289, 288, 47, 55, 73, 74, 77, 83, 110,
1528 111, 114, 115, 117, 118, 119, 121, 176, 238, 237,
1529 237, 206, 158, 62, 132, 272, 36, 9, 17, 53,
1530 54, 70, 92, 100, 102, 116, 133, 134, 169, 171,
1531 176, 180, 209, 210, 211, 212, 213, 214, 215, 146,
1532 293, 295, 296, 298, 183, 194, 158, 4, 26, 105,
1533 112, 129, 178, 181, 235, 237, 27, 270, 206, 61,
1534 61, 61, 173, 158, 194, 183, 198, 296, 197, 289,
1535 196, 205, 187, 297, 194, 188, 299, 300, 289, 194,
1536 198, 300, 183, 289, 197, 189, 190, 191, 192, 193,
1537 301, 302, 303, 198, 302, 183, 194, 183, 289
1540 #define yyerrok (yyerrstatus = 0)
1541 #define yyclearin (yychar = YYEMPTY)
1542 #define YYEMPTY (-2)
1545 #define YYACCEPT goto yyacceptlab
1546 #define YYABORT goto yyabortlab
1547 #define YYERROR goto yyerrorlab
1550 /* Like YYERROR except do call yyerror. This remains here temporarily
1551 to ease the transition to the new meaning of YYERROR, for GCC.
1552 Once GCC version 2 has supplanted version 1, this can go. However,
1553 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1554 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1557 #define YYFAIL goto yyerrlab
1559 /* This is here to suppress warnings from the GCC cpp's
1560 -Wunused-macros. Normally we don't worry about that warning, but
1561 some users do, and we want to make it easy for users to remove
1562 YYFAIL uses, which will produce warnings from Bison 2.5. */
1565 #define YYRECOVERING() (!!yyerrstatus)
1567 #define YYBACKUP(Token, Value) \
1569 if (yychar == YYEMPTY) \
1573 YYPOPSTACK (yylen); \
1579 yyerror (YY_("syntax error: cannot back up")); \
1584 /* Error token number */
1586 #define YYERRCODE 256
1589 /* This macro is provided for backward compatibility. */
1590 #ifndef YY_LOCATION_PRINT
1591 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1595 /* YYLEX -- calling `yylex' with the right arguments. */
1597 # define YYLEX yylex (YYLEX_PARAM)
1599 # define YYLEX yylex ()
1602 /* Enable debugging if requested. */
1606 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1607 # define YYFPRINTF fprintf
1610 # define YYDPRINTF(Args) \
1616 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1620 YYFPRINTF (stderr, "%s ", Title); \
1621 yy_symbol_print (stderr, \
1623 YYFPRINTF (stderr, "\n"); \
1628 /*--------------------------------.
1629 | Print this symbol on YYOUTPUT. |
1630 `--------------------------------*/
1633 #if (defined __STDC__ || defined __C99__FUNC__ \
1634 || defined __cplusplus || defined _MSC_VER)
1636 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1639 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1642 YYSTYPE const * const yyvaluep;
1645 FILE *yyo = yyoutput;
1650 if (yytype < YYNTOKENS)
1651 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1659 /*--------------------------------.
1660 | Print this symbol on YYOUTPUT. |
1661 `--------------------------------*/
1663 #if (defined __STDC__ || defined __C99__FUNC__ \
1664 || defined __cplusplus || defined _MSC_VER)
1666 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1669 yy_symbol_print (yyoutput, yytype, yyvaluep)
1672 YYSTYPE const * const yyvaluep;
1675 if (yytype < YYNTOKENS)
1676 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1678 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1680 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1681 YYFPRINTF (yyoutput, ")");
1684 /*------------------------------------------------------------------.
1685 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1687 `------------------------------------------------------------------*/
1689 #if (defined __STDC__ || defined __C99__FUNC__ \
1690 || defined __cplusplus || defined _MSC_VER)
1692 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1695 yy_stack_print (yybottom, yytop)
1696 yytype_int16 *yybottom;
1697 yytype_int16 *yytop;
1700 YYFPRINTF (stderr, "Stack now");
1701 for (; yybottom <= yytop; yybottom++)
1703 int yybot = *yybottom;
1704 YYFPRINTF (stderr, " %d", yybot);
1706 YYFPRINTF (stderr, "\n");
1709 # define YY_STACK_PRINT(Bottom, Top) \
1712 yy_stack_print ((Bottom), (Top)); \
1716 /*------------------------------------------------.
1717 | Report that the YYRULE is going to be reduced. |
1718 `------------------------------------------------*/
1720 #if (defined __STDC__ || defined __C99__FUNC__ \
1721 || defined __cplusplus || defined _MSC_VER)
1723 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1726 yy_reduce_print (yyvsp, yyrule)
1731 int yynrhs = yyr2[yyrule];
1733 unsigned long int yylno = yyrline[yyrule];
1734 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1736 /* The symbols being reduced. */
1737 for (yyi = 0; yyi < yynrhs; yyi++)
1739 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1740 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1741 &(yyvsp[(yyi + 1) - (yynrhs)])
1743 YYFPRINTF (stderr, "\n");
1747 # define YY_REDUCE_PRINT(Rule) \
1750 yy_reduce_print (yyvsp, Rule); \
1753 /* Nonzero means print parse trace. It is left uninitialized so that
1754 multiple parsers can coexist. */
1756 #else /* !YYDEBUG */
1757 # define YYDPRINTF(Args)
1758 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1759 # define YY_STACK_PRINT(Bottom, Top)
1760 # define YY_REDUCE_PRINT(Rule)
1761 #endif /* !YYDEBUG */
1764 /* YYINITDEPTH -- initial size of the parser's stacks. */
1766 # define YYINITDEPTH 200
1769 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1770 if the built-in stack extension method is used).
1772 Do not make this value too large; the results are undefined if
1773 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1774 evaluated with infinite-precision integer arithmetic. */
1777 # define YYMAXDEPTH 10000
1784 # if defined __GLIBC__ && defined _STRING_H
1785 # define yystrlen strlen
1787 /* Return the length of YYSTR. */
1788 #if (defined __STDC__ || defined __C99__FUNC__ \
1789 || defined __cplusplus || defined _MSC_VER)
1791 yystrlen (const char *yystr)
1799 for (yylen = 0; yystr[yylen]; yylen++)
1807 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1808 # define yystpcpy stpcpy
1810 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1812 #if (defined __STDC__ || defined __C99__FUNC__ \
1813 || defined __cplusplus || defined _MSC_VER)
1815 yystpcpy (char *yydest, const char *yysrc)
1818 yystpcpy (yydest, yysrc)
1824 const char *yys = yysrc;
1826 while ((*yyd++ = *yys++) != '\0')
1835 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1836 quotes and backslashes, so that it's suitable for yyerror. The
1837 heuristic is that double-quoting is unnecessary unless the string
1838 contains an apostrophe, a comma, or backslash (other than
1839 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1840 null, do not copy; instead, return the length of what the result
1843 yytnamerr (char *yyres, const char *yystr)
1848 char const *yyp = yystr;
1855 goto do_not_strip_quotes;
1859 goto do_not_strip_quotes;
1872 do_not_strip_quotes: ;
1876 return yystrlen (yystr);
1878 return yystpcpy (yyres, yystr) - yyres;
1882 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1883 about the unexpected token YYTOKEN for the state stack whose top is
1886 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1887 not large enough to hold the message. In that case, also set
1888 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1889 required number of bytes is too large to store. */
1891 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1892 yytype_int16 *yyssp, int yytoken)
1894 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1895 YYSIZE_T yysize = yysize0;
1896 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1897 /* Internationalized format string. */
1898 const char *yyformat = YY_NULL;
1899 /* Arguments of yyformat. */
1900 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1901 /* Number of reported tokens (one for the "unexpected", one per
1905 /* There are many possibilities here to consider:
1906 - Assume YYFAIL is not used. It's too flawed to consider. See
1907 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1908 for details. YYERROR is fine as it does not invoke this
1910 - If this state is a consistent state with a default action, then
1911 the only way this function was invoked is if the default action
1912 is an error action. In that case, don't check for expected
1913 tokens because there are none.
1914 - The only way there can be no lookahead present (in yychar) is if
1915 this state is a consistent state with a default action. Thus,
1916 detecting the absence of a lookahead is sufficient to determine
1917 that there is no unexpected or expected token to report. In that
1918 case, just report a simple "syntax error".
1919 - Don't assume there isn't a lookahead just because this state is a
1920 consistent state with a default action. There might have been a
1921 previous inconsistent state, consistent state with a non-default
1922 action, or user semantic action that manipulated yychar.
1923 - Of course, the expected token list depends on states to have
1924 correct lookahead information, and it depends on the parser not
1925 to perform extra reductions after fetching a lookahead from the
1926 scanner and before detecting a syntax error. Thus, state merging
1927 (from LALR or IELR) and default reductions corrupt the expected
1928 token list. However, the list is correct for canonical LR with
1929 one exception: it will still contain any token that will not be
1930 accepted due to an error action in a later state.
1932 if (yytoken != YYEMPTY)
1934 int yyn = yypact[*yyssp];
1935 yyarg[yycount++] = yytname[yytoken];
1936 if (!yypact_value_is_default (yyn))
1938 /* Start YYX at -YYN if negative to avoid negative indexes in
1939 YYCHECK. In other words, skip the first -YYN actions for
1940 this state because they are default actions. */
1941 int yyxbegin = yyn < 0 ? -yyn : 0;
1942 /* Stay within bounds of both yycheck and yytname. */
1943 int yychecklim = YYLAST - yyn + 1;
1944 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1947 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1948 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1949 && !yytable_value_is_error (yytable[yyx + yyn]))
1951 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1957 yyarg[yycount++] = yytname[yyx];
1959 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1960 if (! (yysize <= yysize1
1961 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1971 # define YYCASE_(N, S) \
1975 YYCASE_(0, YY_("syntax error"));
1976 YYCASE_(1, YY_("syntax error, unexpected %s"));
1977 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1978 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1979 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1980 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1985 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1986 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1991 if (*yymsg_alloc < yysize)
1993 *yymsg_alloc = 2 * yysize;
1994 if (! (yysize <= *yymsg_alloc
1995 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1996 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2000 /* Avoid sprintf, as that infringes on the user's name space.
2001 Don't have undefined behavior even if the translation
2002 produced a string with the wrong number of "%s"s. */
2006 while ((*yyp = *yyformat) != '\0')
2007 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2009 yyp += yytnamerr (yyp, yyarg[yyi++]);
2020 #endif /* YYERROR_VERBOSE */
2022 /*-----------------------------------------------.
2023 | Release the memory associated to this symbol. |
2024 `-----------------------------------------------*/
2027 #if (defined __STDC__ || defined __C99__FUNC__ \
2028 || defined __cplusplus || defined _MSC_VER)
2030 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2033 yydestruct (yymsg, yytype, yyvaluep)
2043 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2051 /* The lookahead symbol. */
2055 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2056 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2057 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
2059 #ifndef YY_INITIAL_VALUE
2060 # define YY_INITIAL_VALUE(Value) /* Nothing. */
2063 /* The semantic value of the lookahead symbol. */
2064 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
2066 /* Number of syntax errors so far. */
2074 #ifdef YYPARSE_PARAM
2075 #if (defined __STDC__ || defined __C99__FUNC__ \
2076 || defined __cplusplus || defined _MSC_VER)
2078 yyparse (void *YYPARSE_PARAM)
2081 yyparse (YYPARSE_PARAM)
2082 void *YYPARSE_PARAM;
2084 #else /* ! YYPARSE_PARAM */
2085 #if (defined __STDC__ || defined __C99__FUNC__ \
2086 || defined __cplusplus || defined _MSC_VER)
2097 /* Number of tokens to shift before error messages enabled. */
2100 /* The stacks and their tools:
2101 `yyss': related to states.
2102 `yyvs': related to semantic values.
2104 Refer to the stacks through separate pointers, to allow yyoverflow
2105 to reallocate them elsewhere. */
2107 /* The state stack. */
2108 yytype_int16 yyssa[YYINITDEPTH];
2110 yytype_int16 *yyssp;
2112 /* The semantic value stack. */
2113 YYSTYPE yyvsa[YYINITDEPTH];
2117 YYSIZE_T yystacksize;
2121 /* Lookahead token as an internal (translated) token number. */
2123 /* The variables used to return semantic value and location from the
2128 /* Buffer for error messages, and its allocated size. */
2130 char *yymsg = yymsgbuf;
2131 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2134 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2136 /* The number of symbols on the RHS of the reduced rule.
2137 Keep to zero when no symbol should be popped. */
2140 yyssp = yyss = yyssa;
2141 yyvsp = yyvs = yyvsa;
2142 yystacksize = YYINITDEPTH;
2144 YYDPRINTF ((stderr, "Starting parse\n"));
2149 yychar = YYEMPTY; /* Cause a token to be read. */
2152 /*------------------------------------------------------------.
2153 | yynewstate -- Push a new state, which is found in yystate. |
2154 `------------------------------------------------------------*/
2156 /* In all cases, when you get here, the value and location stacks
2157 have just been pushed. So pushing a state here evens the stacks. */
2163 if (yyss + yystacksize - 1 <= yyssp)
2165 /* Get the current used size of the three stacks, in elements. */
2166 YYSIZE_T yysize = yyssp - yyss + 1;
2170 /* Give user a chance to reallocate the stack. Use copies of
2171 these so that the &'s don't force the real ones into
2173 YYSTYPE *yyvs1 = yyvs;
2174 yytype_int16 *yyss1 = yyss;
2176 /* Each stack pointer address is followed by the size of the
2177 data in use in that stack, in bytes. This used to be a
2178 conditional around just the two extra args, but that might
2179 be undefined if yyoverflow is a macro. */
2180 yyoverflow (YY_("memory exhausted"),
2181 &yyss1, yysize * sizeof (*yyssp),
2182 &yyvs1, yysize * sizeof (*yyvsp),
2188 #else /* no yyoverflow */
2189 # ifndef YYSTACK_RELOCATE
2190 goto yyexhaustedlab;
2192 /* Extend the stack our own way. */
2193 if (YYMAXDEPTH <= yystacksize)
2194 goto yyexhaustedlab;
2196 if (YYMAXDEPTH < yystacksize)
2197 yystacksize = YYMAXDEPTH;
2200 yytype_int16 *yyss1 = yyss;
2201 union yyalloc *yyptr =
2202 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2204 goto yyexhaustedlab;
2205 YYSTACK_RELOCATE (yyss_alloc, yyss);
2206 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2207 # undef YYSTACK_RELOCATE
2209 YYSTACK_FREE (yyss1);
2212 #endif /* no yyoverflow */
2214 yyssp = yyss + yysize - 1;
2215 yyvsp = yyvs + yysize - 1;
2217 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2218 (unsigned long int) yystacksize));
2220 if (yyss + yystacksize - 1 <= yyssp)
2224 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2226 if (yystate == YYFINAL)
2236 /* Do appropriate processing given the current state. Read a
2237 lookahead token if we need one and don't already have one. */
2239 /* First try to decide what to do without reference to lookahead token. */
2240 yyn = yypact[yystate];
2241 if (yypact_value_is_default (yyn))
2244 /* Not known => get a lookahead token if don't already have one. */
2246 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2247 if (yychar == YYEMPTY)
2249 YYDPRINTF ((stderr, "Reading a token: "));
2253 if (yychar <= YYEOF)
2255 yychar = yytoken = YYEOF;
2256 YYDPRINTF ((stderr, "Now at end of input.\n"));
2260 yytoken = YYTRANSLATE (yychar);
2261 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2264 /* If the proper action on seeing token YYTOKEN is to reduce or to
2265 detect an error, take that action. */
2267 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2272 if (yytable_value_is_error (yyn))
2278 /* Count tokens shifted since error; after three, turn off error
2283 /* Shift the lookahead token. */
2284 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2286 /* Discard the shifted token. */
2290 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2292 YY_IGNORE_MAYBE_UNINITIALIZED_END
2297 /*-----------------------------------------------------------.
2298 | yydefault -- do the default action for the current state. |
2299 `-----------------------------------------------------------*/
2301 yyn = yydefact[yystate];
2307 /*-----------------------------.
2308 | yyreduce -- Do a reduction. |
2309 `-----------------------------*/
2311 /* yyn is the number of a rule to reduce with. */
2314 /* If YYLEN is nonzero, implement the default value of the action:
2317 Otherwise, the following line sets YYVAL to garbage.
2318 This behavior is undocumented and Bison
2319 users should not rely upon it. Assigning to YYVAL
2320 unconditionally makes the parser a bit smaller, and it avoids a
2321 GCC warning that YYVAL may be used uninitialized. */
2322 yyval = yyvsp[1-yylen];
2325 YY_REDUCE_PRINT (yyn);
2329 /* Line 1787 of yacc.c */
2330 #line 373 "../../ntpd/ntp_parser.y"
2332 /* I will need to incorporate much more fine grained
2333 * error messages. The following should suffice for
2336 struct FILE_INFO * ip_ctx = lex_current();
2338 "syntax error in %s line %d, column %d",
2340 ip_ctx->errpos.nline,
2341 ip_ctx->errpos.ncol);
2346 /* Line 1787 of yacc.c */
2347 #line 409 "../../ntpd/ntp_parser.y"
2351 my_node = create_peer_node((yyvsp[(1) - (3)].Integer), (yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
2352 APPEND_G_FIFO(cfgt.peers, my_node);
2357 /* Line 1787 of yacc.c */
2358 #line 428 "../../ntpd/ntp_parser.y"
2359 { (yyval.Address_node) = create_address_node((yyvsp[(2) - (2)].String), (yyvsp[(1) - (2)].Integer)); }
2363 /* Line 1787 of yacc.c */
2364 #line 433 "../../ntpd/ntp_parser.y"
2365 { (yyval.Address_node) = create_address_node((yyvsp[(1) - (1)].String), AF_UNSPEC); }
2369 /* Line 1787 of yacc.c */
2370 #line 438 "../../ntpd/ntp_parser.y"
2371 { (yyval.Integer) = AF_INET; }
2375 /* Line 1787 of yacc.c */
2376 #line 440 "../../ntpd/ntp_parser.y"
2377 { (yyval.Integer) = AF_INET6; }
2381 /* Line 1787 of yacc.c */
2382 #line 445 "../../ntpd/ntp_parser.y"
2383 { (yyval.Attr_val_fifo) = NULL; }
2387 /* Line 1787 of yacc.c */
2388 #line 447 "../../ntpd/ntp_parser.y"
2390 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2391 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2396 /* Line 1787 of yacc.c */
2397 #line 461 "../../ntpd/ntp_parser.y"
2398 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
2402 /* Line 1787 of yacc.c */
2403 #line 477 "../../ntpd/ntp_parser.y"
2404 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2408 /* Line 1787 of yacc.c */
2409 #line 479 "../../ntpd/ntp_parser.y"
2410 { (yyval.Attr_val) = create_attr_uval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2414 /* Line 1787 of yacc.c */
2415 #line 493 "../../ntpd/ntp_parser.y"
2416 { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
2420 /* Line 1787 of yacc.c */
2421 #line 507 "../../ntpd/ntp_parser.y"
2423 unpeer_node *my_node;
2425 my_node = create_unpeer_node((yyvsp[(2) - (2)].Address_node));
2427 APPEND_G_FIFO(cfgt.unpeers, my_node);
2432 /* Line 1787 of yacc.c */
2433 #line 528 "../../ntpd/ntp_parser.y"
2434 { cfgt.broadcastclient = 1; }
2438 /* Line 1787 of yacc.c */
2439 #line 530 "../../ntpd/ntp_parser.y"
2440 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[(2) - (2)].Address_fifo)); }
2444 /* Line 1787 of yacc.c */
2445 #line 532 "../../ntpd/ntp_parser.y"
2446 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[(2) - (2)].Address_fifo)); }
2450 /* Line 1787 of yacc.c */
2451 #line 534 "../../ntpd/ntp_parser.y"
2452 { cfgt.mdnstries = (yyvsp[(2) - (2)].Integer); }
2456 /* Line 1787 of yacc.c */
2457 #line 545 "../../ntpd/ntp_parser.y"
2461 atrv = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
2462 APPEND_G_FIFO(cfgt.vars, atrv);
2467 /* Line 1787 of yacc.c */
2468 #line 552 "../../ntpd/ntp_parser.y"
2469 { cfgt.auth.control_key = (yyvsp[(2) - (2)].Integer); }
2473 /* Line 1787 of yacc.c */
2474 #line 554 "../../ntpd/ntp_parser.y"
2476 cfgt.auth.cryptosw++;
2477 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[(2) - (2)].Attr_val_fifo));
2482 /* Line 1787 of yacc.c */
2483 #line 559 "../../ntpd/ntp_parser.y"
2484 { cfgt.auth.keys = (yyvsp[(2) - (2)].String); }
2488 /* Line 1787 of yacc.c */
2489 #line 561 "../../ntpd/ntp_parser.y"
2490 { cfgt.auth.keysdir = (yyvsp[(2) - (2)].String); }
2494 /* Line 1787 of yacc.c */
2495 #line 563 "../../ntpd/ntp_parser.y"
2496 { cfgt.auth.request_key = (yyvsp[(2) - (2)].Integer); }
2500 /* Line 1787 of yacc.c */
2501 #line 565 "../../ntpd/ntp_parser.y"
2502 { cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer); }
2506 /* Line 1787 of yacc.c */
2507 #line 567 "../../ntpd/ntp_parser.y"
2509 cfgt.auth.trusted_key_list = (yyvsp[(2) - (2)].Attr_val_fifo);
2511 // if (!cfgt.auth.trusted_key_list)
2512 // cfgt.auth.trusted_key_list = $2;
2514 // LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
2519 /* Line 1787 of yacc.c */
2520 #line 576 "../../ntpd/ntp_parser.y"
2521 { cfgt.auth.ntp_signd_socket = (yyvsp[(2) - (2)].String); }
2525 /* Line 1787 of yacc.c */
2526 #line 581 "../../ntpd/ntp_parser.y"
2527 { (yyval.Attr_val_fifo) = NULL; }
2531 /* Line 1787 of yacc.c */
2532 #line 583 "../../ntpd/ntp_parser.y"
2534 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2535 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2540 /* Line 1787 of yacc.c */
2541 #line 591 "../../ntpd/ntp_parser.y"
2542 { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
2546 /* Line 1787 of yacc.c */
2547 #line 593 "../../ntpd/ntp_parser.y"
2549 (yyval.Attr_val) = NULL;
2550 cfgt.auth.revoke = (yyvsp[(2) - (2)].Integer);
2551 msyslog(LOG_WARNING,
2552 "'crypto revoke %d' is deprecated, "
2553 "please use 'revoke %d' instead.",
2554 cfgt.auth.revoke, cfgt.auth.revoke);
2559 /* Line 1787 of yacc.c */
2560 #line 618 "../../ntpd/ntp_parser.y"
2561 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[(2) - (2)].Attr_val_fifo)); }
2565 /* Line 1787 of yacc.c */
2566 #line 623 "../../ntpd/ntp_parser.y"
2568 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2569 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2574 /* Line 1787 of yacc.c */
2575 #line 628 "../../ntpd/ntp_parser.y"
2577 (yyval.Attr_val_fifo) = NULL;
2578 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
2583 /* Line 1787 of yacc.c */
2584 #line 636 "../../ntpd/ntp_parser.y"
2585 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
2589 /* Line 1787 of yacc.c */
2590 #line 638 "../../ntpd/ntp_parser.y"
2591 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
2595 /* Line 1787 of yacc.c */
2596 #line 640 "../../ntpd/ntp_parser.y"
2597 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (double)(yyvsp[(2) - (2)].Integer)); }
2601 /* Line 1787 of yacc.c */
2602 #line 666 "../../ntpd/ntp_parser.y"
2603 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[(2) - (2)].Int_fifo)); }
2607 /* Line 1787 of yacc.c */
2608 #line 668 "../../ntpd/ntp_parser.y"
2610 if (lex_from_file()) {
2611 cfgt.stats_dir = (yyvsp[(2) - (2)].String);
2613 YYFREE((yyvsp[(2) - (2)].String));
2614 yyerror("statsdir remote configuration ignored");
2620 /* Line 1787 of yacc.c */
2621 #line 677 "../../ntpd/ntp_parser.y"
2625 fgn = create_filegen_node((yyvsp[(2) - (3)].Integer), (yyvsp[(3) - (3)].Attr_val_fifo));
2626 APPEND_G_FIFO(cfgt.filegen_opts, fgn);
2631 /* Line 1787 of yacc.c */
2632 #line 687 "../../ntpd/ntp_parser.y"
2634 (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
2635 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
2640 /* Line 1787 of yacc.c */
2641 #line 692 "../../ntpd/ntp_parser.y"
2643 (yyval.Int_fifo) = NULL;
2644 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
2649 /* Line 1787 of yacc.c */
2650 #line 711 "../../ntpd/ntp_parser.y"
2651 { (yyval.Attr_val_fifo) = NULL; }
2655 /* Line 1787 of yacc.c */
2656 #line 713 "../../ntpd/ntp_parser.y"
2658 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2659 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2664 /* Line 1787 of yacc.c */
2665 #line 721 "../../ntpd/ntp_parser.y"
2667 if (lex_from_file()) {
2668 (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
2670 (yyval.Attr_val) = NULL;
2671 YYFREE((yyvsp[(2) - (2)].String));
2672 yyerror("filegen file remote config ignored");
2678 /* Line 1787 of yacc.c */
2679 #line 731 "../../ntpd/ntp_parser.y"
2681 if (lex_from_file()) {
2682 (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
2684 (yyval.Attr_val) = NULL;
2685 yyerror("filegen type remote config ignored");
2691 /* Line 1787 of yacc.c */
2692 #line 740 "../../ntpd/ntp_parser.y"
2696 if (lex_from_file()) {
2697 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
2699 (yyval.Attr_val) = NULL;
2700 if (T_Link == (yyvsp[(1) - (1)].Integer))
2701 err = "filegen link remote config ignored";
2703 err = "filegen nolink remote config ignored";
2710 /* Line 1787 of yacc.c */
2711 #line 755 "../../ntpd/ntp_parser.y"
2712 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
2716 /* Line 1787 of yacc.c */
2717 #line 785 "../../ntpd/ntp_parser.y"
2719 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[(2) - (2)].Attr_val_fifo));
2724 /* Line 1787 of yacc.c */
2725 #line 789 "../../ntpd/ntp_parser.y"
2727 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[(2) - (2)].Attr_val_fifo));
2732 /* Line 1787 of yacc.c */
2733 #line 793 "../../ntpd/ntp_parser.y"
2737 rn = create_restrict_node((yyvsp[(2) - (3)].Address_node), NULL, (yyvsp[(3) - (3)].Int_fifo),
2738 lex_current()->curpos.nline);
2739 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2744 /* Line 1787 of yacc.c */
2745 #line 801 "../../ntpd/ntp_parser.y"
2749 rn = create_restrict_node((yyvsp[(2) - (5)].Address_node), (yyvsp[(4) - (5)].Address_node), (yyvsp[(5) - (5)].Int_fifo),
2750 lex_current()->curpos.nline);
2751 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2756 /* Line 1787 of yacc.c */
2757 #line 809 "../../ntpd/ntp_parser.y"
2761 rn = create_restrict_node(NULL, NULL, (yyvsp[(3) - (3)].Int_fifo),
2762 lex_current()->curpos.nline);
2763 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2768 /* Line 1787 of yacc.c */
2769 #line 817 "../../ntpd/ntp_parser.y"
2773 rn = create_restrict_node(
2774 create_address_node(
2777 create_address_node(
2780 (yyvsp[(4) - (4)].Int_fifo),
2781 lex_current()->curpos.nline);
2782 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2787 /* Line 1787 of yacc.c */
2788 #line 832 "../../ntpd/ntp_parser.y"
2792 rn = create_restrict_node(
2793 create_address_node(
2796 create_address_node(
2799 (yyvsp[(4) - (4)].Int_fifo),
2800 lex_current()->curpos.nline);
2801 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2806 /* Line 1787 of yacc.c */
2807 #line 847 "../../ntpd/ntp_parser.y"
2811 APPEND_G_FIFO((yyvsp[(3) - (3)].Int_fifo), create_int_node((yyvsp[(2) - (3)].Integer)));
2812 rn = create_restrict_node(
2813 NULL, NULL, (yyvsp[(3) - (3)].Int_fifo), lex_current()->curpos.nline);
2814 APPEND_G_FIFO(cfgt.restrict_opts, rn);
2819 /* Line 1787 of yacc.c */
2820 #line 859 "../../ntpd/ntp_parser.y"
2821 { (yyval.Int_fifo) = NULL; }
2825 /* Line 1787 of yacc.c */
2826 #line 861 "../../ntpd/ntp_parser.y"
2828 (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
2829 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
2834 /* Line 1787 of yacc.c */
2835 #line 887 "../../ntpd/ntp_parser.y"
2837 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2838 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2843 /* Line 1787 of yacc.c */
2844 #line 892 "../../ntpd/ntp_parser.y"
2846 (yyval.Attr_val_fifo) = NULL;
2847 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
2852 /* Line 1787 of yacc.c */
2853 #line 900 "../../ntpd/ntp_parser.y"
2854 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2858 /* Line 1787 of yacc.c */
2859 #line 911 "../../ntpd/ntp_parser.y"
2861 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2862 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2867 /* Line 1787 of yacc.c */
2868 #line 916 "../../ntpd/ntp_parser.y"
2870 (yyval.Attr_val_fifo) = NULL;
2871 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
2876 /* Line 1787 of yacc.c */
2877 #line 924 "../../ntpd/ntp_parser.y"
2878 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2882 /* Line 1787 of yacc.c */
2883 #line 944 "../../ntpd/ntp_parser.y"
2885 addr_opts_node *aon;
2887 aon = create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
2888 APPEND_G_FIFO(cfgt.fudge, aon);
2893 /* Line 1787 of yacc.c */
2894 #line 954 "../../ntpd/ntp_parser.y"
2896 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2897 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2902 /* Line 1787 of yacc.c */
2903 #line 959 "../../ntpd/ntp_parser.y"
2905 (yyval.Attr_val_fifo) = NULL;
2906 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
2911 /* Line 1787 of yacc.c */
2912 #line 967 "../../ntpd/ntp_parser.y"
2913 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
2917 /* Line 1787 of yacc.c */
2918 #line 969 "../../ntpd/ntp_parser.y"
2919 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2923 /* Line 1787 of yacc.c */
2924 #line 971 "../../ntpd/ntp_parser.y"
2925 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2929 /* Line 1787 of yacc.c */
2930 #line 973 "../../ntpd/ntp_parser.y"
2931 { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
2935 /* Line 1787 of yacc.c */
2936 #line 975 "../../ntpd/ntp_parser.y"
2937 { (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String)); }
2941 /* Line 1787 of yacc.c */
2942 #line 996 "../../ntpd/ntp_parser.y"
2943 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[(2) - (2)].Attr_val_fifo)); }
2947 /* Line 1787 of yacc.c */
2948 #line 1001 "../../ntpd/ntp_parser.y"
2950 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2951 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2956 /* Line 1787 of yacc.c */
2957 #line 1006 "../../ntpd/ntp_parser.y"
2959 (yyval.Attr_val_fifo) = NULL;
2960 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
2965 /* Line 1787 of yacc.c */
2966 #line 1014 "../../ntpd/ntp_parser.y"
2967 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
2971 /* Line 1787 of yacc.c */
2972 #line 1030 "../../ntpd/ntp_parser.y"
2973 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[(2) - (2)].Attr_val_fifo)); }
2977 /* Line 1787 of yacc.c */
2978 #line 1032 "../../ntpd/ntp_parser.y"
2979 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[(2) - (2)].Attr_val_fifo)); }
2983 /* Line 1787 of yacc.c */
2984 #line 1037 "../../ntpd/ntp_parser.y"
2986 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
2987 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
2992 /* Line 1787 of yacc.c */
2993 #line 1042 "../../ntpd/ntp_parser.y"
2995 (yyval.Attr_val_fifo) = NULL;
2996 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
3001 /* Line 1787 of yacc.c */
3002 #line 1050 "../../ntpd/ntp_parser.y"
3003 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer)); }
3007 /* Line 1787 of yacc.c */
3008 #line 1052 "../../ntpd/ntp_parser.y"
3010 if (lex_from_file()) {
3011 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[(1) - (1)].Integer));
3015 (yyval.Attr_val) = NULL;
3016 snprintf(err_str, sizeof(err_str),
3017 "enable/disable %s remote configuration ignored",
3018 keyword((yyvsp[(1) - (1)].Integer)));
3025 /* Line 1787 of yacc.c */
3026 #line 1087 "../../ntpd/ntp_parser.y"
3027 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[(2) - (2)].Attr_val_fifo)); }
3031 /* Line 1787 of yacc.c */
3032 #line 1092 "../../ntpd/ntp_parser.y"
3034 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
3035 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
3040 /* Line 1787 of yacc.c */
3041 #line 1097 "../../ntpd/ntp_parser.y"
3043 (yyval.Attr_val_fifo) = NULL;
3044 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
3049 /* Line 1787 of yacc.c */
3050 #line 1105 "../../ntpd/ntp_parser.y"
3051 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double)); }
3055 /* Line 1787 of yacc.c */
3056 #line 1130 "../../ntpd/ntp_parser.y"
3060 av = create_attr_dval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Double));
3061 APPEND_G_FIFO(cfgt.vars, av);
3066 /* Line 1787 of yacc.c */
3067 #line 1137 "../../ntpd/ntp_parser.y"
3071 av = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer));
3072 APPEND_G_FIFO(cfgt.vars, av);
3077 /* Line 1787 of yacc.c */
3078 #line 1144 "../../ntpd/ntp_parser.y"
3082 av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
3083 APPEND_G_FIFO(cfgt.vars, av);
3088 /* Line 1787 of yacc.c */
3089 #line 1151 "../../ntpd/ntp_parser.y"
3091 char error_text[64];
3094 if (lex_from_file()) {
3095 av = create_attr_sval((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].String));
3096 APPEND_G_FIFO(cfgt.vars, av);
3098 YYFREE((yyvsp[(2) - (2)].String));
3099 snprintf(error_text, sizeof(error_text),
3100 "%s remote config ignored",
3101 keyword((yyvsp[(1) - (2)].Integer)));
3102 yyerror(error_text);
3108 /* Line 1787 of yacc.c */
3109 #line 1167 "../../ntpd/ntp_parser.y"
3111 if (!lex_from_file()) {
3112 YYFREE((yyvsp[(2) - (3)].String)); /* avoid leak */
3113 yyerror("remote includefile ignored");
3116 if (lex_level() > MAXINCLUDELEVEL) {
3117 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n");
3118 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded.");
3120 const char * path = FindConfig((yyvsp[(2) - (3)].String)); /* might return $2! */
3121 if (!lex_push_file(path, "r")) {
3122 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path);
3123 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path);
3126 YYFREE((yyvsp[(2) - (3)].String)); /* avoid leak */
3131 /* Line 1787 of yacc.c */
3132 #line 1186 "../../ntpd/ntp_parser.y"
3133 { lex_flush_stack(); }
3137 /* Line 1787 of yacc.c */
3138 #line 1188 "../../ntpd/ntp_parser.y"
3139 { /* see drift_parm below for actions */ }
3143 /* Line 1787 of yacc.c */
3144 #line 1190 "../../ntpd/ntp_parser.y"
3145 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[(2) - (2)].Attr_val_fifo)); }
3149 /* Line 1787 of yacc.c */
3150 #line 1192 "../../ntpd/ntp_parser.y"
3151 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[(2) - (2)].String_fifo)); }
3155 /* Line 1787 of yacc.c */
3156 #line 1194 "../../ntpd/ntp_parser.y"
3157 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[(2) - (2)].Set_var)); }
3161 /* Line 1787 of yacc.c */
3162 #line 1196 "../../ntpd/ntp_parser.y"
3164 addr_opts_node *aon;
3166 aon = create_addr_opts_node((yyvsp[(2) - (3)].Address_node), (yyvsp[(3) - (3)].Attr_val_fifo));
3167 APPEND_G_FIFO(cfgt.trap, aon);
3172 /* Line 1787 of yacc.c */
3173 #line 1203 "../../ntpd/ntp_parser.y"
3174 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[(2) - (2)].Attr_val_fifo)); }
3178 /* Line 1787 of yacc.c */
3179 #line 1218 "../../ntpd/ntp_parser.y"
3182 yyerror("Built without LEAP_SMEAR support.");
3188 /* Line 1787 of yacc.c */
3189 #line 1238 "../../ntpd/ntp_parser.y"
3193 av = create_attr_sval(T_Driftfile, (yyvsp[(1) - (1)].String));
3194 APPEND_G_FIFO(cfgt.vars, av);
3199 /* Line 1787 of yacc.c */
3200 #line 1245 "../../ntpd/ntp_parser.y"
3204 av = create_attr_sval(T_Driftfile, (yyvsp[(1) - (2)].String));
3205 APPEND_G_FIFO(cfgt.vars, av);
3206 av = create_attr_dval(T_WanderThreshold, (yyvsp[(2) - (2)].Double));
3207 APPEND_G_FIFO(cfgt.vars, av);
3212 /* Line 1787 of yacc.c */
3213 #line 1254 "../../ntpd/ntp_parser.y"
3217 av = create_attr_sval(T_Driftfile, "");
3218 APPEND_G_FIFO(cfgt.vars, av);
3223 /* Line 1787 of yacc.c */
3224 #line 1264 "../../ntpd/ntp_parser.y"
3225 { (yyval.Set_var) = create_setvar_node((yyvsp[(1) - (4)].String), (yyvsp[(3) - (4)].String), (yyvsp[(4) - (4)].Integer)); }
3229 /* Line 1787 of yacc.c */
3230 #line 1270 "../../ntpd/ntp_parser.y"
3231 { (yyval.Integer) = 0; }
3235 /* Line 1787 of yacc.c */
3236 #line 1275 "../../ntpd/ntp_parser.y"
3237 { (yyval.Attr_val_fifo) = NULL; }
3241 /* Line 1787 of yacc.c */
3242 #line 1277 "../../ntpd/ntp_parser.y"
3244 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
3245 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
3250 /* Line 1787 of yacc.c */
3251 #line 1285 "../../ntpd/ntp_parser.y"
3252 { (yyval.Attr_val) = create_attr_ival((yyvsp[(1) - (2)].Integer), (yyvsp[(2) - (2)].Integer)); }
3256 /* Line 1787 of yacc.c */
3257 #line 1287 "../../ntpd/ntp_parser.y"
3259 (yyval.Attr_val) = create_attr_sval((yyvsp[(1) - (2)].Integer), estrdup((yyvsp[(2) - (2)].Address_node)->address));
3260 destroy_address_node((yyvsp[(2) - (2)].Address_node));
3265 /* Line 1787 of yacc.c */
3266 #line 1295 "../../ntpd/ntp_parser.y"
3268 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
3269 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
3274 /* Line 1787 of yacc.c */
3275 #line 1300 "../../ntpd/ntp_parser.y"
3277 (yyval.Attr_val_fifo) = NULL;
3278 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
3283 /* Line 1787 of yacc.c */
3284 #line 1308 "../../ntpd/ntp_parser.y"
3289 switch ((yyvsp[(1) - (1)].String)[0]) {
3294 prefix = (yyvsp[(1) - (1)].String)[0];
3295 type = (yyvsp[(1) - (1)].String) + 1;
3300 type = (yyvsp[(1) - (1)].String);
3303 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
3304 YYFREE((yyvsp[(1) - (1)].String));
3309 /* Line 1787 of yacc.c */
3310 #line 1333 "../../ntpd/ntp_parser.y"
3314 nrn = create_nic_rule_node((yyvsp[(3) - (3)].Integer), NULL, (yyvsp[(2) - (3)].Integer));
3315 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3320 /* Line 1787 of yacc.c */
3321 #line 1340 "../../ntpd/ntp_parser.y"
3325 nrn = create_nic_rule_node(0, (yyvsp[(3) - (3)].String), (yyvsp[(2) - (3)].Integer));
3326 APPEND_G_FIFO(cfgt.nic_rules, nrn);
3331 /* Line 1787 of yacc.c */
3332 #line 1368 "../../ntpd/ntp_parser.y"
3333 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[(2) - (2)].Int_fifo)); }
3337 /* Line 1787 of yacc.c */
3338 #line 1373 "../../ntpd/ntp_parser.y"
3340 (yyval.Int_fifo) = (yyvsp[(1) - (2)].Int_fifo);
3341 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
3346 /* Line 1787 of yacc.c */
3347 #line 1378 "../../ntpd/ntp_parser.y"
3349 (yyval.Int_fifo) = NULL;
3350 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
3355 /* Line 1787 of yacc.c */
3356 #line 1402 "../../ntpd/ntp_parser.y"
3358 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
3359 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[(2) - (2)].Integer)));
3364 /* Line 1787 of yacc.c */
3365 #line 1407 "../../ntpd/ntp_parser.y"
3367 (yyval.Attr_val_fifo) = NULL;
3368 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[(1) - (1)].Integer)));
3373 /* Line 1787 of yacc.c */
3374 #line 1415 "../../ntpd/ntp_parser.y"
3376 (yyval.Attr_val_fifo) = (yyvsp[(1) - (2)].Attr_val_fifo);
3377 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (2)].Attr_val));
3382 /* Line 1787 of yacc.c */
3383 #line 1420 "../../ntpd/ntp_parser.y"
3385 (yyval.Attr_val_fifo) = NULL;
3386 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (1)].Attr_val));
3391 /* Line 1787 of yacc.c */
3392 #line 1428 "../../ntpd/ntp_parser.y"
3393 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[(1) - (1)].Integer)); }
3397 /* Line 1787 of yacc.c */
3398 #line 1434 "../../ntpd/ntp_parser.y"
3399 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[(2) - (5)].Integer), (yyvsp[(4) - (5)].Integer)); }
3403 /* Line 1787 of yacc.c */
3404 #line 1439 "../../ntpd/ntp_parser.y"
3406 (yyval.String_fifo) = (yyvsp[(1) - (2)].String_fifo);
3407 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[(2) - (2)].String)));
3412 /* Line 1787 of yacc.c */
3413 #line 1444 "../../ntpd/ntp_parser.y"
3415 (yyval.String_fifo) = NULL;
3416 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[(1) - (1)].String)));
3421 /* Line 1787 of yacc.c */
3422 #line 1452 "../../ntpd/ntp_parser.y"
3424 (yyval.Address_fifo) = (yyvsp[(1) - (2)].Address_fifo);
3425 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[(2) - (2)].Address_node));
3430 /* Line 1787 of yacc.c */
3431 #line 1457 "../../ntpd/ntp_parser.y"
3433 (yyval.Address_fifo) = NULL;
3434 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[(1) - (1)].Address_node));
3439 /* Line 1787 of yacc.c */
3440 #line 1465 "../../ntpd/ntp_parser.y"
3442 if ((yyvsp[(1) - (1)].Integer) != 0 && (yyvsp[(1) - (1)].Integer) != 1) {
3443 yyerror("Integer value is not boolean (0 or 1). Assuming 1");
3444 (yyval.Integer) = 1;
3446 (yyval.Integer) = (yyvsp[(1) - (1)].Integer);
3452 /* Line 1787 of yacc.c */
3453 #line 1473 "../../ntpd/ntp_parser.y"
3454 { (yyval.Integer) = 1; }
3458 /* Line 1787 of yacc.c */
3459 #line 1474 "../../ntpd/ntp_parser.y"
3460 { (yyval.Integer) = 0; }
3464 /* Line 1787 of yacc.c */
3465 #line 1478 "../../ntpd/ntp_parser.y"
3466 { (yyval.Double) = (double)(yyvsp[(1) - (1)].Integer); }
3470 /* Line 1787 of yacc.c */
3471 #line 1489 "../../ntpd/ntp_parser.y"
3475 sn = create_sim_node((yyvsp[(3) - (5)].Attr_val_fifo), (yyvsp[(4) - (5)].Sim_server_fifo));
3476 APPEND_G_FIFO(cfgt.sim_details, sn);
3478 /* Revert from ; to \n for end-of-command */
3479 old_config_style = 1;
3484 /* Line 1787 of yacc.c */
3485 #line 1506 "../../ntpd/ntp_parser.y"
3486 { old_config_style = 0; }
3490 /* Line 1787 of yacc.c */
3491 #line 1511 "../../ntpd/ntp_parser.y"
3493 (yyval.Attr_val_fifo) = (yyvsp[(1) - (3)].Attr_val_fifo);
3494 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (3)].Attr_val));
3499 /* Line 1787 of yacc.c */
3500 #line 1516 "../../ntpd/ntp_parser.y"
3502 (yyval.Attr_val_fifo) = NULL;
3503 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (2)].Attr_val));
3508 /* Line 1787 of yacc.c */
3509 #line 1524 "../../ntpd/ntp_parser.y"
3510 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
3514 /* Line 1787 of yacc.c */
3515 #line 1534 "../../ntpd/ntp_parser.y"
3517 (yyval.Sim_server_fifo) = (yyvsp[(1) - (2)].Sim_server_fifo);
3518 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[(2) - (2)].Sim_server));
3523 /* Line 1787 of yacc.c */
3524 #line 1539 "../../ntpd/ntp_parser.y"
3526 (yyval.Sim_server_fifo) = NULL;
3527 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[(1) - (1)].Sim_server));
3532 /* Line 1787 of yacc.c */
3533 #line 1547 "../../ntpd/ntp_parser.y"
3534 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[(1) - (5)].Address_node), (yyvsp[(3) - (5)].Double), (yyvsp[(4) - (5)].Sim_script_fifo))); }
3538 /* Line 1787 of yacc.c */
3539 #line 1552 "../../ntpd/ntp_parser.y"
3540 { (yyval.Double) = (yyvsp[(3) - (4)].Double); }
3544 /* Line 1787 of yacc.c */
3545 #line 1557 "../../ntpd/ntp_parser.y"
3546 { (yyval.Address_node) = (yyvsp[(3) - (3)].Address_node); }
3550 /* Line 1787 of yacc.c */
3551 #line 1562 "../../ntpd/ntp_parser.y"
3553 (yyval.Sim_script_fifo) = (yyvsp[(1) - (2)].Sim_script_fifo);
3554 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[(2) - (2)].Sim_script));
3559 /* Line 1787 of yacc.c */
3560 #line 1567 "../../ntpd/ntp_parser.y"
3562 (yyval.Sim_script_fifo) = NULL;
3563 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[(1) - (1)].Sim_script));
3568 /* Line 1787 of yacc.c */
3569 #line 1575 "../../ntpd/ntp_parser.y"
3570 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[(3) - (6)].Double), (yyvsp[(5) - (6)].Attr_val_fifo))); }
3574 /* Line 1787 of yacc.c */
3575 #line 1580 "../../ntpd/ntp_parser.y"
3577 (yyval.Attr_val_fifo) = (yyvsp[(1) - (3)].Attr_val_fifo);
3578 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(2) - (3)].Attr_val));
3583 /* Line 1787 of yacc.c */
3584 #line 1585 "../../ntpd/ntp_parser.y"
3586 (yyval.Attr_val_fifo) = NULL;
3587 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[(1) - (2)].Attr_val));
3592 /* Line 1787 of yacc.c */
3593 #line 1593 "../../ntpd/ntp_parser.y"
3594 { (yyval.Attr_val) = create_attr_dval((yyvsp[(1) - (3)].Integer), (yyvsp[(3) - (3)].Double)); }
3598 /* Line 1787 of yacc.c */
3599 #line 3600 "ntp_parser.c"
3602 /* User semantic actions sometimes alter yychar, and that requires
3603 that yytoken be updated with the new translation. We take the
3604 approach of translating immediately before every use of yytoken.
3605 One alternative is translating here after every semantic action,
3606 but that translation would be missed if the semantic action invokes
3607 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3608 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3609 incorrect destructor might then be invoked immediately. In the
3610 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3611 to an incorrect destructor call or verbose syntax error message
3612 before the lookahead is translated. */
3613 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3617 YY_STACK_PRINT (yyss, yyssp);
3621 /* Now `shift' the result of the reduction. Determine what state
3622 that goes to, based on the state we popped back to and the rule
3623 number reduced by. */
3627 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3628 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3629 yystate = yytable[yystate];
3631 yystate = yydefgoto[yyn - YYNTOKENS];
3636 /*------------------------------------.
3637 | yyerrlab -- here on detecting error |
3638 `------------------------------------*/
3640 /* Make sure we have latest lookahead translation. See comments at
3641 user semantic actions for why this is necessary. */
3642 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3644 /* If not already recovering from an error, report this error. */
3648 #if ! YYERROR_VERBOSE
3649 yyerror (YY_("syntax error"));
3651 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3654 char const *yymsgp = YY_("syntax error");
3655 int yysyntax_error_status;
3656 yysyntax_error_status = YYSYNTAX_ERROR;
3657 if (yysyntax_error_status == 0)
3659 else if (yysyntax_error_status == 1)
3661 if (yymsg != yymsgbuf)
3662 YYSTACK_FREE (yymsg);
3663 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3667 yymsg_alloc = sizeof yymsgbuf;
3668 yysyntax_error_status = 2;
3672 yysyntax_error_status = YYSYNTAX_ERROR;
3677 if (yysyntax_error_status == 2)
3678 goto yyexhaustedlab;
3680 # undef YYSYNTAX_ERROR
3686 if (yyerrstatus == 3)
3688 /* If just tried and failed to reuse lookahead token after an
3689 error, discard it. */
3691 if (yychar <= YYEOF)
3693 /* Return failure if at end of input. */
3694 if (yychar == YYEOF)
3699 yydestruct ("Error: discarding",
3705 /* Else will try to reuse lookahead token after shifting the error
3710 /*---------------------------------------------------.
3711 | yyerrorlab -- error raised explicitly by YYERROR. |
3712 `---------------------------------------------------*/
3715 /* Pacify compilers like GCC when the user code never invokes
3716 YYERROR and the label yyerrorlab therefore never appears in user
3718 if (/*CONSTCOND*/ 0)
3721 /* Do not reclaim the symbols of the rule which action triggered
3725 YY_STACK_PRINT (yyss, yyssp);
3730 /*-------------------------------------------------------------.
3731 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3732 `-------------------------------------------------------------*/
3734 yyerrstatus = 3; /* Each real token shifted decrements this. */
3738 yyn = yypact[yystate];
3739 if (!yypact_value_is_default (yyn))
3742 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3750 /* Pop the current state because it cannot handle the error token. */
3755 yydestruct ("Error: popping",
3756 yystos[yystate], yyvsp);
3759 YY_STACK_PRINT (yyss, yyssp);
3762 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3764 YY_IGNORE_MAYBE_UNINITIALIZED_END
3767 /* Shift the error token. */
3768 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3774 /*-------------------------------------.
3775 | yyacceptlab -- YYACCEPT comes here. |
3776 `-------------------------------------*/
3781 /*-----------------------------------.
3782 | yyabortlab -- YYABORT comes here. |
3783 `-----------------------------------*/
3788 #if !defined yyoverflow || YYERROR_VERBOSE
3789 /*-------------------------------------------------.
3790 | yyexhaustedlab -- memory exhaustion comes here. |
3791 `-------------------------------------------------*/
3793 yyerror (YY_("memory exhausted"));
3799 if (yychar != YYEMPTY)
3801 /* Make sure we have latest lookahead translation. See comments at
3802 user semantic actions for why this is necessary. */
3803 yytoken = YYTRANSLATE (yychar);
3804 yydestruct ("Cleanup: discarding lookahead",
3807 /* Do not reclaim the symbols of the rule which action triggered
3808 this YYABORT or YYACCEPT. */
3810 YY_STACK_PRINT (yyss, yyssp);
3811 while (yyssp != yyss)
3813 yydestruct ("Cleanup: popping",
3814 yystos[*yyssp], yyvsp);
3819 YYSTACK_FREE (yyss);
3822 if (yymsg != yymsgbuf)
3823 YYSTACK_FREE (yymsg);
3825 /* Make sure YYID is used. */
3826 return YYID (yyresult);
3830 /* Line 2050 of yacc.c */
3831 #line 1604 "../../ntpd/ntp_parser.y"
3840 struct FILE_INFO * ip_ctx;
3842 ip_ctx = lex_current();
3843 ip_ctx->errpos = ip_ctx->tokpos;
3845 msyslog(LOG_ERR, "line %d column %d %s",
3846 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg);
3847 if (!lex_from_file()) {
3848 /* Save the error message in the correct buffer */
3849 retval = snprintf(remote_config.err_msg + remote_config.err_pos,
3850 MAXLINE - remote_config.err_pos,
3852 ip_ctx->errpos.ncol, msg);
3854 /* Increment the value of err_pos */
3856 remote_config.err_pos += retval;
3858 /* Increment the number of errors */
3859 ++remote_config.no_errors;
3865 * token_name - convert T_ token integers to text
3866 * example: token_name(T_Server) returns "T_Server"
3873 return yytname[YYTRANSLATE(token)];
3877 /* Initial Testing function -- ignore */
3879 int main(int argc, char *argv[])
3881 ip_file = FOPEN(argv[1], "r");
3883 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]);