1
/* A Bison parser, made by GNU Bison 1.875a. */
3
/* Skeleton parser for Yacc-like parsing with Bison,
4
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330,
19
Boston, MA 02111-1307, USA. */
21
/* As a special exception, when this file is copied by Bison into a
22
Bison output file, you may use that output file without restriction.
23
This special exception was added by the Free Software Foundation
24
in version 1.24 of Bison. */
26
/* Written by Richard Stallman by simplifying the original so called
27
``semantic'' parser. */
29
/* All symbols defined below should begin with yy or YY, to avoid
30
infringing on user name space. This should be done even for local
31
variables, as they might otherwise be expanded by user macros.
32
There are some unavoidable exceptions within include files to
33
define necessary library symbols; they are noted "INFRINGES ON
34
USER NAME SPACE" below. */
36
/* Identify Bison output. */
40
#define YYSKELETON_NAME "yacc.c"
45
/* Using locations. */
46
#define YYLSP_NEEDED 0
53
/* Put the tokens into the symbol table, so that GDB and other debuggers
65
NO_COMBINED_MAP = 267,
66
NO_PROBABILITY_MAPS = 268,
78
#define Identifier 258
83
#define SUBJECTIVE 263
87
#define NO_COMBINED_MAP 267
88
#define NO_PROBABILITY_MAPS 268
89
#define COMBINED_MAP 269
96
#define REDYELLOWGREEN 276
102
/* Copy the first part of user declarations. */
109
#include "local_proto.h"
111
struct symtab *cur_sym;
112
struct symtab *cur_att;
113
struct names namelist;
114
struct names problist;
116
char reclassbuf[256];
121
extern int probabilitymaps;
122
extern int combinedmap;
123
extern int colortable;
127
/* Enabling traces. */
132
/* Enabling verbose error messages. */
133
#ifdef YYERROR_VERBOSE
134
# undef YYERROR_VERBOSE
135
# define YYERROR_VERBOSE 1
137
# define YYERROR_VERBOSE 0
140
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
142
typedef union YYSTYPE {
145
/* Line 191 of yacc.c. */
147
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
148
# define YYSTYPE_IS_DECLARED 1
149
# define YYSTYPE_IS_TRIVIAL 1
154
/* Copy the second part of user declarations. */
157
/* Line 214 of yacc.c. */
160
#if ! defined (yyoverflow) || YYERROR_VERBOSE
162
/* The parser invokes alloca or malloc; define the necessary symbols. */
164
# if YYSTACK_USE_ALLOCA
165
# define YYSTACK_ALLOC alloca
167
# ifndef YYSTACK_USE_ALLOCA
168
# if defined (alloca) || defined (_ALLOCA_H)
169
# define YYSTACK_ALLOC alloca
172
# define YYSTACK_ALLOC __builtin_alloca
178
# ifdef YYSTACK_ALLOC
179
/* Pacify GCC's `empty if-body' warning. */
180
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
182
# if defined (__STDC__) || defined (__cplusplus)
183
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
184
# define YYSIZE_T size_t
186
# define YYSTACK_ALLOC malloc
187
# define YYSTACK_FREE free
189
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
192
#if (! defined (yyoverflow) \
193
&& (! defined (__cplusplus) \
194
|| (YYSTYPE_IS_TRIVIAL)))
196
/* A type that is properly aligned for any stack member. */
203
/* The size of the maximum gap between one aligned stack and the next. */
204
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
206
/* The size of an array large to enough to hold all stacks, each with
208
# define YYSTACK_BYTES(N) \
209
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
210
+ YYSTACK_GAP_MAXIMUM)
212
/* Copy COUNT objects from FROM to TO. The source and destination do
216
# define YYCOPY(To, From, Count) \
217
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
219
# define YYCOPY(To, From, Count) \
222
register YYSIZE_T yyi; \
223
for (yyi = 0; yyi < (Count); yyi++) \
224
(To)[yyi] = (From)[yyi]; \
230
/* Relocate STACK from its old location to the new one. The
231
local variables YYSIZE and YYSTACKSIZE give the old and new number of
232
elements in the stack, and YYPTR gives the new location of the
233
stack. Advance YYPTR to a properly aligned location for the next
235
# define YYSTACK_RELOCATE(Stack) \
238
YYSIZE_T yynewbytes; \
239
YYCOPY (&yyptr->Stack, Stack, yysize); \
240
Stack = &yyptr->Stack; \
241
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
242
yyptr += yynewbytes / sizeof (*yyptr); \
248
#if defined (__STDC__) || defined (__cplusplus)
249
typedef signed char yysigned_char;
251
typedef short yysigned_char;
254
/* YYFINAL -- State number of the termination state. */
256
/* YYLAST -- Last index in YYTABLE. */
259
/* YYNTOKENS -- Number of terminals. */
261
/* YYNNTS -- Number of nonterminals. */
263
/* YYNRULES -- Number of rules. */
265
/* YYNRULES -- Number of states. */
266
#define YYNSTATES 155
268
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
270
#define YYMAXUTOK 277
272
#define YYTRANSLATE(YYX) \
273
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
275
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
276
static const unsigned char yytranslate[] =
278
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
279
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
280
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
281
2, 2, 2, 2, 2, 2, 2, 33, 2, 2,
282
23, 24, 2, 2, 31, 2, 32, 2, 2, 2,
283
2, 2, 2, 2, 2, 2, 2, 2, 34, 35,
284
29, 2, 30, 2, 2, 2, 2, 2, 2, 2,
285
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
286
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
287
2, 25, 2, 26, 2, 2, 2, 2, 2, 2,
288
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
289
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
290
2, 2, 2, 27, 2, 28, 2, 2, 2, 2,
291
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
292
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
293
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
294
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
295
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
296
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
297
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
298
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
299
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
300
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
301
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
302
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
303
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
304
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
305
15, 16, 17, 18, 19, 20, 21, 22
309
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
311
static const unsigned short yyprhs[] =
313
0, 0, 3, 4, 7, 10, 11, 14, 16, 18,
314
21, 24, 27, 30, 33, 36, 39, 42, 45, 49,
315
54, 55, 61, 64, 68, 69, 75, 76, 81, 84,
316
88, 89, 94, 95, 99, 101, 104, 106, 109, 113,
317
116, 118, 120, 121, 127, 130, 134, 135, 141, 146,
318
149, 153, 154, 158, 159, 166, 167, 173, 174, 183,
319
184, 188, 190, 194, 196, 200, 201, 211, 212, 214,
320
216, 218, 220, 222, 224, 226, 228, 232, 235, 239,
321
241, 245, 247, 248, 253, 255, 257, 259, 261, 263
324
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
325
static const yysigned_char yyrhs[] =
327
37, 0, -1, -1, 38, 39, -1, 40, 42, -1,
328
-1, 40, 41, -1, 12, -1, 13, -1, 14, 15,
329
-1, 14, 16, -1, 14, 17, -1, 14, 18, -1,
330
14, 19, -1, 14, 20, -1, 14, 21, -1, 14,
331
22, -1, 43, 68, -1, 43, 57, 68, -1, 43,
332
57, 66, 68, -1, -1, 6, 34, 44, 45, 88,
333
-1, 46, 85, -1, 45, 46, 85, -1, -1, 83,
334
34, 47, 48, 82, -1, -1, 23, 50, 49, 84,
335
-1, 31, 50, -1, 49, 31, 50, -1, -1, 83,
336
51, 52, 82, -1, -1, 25, 53, 87, -1, 55,
337
-1, 55, 54, -1, 54, -1, 54, 55, -1, 56,
338
11, 56, -1, 55, 56, -1, 56, -1, 5, -1,
339
-1, 7, 34, 58, 59, 88, -1, 60, 85, -1,
340
59, 60, 85, -1, -1, 83, 34, 61, 62, 82,
341
-1, 23, 64, 63, 84, -1, 31, 64, -1, 63,
342
31, 64, -1, -1, 83, 65, 82, -1, -1, 8,
343
34, 67, 60, 85, 88, -1, -1, 9, 34, 69,
344
70, 88, -1, -1, 83, 34, 71, 72, 23, 74,
345
84, 85, -1, -1, 27, 73, 86, -1, 83, -1,
346
73, 31, 83, -1, 75, -1, 74, 31, 75, -1,
347
-1, 83, 76, 77, 78, 25, 80, 79, 35, 87,
348
-1, -1, 15, -1, 16, -1, 17, -1, 18, -1,
349
19, -1, 20, -1, 21, -1, 22, -1, 29, 5,
350
30, -1, 35, 80, -1, 79, 35, 80, -1, 81,
351
-1, 80, 31, 81, -1, 5, -1, -1, 27, 10,
352
4, 86, -1, 3, -1, 24, -1, 32, -1, 28,
356
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
357
static const unsigned short yyrline[] =
359
0, 80, 80, 80, 88, 90, 92, 95, 100, 106,
360
116, 126, 136, 146, 156, 166, 176, 188, 189, 190,
361
194, 194, 204, 205, 208, 208, 221, 223, 226, 227,
362
230, 230, 240, 242, 251, 252, 254, 255, 260, 264,
363
266, 269, 273, 273, 283, 284, 287, 287, 300, 303,
364
304, 307, 307, 318, 318, 329, 329, 340, 340, 350,
365
352, 355, 358, 365, 366, 369, 369, 380, 382, 392,
366
402, 412, 422, 432, 442, 452, 464, 471, 476, 483,
367
487, 494, 497, 498, 502, 504, 505, 506, 507, 508
371
#if YYDEBUG || YYERROR_VERBOSE
372
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
373
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
374
static const char *const yytname[] =
376
"$end", "error", "$undefined", "Identifier", "String", "Constant",
377
"LAYER", "CONTEXT", "SUBJECTIVE", "INFERRED", "QUESTION", "THRU",
378
"NO_COMBINED_MAP", "NO_PROBABILITY_MAPS", "COMBINED_MAP", "ASPECT",
379
"GREY", "HISTO", "RAINBOW", "RAMP", "RANDOM", "REDYELLOWGREEN", "WAVE",
380
"'('", "')'", "'['", "']'", "'{'", "'}'", "'<'", "'>'", "','", "'.'",
381
"'%'", "':'", "';'", "$accept", "Program", "@1", "Script",
382
"Output_Options", "Output_Option", "MainScript", "Layer_Section", "@2",
383
"Layer_Att_Declarations", "Layer_Att_Declaration", "@3",
384
"Layer_Value_List", "Layer_Value_Sublist", "Layer_Value", "@4",
385
"Category_Range", "Reclass_Rule", "Input_Cat_Range", "Input_Cat_List",
386
"Input_Cat", "Context_Section", "@5", "Context_Att_Declarations",
387
"Context_Att_Declaration", "@6", "Context_Value_List",
388
"Context_Value_Sublist", "Context_Value", "@7", "Subjective_Section",
389
"@8", "Inferred_Section", "@9", "Inferred_Att_Declaration", "@10",
390
"Determinant_List", "Att_List", "Inferred_Value_List", "Inferred_Value",
391
"@11", "Optional_Color_Table", "Prior_Probability",
392
"Conditional_Probability_Table", "Probability_List", "Probability",
393
"Question_Attachment", "Name", "rp", "ep", "rb", "rbr", "end", 0
398
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
400
static const unsigned short yytoknum[] =
402
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
403
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
404
275, 276, 277, 40, 41, 91, 93, 123, 125, 60,
405
62, 44, 46, 37, 58, 59
409
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
410
static const unsigned char yyr1[] =
412
0, 36, 38, 37, 39, 40, 40, 41, 41, 41,
413
41, 41, 41, 41, 41, 41, 41, 42, 42, 42,
414
44, 43, 45, 45, 47, 46, 48, 48, 49, 49,
415
51, 50, 52, 52, 53, 53, 53, 53, 54, 55,
416
55, 56, 58, 57, 59, 59, 61, 60, 62, 63,
417
63, 65, 64, 67, 66, 69, 68, 71, 70, 72,
418
72, 73, 73, 74, 74, 76, 75, 77, 77, 77,
419
77, 77, 77, 77, 77, 77, 78, 79, 79, 80,
420
80, 81, 82, 82, 83, 84, 85, 86, 87, 88
423
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
424
static const unsigned char yyr2[] =
426
0, 2, 0, 2, 2, 0, 2, 1, 1, 2,
427
2, 2, 2, 2, 2, 2, 2, 2, 3, 4,
428
0, 5, 2, 3, 0, 5, 0, 4, 2, 3,
429
0, 4, 0, 3, 1, 2, 1, 2, 3, 2,
430
1, 1, 0, 5, 2, 3, 0, 5, 4, 2,
431
3, 0, 3, 0, 6, 0, 5, 0, 8, 0,
432
3, 1, 3, 1, 3, 0, 9, 0, 1, 1,
433
1, 1, 1, 1, 1, 1, 3, 2, 3, 1,
434
3, 1, 0, 4, 1, 1, 1, 1, 1, 1
437
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
438
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
439
means the default is an error. */
440
static const unsigned char yydefact[] =
442
2, 0, 5, 1, 3, 0, 0, 7, 8, 0,
443
6, 4, 0, 20, 9, 10, 11, 12, 13, 14,
444
15, 16, 0, 0, 0, 17, 0, 42, 55, 0,
445
0, 18, 84, 0, 0, 0, 0, 0, 53, 19,
446
89, 0, 21, 86, 22, 24, 0, 0, 0, 0,
447
0, 0, 23, 26, 0, 43, 44, 46, 56, 57,
448
0, 0, 82, 45, 0, 59, 0, 0, 30, 0,
449
25, 0, 82, 0, 0, 54, 0, 0, 32, 0,
450
0, 51, 47, 0, 61, 0, 28, 85, 0, 27,
451
0, 82, 0, 0, 0, 82, 87, 0, 60, 0,
452
63, 65, 29, 41, 0, 36, 34, 40, 31, 83,
453
49, 0, 48, 52, 62, 0, 0, 67, 88, 33,
454
37, 40, 35, 39, 0, 50, 64, 58, 68, 69,
455
70, 71, 72, 73, 74, 75, 0, 39, 38, 0,
456
0, 0, 0, 76, 81, 0, 79, 0, 0, 0,
460
/* YYDEFGOTO[NTERM-NUM]. */
461
static const short yydefgoto[] =
463
-1, 1, 2, 4, 5, 10, 11, 12, 26, 33,
464
34, 53, 62, 77, 67, 78, 91, 104, 105, 106,
465
107, 24, 36, 46, 47, 64, 72, 94, 80, 95,
466
30, 51, 25, 37, 49, 65, 74, 83, 99, 100,
467
117, 136, 140, 149, 145, 146, 70, 48, 89, 44,
471
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
473
#define YYPACT_NINF -101
474
static const yysigned_char yypact[] =
476
-101, 33, -101, -101, -101, 26, 15, -101, -101, 36,
477
-101, -101, 54, -101, -101, -101, -101, -101, -101, -101,
478
-101, -101, 34, 35, 57, -101, 67, -101, -101, 38,
479
64, -101, -101, -2, 42, 41, 67, 67, -101, -101,
480
-101, 42, -101, -101, -101, -101, -2, 42, 44, 43,
481
45, 67, -101, 58, 42, -101, -101, -101, -101, -101,
482
42, 67, 53, -101, 59, 56, 43, 55, -101, 74,
483
-101, 67, 53, 67, 65, -101, 67, -8, 62, 94,
484
68, -101, -101, -14, -101, 67, -101, -101, 67, -101,
485
95, 53, 73, 67, 3, 53, -101, 67, -101, 12,
486
-101, -101, -101, -101, 76, 95, 95, 92, -101, -101,
487
-101, 67, -101, -101, -101, 67, 42, 75, -101, -101,
488
95, -101, -101, 92, 95, -101, -101, -101, -101, -101,
489
-101, -101, -101, -101, -101, -101, 77, -101, -101, 99,
490
80, 78, 102, -101, -101, 13, -101, 102, 102, 79,
491
-101, 81, -1, 81, -101
494
/* YYPGOTO[NTERM-NUM]. */
495
static const yysigned_char yypgoto[] =
497
-101, -101, -101, -101, -101, -101, -101, -101, -101, -101,
498
82, -101, -101, -101, -58, -101, -101, -101, 4, 6,
499
-100, -101, -101, -101, -9, -101, -101, -101, -83, -101,
500
-101, -101, -11, -101, -101, -101, -101, -101, -101, -6,
501
-101, -101, -101, -101, -88, -34, -69, -26, -53, -39,
505
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
506
positive, shift that token. If negative, reduce the rule which
507
number is the opposite. If zero, do what YYDEFACT says.
508
If YYTABLE_NINF, syntax error. */
509
#define YYTABLE_NINF -1
510
static const unsigned char yytable[] =
512
35, 32, 52, 82, 144, 121, 123, 35, 56, 55,
513
110, 50, 58, 31, 96, 63, 87, 97, 86, 39,
514
137, 66, 108, 88, 138, 118, 113, 87, 125, 75,
515
102, 40, 6, 3, 111, 68, 87, 54, 7, 8,
516
9, 112, 60, 115, 147, 81, 116, 84, 148, 13,
517
68, 14, 15, 16, 17, 18, 19, 20, 21, 101,
518
151, 22, 68, 23, 153, 29, 23, 81, 27, 28,
519
32, 114, 38, 23, 43, 45, 40, 127, 57, 59,
520
69, 61, 71, 73, 79, 81, 76, 90, 85, 101,
521
128, 129, 130, 131, 132, 133, 134, 135, 92, 93,
522
103, 96, 118, 124, 141, 142, 139, 144, 143, 126,
523
122, 120, 147, 150, 152, 41, 109, 154
526
static const unsigned char yycheck[] =
528
26, 3, 41, 72, 5, 105, 106, 33, 47, 46,
529
93, 37, 49, 24, 28, 54, 24, 31, 76, 30,
530
120, 60, 91, 31, 124, 26, 95, 24, 111, 66,
531
88, 33, 6, 0, 31, 61, 24, 46, 12, 13,
532
14, 94, 51, 31, 31, 71, 99, 73, 35, 34,
533
76, 15, 16, 17, 18, 19, 20, 21, 22, 85,
534
148, 7, 88, 9, 152, 8, 9, 93, 34, 34,
535
3, 97, 34, 9, 32, 34, 33, 116, 34, 34,
536
27, 23, 23, 27, 10, 111, 31, 25, 23, 115,
537
15, 16, 17, 18, 19, 20, 21, 22, 4, 31,
538
5, 28, 26, 11, 5, 25, 29, 5, 30, 115,
539
106, 105, 31, 147, 35, 33, 92, 152
542
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
543
symbol of state STATE-NUM. */
544
static const unsigned char yystos[] =
546
0, 37, 38, 0, 39, 40, 6, 12, 13, 14,
547
41, 42, 43, 34, 15, 16, 17, 18, 19, 20,
548
21, 22, 7, 9, 57, 68, 44, 34, 34, 8,
549
66, 68, 3, 45, 46, 83, 58, 69, 34, 68,
550
33, 46, 88, 32, 85, 34, 59, 60, 83, 70,
551
83, 67, 85, 47, 60, 88, 85, 34, 88, 34,
552
60, 23, 48, 85, 61, 71, 85, 50, 83, 27,
553
82, 23, 62, 27, 72, 88, 31, 49, 51, 10,
554
64, 83, 82, 73, 83, 23, 50, 24, 31, 84,
555
25, 52, 4, 31, 63, 65, 28, 31, 86, 74,
556
75, 83, 50, 5, 53, 54, 55, 56, 82, 86,
557
64, 31, 84, 82, 83, 31, 84, 76, 26, 87,
558
55, 56, 54, 56, 11, 64, 75, 85, 15, 16,
559
17, 18, 19, 20, 21, 22, 77, 56, 56, 29,
560
78, 5, 25, 30, 5, 80, 81, 31, 35, 79,
564
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
565
# define YYSIZE_T __SIZE_TYPE__
567
#if ! defined (YYSIZE_T) && defined (size_t)
568
# define YYSIZE_T size_t
570
#if ! defined (YYSIZE_T)
571
# if defined (__STDC__) || defined (__cplusplus)
572
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
573
# define YYSIZE_T size_t
576
#if ! defined (YYSIZE_T)
577
# define YYSIZE_T unsigned int
580
#define yyerrok (yyerrstatus = 0)
581
#define yyclearin (yychar = YYEMPTY)
585
#define YYACCEPT goto yyacceptlab
586
#define YYABORT goto yyabortlab
587
#define YYERROR goto yyerrlab1
590
/* Like YYERROR except do call yyerror. This remains here temporarily
591
to ease the transition to the new meaning of YYERROR, for GCC.
592
Once GCC version 2 has supplanted version 1, this can go. */
594
#define YYFAIL goto yyerrlab
596
#define YYRECOVERING() (!!yyerrstatus)
598
#define YYBACKUP(Token, Value) \
600
if (yychar == YYEMPTY && yylen == 1) \
604
yytoken = YYTRANSLATE (yychar); \
610
yyerror ("syntax error: cannot back up");\
616
#define YYERRCODE 256
618
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
621
#ifndef YYLLOC_DEFAULT
622
# define YYLLOC_DEFAULT(Current, Rhs, N) \
623
Current.first_line = Rhs[1].first_line; \
624
Current.first_column = Rhs[1].first_column; \
625
Current.last_line = Rhs[N].last_line; \
626
Current.last_column = Rhs[N].last_column;
629
/* YYLEX -- calling `yylex' with the right arguments. */
632
# define YYLEX yylex (YYLEX_PARAM)
634
# define YYLEX yylex ()
637
/* Enable debugging if requested. */
641
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
642
# define YYFPRINTF fprintf
645
# define YYDPRINTF(Args) \
651
# define YYDSYMPRINT(Args) \
657
# define YYDSYMPRINTF(Title, Token, Value, Location) \
661
YYFPRINTF (stderr, "%s ", Title); \
662
yysymprint (stderr, \
664
YYFPRINTF (stderr, "\n"); \
668
/*------------------------------------------------------------------.
669
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
671
`------------------------------------------------------------------*/
673
#if defined (__STDC__) || defined (__cplusplus)
675
yy_stack_print (short *bottom, short *top)
678
yy_stack_print (bottom, top)
683
YYFPRINTF (stderr, "Stack now");
684
for (/* Nothing. */; bottom <= top; ++bottom)
685
YYFPRINTF (stderr, " %d", *bottom);
686
YYFPRINTF (stderr, "\n");
689
# define YY_STACK_PRINT(Bottom, Top) \
692
yy_stack_print ((Bottom), (Top)); \
696
/*------------------------------------------------.
697
| Report that the YYRULE is going to be reduced. |
698
`------------------------------------------------*/
700
#if defined (__STDC__) || defined (__cplusplus)
702
yy_reduce_print (int yyrule)
705
yy_reduce_print (yyrule)
710
unsigned int yylineno = yyrline[yyrule];
711
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
712
yyrule - 1, yylineno);
713
/* Print the symbols being reduced, and their result. */
714
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
715
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
716
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
719
# define YY_REDUCE_PRINT(Rule) \
722
yy_reduce_print (Rule); \
725
/* Nonzero means print parse trace. It is left uninitialized so that
726
multiple parsers can coexist. */
729
# define YYDPRINTF(Args)
730
# define YYDSYMPRINT(Args)
731
# define YYDSYMPRINTF(Title, Token, Value, Location)
732
# define YY_STACK_PRINT(Bottom, Top)
733
# define YY_REDUCE_PRINT(Rule)
734
#endif /* !YYDEBUG */
737
/* YYINITDEPTH -- initial size of the parser's stacks. */
739
# define YYINITDEPTH 200
742
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
743
if the built-in stack extension method is used).
745
Do not make this value too large; the results are undefined if
746
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
747
evaluated with infinite-precision integer arithmetic. */
754
# define YYMAXDEPTH 10000
762
# if defined (__GLIBC__) && defined (_STRING_H)
763
# define yystrlen strlen
765
/* Return the length of YYSTR. */
767
# if defined (__STDC__) || defined (__cplusplus)
768
yystrlen (const char *yystr)
774
register const char *yys = yystr;
776
while (*yys++ != '\0')
779
return yys - yystr - 1;
785
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
786
# define yystpcpy stpcpy
788
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
791
# if defined (__STDC__) || defined (__cplusplus)
792
yystpcpy (char *yydest, const char *yysrc)
794
yystpcpy (yydest, yysrc)
799
register char *yyd = yydest;
800
register const char *yys = yysrc;
802
while ((*yyd++ = *yys++) != '\0')
810
#endif /* !YYERROR_VERBOSE */
815
/*--------------------------------.
816
| Print this symbol on YYOUTPUT. |
817
`--------------------------------*/
819
#if defined (__STDC__) || defined (__cplusplus)
821
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
824
yysymprint (yyoutput, yytype, yyvaluep)
830
/* Pacify ``unused variable'' warnings. */
833
if (yytype < YYNTOKENS)
835
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
837
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
841
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
848
YYFPRINTF (yyoutput, ")");
851
#endif /* ! YYDEBUG */
852
/*-----------------------------------------------.
853
| Release the memory associated to this symbol. |
854
`-----------------------------------------------*/
856
#if defined (__STDC__) || defined (__cplusplus)
858
yydestruct (int yytype, YYSTYPE *yyvaluep)
861
yydestruct (yytype, yyvaluep)
866
/* Pacify ``unused variable'' warnings. */
878
/* Prevent warnings from -Wmissing-prototypes. */
881
# if defined (__STDC__) || defined (__cplusplus)
882
int yyparse (void *YYPARSE_PARAM);
886
#else /* ! YYPARSE_PARAM */
887
#if defined (__STDC__) || defined (__cplusplus)
892
#endif /* ! YYPARSE_PARAM */
896
/* The lookahead symbol. */
899
/* The semantic value of the lookahead symbol. */
902
/* Number of syntax errors so far. */
912
# if defined (__STDC__) || defined (__cplusplus)
913
int yyparse (void *YYPARSE_PARAM)
915
int yyparse (YYPARSE_PARAM)
918
#else /* ! YYPARSE_PARAM */
919
#if defined (__STDC__) || defined (__cplusplus)
930
register int yystate;
933
/* Number of tokens to shift before error messages enabled. */
935
/* Lookahead token as an internal (translated) token number. */
938
/* Three stacks and their tools:
939
`yyss': related to states,
940
`yyvs': related to semantic values,
941
`yyls': related to locations.
943
Refer to the stacks thru separate pointers, to allow yyoverflow
944
to reallocate them elsewhere. */
946
/* The state stack. */
947
short yyssa[YYINITDEPTH];
949
register short *yyssp;
951
/* The semantic value stack. */
952
YYSTYPE yyvsa[YYINITDEPTH];
953
YYSTYPE *yyvs = yyvsa;
954
register YYSTYPE *yyvsp;
958
#define YYPOPSTACK (yyvsp--, yyssp--)
960
YYSIZE_T yystacksize = YYINITDEPTH;
962
/* The variables used to return semantic value and location from the
967
/* When reducing, the number of symbols on the RHS of the reduced
971
YYDPRINTF ((stderr, "Starting parse\n"));
976
yychar = YYEMPTY; /* Cause a token to be read. */
978
/* Initialize stack pointers.
979
Waste one element of value and location stack
980
so that they stay on the same level as the state stack.
981
The wasted elements are never initialized. */
988
/*------------------------------------------------------------.
989
| yynewstate -- Push a new state, which is found in yystate. |
990
`------------------------------------------------------------*/
992
/* In all cases, when you get here, the value and location stacks
993
have just been pushed. so pushing a state here evens the stacks.
1000
if (yyss + yystacksize - 1 <= yyssp)
1002
/* Get the current used size of the three stacks, in elements. */
1003
YYSIZE_T yysize = yyssp - yyss + 1;
1007
/* Give user a chance to reallocate the stack. Use copies of
1008
these so that the &'s don't force the real ones into
1010
YYSTYPE *yyvs1 = yyvs;
1011
short *yyss1 = yyss;
1014
/* Each stack pointer address is followed by the size of the
1015
data in use in that stack, in bytes. This used to be a
1016
conditional around just the two extra args, but that might
1017
be undefined if yyoverflow is a macro. */
1018
yyoverflow ("parser stack overflow",
1019
&yyss1, yysize * sizeof (*yyssp),
1020
&yyvs1, yysize * sizeof (*yyvsp),
1027
#else /* no yyoverflow */
1028
# ifndef YYSTACK_RELOCATE
1031
/* Extend the stack our own way. */
1032
if (YYMAXDEPTH <= yystacksize)
1035
if (YYMAXDEPTH < yystacksize)
1036
yystacksize = YYMAXDEPTH;
1039
short *yyss1 = yyss;
1040
union yyalloc *yyptr =
1041
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1044
YYSTACK_RELOCATE (yyss);
1045
YYSTACK_RELOCATE (yyvs);
1047
# undef YYSTACK_RELOCATE
1049
YYSTACK_FREE (yyss1);
1052
#endif /* no yyoverflow */
1054
yyssp = yyss + yysize - 1;
1055
yyvsp = yyvs + yysize - 1;
1058
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1059
(unsigned long int) yystacksize));
1061
if (yyss + yystacksize - 1 <= yyssp)
1065
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1074
/* Do appropriate processing given the current state. */
1075
/* Read a lookahead token if we need one and don't already have one. */
1078
/* First try to decide what to do without reference to lookahead token. */
1080
yyn = yypact[yystate];
1081
if (yyn == YYPACT_NINF)
1084
/* Not known => get a lookahead token if don't already have one. */
1086
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1087
if (yychar == YYEMPTY)
1089
YYDPRINTF ((stderr, "Reading a token: "));
1093
if (yychar <= YYEOF)
1095
yychar = yytoken = YYEOF;
1096
YYDPRINTF ((stderr, "Now at end of input.\n"));
1100
yytoken = YYTRANSLATE (yychar);
1101
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1104
/* If the proper action on seeing token YYTOKEN is to reduce or to
1105
detect an error, take that action. */
1107
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1112
if (yyn == 0 || yyn == YYTABLE_NINF)
1121
/* Shift the lookahead token. */
1122
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1124
/* Discard the token being shifted unless it is eof. */
1125
if (yychar != YYEOF)
1131
/* Count tokens shifted since error; after three, turn off error
1140
/*-----------------------------------------------------------.
1141
| yydefault -- do the default action for the current state. |
1142
`-----------------------------------------------------------*/
1144
yyn = yydefact[yystate];
1150
/*-----------------------------.
1151
| yyreduce -- Do a reduction. |
1152
`-----------------------------*/
1154
/* yyn is the number of a rule to reduce with. */
1157
/* If YYLEN is nonzero, implement the default value of the action:
1160
Otherwise, the following line sets YYVAL to garbage.
1161
This behavior is undocumented and Bison
1162
users should not rely upon it. Assigning to YYVAL
1163
unconditionally makes the parser a bit smaller, and it avoids a
1164
GCC warning that YYVAL may be used uninitialized. */
1165
yyval = yyvsp[1-yylen];
1168
YY_REDUCE_PRINT (yyn);
1179
check_table(&table,verbose);
1180
if ( verbose ) fprintf(stderr,"\nAll input parsed.\n");
1189
fprintf(stderr,"NoCombinedMap option set.\n");
1194
#line 101 "binfer.y"
1196
probabilitymaps = 0;
1197
fprintf(stderr,"NoProbabiltyMaps option set.\n");
1202
#line 107 "binfer.y"
1204
if ( combinedmap ) {
1205
colortable = AspectColors;
1206
fprintf(stderr,"Combined map colortable set to aspect colors.\n");
1208
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1209
fprintf(stderr,"NoCombinedMap option is set.\n");
1215
#line 117 "binfer.y"
1217
if ( combinedmap ) {
1218
colortable = GreyScale;
1219
fprintf(stderr,"Combined map colortable set to grey scale.\n");
1221
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1222
fprintf(stderr,"NoCombinedMap option is set.\n");
1228
#line 127 "binfer.y"
1230
if ( combinedmap ) {
1231
colortable = HistoGreyScale;
1232
fprintf(stderr,"Combined map colortable set to histogram stretched grey scale.\n");
1234
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1235
fprintf(stderr,"NoCombinedMap option is set.\n");
1241
#line 137 "binfer.y"
1243
if ( combinedmap ) {
1244
colortable = Rainbow;
1245
fprintf(stderr,"Combined map colortable set to rainbow colors.\n");
1247
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1248
fprintf(stderr,"NoCombinedMap option is set.\n");
1254
#line 147 "binfer.y"
1256
if ( combinedmap ) {
1258
fprintf(stderr,"Combined map colortable set to color ramp.\n");
1260
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1261
fprintf(stderr,"NoCombinedMap option is set.\n");
1267
#line 157 "binfer.y"
1269
if ( combinedmap ) {
1270
colortable = Random;
1271
fprintf(stderr,"Combined map colortable set to random colors.\n");
1273
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1274
fprintf(stderr,"NoCombinedMap option is set.\n");
1280
#line 167 "binfer.y"
1282
if ( combinedmap ) {
1284
fprintf(stderr,"Combined map colortable set to red yellow green.\n");
1286
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1287
fprintf(stderr,"NoCombinedMap option is set.\n");
1293
#line 177 "binfer.y"
1295
if ( combinedmap ) {
1297
fprintf(stderr,"Combined map colortable set to color wave.\n");
1299
fprintf(stderr,"Warning: Combined map colortable not set.\n");
1300
fprintf(stderr,"NoCombinedMap option is set.\n");
1306
#line 194 "binfer.y"
1308
expected_type = AttributeSymbol;
1309
value_type = LayerAttribute;
1314
#line 199 "binfer.y"
1316
if ( verbose ) fprintf(stderr,"\nParsed layers section.\n");
1321
#line 208 "binfer.y"
1323
cur_sym = s_create(yyvsp[-1].y_sym,expected_type,value_type);
1324
expected_type = ValueSymbol;
1329
#line 214 "binfer.y"
1331
expected_type = AttributeSymbol;
1332
if ( yyvsp[0].y_sym != (char *)0 )
1333
cur_att->question = strsave(yyvsp[0].y_sym);
1339
#line 230 "binfer.y"
1341
cur_sym = s_create(yyvsp[0].y_sym,expected_type,value_type);
1346
#line 234 "binfer.y"
1348
if ( yyvsp[0].y_sym != (char *)0 )
1349
cur_sym->question = strsave(yyvsp[0].y_sym);
1354
#line 243 "binfer.y"
1356
cur_sym->element.val->desc.layer->cat_num = (CELL)valno;
1358
sprintf(cur_sym->reclass,"%s = %d %s",strsave(yyvsp[-1].y_sym),valno++,
1364
#line 251 "binfer.y"
1365
{ yyval.y_sym = strsave(yyvsp[0].y_sym); }
1369
#line 252 "binfer.y"
1370
{ sprintf(reclassbuf,"%s %s",yyvsp[-1].y_sym,yyvsp[0].y_sym);
1371
yyval.y_sym = strsave(reclassbuf); }
1375
#line 254 "binfer.y"
1376
{ yyval.y_sym = strsave(yyvsp[0].y_sym); }
1380
#line 255 "binfer.y"
1381
{ sprintf(reclassbuf,"%s %s",yyvsp[-1].y_sym,yyvsp[0].y_sym);
1382
yyval.y_sym = strsave(reclassbuf); }
1386
#line 260 "binfer.y"
1387
{ sprintf(reclassbuf,"%s thru %s",yyvsp[-2].y_sym,yyvsp[0].y_sym);
1388
yyval.y_sym = strsave(reclassbuf); }
1392
#line 264 "binfer.y"
1393
{ sprintf(reclassbuf,"%s %s",yyvsp[-1].y_sym,yyvsp[0].y_sym);
1394
yyval.y_sym = strsave(reclassbuf); }
1398
#line 266 "binfer.y"
1399
{ yyval.y_sym = strsave(yyvsp[0].y_sym); }
1403
#line 269 "binfer.y"
1404
{ yyval.y_sym = strsave(yyvsp[0].y_sym);}
1408
#line 273 "binfer.y"
1410
expected_type = AttributeSymbol;
1411
value_type = ContextAttribute;
1416
#line 278 "binfer.y"
1418
if ( verbose ) fprintf(stderr,"\nParsed context section.\n");
1423
#line 287 "binfer.y"
1425
cur_att = cur_sym = s_create(yyvsp[-1].y_sym,expected_type,value_type);
1426
expected_type = ValueSymbol;
1431
#line 292 "binfer.y"
1433
expected_type = AttributeSymbol;
1434
if ( yyvsp[0].y_sym != (char *)0 )
1435
cur_att->question = strsave(yyvsp[0].y_sym);
1440
#line 307 "binfer.y"
1442
cur_sym = s_create(yyvsp[0].y_sym,expected_type,value_type);
1447
#line 311 "binfer.y"
1449
if ( yyvsp[0].y_sym != (char *)0 )
1450
cur_sym->question = strsave(yyvsp[0].y_sym);
1455
#line 318 "binfer.y"
1457
expected_type = AttributeSymbol;
1458
value_type = SubjectiveAttribute;
1463
#line 323 "binfer.y"
1466
fprintf(stderr,"\nParsed subjective section.\n");
1471
#line 329 "binfer.y"
1473
expected_type = AttributeSymbol;
1474
value_type = InferredAttribute;
1479
#line 334 "binfer.y"
1482
fprintf(stderr,"\nParsed inferred section.\n");
1487
#line 340 "binfer.y"
1489
cur_sym = s_create(yyvsp[-1].y_sym,expected_type,value_type);
1490
expected_type = ValueSymbol;
1495
#line 345 "binfer.y"
1497
expected_type = AttributeSymbol;
1502
#line 355 "binfer.y"
1504
if (!add_name(yyvsp[0].y_sym)) yyerror("Name not stored");
1509
#line 359 "binfer.y"
1511
if (!add_name(yyvsp[0].y_sym)) yyerror("Name not stored");
1516
#line 369 "binfer.y"
1518
cur_sym = s_create(yyvsp[0].y_sym,expected_type,value_type);
1523
#line 374 "binfer.y"
1525
sprintf(probbuf,"%s%s;",yyvsp[-3].y_sym,yyvsp[-2].y_sym);
1526
if (!add_prob_list(probbuf)) yyerror("Problist not stored");
1531
#line 382 "binfer.y"
1533
if ( probabilitymaps ) {
1534
cur_sym->colortable = AspectColors;
1537
"Warning: %s probability map colortable not set.\n"
1539
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1545
#line 392 "binfer.y"
1547
if ( probabilitymaps ) {
1548
cur_sym->colortable = GreyScale;
1551
"Warning: %s probability map colortable not set.\n"
1553
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1559
#line 402 "binfer.y"
1561
if ( probabilitymaps ) {
1562
cur_sym->colortable = HistoGreyScale;
1565
"Warning: %s probability map colortable not set.\n"
1567
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1573
#line 412 "binfer.y"
1575
if ( probabilitymaps ) {
1576
cur_sym->colortable = Rainbow;
1579
"Warning: %s probability map colortable not set.\n"
1581
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1587
#line 422 "binfer.y"
1589
if ( probabilitymaps ) {
1590
cur_sym->colortable = Ramp;
1593
"Warning: %s probability map colortable not set.\n"
1595
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1601
#line 432 "binfer.y"
1603
if ( probabilitymaps ) {
1604
cur_sym->colortable = Random;
1607
"Warning: %s probability map colortable not set.\n"
1609
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1615
#line 442 "binfer.y"
1617
if ( probabilitymaps ) {
1618
cur_sym->colortable = RYG;
1621
"Warning: %s probability map colortable not set.\n"
1623
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1629
#line 452 "binfer.y"
1631
if ( probabilitymaps ) {
1632
cur_sym->colortable = Wave;
1635
"Warning: %s probability map colortable not set.\n"
1637
fprintf(stderr,"NoProbabilityMaps option is set.\n");
1643
#line 465 "binfer.y"
1645
cur_sym->element.val->desc.infr->prior_prob = atof(yyvsp[-1].y_sym);
1650
#line 472 "binfer.y"
1652
sprintf(probbuf,";%s",yyvsp[0].y_sym);
1653
yyval.y_sym = strsave(probbuf);
1658
#line 477 "binfer.y"
1660
sprintf(probbuf,"%s;%s",yyvsp[-2].y_sym,yyvsp[0].y_sym);
1661
yyval.y_sym = strsave(probbuf);
1666
#line 484 "binfer.y"
1668
yyval.y_sym = strsave(yyvsp[0].y_sym);
1673
#line 488 "binfer.y"
1675
sprintf(probbuf,"%s,%s",yyvsp[-2].y_sym,yyvsp[0].y_sym);
1676
yyval.y_sym = strsave(probbuf);
1681
#line 494 "binfer.y"
1682
{ yyval.y_sym = strsave(yyvsp[0].y_sym); }
1686
#line 497 "binfer.y"
1687
{ yyval.y_sym = (char *)0; }
1691
#line 498 "binfer.y"
1692
{ yyval.y_sym = strsave(yyvsp[-1].y_sym); }
1696
#line 504 "binfer.y"
1701
#line 505 "binfer.y"
1706
#line 506 "binfer.y"
1711
#line 507 "binfer.y"
1716
#line 508 "binfer.y"
1723
/* Line 999 of yacc.c. */
1724
#line 1725 "y.tab.c"
1730
YY_STACK_PRINT (yyss, yyssp);
1735
/* Now `shift' the result of the reduction. Determine what state
1736
that goes to, based on the state we popped back to and the rule
1737
number reduced by. */
1741
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1742
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1743
yystate = yytable[yystate];
1745
yystate = yydefgoto[yyn - YYNTOKENS];
1750
/*------------------------------------.
1751
| yyerrlab -- here on detecting error |
1752
`------------------------------------*/
1754
/* If not already recovering from an error, report this error. */
1759
yyn = yypact[yystate];
1761
if (YYPACT_NINF < yyn && yyn < YYLAST)
1763
YYSIZE_T yysize = 0;
1764
int yytype = YYTRANSLATE (yychar);
1769
/* Start YYX at -YYN if negative to avoid negative indexes in
1771
for (yyx = yyn < 0 ? -yyn : 0;
1772
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1773
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1774
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1775
yysize += yystrlen ("syntax error, unexpected ") + 1;
1776
yysize += yystrlen (yytname[yytype]);
1777
yymsg = (char *) YYSTACK_ALLOC (yysize);
1780
char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1781
yyp = yystpcpy (yyp, yytname[yytype]);
1786
for (yyx = yyn < 0 ? -yyn : 0;
1787
yyx < (int) (sizeof (yytname) / sizeof (char *));
1789
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1791
const char *yyq = ! yycount ? ", expecting " : " or ";
1792
yyp = yystpcpy (yyp, yyq);
1793
yyp = yystpcpy (yyp, yytname[yyx]);
1798
YYSTACK_FREE (yymsg);
1801
yyerror ("syntax error; also virtual memory exhausted");
1804
#endif /* YYERROR_VERBOSE */
1805
yyerror ("syntax error");
1810
if (yyerrstatus == 3)
1812
/* If just tried and failed to reuse lookahead token after an
1813
error, discard it. */
1815
/* Return failure if at end of input. */
1816
if (yychar == YYEOF)
1818
/* Pop the error token. */
1820
/* Pop the rest of the stack. */
1821
while (yyss < yyssp)
1823
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1824
yydestruct (yystos[*yyssp], yyvsp);
1830
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
1831
yydestruct (yytoken, &yylval);
1836
/* Else will try to reuse lookahead token after shifting the error
1841
/*----------------------------------------------------.
1842
| yyerrlab1 -- error raised explicitly by an action. |
1843
`----------------------------------------------------*/
1845
yyerrstatus = 3; /* Each real token shifted decrements this. */
1849
yyn = yypact[yystate];
1850
if (yyn != YYPACT_NINF)
1853
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1861
/* Pop the current state because it cannot handle the error token. */
1865
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
1866
yydestruct (yystos[yystate], yyvsp);
1870
YY_STACK_PRINT (yyss, yyssp);
1876
YYDPRINTF ((stderr, "Shifting error token, "));
1885
/*-------------------------------------.
1886
| yyacceptlab -- YYACCEPT comes here. |
1887
`-------------------------------------*/
1892
/*-----------------------------------.
1893
| yyabortlab -- YYABORT comes here. |
1894
`-----------------------------------*/
1900
/*----------------------------------------------.
1901
| yyoverflowlab -- parser overflow comes here. |
1902
`----------------------------------------------*/
1904
yyerror ("parser stack overflow");
1912
YYSTACK_FREE (yyss);
1918
#line 510 "binfer.y"