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