ntp_parser.c revision 330106
1/* A Bison parser, made by GNU Bison 3.0.4. */ 2 3/* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 6 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. 11 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. 16 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/>. */ 19 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. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33/* C LALR(1) parser skeleton written by Richard Stallman, by 34 simplifying the original so-called "semantic" parser. */ 35 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. */ 42 43/* Identify Bison output. */ 44#define YYBISON 1 45 46/* Bison version. */ 47#define YYBISON_VERSION "3.0.4" 48 49/* Skeleton name. */ 50#define YYSKELETON_NAME "yacc.c" 51 52/* Pure parsers. */ 53#define YYPURE 0 54 55/* Push parsers. */ 56#define YYPUSH 0 57 58/* Pull parsers. */ 59#define YYPULL 1 60 61 62 63 64/* Copy the first part of user declarations. */ 65#line 11 "../../ntpd/ntp_parser.y" /* yacc.c:339 */ 66 67 #ifdef HAVE_CONFIG_H 68 # include <config.h> 69 #endif 70 71 #include "ntp.h" 72 #include "ntpd.h" 73 #include "ntp_machine.h" 74 #include "ntp_stdlib.h" 75 #include "ntp_filegen.h" 76 #include "ntp_scanner.h" 77 #include "ntp_config.h" 78 #include "ntp_crypto.h" 79 80 #include "ntpsim.h" /* HMS: Do we really want this all the time? */ 81 /* SK: It might be a good idea to always 82 include the simulator code. That way 83 someone can use the same configuration file 84 for both the simulator and the daemon 85 */ 86 87 #define YYMALLOC emalloc 88 #define YYFREE free 89 #define YYERROR_VERBOSE 90 #define YYMAXDEPTH 1000 /* stop the madness sooner */ 91 void yyerror(const char *msg); 92 93 #ifdef SIM 94 # define ONLY_SIM(a) (a) 95 #else 96 # define ONLY_SIM(a) NULL 97 #endif 98 99#line 100 "ntp_parser.c" /* yacc.c:339 */ 100 101# ifndef YY_NULLPTR 102# if defined __cplusplus && 201103L <= __cplusplus 103# define YY_NULLPTR nullptr 104# else 105# define YY_NULLPTR 0 106# endif 107# endif 108 109/* Enabling verbose error messages. */ 110#ifdef YYERROR_VERBOSE 111# undef YYERROR_VERBOSE 112# define YYERROR_VERBOSE 1 113#else 114# define YYERROR_VERBOSE 0 115#endif 116 117/* In a future release of Bison, this section will be replaced 118 by #include "y.tab.h". */ 119#ifndef YY_YY_NTP_PARSER_H_INCLUDED 120# define YY_YY_NTP_PARSER_H_INCLUDED 121/* Debug traces. */ 122#ifndef YYDEBUG 123# define YYDEBUG 1 124#endif 125#if YYDEBUG 126extern int yydebug; 127#endif 128 129/* Token type. */ 130#ifndef YYTOKENTYPE 131# define YYTOKENTYPE 132 enum yytokentype 133 { 134 T_Abbrev = 258, 135 T_Age = 259, 136 T_All = 260, 137 T_Allan = 261, 138 T_Allpeers = 262, 139 T_Auth = 263, 140 T_Autokey = 264, 141 T_Automax = 265, 142 T_Average = 266, 143 T_Basedate = 267, 144 T_Bclient = 268, 145 T_Bcpollbstep = 269, 146 T_Beacon = 270, 147 T_Broadcast = 271, 148 T_Broadcastclient = 272, 149 T_Broadcastdelay = 273, 150 T_Burst = 274, 151 T_Calibrate = 275, 152 T_Ceiling = 276, 153 T_Clockstats = 277, 154 T_Cohort = 278, 155 T_ControlKey = 279, 156 T_Crypto = 280, 157 T_Cryptostats = 281, 158 T_Ctl = 282, 159 T_Day = 283, 160 T_Default = 284, 161 T_Digest = 285, 162 T_Disable = 286, 163 T_Discard = 287, 164 T_Dispersion = 288, 165 T_Double = 289, 166 T_Driftfile = 290, 167 T_Drop = 291, 168 T_Dscp = 292, 169 T_Ellipsis = 293, 170 T_Enable = 294, 171 T_End = 295, 172 T_Epeer = 296, 173 T_False = 297, 174 T_File = 298, 175 T_Filegen = 299, 176 T_Filenum = 300, 177 T_Flag1 = 301, 178 T_Flag2 = 302, 179 T_Flag3 = 303, 180 T_Flag4 = 304, 181 T_Flake = 305, 182 T_Floor = 306, 183 T_Freq = 307, 184 T_Fudge = 308, 185 T_Host = 309, 186 T_Huffpuff = 310, 187 T_Iburst = 311, 188 T_Ident = 312, 189 T_Ignore = 313, 190 T_Incalloc = 314, 191 T_Incmem = 315, 192 T_Initalloc = 316, 193 T_Initmem = 317, 194 T_Includefile = 318, 195 T_Integer = 319, 196 T_Interface = 320, 197 T_Intrange = 321, 198 T_Io = 322, 199 T_Ippeerlimit = 323, 200 T_Ipv4 = 324, 201 T_Ipv4_flag = 325, 202 T_Ipv6 = 326, 203 T_Ipv6_flag = 327, 204 T_Kernel = 328, 205 T_Key = 329, 206 T_Keys = 330, 207 T_Keysdir = 331, 208 T_Kod = 332, 209 T_Mssntp = 333, 210 T_Leapfile = 334, 211 T_Leapsmearinterval = 335, 212 T_Limited = 336, 213 T_Link = 337, 214 T_Listen = 338, 215 T_Logconfig = 339, 216 T_Logfile = 340, 217 T_Loopstats = 341, 218 T_Lowpriotrap = 342, 219 T_Manycastclient = 343, 220 T_Manycastserver = 344, 221 T_Mask = 345, 222 T_Maxage = 346, 223 T_Maxclock = 347, 224 T_Maxdepth = 348, 225 T_Maxdist = 349, 226 T_Maxmem = 350, 227 T_Maxpoll = 351, 228 T_Mdnstries = 352, 229 T_Mem = 353, 230 T_Memlock = 354, 231 T_Minclock = 355, 232 T_Mindepth = 356, 233 T_Mindist = 357, 234 T_Minimum = 358, 235 T_Minpoll = 359, 236 T_Minsane = 360, 237 T_Mode = 361, 238 T_Mode7 = 362, 239 T_Monitor = 363, 240 T_Month = 364, 241 T_Mru = 365, 242 T_Multicastclient = 366, 243 T_Nic = 367, 244 T_Nolink = 368, 245 T_Nomodify = 369, 246 T_Nomrulist = 370, 247 T_None = 371, 248 T_Nonvolatile = 372, 249 T_Noepeer = 373, 250 T_Nopeer = 374, 251 T_Noquery = 375, 252 T_Noselect = 376, 253 T_Noserve = 377, 254 T_Notrap = 378, 255 T_Notrust = 379, 256 T_Ntp = 380, 257 T_Ntpport = 381, 258 T_NtpSignDsocket = 382, 259 T_Orphan = 383, 260 T_Orphanwait = 384, 261 T_PCEdigest = 385, 262 T_Panic = 386, 263 T_Peer = 387, 264 T_Peerstats = 388, 265 T_Phone = 389, 266 T_Pid = 390, 267 T_Pidfile = 391, 268 T_Pool = 392, 269 T_Port = 393, 270 T_Preempt = 394, 271 T_Prefer = 395, 272 T_Protostats = 396, 273 T_Pw = 397, 274 T_Randfile = 398, 275 T_Rawstats = 399, 276 T_Refid = 400, 277 T_Requestkey = 401, 278 T_Reset = 402, 279 T_Restrict = 403, 280 T_Revoke = 404, 281 T_Rlimit = 405, 282 T_Saveconfigdir = 406, 283 T_Server = 407, 284 T_Setvar = 408, 285 T_Source = 409, 286 T_Stacksize = 410, 287 T_Statistics = 411, 288 T_Stats = 412, 289 T_Statsdir = 413, 290 T_Step = 414, 291 T_Stepback = 415, 292 T_Stepfwd = 416, 293 T_Stepout = 417, 294 T_Stratum = 418, 295 T_String = 419, 296 T_Sys = 420, 297 T_Sysstats = 421, 298 T_Tick = 422, 299 T_Time1 = 423, 300 T_Time2 = 424, 301 T_Timer = 425, 302 T_Timingstats = 426, 303 T_Tinker = 427, 304 T_Tos = 428, 305 T_Trap = 429, 306 T_True = 430, 307 T_Trustedkey = 431, 308 T_Ttl = 432, 309 T_Type = 433, 310 T_U_int = 434, 311 T_UEcrypto = 435, 312 T_UEcryptonak = 436, 313 T_UEdigest = 437, 314 T_Unconfig = 438, 315 T_Unpeer = 439, 316 T_Version = 440, 317 T_WanderThreshold = 441, 318 T_Week = 442, 319 T_Wildcard = 443, 320 T_Xleave = 444, 321 T_Year = 445, 322 T_Flag = 446, 323 T_EOC = 447, 324 T_Simulate = 448, 325 T_Beep_Delay = 449, 326 T_Sim_Duration = 450, 327 T_Server_Offset = 451, 328 T_Duration = 452, 329 T_Freq_Offset = 453, 330 T_Wander = 454, 331 T_Jitter = 455, 332 T_Prop_Delay = 456, 333 T_Proc_Delay = 457 334 }; 335#endif 336/* Tokens. */ 337#define T_Abbrev 258 338#define T_Age 259 339#define T_All 260 340#define T_Allan 261 341#define T_Allpeers 262 342#define T_Auth 263 343#define T_Autokey 264 344#define T_Automax 265 345#define T_Average 266 346#define T_Basedate 267 347#define T_Bclient 268 348#define T_Bcpollbstep 269 349#define T_Beacon 270 350#define T_Broadcast 271 351#define T_Broadcastclient 272 352#define T_Broadcastdelay 273 353#define T_Burst 274 354#define T_Calibrate 275 355#define T_Ceiling 276 356#define T_Clockstats 277 357#define T_Cohort 278 358#define T_ControlKey 279 359#define T_Crypto 280 360#define T_Cryptostats 281 361#define T_Ctl 282 362#define T_Day 283 363#define T_Default 284 364#define T_Digest 285 365#define T_Disable 286 366#define T_Discard 287 367#define T_Dispersion 288 368#define T_Double 289 369#define T_Driftfile 290 370#define T_Drop 291 371#define T_Dscp 292 372#define T_Ellipsis 293 373#define T_Enable 294 374#define T_End 295 375#define T_Epeer 296 376#define T_False 297 377#define T_File 298 378#define T_Filegen 299 379#define T_Filenum 300 380#define T_Flag1 301 381#define T_Flag2 302 382#define T_Flag3 303 383#define T_Flag4 304 384#define T_Flake 305 385#define T_Floor 306 386#define T_Freq 307 387#define T_Fudge 308 388#define T_Host 309 389#define T_Huffpuff 310 390#define T_Iburst 311 391#define T_Ident 312 392#define T_Ignore 313 393#define T_Incalloc 314 394#define T_Incmem 315 395#define T_Initalloc 316 396#define T_Initmem 317 397#define T_Includefile 318 398#define T_Integer 319 399#define T_Interface 320 400#define T_Intrange 321 401#define T_Io 322 402#define T_Ippeerlimit 323 403#define T_Ipv4 324 404#define T_Ipv4_flag 325 405#define T_Ipv6 326 406#define T_Ipv6_flag 327 407#define T_Kernel 328 408#define T_Key 329 409#define T_Keys 330 410#define T_Keysdir 331 411#define T_Kod 332 412#define T_Mssntp 333 413#define T_Leapfile 334 414#define T_Leapsmearinterval 335 415#define T_Limited 336 416#define T_Link 337 417#define T_Listen 338 418#define T_Logconfig 339 419#define T_Logfile 340 420#define T_Loopstats 341 421#define T_Lowpriotrap 342 422#define T_Manycastclient 343 423#define T_Manycastserver 344 424#define T_Mask 345 425#define T_Maxage 346 426#define T_Maxclock 347 427#define T_Maxdepth 348 428#define T_Maxdist 349 429#define T_Maxmem 350 430#define T_Maxpoll 351 431#define T_Mdnstries 352 432#define T_Mem 353 433#define T_Memlock 354 434#define T_Minclock 355 435#define T_Mindepth 356 436#define T_Mindist 357 437#define T_Minimum 358 438#define T_Minpoll 359 439#define T_Minsane 360 440#define T_Mode 361 441#define T_Mode7 362 442#define T_Monitor 363 443#define T_Month 364 444#define T_Mru 365 445#define T_Multicastclient 366 446#define T_Nic 367 447#define T_Nolink 368 448#define T_Nomodify 369 449#define T_Nomrulist 370 450#define T_None 371 451#define T_Nonvolatile 372 452#define T_Noepeer 373 453#define T_Nopeer 374 454#define T_Noquery 375 455#define T_Noselect 376 456#define T_Noserve 377 457#define T_Notrap 378 458#define T_Notrust 379 459#define T_Ntp 380 460#define T_Ntpport 381 461#define T_NtpSignDsocket 382 462#define T_Orphan 383 463#define T_Orphanwait 384 464#define T_PCEdigest 385 465#define T_Panic 386 466#define T_Peer 387 467#define T_Peerstats 388 468#define T_Phone 389 469#define T_Pid 390 470#define T_Pidfile 391 471#define T_Pool 392 472#define T_Port 393 473#define T_Preempt 394 474#define T_Prefer 395 475#define T_Protostats 396 476#define T_Pw 397 477#define T_Randfile 398 478#define T_Rawstats 399 479#define T_Refid 400 480#define T_Requestkey 401 481#define T_Reset 402 482#define T_Restrict 403 483#define T_Revoke 404 484#define T_Rlimit 405 485#define T_Saveconfigdir 406 486#define T_Server 407 487#define T_Setvar 408 488#define T_Source 409 489#define T_Stacksize 410 490#define T_Statistics 411 491#define T_Stats 412 492#define T_Statsdir 413 493#define T_Step 414 494#define T_Stepback 415 495#define T_Stepfwd 416 496#define T_Stepout 417 497#define T_Stratum 418 498#define T_String 419 499#define T_Sys 420 500#define T_Sysstats 421 501#define T_Tick 422 502#define T_Time1 423 503#define T_Time2 424 504#define T_Timer 425 505#define T_Timingstats 426 506#define T_Tinker 427 507#define T_Tos 428 508#define T_Trap 429 509#define T_True 430 510#define T_Trustedkey 431 511#define T_Ttl 432 512#define T_Type 433 513#define T_U_int 434 514#define T_UEcrypto 435 515#define T_UEcryptonak 436 516#define T_UEdigest 437 517#define T_Unconfig 438 518#define T_Unpeer 439 519#define T_Version 440 520#define T_WanderThreshold 441 521#define T_Week 442 522#define T_Wildcard 443 523#define T_Xleave 444 524#define T_Year 445 525#define T_Flag 446 526#define T_EOC 447 527#define T_Simulate 448 528#define T_Beep_Delay 449 529#define T_Sim_Duration 450 530#define T_Server_Offset 451 531#define T_Duration 452 532#define T_Freq_Offset 453 533#define T_Wander 454 534#define T_Jitter 455 535#define T_Prop_Delay 456 536#define T_Proc_Delay 457 537 538/* Value type. */ 539#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 540 541union YYSTYPE 542{ 543#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:355 */ 544 545 char * String; 546 double Double; 547 int Integer; 548 unsigned U_int; 549 gen_fifo * Generic_fifo; 550 attr_val * Attr_val; 551 attr_val_fifo * Attr_val_fifo; 552 int_fifo * Int_fifo; 553 string_fifo * String_fifo; 554 address_node * Address_node; 555 address_fifo * Address_fifo; 556 setvar_node * Set_var; 557 server_info * Sim_server; 558 server_info_fifo * Sim_server_fifo; 559 script_info * Sim_script; 560 script_info_fifo * Sim_script_fifo; 561 562#line 563 "ntp_parser.c" /* yacc.c:355 */ 563}; 564 565typedef union YYSTYPE YYSTYPE; 566# define YYSTYPE_IS_TRIVIAL 1 567# define YYSTYPE_IS_DECLARED 1 568#endif 569 570 571extern YYSTYPE yylval; 572 573int yyparse (void); 574 575#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */ 576 577/* Copy the second part of user declarations. */ 578 579#line 580 "ntp_parser.c" /* yacc.c:358 */ 580 581#ifdef short 582# undef short 583#endif 584 585#ifdef YYTYPE_UINT8 586typedef YYTYPE_UINT8 yytype_uint8; 587#else 588typedef unsigned char yytype_uint8; 589#endif 590 591#ifdef YYTYPE_INT8 592typedef YYTYPE_INT8 yytype_int8; 593#else 594typedef signed char yytype_int8; 595#endif 596 597#ifdef YYTYPE_UINT16 598typedef YYTYPE_UINT16 yytype_uint16; 599#else 600typedef unsigned short int yytype_uint16; 601#endif 602 603#ifdef YYTYPE_INT16 604typedef YYTYPE_INT16 yytype_int16; 605#else 606typedef short int yytype_int16; 607#endif 608 609#ifndef YYSIZE_T 610# ifdef __SIZE_TYPE__ 611# define YYSIZE_T __SIZE_TYPE__ 612# elif defined size_t 613# define YYSIZE_T size_t 614# elif ! defined YYSIZE_T 615# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 616# define YYSIZE_T size_t 617# else 618# define YYSIZE_T unsigned int 619# endif 620#endif 621 622#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 623 624#ifndef YY_ 625# if defined YYENABLE_NLS && YYENABLE_NLS 626# if ENABLE_NLS 627# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 628# define YY_(Msgid) dgettext ("bison-runtime", Msgid) 629# endif 630# endif 631# ifndef YY_ 632# define YY_(Msgid) Msgid 633# endif 634#endif 635 636#ifndef YY_ATTRIBUTE 637# if (defined __GNUC__ \ 638 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 639 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 640# define YY_ATTRIBUTE(Spec) __attribute__(Spec) 641# else 642# define YY_ATTRIBUTE(Spec) /* empty */ 643# endif 644#endif 645 646#ifndef YY_ATTRIBUTE_PURE 647# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 648#endif 649 650#ifndef YY_ATTRIBUTE_UNUSED 651# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 652#endif 653 654#if !defined _Noreturn \ 655 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 656# if defined _MSC_VER && 1200 <= _MSC_VER 657# define _Noreturn __declspec (noreturn) 658# else 659# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 660# endif 661#endif 662 663/* Suppress unused-variable warnings by "using" E. */ 664#if ! defined lint || defined __GNUC__ 665# define YYUSE(E) ((void) (E)) 666#else 667# define YYUSE(E) /* empty */ 668#endif 669 670#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 671/* Suppress an incorrect diagnostic about yylval being uninitialized. */ 672# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 673 _Pragma ("GCC diagnostic push") \ 674 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 675 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 676# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 677 _Pragma ("GCC diagnostic pop") 678#else 679# define YY_INITIAL_VALUE(Value) Value 680#endif 681#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 682# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 683# define YY_IGNORE_MAYBE_UNINITIALIZED_END 684#endif 685#ifndef YY_INITIAL_VALUE 686# define YY_INITIAL_VALUE(Value) /* Nothing. */ 687#endif 688 689 690#if ! defined yyoverflow || YYERROR_VERBOSE 691 692/* The parser invokes alloca or malloc; define the necessary symbols. */ 693 694# ifdef YYSTACK_USE_ALLOCA 695# if YYSTACK_USE_ALLOCA 696# ifdef __GNUC__ 697# define YYSTACK_ALLOC __builtin_alloca 698# elif defined __BUILTIN_VA_ARG_INCR 699# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 700# elif defined _AIX 701# define YYSTACK_ALLOC __alloca 702# elif defined _MSC_VER 703# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 704# define alloca _alloca 705# else 706# define YYSTACK_ALLOC alloca 707# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 708# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 709 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 710# ifndef EXIT_SUCCESS 711# define EXIT_SUCCESS 0 712# endif 713# endif 714# endif 715# endif 716# endif 717 718# ifdef YYSTACK_ALLOC 719 /* Pacify GCC's 'empty if-body' warning. */ 720# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 721# ifndef YYSTACK_ALLOC_MAXIMUM 722 /* The OS might guarantee only one guard page at the bottom of the stack, 723 and a page size can be as small as 4096 bytes. So we cannot safely 724 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 725 to allow for a few compiler-allocated temporary stack slots. */ 726# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 727# endif 728# else 729# define YYSTACK_ALLOC YYMALLOC 730# define YYSTACK_FREE YYFREE 731# ifndef YYSTACK_ALLOC_MAXIMUM 732# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 733# endif 734# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 735 && ! ((defined YYMALLOC || defined malloc) \ 736 && (defined YYFREE || defined free))) 737# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 738# ifndef EXIT_SUCCESS 739# define EXIT_SUCCESS 0 740# endif 741# endif 742# ifndef YYMALLOC 743# define YYMALLOC malloc 744# if ! defined malloc && ! defined EXIT_SUCCESS 745void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 746# endif 747# endif 748# ifndef YYFREE 749# define YYFREE free 750# if ! defined free && ! defined EXIT_SUCCESS 751void free (void *); /* INFRINGES ON USER NAME SPACE */ 752# endif 753# endif 754# endif 755#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 756 757 758#if (! defined yyoverflow \ 759 && (! defined __cplusplus \ 760 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 761 762/* A type that is properly aligned for any stack member. */ 763union yyalloc 764{ 765 yytype_int16 yyss_alloc; 766 YYSTYPE yyvs_alloc; 767}; 768 769/* The size of the maximum gap between one aligned stack and the next. */ 770# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 771 772/* The size of an array large to enough to hold all stacks, each with 773 N elements. */ 774# define YYSTACK_BYTES(N) \ 775 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 776 + YYSTACK_GAP_MAXIMUM) 777 778# define YYCOPY_NEEDED 1 779 780/* Relocate STACK from its old location to the new one. The 781 local variables YYSIZE and YYSTACKSIZE give the old and new number of 782 elements in the stack, and YYPTR gives the new location of the 783 stack. Advance YYPTR to a properly aligned location for the next 784 stack. */ 785# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 786 do \ 787 { \ 788 YYSIZE_T yynewbytes; \ 789 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 790 Stack = &yyptr->Stack_alloc; \ 791 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 792 yyptr += yynewbytes / sizeof (*yyptr); \ 793 } \ 794 while (0) 795 796#endif 797 798#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 799/* Copy COUNT objects from SRC to DST. The source and destination do 800 not overlap. */ 801# ifndef YYCOPY 802# if defined __GNUC__ && 1 < __GNUC__ 803# define YYCOPY(Dst, Src, Count) \ 804 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 805# else 806# define YYCOPY(Dst, Src, Count) \ 807 do \ 808 { \ 809 YYSIZE_T yyi; \ 810 for (yyi = 0; yyi < (Count); yyi++) \ 811 (Dst)[yyi] = (Src)[yyi]; \ 812 } \ 813 while (0) 814# endif 815# endif 816#endif /* !YYCOPY_NEEDED */ 817 818/* YYFINAL -- State number of the termination state. */ 819#define YYFINAL 216 820/* YYLAST -- Last index in YYTABLE. */ 821#define YYLAST 662 822 823/* YYNTOKENS -- Number of terminals. */ 824#define YYNTOKENS 208 825/* YYNNTS -- Number of nonterminals. */ 826#define YYNNTS 107 827/* YYNRULES -- Number of rules. */ 828#define YYNRULES 324 829/* YYNSTATES -- Number of states. */ 830#define YYNSTATES 436 831 832/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned 833 by yylex, with out-of-bounds checking. */ 834#define YYUNDEFTOK 2 835#define YYMAXUTOK 457 836 837#define YYTRANSLATE(YYX) \ 838 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 839 840/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 841 as returned by yylex, without out-of-bounds checking. */ 842static const yytype_uint8 yytranslate[] = 843{ 844 0, 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 204, 205, 2, 2, 2, 2, 2, 2, 2, 2, 849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 850 2, 203, 2, 2, 2, 2, 2, 2, 2, 2, 851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 856 2, 2, 2, 206, 2, 207, 2, 2, 2, 2, 857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 865 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 869 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 870 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 871 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 872 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 873 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 874 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 875 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 876 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 877 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 878 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 879 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 880 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 881 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 882 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 883 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 884 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 885 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 886 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 887 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 888 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 889 195, 196, 197, 198, 199, 200, 201, 202 890}; 891 892#if YYDEBUG 893 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 894static const yytype_uint16 yyrline[] = 895{ 896 0, 377, 377, 381, 382, 383, 398, 399, 400, 401, 897 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 898 419, 429, 430, 431, 432, 433, 437, 438, 443, 448, 899 450, 456, 457, 465, 466, 467, 471, 476, 477, 478, 900 479, 480, 481, 482, 483, 487, 489, 494, 495, 496, 901 497, 498, 499, 503, 508, 517, 527, 528, 538, 540, 902 542, 544, 555, 562, 564, 569, 571, 573, 575, 577, 903 587, 593, 594, 602, 604, 616, 617, 618, 619, 620, 904 629, 634, 639, 647, 649, 651, 653, 658, 659, 660, 905 661, 662, 663, 664, 665, 666, 670, 671, 680, 682, 906 691, 701, 706, 714, 715, 716, 717, 718, 719, 720, 907 721, 726, 727, 735, 745, 754, 769, 774, 775, 779, 908 780, 784, 785, 786, 787, 788, 789, 790, 799, 803, 909 807, 815, 823, 831, 846, 861, 874, 875, 895, 896, 910 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 911 914, 915, 916, 917, 918, 919, 920, 924, 929, 937, 912 942, 943, 944, 948, 953, 961, 966, 967, 968, 969, 913 970, 971, 972, 973, 981, 991, 996, 1004, 1006, 1008, 914 1017, 1019, 1024, 1025, 1029, 1030, 1031, 1032, 1040, 1045, 915 1050, 1058, 1063, 1064, 1065, 1074, 1076, 1081, 1086, 1094, 916 1096, 1113, 1114, 1115, 1116, 1117, 1118, 1122, 1123, 1124, 917 1125, 1126, 1127, 1135, 1140, 1145, 1153, 1158, 1159, 1160, 918 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1176, 1177, 1178, 919 1185, 1192, 1199, 1215, 1234, 1236, 1238, 1240, 1242, 1244, 920 1251, 1256, 1257, 1258, 1262, 1266, 1275, 1276, 1280, 1281, 921 1282, 1286, 1297, 1315, 1327, 1332, 1334, 1339, 1340, 1348, 922 1350, 1358, 1363, 1371, 1396, 1403, 1413, 1414, 1418, 1419, 923 1420, 1421, 1425, 1426, 1427, 1431, 1436, 1441, 1449, 1450, 924 1451, 1452, 1453, 1454, 1455, 1465, 1470, 1478, 1483, 1491, 925 1493, 1497, 1502, 1507, 1515, 1520, 1528, 1537, 1538, 1542, 926 1543, 1547, 1555, 1573, 1577, 1582, 1590, 1595, 1596, 1600, 927 1605, 1613, 1618, 1623, 1628, 1633, 1641, 1646, 1651, 1659, 928 1664, 1665, 1666, 1667, 1668 929}; 930#endif 931 932#if YYDEBUG || YYERROR_VERBOSE || 1 933/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 934 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 935static const char *const yytname[] = 936{ 937 "$end", "error", "$undefined", "T_Abbrev", "T_Age", "T_All", "T_Allan", 938 "T_Allpeers", "T_Auth", "T_Autokey", "T_Automax", "T_Average", 939 "T_Basedate", "T_Bclient", "T_Bcpollbstep", "T_Beacon", "T_Broadcast", 940 "T_Broadcastclient", "T_Broadcastdelay", "T_Burst", "T_Calibrate", 941 "T_Ceiling", "T_Clockstats", "T_Cohort", "T_ControlKey", "T_Crypto", 942 "T_Cryptostats", "T_Ctl", "T_Day", "T_Default", "T_Digest", "T_Disable", 943 "T_Discard", "T_Dispersion", "T_Double", "T_Driftfile", "T_Drop", 944 "T_Dscp", "T_Ellipsis", "T_Enable", "T_End", "T_Epeer", "T_False", 945 "T_File", "T_Filegen", "T_Filenum", "T_Flag1", "T_Flag2", "T_Flag3", 946 "T_Flag4", "T_Flake", "T_Floor", "T_Freq", "T_Fudge", "T_Host", 947 "T_Huffpuff", "T_Iburst", "T_Ident", "T_Ignore", "T_Incalloc", 948 "T_Incmem", "T_Initalloc", "T_Initmem", "T_Includefile", "T_Integer", 949 "T_Interface", "T_Intrange", "T_Io", "T_Ippeerlimit", "T_Ipv4", 950 "T_Ipv4_flag", "T_Ipv6", "T_Ipv6_flag", "T_Kernel", "T_Key", "T_Keys", 951 "T_Keysdir", "T_Kod", "T_Mssntp", "T_Leapfile", "T_Leapsmearinterval", 952 "T_Limited", "T_Link", "T_Listen", "T_Logconfig", "T_Logfile", 953 "T_Loopstats", "T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver", 954 "T_Mask", "T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist", 955 "T_Maxmem", "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock", 956 "T_Minclock", "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll", 957 "T_Minsane", "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru", 958 "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist", 959 "T_None", "T_Nonvolatile", "T_Noepeer", "T_Nopeer", "T_Noquery", 960 "T_Noselect", "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport", 961 "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_PCEdigest", "T_Panic", 962 "T_Peer", "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", 963 "T_Port", "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile", 964 "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict", 965 "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar", 966 "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir", 967 "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum", 968 "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", 969 "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True", 970 "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_UEcrypto", 971 "T_UEcryptonak", "T_UEdigest", "T_Unconfig", "T_Unpeer", "T_Version", 972 "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year", 973 "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration", 974 "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter", 975 "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'", 976 "$accept", "configuration", "command_list", "command", "server_command", 977 "client_type", "address", "ip_address", "address_fam", "option_list", 978 "option", "option_flag", "option_flag_keyword", "option_int", 979 "option_int_keyword", "option_str", "option_str_keyword", 980 "unpeer_command", "unpeer_keyword", "other_mode_command", 981 "authentication_command", "crypto_command_list", "crypto_command", 982 "crypto_str_keyword", "orphan_mode_command", "tos_option_list", 983 "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword", 984 "monitoring_command", "stats_list", "stat", "filegen_option_list", 985 "filegen_option", "link_nolink", "enable_disable", "filegen_type", 986 "access_control_command", "res_ippeerlimit", "ac_flag_list", 987 "access_control_flag", "discard_option_list", "discard_option", 988 "discard_option_keyword", "mru_option_list", "mru_option", 989 "mru_option_keyword", "fudge_command", "fudge_factor_list", 990 "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword", 991 "rlimit_command", "rlimit_option_list", "rlimit_option", 992 "rlimit_option_keyword", "system_option_command", "system_option_list", 993 "system_option", "system_option_flag_keyword", 994 "system_option_local_flag_keyword", "tinker_command", 995 "tinker_option_list", "tinker_option", "tinker_option_keyword", 996 "miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_int_keyword", 997 "misc_cmd_str_keyword", "misc_cmd_str_lcl_keyword", "drift_parm", 998 "variable_assign", "t_default_or_zero", "trap_option_list", 999 "trap_option", "log_config_list", "log_config_command", 1000 "interface_command", "interface_nic", "nic_rule_class", 1001 "nic_rule_action", "reset_command", "counter_set_list", 1002 "counter_set_keyword", "integer_list", "integer_list_range", 1003 "integer_list_range_elt", "integer_range", "string_list", "address_list", 1004 "boolean", "number", "basedate", "simulate_command", "sim_conf_start", 1005 "sim_init_statement_list", "sim_init_statement", "sim_init_keyword", 1006 "sim_server_list", "sim_server", "sim_server_offset", "sim_server_name", 1007 "sim_act_list", "sim_act", "sim_act_stmt_list", "sim_act_stmt", 1008 "sim_act_keyword", YY_NULLPTR 1009}; 1010#endif 1011 1012# ifdef YYPRINT 1013/* YYTOKNUM[NUM] -- (External) token number corresponding to the 1014 (internal) symbol number NUM (which must be that of a token). */ 1015static const yytype_uint16 yytoknum[] = 1016{ 1017 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 1018 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1019 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1020 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 1021 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 1022 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 1023 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 1024 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 1025 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 1026 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 1027 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 1028 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 1029 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 1030 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 1031 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 1032 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 1033 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 1034 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 1035 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 1036 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 1037 455, 456, 457, 61, 40, 41, 123, 125 1038}; 1039# endif 1040 1041#define YYPACT_NINF -215 1042 1043#define yypact_value_is_default(Yystate) \ 1044 (!!((Yystate) == (-215))) 1045 1046#define YYTABLE_NINF -7 1047 1048#define yytable_value_is_error(Yytable_value) \ 1049 0 1050 1051 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1052 STATE-NUM. */ 1053static const yytype_int16 yypact[] = 1054{ 1055 11, -175, 2, -215, -215, -215, 3, -215, 93, 9, 1056 -138, -215, 93, -215, 66, -40, -215, -93, -215, -87, 1057 -82, -215, -215, -81, -215, -215, -40, 20, 210, -40, 1058 -215, -215, -70, -215, -67, -215, -215, 34, 6, -13, 1059 47, -6, -215, -215, -48, 66, -45, -215, 412, 483, 1060 -39, -60, 62, -215, -215, -215, 127, 203, -63, -215, 1061 -40, -215, -40, -215, -215, -215, -215, -215, -215, -215, 1062 -215, -215, -215, -11, 75, -24, -22, -215, -18, -215, 1063 -215, -53, -215, -215, -215, 48, -215, -215, -215, -215, 1064 -215, -215, -215, -215, -215, -215, -215, -215, 93, -215, 1065 -215, -215, -215, -215, -215, 9, -215, 82, 120, -215, 1066 93, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1067 -215, -215, -215, 86, -215, 4, 373, -215, -215, -215, 1068 -81, -215, -215, -40, -215, -215, -215, -215, -215, -215, 1069 -215, -215, -215, 210, -215, 106, -40, -215, -215, 15, 1070 -215, -215, -215, -215, -215, -215, -215, -215, 6, -215, 1071 105, 146, 151, 105, -30, -215, -215, -215, -215, -6, 1072 -215, 117, -21, -215, 66, -215, -215, -215, -215, -215, 1073 -215, -215, -215, -215, -215, -215, -215, 412, -215, -11, 1074 22, -215, -215, -215, -20, -215, -215, -215, -215, -215, 1075 -215, -215, -215, 483, -215, 128, -11, -215, -215, -215, 1076 129, -60, -215, -215, -215, 132, -215, 10, -215, -215, 1077 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1078 1, -133, -215, -215, -215, -215, -215, 134, -215, 41, 1079 -215, -215, -215, -215, -28, 42, -215, -215, -215, -215, 1080 45, 148, -215, -215, 86, -215, -11, -20, -215, -215, 1081 -215, -215, -215, -215, -215, -215, 150, -215, 105, 105, 1082 -215, -39, -215, -215, -215, 51, -215, -215, -215, -215, 1083 -215, -215, -215, -215, -215, -215, -215, -57, 178, -215, 1084 -215, -215, 288, -215, -215, -215, -215, -215, -215, -215, 1085 -215, -115, 25, 23, -215, -215, -215, -215, 61, -215, 1086 -215, 21, -215, -215, -215, -215, -215, -215, -215, -215, 1087 -215, -215, 477, -215, -215, 477, 105, 477, 201, -39, 1088 169, -215, 172, -215, -215, -215, -215, -215, -215, -215, 1089 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1090 -215, -215, -59, -215, 77, 36, 52, -100, -215, 39, 1091 -215, -11, -215, -215, -215, -215, -215, -215, -215, -215, 1092 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1093 -215, -215, -215, -215, -215, -215, -215, -215, -215, 477, 1094 477, -215, -215, -215, -215, -215, 43, -215, -215, -215, 1095 -40, -215, -215, -215, 55, -215, 477, -215, -215, 49, 1096 56, -11, 54, -166, -215, 67, -11, -215, -215, -215, 1097 70, 63, -215, -215, -215, -215, -215, 124, 85, 64, 1098 -215, 89, -215, -11, -215, -215 1099}; 1100 1101 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 1102 Performed when YYTABLE does not specify something else to do. Zero 1103 means the default is an error. */ 1104static const yytype_uint16 yydefact[] = 1105{ 1106 0, 0, 0, 24, 58, 241, 0, 71, 0, 0, 1107 253, 244, 0, 234, 0, 0, 246, 0, 266, 0, 1108 0, 247, 245, 0, 248, 25, 0, 0, 0, 0, 1109 267, 242, 0, 23, 0, 249, 22, 0, 0, 0, 1110 0, 0, 250, 21, 0, 0, 0, 243, 0, 0, 1111 0, 0, 0, 56, 57, 303, 0, 2, 0, 7, 1112 0, 8, 0, 9, 10, 13, 11, 12, 14, 15, 1113 16, 17, 18, 0, 0, 0, 0, 227, 0, 228, 1114 19, 0, 5, 62, 63, 64, 201, 202, 203, 204, 1115 207, 205, 206, 208, 209, 210, 211, 212, 196, 198, 1116 199, 200, 160, 161, 162, 128, 158, 0, 251, 235, 1117 195, 103, 104, 105, 106, 110, 107, 108, 109, 111, 1118 29, 30, 28, 0, 26, 0, 6, 65, 66, 263, 1119 236, 262, 295, 59, 61, 166, 167, 168, 169, 170, 1120 171, 172, 173, 129, 164, 0, 60, 70, 293, 237, 1121 67, 278, 279, 280, 281, 282, 283, 284, 275, 277, 1122 136, 29, 30, 136, 136, 68, 194, 192, 193, 188, 1123 190, 0, 0, 238, 98, 102, 99, 217, 218, 219, 1124 220, 221, 222, 223, 224, 225, 226, 213, 215, 0, 1125 0, 87, 88, 89, 0, 90, 91, 97, 92, 96, 1126 93, 94, 95, 80, 82, 0, 0, 86, 257, 289, 1127 0, 69, 288, 290, 286, 240, 1, 0, 4, 31, 1128 55, 300, 299, 229, 230, 231, 232, 274, 273, 272, 1129 0, 0, 79, 75, 76, 77, 78, 0, 72, 0, 1130 197, 157, 159, 252, 100, 0, 184, 185, 186, 187, 1131 0, 0, 182, 183, 174, 176, 0, 0, 27, 233, 1132 261, 294, 163, 165, 292, 276, 0, 138, 136, 136, 1133 138, 0, 138, 189, 191, 0, 101, 214, 216, 301, 1134 298, 296, 297, 85, 81, 83, 84, 239, 0, 287, 1135 285, 3, 20, 268, 269, 270, 265, 271, 264, 307, 1136 308, 0, 0, 0, 74, 73, 120, 119, 0, 117, 1137 118, 0, 112, 115, 116, 180, 181, 179, 175, 177, 1138 178, 137, 132, 138, 138, 135, 136, 130, 256, 0, 1139 0, 258, 0, 37, 38, 39, 54, 47, 49, 48, 1140 51, 40, 41, 42, 43, 50, 52, 44, 32, 33, 1141 36, 34, 0, 35, 0, 0, 0, 0, 310, 0, 1142 305, 0, 113, 127, 123, 125, 121, 122, 124, 126, 1143 114, 140, 141, 142, 143, 144, 145, 146, 148, 149, 1144 147, 150, 151, 152, 153, 154, 155, 156, 139, 133, 1145 134, 138, 255, 254, 260, 259, 0, 45, 46, 53, 1146 0, 304, 302, 309, 0, 306, 131, 291, 313, 0, 1147 0, 0, 0, 0, 315, 0, 0, 311, 314, 312, 1148 0, 0, 320, 321, 322, 323, 324, 0, 0, 0, 1149 316, 0, 318, 0, 317, 319 1150}; 1151 1152 /* YYPGOTO[NTERM-NUM]. */ 1153static const yytype_int16 yypgoto[] = 1154{ 1155 -215, -215, -215, -23, -215, -215, -15, -49, -215, -215, 1156 -215, -215, -215, -215, -215, -215, -215, -215, -215, -215, 1157 -215, -215, -215, -215, -215, -215, 81, -215, -215, -215, 1158 -215, -38, -215, -215, -215, -215, -215, -215, -154, -214, 1159 -215, -215, 153, -215, -215, 142, -215, -215, -215, 32, 1160 -215, -215, -215, -215, 121, -215, -215, 277, -35, -215, 1161 -215, -215, -215, 107, -215, -215, -215, -215, -215, -215, 1162 -215, -215, -215, -215, -215, -215, 163, -215, -215, -215, 1163 -215, -215, -215, 137, -215, -215, 87, -215, -215, 267, 1164 53, -187, -215, -215, -215, -215, -2, -215, -215, -55, 1165 -215, -215, -215, -109, -215, -121, -215 1166}; 1167 1168 /* YYDEFGOTO[NTERM-NUM]. */ 1169static const yytype_int16 yydefgoto[] = 1170{ 1171 -1, 56, 57, 58, 59, 60, 132, 124, 125, 292, 1172 348, 349, 350, 351, 352, 353, 354, 61, 62, 63, 1173 64, 85, 238, 239, 65, 203, 204, 205, 206, 66, 1174 174, 119, 244, 312, 313, 314, 370, 67, 267, 322, 1175 388, 105, 106, 107, 143, 144, 145, 68, 254, 255, 1176 256, 257, 69, 169, 170, 171, 70, 98, 99, 100, 1177 101, 71, 187, 188, 189, 72, 73, 74, 75, 76, 1178 109, 173, 393, 287, 331, 130, 131, 77, 78, 298, 1179 230, 79, 158, 159, 215, 211, 212, 213, 149, 133, 1180 283, 223, 207, 80, 81, 301, 302, 303, 357, 358, 1181 410, 359, 413, 414, 427, 428, 429 1182}; 1183 1184 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 1185 positive, shift that token. If negative, reduce the rule whose 1186 number is the opposite. If YYTABLE_NINF, syntax error. */ 1187static const yytype_int16 yytable[] = 1188{ 1189 123, 208, 278, 306, 209, 397, 293, 175, 329, 270, 1190 272, 307, 1, 151, 152, 308, 160, 82, 227, 286, 1191 102, 2, 280, 221, 164, 363, 108, 3, 4, 5, 1192 120, 412, 121, 153, 217, 6, 7, 355, 266, 166, 1193 228, 417, 8, 9, 281, 219, 10, 220, 11, 364, 1194 12, 13, 355, 222, 309, 14, 325, 161, 327, 162, 1195 271, 299, 300, 240, 15, 229, 83, 84, 16, 319, 1196 294, 126, 295, 154, 17, 240, 18, 127, 232, 299, 1197 300, 330, 128, 129, 134, 310, 19, 20, 111, 245, 1198 21, 22, 112, 167, 147, 23, 24, 148, 150, 25, 1199 26, 86, 233, 259, 155, 234, 87, 402, 27, 389, 1200 390, 165, 103, 88, 323, 324, 172, 104, 261, 176, 1201 398, 28, 29, 30, 122, 122, 214, 216, 31, 218, 1202 365, 261, 246, 247, 248, 249, 276, 366, 32, 224, 1203 225, 163, 226, 33, 210, 34, 242, 35, 36, 168, 1204 311, 122, 113, 231, 243, 282, 367, 37, 38, 39, 1205 40, 41, 42, 43, 44, 296, 89, 45, 258, 46, 1206 263, 156, 391, 266, 405, 268, 157, 406, 47, 264, 1207 269, 274, 275, 48, 49, 50, 279, 51, 52, 297, 1208 235, 236, 285, 288, 53, 54, 290, 237, 304, 114, 1209 90, 91, 291, -6, 55, 305, 315, 115, 368, 316, 1210 116, 369, 317, 2, 321, 328, 332, 360, 92, 3, 1211 4, 5, 326, 93, 415, 362, 361, 6, 7, 420, 1212 392, 250, 117, 395, 8, 9, 396, 118, 10, 400, 1213 11, 399, 12, 13, 401, 404, 435, 14, 407, 251, 1214 94, 409, 411, 412, 252, 253, 15, 416, 241, 419, 1215 16, 422, 423, 424, 425, 426, 17, 433, 18, 135, 1216 136, 137, 138, 95, 96, 97, 421, 432, 19, 20, 1217 394, 434, 21, 22, 284, 262, 318, 23, 24, 110, 1218 273, 25, 26, 260, 277, 265, 146, 333, 289, 356, 1219 27, 139, 403, 140, 418, 141, 431, 334, 0, 0, 1220 320, 142, 0, 28, 29, 30, 0, 0, 0, 0, 1221 31, 0, 422, 423, 424, 425, 426, 0, 0, 0, 1222 32, 430, 0, 0, 0, 33, 0, 34, 0, 35, 1223 36, 0, 0, 0, 335, 336, 0, 0, 0, 37, 1224 38, 39, 40, 41, 42, 43, 44, 0, 0, 45, 1225 0, 46, 337, 0, 0, 0, 0, 0, 0, 0, 1226 47, 0, 0, 0, 0, 48, 49, 50, 0, 51, 1227 52, 0, 0, 2, 338, 408, 53, 54, 0, 3, 1228 4, 5, 339, 0, 340, -6, 55, 6, 7, 0, 1229 0, 0, 0, 0, 8, 9, 0, 0, 10, 341, 1230 11, 0, 12, 13, 0, 0, 0, 14, 177, 0, 1231 0, 0, 0, 0, 0, 0, 15, 342, 343, 0, 1232 16, 0, 0, 0, 0, 0, 17, 0, 18, 0, 1233 0, 0, 0, 0, 0, 178, 0, 0, 19, 20, 1234 0, 0, 21, 22, 0, 0, 0, 23, 24, 0, 1235 0, 25, 26, 344, 179, 345, 0, 180, 0, 0, 1236 27, 0, 0, 346, 0, 0, 0, 347, 0, 0, 1237 0, 0, 0, 28, 29, 30, 0, 0, 0, 0, 1238 31, 0, 0, 0, 0, 190, 0, 191, 192, 0, 1239 32, 0, 0, 0, 193, 33, 194, 34, 0, 35, 1240 36, 0, 0, 0, 0, 0, 0, 0, 371, 37, 1241 38, 39, 40, 41, 42, 43, 44, 372, 0, 45, 1242 0, 46, 0, 0, 195, 373, 0, 0, 0, 0, 1243 47, 0, 0, 181, 0, 48, 49, 50, 0, 51, 1244 52, 0, 0, 0, 374, 375, 53, 54, 376, 0, 1245 0, 0, 0, 0, 377, 0, 55, 0, 0, 0, 1246 0, 182, 183, 184, 185, 196, 0, 197, 0, 186, 1247 0, 0, 0, 198, 0, 199, 0, 0, 200, 0, 1248 0, 378, 379, 0, 0, 380, 381, 382, 0, 383, 1249 384, 385, 0, 386, 0, 0, 0, 0, 0, 0, 1250 0, 201, 202, 0, 0, 0, 0, 0, 0, 0, 1251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1255 0, 0, 387 1256}; 1257 1258static const yytype_int16 yycheck[] = 1259{ 1260 15, 50, 189, 31, 64, 64, 5, 45, 65, 163, 1261 164, 39, 1, 7, 8, 43, 29, 192, 36, 206, 1262 11, 10, 42, 34, 39, 4, 164, 16, 17, 18, 1263 70, 197, 72, 27, 57, 24, 25, 152, 68, 45, 1264 58, 207, 31, 32, 64, 60, 35, 62, 37, 28, 1265 39, 40, 152, 64, 82, 44, 270, 70, 272, 72, 1266 90, 194, 195, 98, 53, 83, 64, 64, 57, 256, 1267 69, 164, 71, 67, 63, 110, 65, 164, 30, 194, 1268 195, 138, 164, 164, 64, 113, 75, 76, 22, 3, 1269 79, 80, 26, 99, 164, 84, 85, 164, 64, 88, 1270 89, 8, 54, 126, 98, 57, 13, 207, 97, 323, 1271 324, 64, 103, 20, 268, 269, 164, 108, 133, 164, 1272 179, 110, 111, 112, 164, 164, 64, 0, 117, 192, 1273 109, 146, 46, 47, 48, 49, 174, 116, 127, 64, 1274 164, 154, 164, 132, 204, 134, 64, 136, 137, 155, 1275 178, 164, 86, 206, 34, 175, 135, 146, 147, 148, 1276 149, 150, 151, 152, 153, 164, 73, 156, 164, 158, 1277 64, 165, 326, 68, 361, 29, 170, 391, 167, 164, 1278 29, 64, 203, 172, 173, 174, 164, 176, 177, 188, 1279 142, 143, 64, 64, 183, 184, 64, 149, 64, 133, 1280 107, 108, 192, 192, 193, 164, 164, 141, 187, 164, 1281 144, 190, 64, 10, 64, 164, 38, 192, 125, 16, 1282 17, 18, 271, 130, 411, 164, 203, 24, 25, 416, 1283 29, 145, 166, 64, 31, 32, 64, 171, 35, 203, 1284 37, 164, 39, 40, 192, 206, 433, 44, 205, 163, 1285 157, 196, 203, 197, 168, 169, 53, 203, 105, 192, 1286 57, 198, 199, 200, 201, 202, 63, 203, 65, 59, 1287 60, 61, 62, 180, 181, 182, 206, 192, 75, 76, 1288 329, 192, 79, 80, 203, 143, 254, 84, 85, 12, 1289 169, 88, 89, 130, 187, 158, 29, 9, 211, 301, 1290 97, 91, 357, 93, 413, 95, 427, 19, -1, -1, 1291 257, 101, -1, 110, 111, 112, -1, -1, -1, -1, 1292 117, -1, 198, 199, 200, 201, 202, -1, -1, -1, 1293 127, 207, -1, -1, -1, 132, -1, 134, -1, 136, 1294 137, -1, -1, -1, 56, 57, -1, -1, -1, 146, 1295 147, 148, 149, 150, 151, 152, 153, -1, -1, 156, 1296 -1, 158, 74, -1, -1, -1, -1, -1, -1, -1, 1297 167, -1, -1, -1, -1, 172, 173, 174, -1, 176, 1298 177, -1, -1, 10, 96, 400, 183, 184, -1, 16, 1299 17, 18, 104, -1, 106, 192, 193, 24, 25, -1, 1300 -1, -1, -1, -1, 31, 32, -1, -1, 35, 121, 1301 37, -1, 39, 40, -1, -1, -1, 44, 6, -1, 1302 -1, -1, -1, -1, -1, -1, 53, 139, 140, -1, 1303 57, -1, -1, -1, -1, -1, 63, -1, 65, -1, 1304 -1, -1, -1, -1, -1, 33, -1, -1, 75, 76, 1305 -1, -1, 79, 80, -1, -1, -1, 84, 85, -1, 1306 -1, 88, 89, 175, 52, 177, -1, 55, -1, -1, 1307 97, -1, -1, 185, -1, -1, -1, 189, -1, -1, 1308 -1, -1, -1, 110, 111, 112, -1, -1, -1, -1, 1309 117, -1, -1, -1, -1, 12, -1, 14, 15, -1, 1310 127, -1, -1, -1, 21, 132, 23, 134, -1, 136, 1311 137, -1, -1, -1, -1, -1, -1, -1, 41, 146, 1312 147, 148, 149, 150, 151, 152, 153, 50, -1, 156, 1313 -1, 158, -1, -1, 51, 58, -1, -1, -1, -1, 1314 167, -1, -1, 131, -1, 172, 173, 174, -1, 176, 1315 177, -1, -1, -1, 77, 78, 183, 184, 81, -1, 1316 -1, -1, -1, -1, 87, -1, 193, -1, -1, -1, 1317 -1, 159, 160, 161, 162, 92, -1, 94, -1, 167, 1318 -1, -1, -1, 100, -1, 102, -1, -1, 105, -1, 1319 -1, 114, 115, -1, -1, 118, 119, 120, -1, 122, 1320 123, 124, -1, 126, -1, -1, -1, -1, -1, -1, 1321 -1, 128, 129, -1, -1, -1, -1, -1, -1, -1, 1322 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1325 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1326 -1, -1, 185 1327}; 1328 1329 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1330 symbol of state STATE-NUM. */ 1331static const yytype_uint16 yystos[] = 1332{ 1333 0, 1, 10, 16, 17, 18, 24, 25, 31, 32, 1334 35, 37, 39, 40, 44, 53, 57, 63, 65, 75, 1335 76, 79, 80, 84, 85, 88, 89, 97, 110, 111, 1336 112, 117, 127, 132, 134, 136, 137, 146, 147, 148, 1337 149, 150, 151, 152, 153, 156, 158, 167, 172, 173, 1338 174, 176, 177, 183, 184, 193, 209, 210, 211, 212, 1339 213, 225, 226, 227, 228, 232, 237, 245, 255, 260, 1340 264, 269, 273, 274, 275, 276, 277, 285, 286, 289, 1341 301, 302, 192, 64, 64, 229, 8, 13, 20, 73, 1342 107, 108, 125, 130, 157, 180, 181, 182, 265, 266, 1343 267, 268, 11, 103, 108, 249, 250, 251, 164, 278, 1344 265, 22, 26, 86, 133, 141, 144, 166, 171, 239, 1345 70, 72, 164, 214, 215, 216, 164, 164, 164, 164, 1346 283, 284, 214, 297, 64, 59, 60, 61, 62, 91, 1347 93, 95, 101, 252, 253, 254, 297, 164, 164, 296, 1348 64, 7, 8, 27, 67, 98, 165, 170, 290, 291, 1349 29, 70, 72, 154, 214, 64, 45, 99, 155, 261, 1350 262, 263, 164, 279, 238, 239, 164, 6, 33, 52, 1351 55, 131, 159, 160, 161, 162, 167, 270, 271, 272, 1352 12, 14, 15, 21, 23, 51, 92, 94, 100, 102, 1353 105, 128, 129, 233, 234, 235, 236, 300, 215, 64, 1354 204, 293, 294, 295, 64, 292, 0, 211, 192, 214, 1355 214, 34, 64, 299, 64, 164, 164, 36, 58, 83, 1356 288, 206, 30, 54, 57, 142, 143, 149, 230, 231, 1357 266, 250, 64, 34, 240, 3, 46, 47, 48, 49, 1358 145, 163, 168, 169, 256, 257, 258, 259, 164, 211, 1359 284, 214, 253, 64, 164, 291, 68, 246, 29, 29, 1360 246, 90, 246, 262, 64, 203, 239, 271, 299, 164, 1361 42, 64, 175, 298, 234, 64, 299, 281, 64, 294, 1362 64, 192, 217, 5, 69, 71, 164, 188, 287, 194, 1363 195, 303, 304, 305, 64, 164, 31, 39, 43, 82, 1364 113, 178, 241, 242, 243, 164, 164, 64, 257, 299, 1365 298, 64, 247, 246, 246, 247, 215, 247, 164, 65, 1366 138, 282, 38, 9, 19, 56, 57, 74, 96, 104, 1367 106, 121, 139, 140, 175, 177, 185, 189, 218, 219, 1368 220, 221, 222, 223, 224, 152, 304, 306, 307, 309, 1369 192, 203, 164, 4, 28, 109, 116, 135, 187, 190, 1370 244, 41, 50, 58, 77, 78, 81, 87, 114, 115, 1371 118, 119, 120, 122, 123, 124, 126, 185, 248, 247, 1372 247, 246, 29, 280, 215, 64, 64, 64, 179, 164, 1373 203, 192, 207, 307, 206, 299, 247, 205, 214, 196, 1374 308, 203, 197, 310, 311, 299, 203, 207, 311, 192, 1375 299, 206, 198, 199, 200, 201, 202, 312, 313, 314, 1376 207, 313, 192, 203, 192, 299 1377}; 1378 1379 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 1380static const yytype_uint16 yyr1[] = 1381{ 1382 0, 208, 209, 210, 210, 210, 211, 211, 211, 211, 1383 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 1384 212, 213, 213, 213, 213, 213, 214, 214, 215, 216, 1385 216, 217, 217, 218, 218, 218, 219, 220, 220, 220, 1386 220, 220, 220, 220, 220, 221, 221, 222, 222, 222, 1387 222, 222, 222, 223, 224, 225, 226, 226, 227, 227, 1388 227, 227, 228, 228, 228, 228, 228, 228, 228, 228, 1389 228, 229, 229, 230, 230, 231, 231, 231, 231, 231, 1390 232, 233, 233, 234, 234, 234, 234, 235, 235, 235, 1391 235, 235, 235, 235, 235, 235, 236, 236, 237, 237, 1392 237, 238, 238, 239, 239, 239, 239, 239, 239, 239, 1393 239, 240, 240, 241, 241, 241, 241, 242, 242, 243, 1394 243, 244, 244, 244, 244, 244, 244, 244, 245, 245, 1395 245, 245, 245, 245, 245, 245, 246, 246, 247, 247, 1396 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 1397 248, 248, 248, 248, 248, 248, 248, 249, 249, 250, 1398 251, 251, 251, 252, 252, 253, 254, 254, 254, 254, 1399 254, 254, 254, 254, 255, 256, 256, 257, 257, 257, 1400 257, 257, 258, 258, 259, 259, 259, 259, 260, 261, 1401 261, 262, 263, 263, 263, 264, 264, 265, 265, 266, 1402 266, 267, 267, 267, 267, 267, 267, 268, 268, 268, 1403 268, 268, 268, 269, 270, 270, 271, 272, 272, 272, 1404 272, 272, 272, 272, 272, 272, 272, 273, 273, 273, 1405 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 1406 273, 274, 274, 274, 275, 275, 276, 276, 277, 277, 1407 277, 278, 278, 278, 279, 280, 280, 281, 281, 282, 1408 282, 283, 283, 284, 285, 285, 286, 286, 287, 287, 1409 287, 287, 288, 288, 288, 289, 290, 290, 291, 291, 1410 291, 291, 291, 291, 291, 292, 292, 293, 293, 294, 1411 294, 295, 296, 296, 297, 297, 298, 298, 298, 299, 1412 299, 300, 301, 302, 303, 303, 304, 305, 305, 306, 1413 306, 307, 308, 309, 310, 310, 311, 312, 312, 313, 1414 314, 314, 314, 314, 314 1415}; 1416 1417 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 1418static const yytype_uint8 yyr2[] = 1419{ 1420 0, 2, 1, 3, 2, 2, 0, 1, 1, 1, 1421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1422 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1423 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1424 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1425 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1427 2, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1428 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 1429 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1430 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1431 1, 0, 2, 2, 2, 1, 1, 1, 1, 1, 1432 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1433 4, 6, 4, 5, 5, 4, 0, 2, 0, 2, 1434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1435 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1436 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1437 1, 1, 1, 1, 3, 2, 1, 2, 2, 2, 1438 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1439 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1441 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1442 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1443 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 1444 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1445 1, 1, 2, 0, 4, 1, 0, 0, 2, 2, 1446 2, 2, 1, 1, 3, 3, 1, 1, 1, 1, 1447 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1448 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1449 1, 5, 2, 1, 2, 1, 1, 1, 1, 1, 1450 1, 2, 5, 1, 3, 2, 3, 1, 1, 2, 1451 1, 5, 4, 3, 2, 1, 6, 3, 2, 3, 1452 1, 1, 1, 1, 1 1453}; 1454 1455 1456#define yyerrok (yyerrstatus = 0) 1457#define yyclearin (yychar = YYEMPTY) 1458#define YYEMPTY (-2) 1459#define YYEOF 0 1460 1461#define YYACCEPT goto yyacceptlab 1462#define YYABORT goto yyabortlab 1463#define YYERROR goto yyerrorlab 1464 1465 1466#define YYRECOVERING() (!!yyerrstatus) 1467 1468#define YYBACKUP(Token, Value) \ 1469do \ 1470 if (yychar == YYEMPTY) \ 1471 { \ 1472 yychar = (Token); \ 1473 yylval = (Value); \ 1474 YYPOPSTACK (yylen); \ 1475 yystate = *yyssp; \ 1476 goto yybackup; \ 1477 } \ 1478 else \ 1479 { \ 1480 yyerror (YY_("syntax error: cannot back up")); \ 1481 YYERROR; \ 1482 } \ 1483while (0) 1484 1485/* Error token number */ 1486#define YYTERROR 1 1487#define YYERRCODE 256 1488 1489 1490 1491/* Enable debugging if requested. */ 1492#if YYDEBUG 1493 1494# ifndef YYFPRINTF 1495# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1496# define YYFPRINTF fprintf 1497# endif 1498 1499# define YYDPRINTF(Args) \ 1500do { \ 1501 if (yydebug) \ 1502 YYFPRINTF Args; \ 1503} while (0) 1504 1505/* This macro is provided for backward compatibility. */ 1506#ifndef YY_LOCATION_PRINT 1507# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1508#endif 1509 1510 1511# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1512do { \ 1513 if (yydebug) \ 1514 { \ 1515 YYFPRINTF (stderr, "%s ", Title); \ 1516 yy_symbol_print (stderr, \ 1517 Type, Value); \ 1518 YYFPRINTF (stderr, "\n"); \ 1519 } \ 1520} while (0) 1521 1522 1523/*----------------------------------------. 1524| Print this symbol's value on YYOUTPUT. | 1525`----------------------------------------*/ 1526 1527static void 1528yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1529{ 1530 FILE *yyo = yyoutput; 1531 YYUSE (yyo); 1532 if (!yyvaluep) 1533 return; 1534# ifdef YYPRINT 1535 if (yytype < YYNTOKENS) 1536 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1537# endif 1538 YYUSE (yytype); 1539} 1540 1541 1542/*--------------------------------. 1543| Print this symbol on YYOUTPUT. | 1544`--------------------------------*/ 1545 1546static void 1547yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1548{ 1549 YYFPRINTF (yyoutput, "%s %s (", 1550 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 1551 1552 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1553 YYFPRINTF (yyoutput, ")"); 1554} 1555 1556/*------------------------------------------------------------------. 1557| yy_stack_print -- Print the state stack from its BOTTOM up to its | 1558| TOP (included). | 1559`------------------------------------------------------------------*/ 1560 1561static void 1562yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1563{ 1564 YYFPRINTF (stderr, "Stack now"); 1565 for (; yybottom <= yytop; yybottom++) 1566 { 1567 int yybot = *yybottom; 1568 YYFPRINTF (stderr, " %d", yybot); 1569 } 1570 YYFPRINTF (stderr, "\n"); 1571} 1572 1573# define YY_STACK_PRINT(Bottom, Top) \ 1574do { \ 1575 if (yydebug) \ 1576 yy_stack_print ((Bottom), (Top)); \ 1577} while (0) 1578 1579 1580/*------------------------------------------------. 1581| Report that the YYRULE is going to be reduced. | 1582`------------------------------------------------*/ 1583 1584static void 1585yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 1586{ 1587 unsigned long int yylno = yyrline[yyrule]; 1588 int yynrhs = yyr2[yyrule]; 1589 int yyi; 1590 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1591 yyrule - 1, yylno); 1592 /* The symbols being reduced. */ 1593 for (yyi = 0; yyi < yynrhs; yyi++) 1594 { 1595 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1596 yy_symbol_print (stderr, 1597 yystos[yyssp[yyi + 1 - yynrhs]], 1598 &(yyvsp[(yyi + 1) - (yynrhs)]) 1599 ); 1600 YYFPRINTF (stderr, "\n"); 1601 } 1602} 1603 1604# define YY_REDUCE_PRINT(Rule) \ 1605do { \ 1606 if (yydebug) \ 1607 yy_reduce_print (yyssp, yyvsp, Rule); \ 1608} while (0) 1609 1610/* Nonzero means print parse trace. It is left uninitialized so that 1611 multiple parsers can coexist. */ 1612int yydebug; 1613#else /* !YYDEBUG */ 1614# define YYDPRINTF(Args) 1615# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1616# define YY_STACK_PRINT(Bottom, Top) 1617# define YY_REDUCE_PRINT(Rule) 1618#endif /* !YYDEBUG */ 1619 1620 1621/* YYINITDEPTH -- initial size of the parser's stacks. */ 1622#ifndef YYINITDEPTH 1623# define YYINITDEPTH 200 1624#endif 1625 1626/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1627 if the built-in stack extension method is used). 1628 1629 Do not make this value too large; the results are undefined if 1630 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1631 evaluated with infinite-precision integer arithmetic. */ 1632 1633#ifndef YYMAXDEPTH 1634# define YYMAXDEPTH 10000 1635#endif 1636 1637 1638#if YYERROR_VERBOSE 1639 1640# ifndef yystrlen 1641# if defined __GLIBC__ && defined _STRING_H 1642# define yystrlen strlen 1643# else 1644/* Return the length of YYSTR. */ 1645static YYSIZE_T 1646yystrlen (const char *yystr) 1647{ 1648 YYSIZE_T yylen; 1649 for (yylen = 0; yystr[yylen]; yylen++) 1650 continue; 1651 return yylen; 1652} 1653# endif 1654# endif 1655 1656# ifndef yystpcpy 1657# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1658# define yystpcpy stpcpy 1659# else 1660/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1661 YYDEST. */ 1662static char * 1663yystpcpy (char *yydest, const char *yysrc) 1664{ 1665 char *yyd = yydest; 1666 const char *yys = yysrc; 1667 1668 while ((*yyd++ = *yys++) != '\0') 1669 continue; 1670 1671 return yyd - 1; 1672} 1673# endif 1674# endif 1675 1676# ifndef yytnamerr 1677/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1678 quotes and backslashes, so that it's suitable for yyerror. The 1679 heuristic is that double-quoting is unnecessary unless the string 1680 contains an apostrophe, a comma, or backslash (other than 1681 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1682 null, do not copy; instead, return the length of what the result 1683 would have been. */ 1684static YYSIZE_T 1685yytnamerr (char *yyres, const char *yystr) 1686{ 1687 if (*yystr == '"') 1688 { 1689 YYSIZE_T yyn = 0; 1690 char const *yyp = yystr; 1691 1692 for (;;) 1693 switch (*++yyp) 1694 { 1695 case '\'': 1696 case ',': 1697 goto do_not_strip_quotes; 1698 1699 case '\\': 1700 if (*++yyp != '\\') 1701 goto do_not_strip_quotes; 1702 /* Fall through. */ 1703 default: 1704 if (yyres) 1705 yyres[yyn] = *yyp; 1706 yyn++; 1707 break; 1708 1709 case '"': 1710 if (yyres) 1711 yyres[yyn] = '\0'; 1712 return yyn; 1713 } 1714 do_not_strip_quotes: ; 1715 } 1716 1717 if (! yyres) 1718 return yystrlen (yystr); 1719 1720 return yystpcpy (yyres, yystr) - yyres; 1721} 1722# endif 1723 1724/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1725 about the unexpected token YYTOKEN for the state stack whose top is 1726 YYSSP. 1727 1728 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1729 not large enough to hold the message. In that case, also set 1730 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1731 required number of bytes is too large to store. */ 1732static int 1733yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1734 yytype_int16 *yyssp, int yytoken) 1735{ 1736 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 1737 YYSIZE_T yysize = yysize0; 1738 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1739 /* Internationalized format string. */ 1740 const char *yyformat = YY_NULLPTR; 1741 /* Arguments of yyformat. */ 1742 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1743 /* Number of reported tokens (one for the "unexpected", one per 1744 "expected"). */ 1745 int yycount = 0; 1746 1747 /* There are many possibilities here to consider: 1748 - If this state is a consistent state with a default action, then 1749 the only way this function was invoked is if the default action 1750 is an error action. In that case, don't check for expected 1751 tokens because there are none. 1752 - The only way there can be no lookahead present (in yychar) is if 1753 this state is a consistent state with a default action. Thus, 1754 detecting the absence of a lookahead is sufficient to determine 1755 that there is no unexpected or expected token to report. In that 1756 case, just report a simple "syntax error". 1757 - Don't assume there isn't a lookahead just because this state is a 1758 consistent state with a default action. There might have been a 1759 previous inconsistent state, consistent state with a non-default 1760 action, or user semantic action that manipulated yychar. 1761 - Of course, the expected token list depends on states to have 1762 correct lookahead information, and it depends on the parser not 1763 to perform extra reductions after fetching a lookahead from the 1764 scanner and before detecting a syntax error. Thus, state merging 1765 (from LALR or IELR) and default reductions corrupt the expected 1766 token list. However, the list is correct for canonical LR with 1767 one exception: it will still contain any token that will not be 1768 accepted due to an error action in a later state. 1769 */ 1770 if (yytoken != YYEMPTY) 1771 { 1772 int yyn = yypact[*yyssp]; 1773 yyarg[yycount++] = yytname[yytoken]; 1774 if (!yypact_value_is_default (yyn)) 1775 { 1776 /* Start YYX at -YYN if negative to avoid negative indexes in 1777 YYCHECK. In other words, skip the first -YYN actions for 1778 this state because they are default actions. */ 1779 int yyxbegin = yyn < 0 ? -yyn : 0; 1780 /* Stay within bounds of both yycheck and yytname. */ 1781 int yychecklim = YYLAST - yyn + 1; 1782 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1783 int yyx; 1784 1785 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1786 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1787 && !yytable_value_is_error (yytable[yyx + yyn])) 1788 { 1789 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1790 { 1791 yycount = 1; 1792 yysize = yysize0; 1793 break; 1794 } 1795 yyarg[yycount++] = yytname[yyx]; 1796 { 1797 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 1798 if (! (yysize <= yysize1 1799 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1800 return 2; 1801 yysize = yysize1; 1802 } 1803 } 1804 } 1805 } 1806 1807 switch (yycount) 1808 { 1809# define YYCASE_(N, S) \ 1810 case N: \ 1811 yyformat = S; \ 1812 break 1813 YYCASE_(0, YY_("syntax error")); 1814 YYCASE_(1, YY_("syntax error, unexpected %s")); 1815 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1816 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1817 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1818 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1819# undef YYCASE_ 1820 } 1821 1822 { 1823 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1824 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1825 return 2; 1826 yysize = yysize1; 1827 } 1828 1829 if (*yymsg_alloc < yysize) 1830 { 1831 *yymsg_alloc = 2 * yysize; 1832 if (! (yysize <= *yymsg_alloc 1833 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1834 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1835 return 1; 1836 } 1837 1838 /* Avoid sprintf, as that infringes on the user's name space. 1839 Don't have undefined behavior even if the translation 1840 produced a string with the wrong number of "%s"s. */ 1841 { 1842 char *yyp = *yymsg; 1843 int yyi = 0; 1844 while ((*yyp = *yyformat) != '\0') 1845 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1846 { 1847 yyp += yytnamerr (yyp, yyarg[yyi++]); 1848 yyformat += 2; 1849 } 1850 else 1851 { 1852 yyp++; 1853 yyformat++; 1854 } 1855 } 1856 return 0; 1857} 1858#endif /* YYERROR_VERBOSE */ 1859 1860/*-----------------------------------------------. 1861| Release the memory associated to this symbol. | 1862`-----------------------------------------------*/ 1863 1864static void 1865yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1866{ 1867 YYUSE (yyvaluep); 1868 if (!yymsg) 1869 yymsg = "Deleting"; 1870 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1871 1872 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1873 YYUSE (yytype); 1874 YY_IGNORE_MAYBE_UNINITIALIZED_END 1875} 1876 1877 1878 1879 1880/* The lookahead symbol. */ 1881int yychar; 1882 1883/* The semantic value of the lookahead symbol. */ 1884YYSTYPE yylval; 1885/* Number of syntax errors so far. */ 1886int yynerrs; 1887 1888 1889/*----------. 1890| yyparse. | 1891`----------*/ 1892 1893int 1894yyparse (void) 1895{ 1896 int yystate; 1897 /* Number of tokens to shift before error messages enabled. */ 1898 int yyerrstatus; 1899 1900 /* The stacks and their tools: 1901 'yyss': related to states. 1902 'yyvs': related to semantic values. 1903 1904 Refer to the stacks through separate pointers, to allow yyoverflow 1905 to reallocate them elsewhere. */ 1906 1907 /* The state stack. */ 1908 yytype_int16 yyssa[YYINITDEPTH]; 1909 yytype_int16 *yyss; 1910 yytype_int16 *yyssp; 1911 1912 /* The semantic value stack. */ 1913 YYSTYPE yyvsa[YYINITDEPTH]; 1914 YYSTYPE *yyvs; 1915 YYSTYPE *yyvsp; 1916 1917 YYSIZE_T yystacksize; 1918 1919 int yyn; 1920 int yyresult; 1921 /* Lookahead token as an internal (translated) token number. */ 1922 int yytoken = 0; 1923 /* The variables used to return semantic value and location from the 1924 action routines. */ 1925 YYSTYPE yyval; 1926 1927#if YYERROR_VERBOSE 1928 /* Buffer for error messages, and its allocated size. */ 1929 char yymsgbuf[128]; 1930 char *yymsg = yymsgbuf; 1931 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1932#endif 1933 1934#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1935 1936 /* The number of symbols on the RHS of the reduced rule. 1937 Keep to zero when no symbol should be popped. */ 1938 int yylen = 0; 1939 1940 yyssp = yyss = yyssa; 1941 yyvsp = yyvs = yyvsa; 1942 yystacksize = YYINITDEPTH; 1943 1944 YYDPRINTF ((stderr, "Starting parse\n")); 1945 1946 yystate = 0; 1947 yyerrstatus = 0; 1948 yynerrs = 0; 1949 yychar = YYEMPTY; /* Cause a token to be read. */ 1950 goto yysetstate; 1951 1952/*------------------------------------------------------------. 1953| yynewstate -- Push a new state, which is found in yystate. | 1954`------------------------------------------------------------*/ 1955 yynewstate: 1956 /* In all cases, when you get here, the value and location stacks 1957 have just been pushed. So pushing a state here evens the stacks. */ 1958 yyssp++; 1959 1960 yysetstate: 1961 *yyssp = yystate; 1962 1963 if (yyss + yystacksize - 1 <= yyssp) 1964 { 1965 /* Get the current used size of the three stacks, in elements. */ 1966 YYSIZE_T yysize = yyssp - yyss + 1; 1967 1968#ifdef yyoverflow 1969 { 1970 /* Give user a chance to reallocate the stack. Use copies of 1971 these so that the &'s don't force the real ones into 1972 memory. */ 1973 YYSTYPE *yyvs1 = yyvs; 1974 yytype_int16 *yyss1 = yyss; 1975 1976 /* Each stack pointer address is followed by the size of the 1977 data in use in that stack, in bytes. This used to be a 1978 conditional around just the two extra args, but that might 1979 be undefined if yyoverflow is a macro. */ 1980 yyoverflow (YY_("memory exhausted"), 1981 &yyss1, yysize * sizeof (*yyssp), 1982 &yyvs1, yysize * sizeof (*yyvsp), 1983 &yystacksize); 1984 1985 yyss = yyss1; 1986 yyvs = yyvs1; 1987 } 1988#else /* no yyoverflow */ 1989# ifndef YYSTACK_RELOCATE 1990 goto yyexhaustedlab; 1991# else 1992 /* Extend the stack our own way. */ 1993 if (YYMAXDEPTH <= yystacksize) 1994 goto yyexhaustedlab; 1995 yystacksize *= 2; 1996 if (YYMAXDEPTH < yystacksize) 1997 yystacksize = YYMAXDEPTH; 1998 1999 { 2000 yytype_int16 *yyss1 = yyss; 2001 union yyalloc *yyptr = 2002 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 2003 if (! yyptr) 2004 goto yyexhaustedlab; 2005 YYSTACK_RELOCATE (yyss_alloc, yyss); 2006 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 2007# undef YYSTACK_RELOCATE 2008 if (yyss1 != yyssa) 2009 YYSTACK_FREE (yyss1); 2010 } 2011# endif 2012#endif /* no yyoverflow */ 2013 2014 yyssp = yyss + yysize - 1; 2015 yyvsp = yyvs + yysize - 1; 2016 2017 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 2018 (unsigned long int) yystacksize)); 2019 2020 if (yyss + yystacksize - 1 <= yyssp) 2021 YYABORT; 2022 } 2023 2024 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 2025 2026 if (yystate == YYFINAL) 2027 YYACCEPT; 2028 2029 goto yybackup; 2030 2031/*-----------. 2032| yybackup. | 2033`-----------*/ 2034yybackup: 2035 2036 /* Do appropriate processing given the current state. Read a 2037 lookahead token if we need one and don't already have one. */ 2038 2039 /* First try to decide what to do without reference to lookahead token. */ 2040 yyn = yypact[yystate]; 2041 if (yypact_value_is_default (yyn)) 2042 goto yydefault; 2043 2044 /* Not known => get a lookahead token if don't already have one. */ 2045 2046 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2047 if (yychar == YYEMPTY) 2048 { 2049 YYDPRINTF ((stderr, "Reading a token: ")); 2050 yychar = yylex (); 2051 } 2052 2053 if (yychar <= YYEOF) 2054 { 2055 yychar = yytoken = YYEOF; 2056 YYDPRINTF ((stderr, "Now at end of input.\n")); 2057 } 2058 else 2059 { 2060 yytoken = YYTRANSLATE (yychar); 2061 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 2062 } 2063 2064 /* If the proper action on seeing token YYTOKEN is to reduce or to 2065 detect an error, take that action. */ 2066 yyn += yytoken; 2067 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2068 goto yydefault; 2069 yyn = yytable[yyn]; 2070 if (yyn <= 0) 2071 { 2072 if (yytable_value_is_error (yyn)) 2073 goto yyerrlab; 2074 yyn = -yyn; 2075 goto yyreduce; 2076 } 2077 2078 /* Count tokens shifted since error; after three, turn off error 2079 status. */ 2080 if (yyerrstatus) 2081 yyerrstatus--; 2082 2083 /* Shift the lookahead token. */ 2084 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2085 2086 /* Discard the shifted token. */ 2087 yychar = YYEMPTY; 2088 2089 yystate = yyn; 2090 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 2091 *++yyvsp = yylval; 2092 YY_IGNORE_MAYBE_UNINITIALIZED_END 2093 2094 goto yynewstate; 2095 2096 2097/*-----------------------------------------------------------. 2098| yydefault -- do the default action for the current state. | 2099`-----------------------------------------------------------*/ 2100yydefault: 2101 yyn = yydefact[yystate]; 2102 if (yyn == 0) 2103 goto yyerrlab; 2104 goto yyreduce; 2105 2106 2107/*-----------------------------. 2108| yyreduce -- Do a reduction. | 2109`-----------------------------*/ 2110yyreduce: 2111 /* yyn is the number of a rule to reduce with. */ 2112 yylen = yyr2[yyn]; 2113 2114 /* If YYLEN is nonzero, implement the default value of the action: 2115 '$$ = $1'. 2116 2117 Otherwise, the following line sets YYVAL to garbage. 2118 This behavior is undocumented and Bison 2119 users should not rely upon it. Assigning to YYVAL 2120 unconditionally makes the parser a bit smaller, and it avoids a 2121 GCC warning that YYVAL may be used uninitialized. */ 2122 yyval = yyvsp[1-yylen]; 2123 2124 2125 YY_REDUCE_PRINT (yyn); 2126 switch (yyn) 2127 { 2128 case 5: 2129#line 384 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2130 { 2131 /* I will need to incorporate much more fine grained 2132 * error messages. The following should suffice for 2133 * the time being. 2134 */ 2135 struct FILE_INFO * ip_ctx = lex_current(); 2136 msyslog(LOG_ERR, 2137 "syntax error in %s line %d, column %d", 2138 ip_ctx->fname, 2139 ip_ctx->errpos.nline, 2140 ip_ctx->errpos.ncol); 2141 } 2142#line 2143 "ntp_parser.c" /* yacc.c:1646 */ 2143 break; 2144 2145 case 20: 2146#line 420 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2147 { 2148 peer_node *my_node; 2149 2150 my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); 2151 APPEND_G_FIFO(cfgt.peers, my_node); 2152 } 2153#line 2154 "ntp_parser.c" /* yacc.c:1646 */ 2154 break; 2155 2156 case 27: 2157#line 439 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2158 { (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); } 2159#line 2160 "ntp_parser.c" /* yacc.c:1646 */ 2160 break; 2161 2162 case 28: 2163#line 444 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2164 { (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); } 2165#line 2166 "ntp_parser.c" /* yacc.c:1646 */ 2166 break; 2167 2168 case 29: 2169#line 449 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2170 { (yyval.Integer) = AF_INET; } 2171#line 2172 "ntp_parser.c" /* yacc.c:1646 */ 2172 break; 2173 2174 case 30: 2175#line 451 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2176 { (yyval.Integer) = AF_INET6; } 2177#line 2178 "ntp_parser.c" /* yacc.c:1646 */ 2178 break; 2179 2180 case 31: 2181#line 456 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2182 { (yyval.Attr_val_fifo) = NULL; } 2183#line 2184 "ntp_parser.c" /* yacc.c:1646 */ 2184 break; 2185 2186 case 32: 2187#line 458 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2188 { 2189 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2190 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2191 } 2192#line 2193 "ntp_parser.c" /* yacc.c:1646 */ 2193 break; 2194 2195 case 36: 2196#line 472 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2197 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } 2198#line 2199 "ntp_parser.c" /* yacc.c:1646 */ 2199 break; 2200 2201 case 45: 2202#line 488 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2203 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2204#line 2205 "ntp_parser.c" /* yacc.c:1646 */ 2205 break; 2206 2207 case 46: 2208#line 490 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2209 { (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2210#line 2211 "ntp_parser.c" /* yacc.c:1646 */ 2211 break; 2212 2213 case 53: 2214#line 504 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2215 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } 2216#line 2217 "ntp_parser.c" /* yacc.c:1646 */ 2217 break; 2218 2219 case 55: 2220#line 518 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2221 { 2222 unpeer_node *my_node; 2223 2224 my_node = create_unpeer_node((yyvsp[0].Address_node)); 2225 if (my_node) 2226 APPEND_G_FIFO(cfgt.unpeers, my_node); 2227 } 2228#line 2229 "ntp_parser.c" /* yacc.c:1646 */ 2229 break; 2230 2231 case 58: 2232#line 539 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2233 { cfgt.broadcastclient = 1; } 2234#line 2235 "ntp_parser.c" /* yacc.c:1646 */ 2235 break; 2236 2237 case 59: 2238#line 541 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2239 { CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); } 2240#line 2241 "ntp_parser.c" /* yacc.c:1646 */ 2241 break; 2242 2243 case 60: 2244#line 543 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2245 { CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); } 2246#line 2247 "ntp_parser.c" /* yacc.c:1646 */ 2247 break; 2248 2249 case 61: 2250#line 545 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2251 { cfgt.mdnstries = (yyvsp[0].Integer); } 2252#line 2253 "ntp_parser.c" /* yacc.c:1646 */ 2253 break; 2254 2255 case 62: 2256#line 556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2257 { 2258 attr_val *atrv; 2259 2260 atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); 2261 APPEND_G_FIFO(cfgt.vars, atrv); 2262 } 2263#line 2264 "ntp_parser.c" /* yacc.c:1646 */ 2264 break; 2265 2266 case 63: 2267#line 563 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2268 { cfgt.auth.control_key = (yyvsp[0].Integer); } 2269#line 2270 "ntp_parser.c" /* yacc.c:1646 */ 2270 break; 2271 2272 case 64: 2273#line 565 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2274 { 2275 cfgt.auth.cryptosw++; 2276 CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo)); 2277 } 2278#line 2279 "ntp_parser.c" /* yacc.c:1646 */ 2279 break; 2280 2281 case 65: 2282#line 570 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2283 { cfgt.auth.keys = (yyvsp[0].String); } 2284#line 2285 "ntp_parser.c" /* yacc.c:1646 */ 2285 break; 2286 2287 case 66: 2288#line 572 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2289 { cfgt.auth.keysdir = (yyvsp[0].String); } 2290#line 2291 "ntp_parser.c" /* yacc.c:1646 */ 2291 break; 2292 2293 case 67: 2294#line 574 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2295 { cfgt.auth.request_key = (yyvsp[0].Integer); } 2296#line 2297 "ntp_parser.c" /* yacc.c:1646 */ 2297 break; 2298 2299 case 68: 2300#line 576 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2301 { cfgt.auth.revoke = (yyvsp[0].Integer); } 2302#line 2303 "ntp_parser.c" /* yacc.c:1646 */ 2303 break; 2304 2305 case 69: 2306#line 578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2307 { 2308 /* [Bug 948] leaves it open if appending or 2309 * replacing the trusted key list is the right 2310 * way. In any case, either alternative should 2311 * be coded correctly! 2312 */ 2313 DESTROY_G_FIFO(cfgt.auth.trusted_key_list, destroy_attr_val); /* remove for append */ 2314 CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, (yyvsp[0].Attr_val_fifo)); 2315 } 2316#line 2317 "ntp_parser.c" /* yacc.c:1646 */ 2317 break; 2318 2319 case 70: 2320#line 588 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2321 { cfgt.auth.ntp_signd_socket = (yyvsp[0].String); } 2322#line 2323 "ntp_parser.c" /* yacc.c:1646 */ 2323 break; 2324 2325 case 71: 2326#line 593 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2327 { (yyval.Attr_val_fifo) = NULL; } 2328#line 2329 "ntp_parser.c" /* yacc.c:1646 */ 2329 break; 2330 2331 case 72: 2332#line 595 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2333 { 2334 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2335 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2336 } 2337#line 2338 "ntp_parser.c" /* yacc.c:1646 */ 2338 break; 2339 2340 case 73: 2341#line 603 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2342 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } 2343#line 2344 "ntp_parser.c" /* yacc.c:1646 */ 2344 break; 2345 2346 case 74: 2347#line 605 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2348 { 2349 (yyval.Attr_val) = NULL; 2350 cfgt.auth.revoke = (yyvsp[0].Integer); 2351 msyslog(LOG_WARNING, 2352 "'crypto revoke %d' is deprecated, " 2353 "please use 'revoke %d' instead.", 2354 cfgt.auth.revoke, cfgt.auth.revoke); 2355 } 2356#line 2357 "ntp_parser.c" /* yacc.c:1646 */ 2357 break; 2358 2359 case 80: 2360#line 630 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2361 { CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); } 2362#line 2363 "ntp_parser.c" /* yacc.c:1646 */ 2363 break; 2364 2365 case 81: 2366#line 635 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2367 { 2368 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2369 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2370 } 2371#line 2372 "ntp_parser.c" /* yacc.c:1646 */ 2372 break; 2373 2374 case 82: 2375#line 640 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2376 { 2377 (yyval.Attr_val_fifo) = NULL; 2378 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2379 } 2380#line 2381 "ntp_parser.c" /* yacc.c:1646 */ 2381 break; 2382 2383 case 83: 2384#line 648 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2385 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } 2386#line 2387 "ntp_parser.c" /* yacc.c:1646 */ 2387 break; 2388 2389 case 84: 2390#line 650 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2391 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } 2392#line 2393 "ntp_parser.c" /* yacc.c:1646 */ 2393 break; 2394 2395 case 85: 2396#line 652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2397 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); } 2398#line 2399 "ntp_parser.c" /* yacc.c:1646 */ 2399 break; 2400 2401 case 86: 2402#line 654 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2403 { (yyval.Attr_val) = create_attr_ival(T_Basedate, (yyvsp[0].Integer)); } 2404#line 2405 "ntp_parser.c" /* yacc.c:1646 */ 2405 break; 2406 2407 case 98: 2408#line 681 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2409 { CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); } 2410#line 2411 "ntp_parser.c" /* yacc.c:1646 */ 2411 break; 2412 2413 case 99: 2414#line 683 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2415 { 2416 if (lex_from_file()) { 2417 cfgt.stats_dir = (yyvsp[0].String); 2418 } else { 2419 YYFREE((yyvsp[0].String)); 2420 yyerror("statsdir remote configuration ignored"); 2421 } 2422 } 2423#line 2424 "ntp_parser.c" /* yacc.c:1646 */ 2424 break; 2425 2426 case 100: 2427#line 692 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2428 { 2429 filegen_node *fgn; 2430 2431 fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo)); 2432 APPEND_G_FIFO(cfgt.filegen_opts, fgn); 2433 } 2434#line 2435 "ntp_parser.c" /* yacc.c:1646 */ 2435 break; 2436 2437 case 101: 2438#line 702 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2439 { 2440 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); 2441 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); 2442 } 2443#line 2444 "ntp_parser.c" /* yacc.c:1646 */ 2444 break; 2445 2446 case 102: 2447#line 707 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2448 { 2449 (yyval.Int_fifo) = NULL; 2450 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); 2451 } 2452#line 2453 "ntp_parser.c" /* yacc.c:1646 */ 2453 break; 2454 2455 case 111: 2456#line 726 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2457 { (yyval.Attr_val_fifo) = NULL; } 2458#line 2459 "ntp_parser.c" /* yacc.c:1646 */ 2459 break; 2460 2461 case 112: 2462#line 728 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2463 { 2464 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2465 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2466 } 2467#line 2468 "ntp_parser.c" /* yacc.c:1646 */ 2468 break; 2469 2470 case 113: 2471#line 736 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2472 { 2473 if (lex_from_file()) { 2474 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); 2475 } else { 2476 (yyval.Attr_val) = NULL; 2477 YYFREE((yyvsp[0].String)); 2478 yyerror("filegen file remote config ignored"); 2479 } 2480 } 2481#line 2482 "ntp_parser.c" /* yacc.c:1646 */ 2482 break; 2483 2484 case 114: 2485#line 746 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2486 { 2487 if (lex_from_file()) { 2488 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); 2489 } else { 2490 (yyval.Attr_val) = NULL; 2491 yyerror("filegen type remote config ignored"); 2492 } 2493 } 2494#line 2495 "ntp_parser.c" /* yacc.c:1646 */ 2495 break; 2496 2497 case 115: 2498#line 755 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2499 { 2500 const char *err; 2501 2502 if (lex_from_file()) { 2503 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); 2504 } else { 2505 (yyval.Attr_val) = NULL; 2506 if (T_Link == (yyvsp[0].Integer)) 2507 err = "filegen link remote config ignored"; 2508 else 2509 err = "filegen nolink remote config ignored"; 2510 yyerror(err); 2511 } 2512 } 2513#line 2514 "ntp_parser.c" /* yacc.c:1646 */ 2514 break; 2515 2516 case 116: 2517#line 770 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2518 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } 2519#line 2520 "ntp_parser.c" /* yacc.c:1646 */ 2520 break; 2521 2522 case 128: 2523#line 800 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2524 { 2525 CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo)); 2526 } 2527#line 2528 "ntp_parser.c" /* yacc.c:1646 */ 2528 break; 2529 2530 case 129: 2531#line 804 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2532 { 2533 CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo)); 2534 } 2535#line 2536 "ntp_parser.c" /* yacc.c:1646 */ 2536 break; 2537 2538 case 130: 2539#line 808 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2540 { 2541 restrict_node *rn; 2542 2543 rn = create_restrict_node((yyvsp[-2].Address_node), NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), 2544 lex_current()->curpos.nline); 2545 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2546 } 2547#line 2548 "ntp_parser.c" /* yacc.c:1646 */ 2548 break; 2549 2550 case 131: 2551#line 816 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2552 { 2553 restrict_node *rn; 2554 2555 rn = create_restrict_node((yyvsp[-4].Address_node), (yyvsp[-2].Address_node), (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), 2556 lex_current()->curpos.nline); 2557 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2558 } 2559#line 2560 "ntp_parser.c" /* yacc.c:1646 */ 2560 break; 2561 2562 case 132: 2563#line 824 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2564 { 2565 restrict_node *rn; 2566 2567 rn = create_restrict_node(NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), 2568 lex_current()->curpos.nline); 2569 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2570 } 2571#line 2572 "ntp_parser.c" /* yacc.c:1646 */ 2572 break; 2573 2574 case 133: 2575#line 832 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2576 { 2577 restrict_node *rn; 2578 2579 rn = create_restrict_node( 2580 create_address_node( 2581 estrdup("0.0.0.0"), 2582 AF_INET), 2583 create_address_node( 2584 estrdup("0.0.0.0"), 2585 AF_INET), 2586 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), 2587 lex_current()->curpos.nline); 2588 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2589 } 2590#line 2591 "ntp_parser.c" /* yacc.c:1646 */ 2591 break; 2592 2593 case 134: 2594#line 847 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2595 { 2596 restrict_node *rn; 2597 2598 rn = create_restrict_node( 2599 create_address_node( 2600 estrdup("::"), 2601 AF_INET6), 2602 create_address_node( 2603 estrdup("::"), 2604 AF_INET6), 2605 (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), 2606 lex_current()->curpos.nline); 2607 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2608 } 2609#line 2610 "ntp_parser.c" /* yacc.c:1646 */ 2610 break; 2611 2612 case 135: 2613#line 862 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2614 { 2615 restrict_node * rn; 2616 2617 APPEND_G_FIFO((yyvsp[0].Int_fifo), create_int_node((yyvsp[-2].Integer))); 2618 rn = create_restrict_node( 2619 NULL, NULL, (yyvsp[-1].Integer), (yyvsp[0].Int_fifo), lex_current()->curpos.nline); 2620 APPEND_G_FIFO(cfgt.restrict_opts, rn); 2621 } 2622#line 2623 "ntp_parser.c" /* yacc.c:1646 */ 2623 break; 2624 2625 case 136: 2626#line 874 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2627 { (yyval.Integer) = -1; } 2628#line 2629 "ntp_parser.c" /* yacc.c:1646 */ 2629 break; 2630 2631 case 137: 2632#line 876 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2633 { 2634 if (((yyvsp[0].Integer) < -1) || ((yyvsp[0].Integer) > 100)) { 2635 struct FILE_INFO * ip_ctx; 2636 2637 ip_ctx = lex_current(); 2638 msyslog(LOG_ERR, 2639 "Unreasonable ippeerlimit value (%d) in %s line %d, column %d. Using 0.", 2640 (yyvsp[0].Integer), 2641 ip_ctx->fname, 2642 ip_ctx->errpos.nline, 2643 ip_ctx->errpos.ncol); 2644 (yyvsp[0].Integer) = 0; 2645 } 2646 (yyval.Integer) = (yyvsp[0].Integer); 2647 } 2648#line 2649 "ntp_parser.c" /* yacc.c:1646 */ 2649 break; 2650 2651 case 138: 2652#line 895 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2653 { (yyval.Int_fifo) = NULL; } 2654#line 2655 "ntp_parser.c" /* yacc.c:1646 */ 2655 break; 2656 2657 case 139: 2658#line 897 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2659 { 2660 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); 2661 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); 2662 } 2663#line 2664 "ntp_parser.c" /* yacc.c:1646 */ 2664 break; 2665 2666 case 157: 2667#line 925 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2668 { 2669 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2670 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2671 } 2672#line 2673 "ntp_parser.c" /* yacc.c:1646 */ 2673 break; 2674 2675 case 158: 2676#line 930 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2677 { 2678 (yyval.Attr_val_fifo) = NULL; 2679 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2680 } 2681#line 2682 "ntp_parser.c" /* yacc.c:1646 */ 2682 break; 2683 2684 case 159: 2685#line 938 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2686 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2687#line 2688 "ntp_parser.c" /* yacc.c:1646 */ 2688 break; 2689 2690 case 163: 2691#line 949 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2692 { 2693 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2694 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2695 } 2696#line 2697 "ntp_parser.c" /* yacc.c:1646 */ 2697 break; 2698 2699 case 164: 2700#line 954 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2701 { 2702 (yyval.Attr_val_fifo) = NULL; 2703 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2704 } 2705#line 2706 "ntp_parser.c" /* yacc.c:1646 */ 2706 break; 2707 2708 case 165: 2709#line 962 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2710 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2711#line 2712 "ntp_parser.c" /* yacc.c:1646 */ 2712 break; 2713 2714 case 174: 2715#line 982 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2716 { 2717 addr_opts_node *aon; 2718 2719 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); 2720 APPEND_G_FIFO(cfgt.fudge, aon); 2721 } 2722#line 2723 "ntp_parser.c" /* yacc.c:1646 */ 2723 break; 2724 2725 case 175: 2726#line 992 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2727 { 2728 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2729 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2730 } 2731#line 2732 "ntp_parser.c" /* yacc.c:1646 */ 2732 break; 2733 2734 case 176: 2735#line 997 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2736 { 2737 (yyval.Attr_val_fifo) = NULL; 2738 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2739 } 2740#line 2741 "ntp_parser.c" /* yacc.c:1646 */ 2741 break; 2742 2743 case 177: 2744#line 1005 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2745 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } 2746#line 2747 "ntp_parser.c" /* yacc.c:1646 */ 2747 break; 2748 2749 case 178: 2750#line 1007 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2751 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2752#line 2753 "ntp_parser.c" /* yacc.c:1646 */ 2753 break; 2754 2755 case 179: 2756#line 1009 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2757 { 2758 if ((yyvsp[0].Integer) >= 0 && (yyvsp[0].Integer) <= 16) { 2759 (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); 2760 } else { 2761 (yyval.Attr_val) = NULL; 2762 yyerror("fudge factor: stratum value not in [0..16], ignored"); 2763 } 2764 } 2765#line 2766 "ntp_parser.c" /* yacc.c:1646 */ 2766 break; 2767 2768 case 180: 2769#line 1018 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2770 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } 2771#line 2772 "ntp_parser.c" /* yacc.c:1646 */ 2772 break; 2773 2774 case 181: 2775#line 1020 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2776 { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); } 2777#line 2778 "ntp_parser.c" /* yacc.c:1646 */ 2778 break; 2779 2780 case 188: 2781#line 1041 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2782 { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); } 2783#line 2784 "ntp_parser.c" /* yacc.c:1646 */ 2784 break; 2785 2786 case 189: 2787#line 1046 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2788 { 2789 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2790 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2791 } 2792#line 2793 "ntp_parser.c" /* yacc.c:1646 */ 2793 break; 2794 2795 case 190: 2796#line 1051 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2797 { 2798 (yyval.Attr_val_fifo) = NULL; 2799 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2800 } 2801#line 2802 "ntp_parser.c" /* yacc.c:1646 */ 2802 break; 2803 2804 case 191: 2805#line 1059 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2806 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 2807#line 2808 "ntp_parser.c" /* yacc.c:1646 */ 2808 break; 2809 2810 case 195: 2811#line 1075 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2812 { CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); } 2813#line 2814 "ntp_parser.c" /* yacc.c:1646 */ 2814 break; 2815 2816 case 196: 2817#line 1077 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2818 { CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); } 2819#line 2820 "ntp_parser.c" /* yacc.c:1646 */ 2820 break; 2821 2822 case 197: 2823#line 1082 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2824 { 2825 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2826 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2827 } 2828#line 2829 "ntp_parser.c" /* yacc.c:1646 */ 2829 break; 2830 2831 case 198: 2832#line 1087 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2833 { 2834 (yyval.Attr_val_fifo) = NULL; 2835 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2836 } 2837#line 2838 "ntp_parser.c" /* yacc.c:1646 */ 2838 break; 2839 2840 case 199: 2841#line 1095 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2842 { (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); } 2843#line 2844 "ntp_parser.c" /* yacc.c:1646 */ 2844 break; 2845 2846 case 200: 2847#line 1097 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2848 { 2849 if (lex_from_file()) { 2850 (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); 2851 } else { 2852 char err_str[128]; 2853 2854 (yyval.Attr_val) = NULL; 2855 snprintf(err_str, sizeof(err_str), 2856 "enable/disable %s remote configuration ignored", 2857 keyword((yyvsp[0].Integer))); 2858 yyerror(err_str); 2859 } 2860 } 2861#line 2862 "ntp_parser.c" /* yacc.c:1646 */ 2862 break; 2863 2864 case 213: 2865#line 1136 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2866 { CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); } 2867#line 2868 "ntp_parser.c" /* yacc.c:1646 */ 2868 break; 2869 2870 case 214: 2871#line 1141 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2872 { 2873 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 2874 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2875 } 2876#line 2877 "ntp_parser.c" /* yacc.c:1646 */ 2877 break; 2878 2879 case 215: 2880#line 1146 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2881 { 2882 (yyval.Attr_val_fifo) = NULL; 2883 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 2884 } 2885#line 2886 "ntp_parser.c" /* yacc.c:1646 */ 2886 break; 2887 2888 case 216: 2889#line 1154 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2890 { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); } 2891#line 2892 "ntp_parser.c" /* yacc.c:1646 */ 2892 break; 2893 2894 case 229: 2895#line 1179 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2896 { 2897 attr_val *av; 2898 2899 av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); 2900 APPEND_G_FIFO(cfgt.vars, av); 2901 } 2902#line 2903 "ntp_parser.c" /* yacc.c:1646 */ 2903 break; 2904 2905 case 230: 2906#line 1186 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2907 { 2908 attr_val *av; 2909 2910 av = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); 2911 APPEND_G_FIFO(cfgt.vars, av); 2912 } 2913#line 2914 "ntp_parser.c" /* yacc.c:1646 */ 2914 break; 2915 2916 case 231: 2917#line 1193 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2918 { 2919 attr_val *av; 2920 2921 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); 2922 APPEND_G_FIFO(cfgt.vars, av); 2923 } 2924#line 2925 "ntp_parser.c" /* yacc.c:1646 */ 2925 break; 2926 2927 case 232: 2928#line 1200 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2929 { 2930 char error_text[64]; 2931 attr_val *av; 2932 2933 if (lex_from_file()) { 2934 av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); 2935 APPEND_G_FIFO(cfgt.vars, av); 2936 } else { 2937 YYFREE((yyvsp[0].String)); 2938 snprintf(error_text, sizeof(error_text), 2939 "%s remote config ignored", 2940 keyword((yyvsp[-1].Integer))); 2941 yyerror(error_text); 2942 } 2943 } 2944#line 2945 "ntp_parser.c" /* yacc.c:1646 */ 2945 break; 2946 2947 case 233: 2948#line 1216 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2949 { 2950 if (!lex_from_file()) { 2951 YYFREE((yyvsp[-1].String)); /* avoid leak */ 2952 yyerror("remote includefile ignored"); 2953 break; 2954 } 2955 if (lex_level() > MAXINCLUDELEVEL) { 2956 fprintf(stderr, "getconfig: Maximum include file level exceeded.\n"); 2957 msyslog(LOG_ERR, "getconfig: Maximum include file level exceeded."); 2958 } else { 2959 const char * path = FindConfig((yyvsp[-1].String)); /* might return $2! */ 2960 if (!lex_push_file(path, "r")) { 2961 fprintf(stderr, "getconfig: Couldn't open <%s>\n", path); 2962 msyslog(LOG_ERR, "getconfig: Couldn't open <%s>", path); 2963 } 2964 } 2965 YYFREE((yyvsp[-1].String)); /* avoid leak */ 2966 } 2967#line 2968 "ntp_parser.c" /* yacc.c:1646 */ 2968 break; 2969 2970 case 234: 2971#line 1235 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2972 { lex_flush_stack(); } 2973#line 2974 "ntp_parser.c" /* yacc.c:1646 */ 2974 break; 2975 2976 case 235: 2977#line 1237 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2978 { /* see drift_parm below for actions */ } 2979#line 2980 "ntp_parser.c" /* yacc.c:1646 */ 2980 break; 2981 2982 case 236: 2983#line 1239 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2984 { CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); } 2985#line 2986 "ntp_parser.c" /* yacc.c:1646 */ 2986 break; 2987 2988 case 237: 2989#line 1241 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2990 { CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); } 2991#line 2992 "ntp_parser.c" /* yacc.c:1646 */ 2992 break; 2993 2994 case 238: 2995#line 1243 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 2996 { APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); } 2997#line 2998 "ntp_parser.c" /* yacc.c:1646 */ 2998 break; 2999 3000 case 239: 3001#line 1245 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3002 { 3003 addr_opts_node *aon; 3004 3005 aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo)); 3006 APPEND_G_FIFO(cfgt.trap, aon); 3007 } 3008#line 3009 "ntp_parser.c" /* yacc.c:1646 */ 3009 break; 3010 3011 case 240: 3012#line 1252 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3013 { CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); } 3014#line 3015 "ntp_parser.c" /* yacc.c:1646 */ 3015 break; 3016 3017 case 245: 3018#line 1267 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3019 { 3020#ifndef LEAP_SMEAR 3021 yyerror("Built without LEAP_SMEAR support."); 3022#endif 3023 } 3024#line 3025 "ntp_parser.c" /* yacc.c:1646 */ 3025 break; 3026 3027 case 251: 3028#line 1287 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3029 { 3030 if (lex_from_file()) { 3031 attr_val *av; 3032 av = create_attr_sval(T_Driftfile, (yyvsp[0].String)); 3033 APPEND_G_FIFO(cfgt.vars, av); 3034 } else { 3035 YYFREE((yyvsp[0].String)); 3036 yyerror("driftfile remote configuration ignored"); 3037 } 3038 } 3039#line 3040 "ntp_parser.c" /* yacc.c:1646 */ 3040 break; 3041 3042 case 252: 3043#line 1298 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3044 { 3045 if (lex_from_file()) { 3046 attr_val *av; 3047 av = create_attr_sval(T_Driftfile, (yyvsp[-1].String)); 3048 APPEND_G_FIFO(cfgt.vars, av); 3049 av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double)); 3050 APPEND_G_FIFO(cfgt.vars, av); 3051 msyslog(LOG_WARNING, 3052 "'driftfile FILENAME WanderValue' is deprecated, " 3053 "please use separate 'driftfile FILENAME' and " 3054 "'nonvolatile WanderValue' lines instead."); 3055 } else { 3056 YYFREE((yyvsp[-1].String)); 3057 yyerror("driftfile remote configuration ignored"); 3058 } 3059 } 3060#line 3061 "ntp_parser.c" /* yacc.c:1646 */ 3061 break; 3062 3063 case 253: 3064#line 1315 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3065 { 3066 if (lex_from_file()) { 3067 attr_val *av; 3068 av = create_attr_sval(T_Driftfile, estrdup("")); 3069 APPEND_G_FIFO(cfgt.vars, av); 3070 } else { 3071 yyerror("driftfile remote configuration ignored"); 3072 } 3073 } 3074#line 3075 "ntp_parser.c" /* yacc.c:1646 */ 3075 break; 3076 3077 case 254: 3078#line 1328 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3079 { (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); } 3080#line 3081 "ntp_parser.c" /* yacc.c:1646 */ 3081 break; 3082 3083 case 256: 3084#line 1334 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3085 { (yyval.Integer) = 0; } 3086#line 3087 "ntp_parser.c" /* yacc.c:1646 */ 3087 break; 3088 3089 case 257: 3090#line 1339 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3091 { (yyval.Attr_val_fifo) = NULL; } 3092#line 3093 "ntp_parser.c" /* yacc.c:1646 */ 3093 break; 3094 3095 case 258: 3096#line 1341 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3097 { 3098 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 3099 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 3100 } 3101#line 3102 "ntp_parser.c" /* yacc.c:1646 */ 3102 break; 3103 3104 case 259: 3105#line 1349 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3106 { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); } 3107#line 3108 "ntp_parser.c" /* yacc.c:1646 */ 3108 break; 3109 3110 case 260: 3111#line 1351 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3112 { 3113 (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address)); 3114 destroy_address_node((yyvsp[0].Address_node)); 3115 } 3116#line 3117 "ntp_parser.c" /* yacc.c:1646 */ 3117 break; 3118 3119 case 261: 3120#line 1359 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3121 { 3122 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 3123 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 3124 } 3125#line 3126 "ntp_parser.c" /* yacc.c:1646 */ 3126 break; 3127 3128 case 262: 3129#line 1364 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3130 { 3131 (yyval.Attr_val_fifo) = NULL; 3132 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 3133 } 3134#line 3135 "ntp_parser.c" /* yacc.c:1646 */ 3135 break; 3136 3137 case 263: 3138#line 1372 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3139 { 3140 char prefix; 3141 char * type; 3142 3143 switch ((yyvsp[0].String)[0]) { 3144 3145 case '+': 3146 case '-': 3147 case '=': 3148 prefix = (yyvsp[0].String)[0]; 3149 type = (yyvsp[0].String) + 1; 3150 break; 3151 3152 default: 3153 prefix = '='; 3154 type = (yyvsp[0].String); 3155 } 3156 3157 (yyval.Attr_val) = create_attr_sval(prefix, estrdup(type)); 3158 YYFREE((yyvsp[0].String)); 3159 } 3160#line 3161 "ntp_parser.c" /* yacc.c:1646 */ 3161 break; 3162 3163 case 264: 3164#line 1397 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3165 { 3166 nic_rule_node *nrn; 3167 3168 nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer)); 3169 APPEND_G_FIFO(cfgt.nic_rules, nrn); 3170 } 3171#line 3172 "ntp_parser.c" /* yacc.c:1646 */ 3172 break; 3173 3174 case 265: 3175#line 1404 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3176 { 3177 nic_rule_node *nrn; 3178 3179 nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer)); 3180 APPEND_G_FIFO(cfgt.nic_rules, nrn); 3181 } 3182#line 3183 "ntp_parser.c" /* yacc.c:1646 */ 3183 break; 3184 3185 case 275: 3186#line 1432 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3187 { CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); } 3188#line 3189 "ntp_parser.c" /* yacc.c:1646 */ 3189 break; 3190 3191 case 276: 3192#line 1437 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3193 { 3194 (yyval.Int_fifo) = (yyvsp[-1].Int_fifo); 3195 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); 3196 } 3197#line 3198 "ntp_parser.c" /* yacc.c:1646 */ 3198 break; 3199 3200 case 277: 3201#line 1442 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3202 { 3203 (yyval.Int_fifo) = NULL; 3204 APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer))); 3205 } 3206#line 3207 "ntp_parser.c" /* yacc.c:1646 */ 3207 break; 3208 3209 case 285: 3210#line 1466 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3211 { 3212 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 3213 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); 3214 } 3215#line 3216 "ntp_parser.c" /* yacc.c:1646 */ 3216 break; 3217 3218 case 286: 3219#line 1471 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3220 { 3221 (yyval.Attr_val_fifo) = NULL; 3222 APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer))); 3223 } 3224#line 3225 "ntp_parser.c" /* yacc.c:1646 */ 3225 break; 3226 3227 case 287: 3228#line 1479 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3229 { 3230 (yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo); 3231 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 3232 } 3233#line 3234 "ntp_parser.c" /* yacc.c:1646 */ 3234 break; 3235 3236 case 288: 3237#line 1484 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3238 { 3239 (yyval.Attr_val_fifo) = NULL; 3240 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val)); 3241 } 3242#line 3243 "ntp_parser.c" /* yacc.c:1646 */ 3243 break; 3244 3245 case 289: 3246#line 1492 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3247 { (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); } 3248#line 3249 "ntp_parser.c" /* yacc.c:1646 */ 3249 break; 3250 3251 case 291: 3252#line 1498 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3253 { (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); } 3254#line 3255 "ntp_parser.c" /* yacc.c:1646 */ 3255 break; 3256 3257 case 292: 3258#line 1503 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3259 { 3260 (yyval.String_fifo) = (yyvsp[-1].String_fifo); 3261 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); 3262 } 3263#line 3264 "ntp_parser.c" /* yacc.c:1646 */ 3264 break; 3265 3266 case 293: 3267#line 1508 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3268 { 3269 (yyval.String_fifo) = NULL; 3270 APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String))); 3271 } 3272#line 3273 "ntp_parser.c" /* yacc.c:1646 */ 3273 break; 3274 3275 case 294: 3276#line 1516 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3277 { 3278 (yyval.Address_fifo) = (yyvsp[-1].Address_fifo); 3279 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); 3280 } 3281#line 3282 "ntp_parser.c" /* yacc.c:1646 */ 3282 break; 3283 3284 case 295: 3285#line 1521 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3286 { 3287 (yyval.Address_fifo) = NULL; 3288 APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node)); 3289 } 3290#line 3291 "ntp_parser.c" /* yacc.c:1646 */ 3291 break; 3292 3293 case 296: 3294#line 1529 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3295 { 3296 if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) { 3297 yyerror("Integer value is not boolean (0 or 1). Assuming 1"); 3298 (yyval.Integer) = 1; 3299 } else { 3300 (yyval.Integer) = (yyvsp[0].Integer); 3301 } 3302 } 3303#line 3304 "ntp_parser.c" /* yacc.c:1646 */ 3304 break; 3305 3306 case 297: 3307#line 1537 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3308 { (yyval.Integer) = 1; } 3309#line 3310 "ntp_parser.c" /* yacc.c:1646 */ 3310 break; 3311 3312 case 298: 3313#line 1538 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3314 { (yyval.Integer) = 0; } 3315#line 3316 "ntp_parser.c" /* yacc.c:1646 */ 3316 break; 3317 3318 case 299: 3319#line 1542 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3320 { (yyval.Double) = (double)(yyvsp[0].Integer); } 3321#line 3322 "ntp_parser.c" /* yacc.c:1646 */ 3322 break; 3323 3324 case 301: 3325#line 1548 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3326 { (yyval.Integer) = basedate_eval_string((yyvsp[0].String)); YYFREE((yyvsp[0].String)); } 3327#line 3328 "ntp_parser.c" /* yacc.c:1646 */ 3328 break; 3329 3330 case 302: 3331#line 1556 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3332 { 3333 sim_node *sn; 3334 3335 sn = create_sim_node((yyvsp[-2].Attr_val_fifo), (yyvsp[-1].Sim_server_fifo)); 3336 APPEND_G_FIFO(cfgt.sim_details, sn); 3337 3338 /* Revert from ; to \n for end-of-command */ 3339 old_config_style = 1; 3340 } 3341#line 3342 "ntp_parser.c" /* yacc.c:1646 */ 3342 break; 3343 3344 case 303: 3345#line 1573 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3346 { old_config_style = 0; } 3347#line 3348 "ntp_parser.c" /* yacc.c:1646 */ 3348 break; 3349 3350 case 304: 3351#line 1578 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3352 { 3353 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); 3354 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); 3355 } 3356#line 3357 "ntp_parser.c" /* yacc.c:1646 */ 3357 break; 3358 3359 case 305: 3360#line 1583 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3361 { 3362 (yyval.Attr_val_fifo) = NULL; 3363 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); 3364 } 3365#line 3366 "ntp_parser.c" /* yacc.c:1646 */ 3366 break; 3367 3368 case 306: 3369#line 1591 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3370 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } 3371#line 3372 "ntp_parser.c" /* yacc.c:1646 */ 3372 break; 3373 3374 case 309: 3375#line 1601 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3376 { 3377 (yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo); 3378 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); 3379 } 3380#line 3381 "ntp_parser.c" /* yacc.c:1646 */ 3381 break; 3382 3383 case 310: 3384#line 1606 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3385 { 3386 (yyval.Sim_server_fifo) = NULL; 3387 APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server)); 3388 } 3389#line 3390 "ntp_parser.c" /* yacc.c:1646 */ 3390 break; 3391 3392 case 311: 3393#line 1614 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3394 { (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); } 3395#line 3396 "ntp_parser.c" /* yacc.c:1646 */ 3396 break; 3397 3398 case 312: 3399#line 1619 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3400 { (yyval.Double) = (yyvsp[-1].Double); } 3401#line 3402 "ntp_parser.c" /* yacc.c:1646 */ 3402 break; 3403 3404 case 313: 3405#line 1624 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3406 { (yyval.Address_node) = (yyvsp[0].Address_node); } 3407#line 3408 "ntp_parser.c" /* yacc.c:1646 */ 3408 break; 3409 3410 case 314: 3411#line 1629 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3412 { 3413 (yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo); 3414 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); 3415 } 3416#line 3417 "ntp_parser.c" /* yacc.c:1646 */ 3417 break; 3418 3419 case 315: 3420#line 1634 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3421 { 3422 (yyval.Sim_script_fifo) = NULL; 3423 APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script)); 3424 } 3425#line 3426 "ntp_parser.c" /* yacc.c:1646 */ 3426 break; 3427 3428 case 316: 3429#line 1642 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3430 { (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); } 3431#line 3432 "ntp_parser.c" /* yacc.c:1646 */ 3432 break; 3433 3434 case 317: 3435#line 1647 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3436 { 3437 (yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo); 3438 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); 3439 } 3440#line 3441 "ntp_parser.c" /* yacc.c:1646 */ 3441 break; 3442 3443 case 318: 3444#line 1652 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3445 { 3446 (yyval.Attr_val_fifo) = NULL; 3447 APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val)); 3448 } 3449#line 3450 "ntp_parser.c" /* yacc.c:1646 */ 3450 break; 3451 3452 case 319: 3453#line 1660 "../../ntpd/ntp_parser.y" /* yacc.c:1646 */ 3454 { (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); } 3455#line 3456 "ntp_parser.c" /* yacc.c:1646 */ 3456 break; 3457 3458 3459#line 3460 "ntp_parser.c" /* yacc.c:1646 */ 3460 default: break; 3461 } 3462 /* User semantic actions sometimes alter yychar, and that requires 3463 that yytoken be updated with the new translation. We take the 3464 approach of translating immediately before every use of yytoken. 3465 One alternative is translating here after every semantic action, 3466 but that translation would be missed if the semantic action invokes 3467 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 3468 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 3469 incorrect destructor might then be invoked immediately. In the 3470 case of YYERROR or YYBACKUP, subsequent parser actions might lead 3471 to an incorrect destructor call or verbose syntax error message 3472 before the lookahead is translated. */ 3473 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3474 3475 YYPOPSTACK (yylen); 3476 yylen = 0; 3477 YY_STACK_PRINT (yyss, yyssp); 3478 3479 *++yyvsp = yyval; 3480 3481 /* Now 'shift' the result of the reduction. Determine what state 3482 that goes to, based on the state we popped back to and the rule 3483 number reduced by. */ 3484 3485 yyn = yyr1[yyn]; 3486 3487 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3488 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3489 yystate = yytable[yystate]; 3490 else 3491 yystate = yydefgoto[yyn - YYNTOKENS]; 3492 3493 goto yynewstate; 3494 3495 3496/*--------------------------------------. 3497| yyerrlab -- here on detecting error. | 3498`--------------------------------------*/ 3499yyerrlab: 3500 /* Make sure we have latest lookahead translation. See comments at 3501 user semantic actions for why this is necessary. */ 3502 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 3503 3504 /* If not already recovering from an error, report this error. */ 3505 if (!yyerrstatus) 3506 { 3507 ++yynerrs; 3508#if ! YYERROR_VERBOSE 3509 yyerror (YY_("syntax error")); 3510#else 3511# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 3512 yyssp, yytoken) 3513 { 3514 char const *yymsgp = YY_("syntax error"); 3515 int yysyntax_error_status; 3516 yysyntax_error_status = YYSYNTAX_ERROR; 3517 if (yysyntax_error_status == 0) 3518 yymsgp = yymsg; 3519 else if (yysyntax_error_status == 1) 3520 { 3521 if (yymsg != yymsgbuf) 3522 YYSTACK_FREE (yymsg); 3523 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 3524 if (!yymsg) 3525 { 3526 yymsg = yymsgbuf; 3527 yymsg_alloc = sizeof yymsgbuf; 3528 yysyntax_error_status = 2; 3529 } 3530 else 3531 { 3532 yysyntax_error_status = YYSYNTAX_ERROR; 3533 yymsgp = yymsg; 3534 } 3535 } 3536 yyerror (yymsgp); 3537 if (yysyntax_error_status == 2) 3538 goto yyexhaustedlab; 3539 } 3540# undef YYSYNTAX_ERROR 3541#endif 3542 } 3543 3544 3545 3546 if (yyerrstatus == 3) 3547 { 3548 /* If just tried and failed to reuse lookahead token after an 3549 error, discard it. */ 3550 3551 if (yychar <= YYEOF) 3552 { 3553 /* Return failure if at end of input. */ 3554 if (yychar == YYEOF) 3555 YYABORT; 3556 } 3557 else 3558 { 3559 yydestruct ("Error: discarding", 3560 yytoken, &yylval); 3561 yychar = YYEMPTY; 3562 } 3563 } 3564 3565 /* Else will try to reuse lookahead token after shifting the error 3566 token. */ 3567 goto yyerrlab1; 3568 3569 3570/*---------------------------------------------------. 3571| yyerrorlab -- error raised explicitly by YYERROR. | 3572`---------------------------------------------------*/ 3573yyerrorlab: 3574 3575 /* Pacify compilers like GCC when the user code never invokes 3576 YYERROR and the label yyerrorlab therefore never appears in user 3577 code. */ 3578 if (/*CONSTCOND*/ 0) 3579 goto yyerrorlab; 3580 3581 /* Do not reclaim the symbols of the rule whose action triggered 3582 this YYERROR. */ 3583 YYPOPSTACK (yylen); 3584 yylen = 0; 3585 YY_STACK_PRINT (yyss, yyssp); 3586 yystate = *yyssp; 3587 goto yyerrlab1; 3588 3589 3590/*-------------------------------------------------------------. 3591| yyerrlab1 -- common code for both syntax error and YYERROR. | 3592`-------------------------------------------------------------*/ 3593yyerrlab1: 3594 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3595 3596 for (;;) 3597 { 3598 yyn = yypact[yystate]; 3599 if (!yypact_value_is_default (yyn)) 3600 { 3601 yyn += YYTERROR; 3602 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3603 { 3604 yyn = yytable[yyn]; 3605 if (0 < yyn) 3606 break; 3607 } 3608 } 3609 3610 /* Pop the current state because it cannot handle the error token. */ 3611 if (yyssp == yyss) 3612 YYABORT; 3613 3614 3615 yydestruct ("Error: popping", 3616 yystos[yystate], yyvsp); 3617 YYPOPSTACK (1); 3618 yystate = *yyssp; 3619 YY_STACK_PRINT (yyss, yyssp); 3620 } 3621 3622 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 3623 *++yyvsp = yylval; 3624 YY_IGNORE_MAYBE_UNINITIALIZED_END 3625 3626 3627 /* Shift the error token. */ 3628 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3629 3630 yystate = yyn; 3631 goto yynewstate; 3632 3633 3634/*-------------------------------------. 3635| yyacceptlab -- YYACCEPT comes here. | 3636`-------------------------------------*/ 3637yyacceptlab: 3638 yyresult = 0; 3639 goto yyreturn; 3640 3641/*-----------------------------------. 3642| yyabortlab -- YYABORT comes here. | 3643`-----------------------------------*/ 3644yyabortlab: 3645 yyresult = 1; 3646 goto yyreturn; 3647 3648#if !defined yyoverflow || YYERROR_VERBOSE 3649/*-------------------------------------------------. 3650| yyexhaustedlab -- memory exhaustion comes here. | 3651`-------------------------------------------------*/ 3652yyexhaustedlab: 3653 yyerror (YY_("memory exhausted")); 3654 yyresult = 2; 3655 /* Fall through. */ 3656#endif 3657 3658yyreturn: 3659 if (yychar != YYEMPTY) 3660 { 3661 /* Make sure we have latest lookahead translation. See comments at 3662 user semantic actions for why this is necessary. */ 3663 yytoken = YYTRANSLATE (yychar); 3664 yydestruct ("Cleanup: discarding lookahead", 3665 yytoken, &yylval); 3666 } 3667 /* Do not reclaim the symbols of the rule whose action triggered 3668 this YYABORT or YYACCEPT. */ 3669 YYPOPSTACK (yylen); 3670 YY_STACK_PRINT (yyss, yyssp); 3671 while (yyssp != yyss) 3672 { 3673 yydestruct ("Cleanup: popping", 3674 yystos[*yyssp], yyvsp); 3675 YYPOPSTACK (1); 3676 } 3677#ifndef yyoverflow 3678 if (yyss != yyssa) 3679 YYSTACK_FREE (yyss); 3680#endif 3681#if YYERROR_VERBOSE 3682 if (yymsg != yymsgbuf) 3683 YYSTACK_FREE (yymsg); 3684#endif 3685 return yyresult; 3686} 3687#line 1671 "../../ntpd/ntp_parser.y" /* yacc.c:1906 */ 3688 3689 3690void 3691yyerror( 3692 const char *msg 3693 ) 3694{ 3695 int retval; 3696 struct FILE_INFO * ip_ctx; 3697 3698 ip_ctx = lex_current(); 3699 ip_ctx->errpos = ip_ctx->tokpos; 3700 3701 msyslog(LOG_ERR, "line %d column %d %s", 3702 ip_ctx->errpos.nline, ip_ctx->errpos.ncol, msg); 3703 if (!lex_from_file()) { 3704 /* Save the error message in the correct buffer */ 3705 retval = snprintf(remote_config.err_msg + remote_config.err_pos, 3706 MAXLINE - remote_config.err_pos, 3707 "column %d %s", 3708 ip_ctx->errpos.ncol, msg); 3709 3710 /* Increment the value of err_pos */ 3711 if (retval > 0) 3712 remote_config.err_pos += retval; 3713 3714 /* Increment the number of errors */ 3715 ++remote_config.no_errors; 3716 } 3717} 3718 3719 3720/* 3721 * token_name - convert T_ token integers to text 3722 * example: token_name(T_Server) returns "T_Server" 3723 */ 3724const char * 3725token_name( 3726 int token 3727 ) 3728{ 3729 return yytname[YYTRANSLATE(token)]; 3730} 3731 3732 3733/* Initial Testing function -- ignore */ 3734#if 0 3735int main(int argc, char *argv[]) 3736{ 3737 ip_file = FOPEN(argv[1], "r"); 3738 if (!ip_file) 3739 fprintf(stderr, "ERROR!! Could not open file: %s\n", argv[1]); 3740 yyparse(); 3741 return 0; 3742} 3743#endif 3744 3745