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