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