1 /* A Bison parser, made from rcparse.y
2 by GNU bison 1.35. */
3
4 #define YYBISON 1 /* Identify Bison output. */
5
6 # define BEG 257
7 # define END 258
8 # define ACCELERATORS 259
9 # define VIRTKEY 260
10 # define ASCII 261
11 # define NOINVERT 262
12 # define SHIFT 263
13 # define CONTROL 264
14 # define ALT 265
15 # define BITMAP 266
16 # define CURSOR 267
17 # define DIALOG 268
18 # define DIALOGEX 269
19 # define EXSTYLE 270
20 # define CAPTION 271
21 # define CLASS 272
22 # define STYLE 273
23 # define AUTO3STATE 274
24 # define AUTOCHECKBOX 275
25 # define AUTORADIOBUTTON 276
26 # define CHECKBOX 277
27 # define COMBOBOX 278
28 # define CTEXT 279
29 # define DEFPUSHBUTTON 280
30 # define EDITTEXT 281
31 # define GROUPBOX 282
32 # define LISTBOX 283
33 # define LTEXT 284
34 # define PUSHBOX 285
35 # define PUSHBUTTON 286
36 # define RADIOBUTTON 287
37 # define RTEXT 288
38 # define SCROLLBAR 289
39 # define STATE3 290
40 # define USERBUTTON 291
41 # define BEDIT 292
42 # define HEDIT 293
43 # define IEDIT 294
44 # define FONT 295
45 # define ICON 296
46 # define LANGUAGE 297
47 # define CHARACTERISTICS 298
48 # define VERSIONK 299
49 # define MENU 300
50 # define MENUEX 301
51 # define MENUITEM 302
52 # define SEPARATOR 303
53 # define POPUP 304
54 # define CHECKED 305
55 # define GRAYED 306
56 # define HELP 307
57 # define INACTIVE 308
58 # define MENUBARBREAK 309
59 # define MENUBREAK 310
60 # define MESSAGETABLE 311
61 # define RCDATA 312
62 # define STRINGTABLE 313
63 # define VERSIONINFO 314
64 # define FILEVERSION 315
65 # define PRODUCTVERSION 316
66 # define FILEFLAGSMASK 317
67 # define FILEFLAGS 318
68 # define FILEOS 319
69 # define FILETYPE 320
70 # define FILESUBTYPE 321
71 # define BLOCKSTRINGFILEINFO 322
72 # define BLOCKVARFILEINFO 323
73 # define VALUE 324
74 # define BLOCK 325
75 # define MOVEABLE 326
76 # define FIXED 327
77 # define PURE 328
78 # define IMPURE 329
79 # define PRELOAD 330
80 # define LOADONCALL 331
81 # define DISCARDABLE 332
82 # define NOT 333
83 # define QUOTEDSTRING 334
84 # define STRING 335
85 # define NUMBER 336
86 # define SIZEDSTRING 337
87 # define IGNORED_TOKEN 338
88 # define NEG 339
89
90 #line 1 "rcparse.y"
91 /* rcparse.y -- parser for Windows rc files
92 Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
93 Written by Ian Lance Taylor, Cygnus Support.
94
95 This file is part of GNU Binutils.
96
97 This program is free software; you can redistribute it and/or modify
98 it under the terms of the GNU General Public License as published by
99 the Free Software Foundation; either version 2 of the License, or
100 (at your option) any later version.
101
102 This program is distributed in the hope that it will be useful,
103 but WITHOUT ANY WARRANTY; without even the implied warranty of
104 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
105 GNU General Public License for more details.
106
107 You should have received a copy of the GNU General Public License
108 along with this program; if not, write to the Free Software
109 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
110 02111-1307, USA. */
111
112 /* This is a parser for Windows rc files. It is based on the parser
113 by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
114
115 #include "bfd.h"
116 #include "bucomm.h"
117 #include "libiberty.h"
118 #include "windres.h"
119 #include "safe-ctype.h"
120
121 /* The current language. */
122
123 static unsigned short language;
124
125 /* The resource information during a sub statement. */
126
127 static struct res_res_info sub_res_info;
128
129 /* Dialog information. This is built by the nonterminals styles and
130 controls. */
131
132 static struct dialog dialog;
133
134 /* This is used when building a style. It is modified by the
135 nonterminal styleexpr. */
136
137 static unsigned long style;
138
139 /* These are used when building a control. They are set before using
140 control_params. */
141
142 static unsigned long base_style;
143 static unsigned long default_style;
144 static unsigned long class;
145 static struct res_id res_text_field;
146
147 /* This is used for COMBOBOX, LISTBOX and EDITTEXT which
148 do not allow resource 'text' field in control definition. */
149 static const struct res_id res_null_text = { 1, {{0, L""}}};
150
151
152 #line 63 "rcparse.y"
153 #ifndef YYSTYPE
154 typedef union
155 {
156 struct accelerator acc;
157 struct accelerator *pacc;
158 struct dialog_control *dialog_control;
159 struct menuitem *menuitem;
160 struct
161 {
162 struct rcdata_item *first;
163 struct rcdata_item *last;
164 } rcdata;
165 struct rcdata_item *rcdata_item;
166 struct stringtable_data *stringtable;
167 struct fixed_versioninfo *fixver;
168 struct ver_info *verinfo;
169 struct ver_stringinfo *verstring;
170 struct ver_varinfo *vervar;
171 struct res_id id;
172 struct res_res_info res_info;
173 struct
174 {
175 unsigned short on;
176 unsigned short off;
177 } memflags;
178 struct
179 {
180 unsigned long val;
181 /* Nonzero if this number was explicitly specified as long. */
182 int dword;
183 } i;
184 unsigned long il;
185 unsigned short is;
186 const char *s;
187 struct
188 {
189 unsigned long length;
190 const char *s;
191 } ss;
192 } yystype;
193 # define YYSTYPE yystype
194 # define YYSTYPE_IS_TRIVIAL 1
195 #endif
196 #ifndef YYDEBUG
197 # define YYDEBUG 0
198 #endif
199
200
201
202 #define YYFINAL 499
203 #define YYFLAG -32768
204 #define YYNTBASE 99
205
206 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
207 #define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 189)
208
209 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
210 static const char yytranslate[] =
211 {
212 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
215 2, 2, 2, 2, 2, 2, 2, 92, 87, 2,
216 97, 98, 90, 88, 95, 89, 2, 91, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 96, 2, 2, 2, 2, 2, 2, 2, 2,
219 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
221 2, 2, 2, 2, 86, 2, 2, 2, 2, 2,
222 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
223 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
224 2, 2, 2, 2, 85, 2, 93, 2, 2, 2,
225 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
226 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
227 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
228 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
229 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
230 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
231 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
232 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
233 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
234 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
238 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
239 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
240 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
241 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
242 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
243 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
244 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
245 76, 77, 78, 79, 80, 81, 82, 83, 84, 94
246 };
247
248 #if YYDEBUG
249 static const short yyprhs[] =
250 {
251 0, 0, 1, 4, 7, 10, 13, 16, 19, 22,
252 25, 28, 31, 34, 37, 40, 43, 46, 53, 54,
253 57, 60, 65, 67, 69, 71, 75, 78, 80, 82,
254 84, 86, 88, 90, 95, 100, 101, 115, 116, 130,
255 131, 146, 147, 151, 152, 156, 160, 164, 168, 172,
256 178, 185, 193, 202, 206, 210, 215, 219, 220, 223,
257 224, 229, 230, 235, 236, 241, 242, 247, 248, 253,
258 254, 258, 270, 283, 296, 310, 311, 316, 317, 322,
259 323, 327, 328, 333, 334, 339, 346, 355, 366, 378,
260 379, 384, 385, 389, 390, 395, 396, 401, 402, 407,
261 408, 413, 414, 419, 420, 424, 425, 430, 431, 447,
262 454, 463, 473, 474, 477, 479, 482, 483, 487, 488,
263 492, 493, 497, 498, 502, 507, 512, 516, 523, 524,
264 527, 532, 535, 542, 543, 547, 550, 552, 554, 556,
265 558, 560, 562, 569, 570, 573, 576, 580, 586, 589,
266 595, 602, 610, 620, 625, 632, 633, 636, 637, 639,
267 641, 643, 647, 651, 652, 659, 660, 664, 669, 676,
268 681, 688, 689, 696, 703, 707, 711, 715, 719, 723,
269 724, 733, 741, 742, 748, 749, 753, 755, 757, 759,
270 762, 765, 768, 770, 771, 774, 778, 783, 787, 788,
271 791, 792, 795, 797, 799, 801, 803, 805, 807, 809,
272 811, 813, 815, 818, 822, 827, 829, 833, 834, 836,
273 839, 841, 843, 847, 850, 853, 857, 861, 865, 869,
274 873, 877, 881, 885, 888, 890, 892, 896, 899, 903,
275 907, 911, 915, 919, 923, 927
276 };
277 static const short yyrhs[] =
278 {
279 -1, 99, 100, 0, 99, 106, 0, 99, 107, 0,
280 99, 108, 0, 99, 146, 0, 99, 147, 0, 99,
281 148, 0, 99, 149, 0, 99, 154, 0, 99, 157,
282 0, 99, 158, 0, 99, 163, 0, 99, 166, 0,
283 99, 167, 0, 99, 84, 0, 172, 5, 175, 3,
284 101, 4, 0, 0, 101, 102, 0, 103, 186, 0,
285 103, 186, 95, 104, 0, 80, 0, 187, 0, 105,
286 0, 104, 95, 105, 0, 104, 105, 0, 6, 0,
287 7, 0, 8, 0, 9, 0, 10, 0, 11, 0,
288 172, 12, 177, 179, 0, 172, 13, 176, 179, 0,
289 0, 172, 14, 177, 112, 187, 183, 183, 183, 109,
290 113, 3, 114, 4, 0, 0, 172, 15, 177, 112,
291 187, 183, 183, 183, 110, 113, 3, 114, 4, 0,
292 0, 172, 15, 177, 112, 187, 183, 183, 183, 183,
293 111, 113, 3, 114, 4, 0, 0, 16, 96, 184,
294 0, 0, 113, 17, 80, 0, 113, 18, 172, 0,
295 113, 19, 180, 0, 113, 16, 184, 0, 113, 18,
296 80, 0, 113, 41, 184, 95, 80, 0, 113, 41,
297 184, 95, 80, 183, 0, 113, 41, 184, 95, 80,
298 183, 183, 0, 113, 41, 184, 95, 80, 183, 183,
299 183, 0, 113, 46, 172, 0, 113, 44, 184, 0,
300 113, 43, 184, 183, 0, 113, 45, 184, 0, 0,
301 114, 115, 0, 0, 20, 138, 116, 137, 0, 0,
302 21, 138, 117, 137, 0, 0, 22, 138, 118, 137,
303 0, 0, 38, 138, 119, 137, 0, 0, 23, 138,
304 120, 137, 0, 0, 24, 121, 137, 0, 10, 138,
305 184, 183, 140, 183, 183, 183, 183, 182, 139, 0,
306 10, 138, 184, 183, 140, 183, 183, 183, 183, 183,
307 183, 139, 0, 10, 138, 184, 95, 80, 140, 183,
308 183, 183, 183, 182, 139, 0, 10, 138, 184, 95,
309 80, 140, 183, 183, 183, 183, 183, 183, 139, 0,
310 0, 25, 138, 122, 137, 0, 0, 26, 138, 123,
311 137, 0, 0, 27, 124, 137, 0, 0, 28, 138,
312 125, 137, 0, 0, 39, 138, 126, 137, 0, 42,
313 174, 184, 183, 183, 139, 0, 42, 174, 184, 183,
314 183, 183, 183, 139, 0, 42, 174, 184, 183, 183,
315 183, 183, 142, 182, 139, 0, 42, 174, 184, 183,
316 183, 183, 183, 142, 183, 183, 139, 0, 0, 40,
317 138, 127, 137, 0, 0, 29, 128, 137, 0, 0,
318 30, 138, 129, 137, 0, 0, 31, 138, 130, 137,
319 0, 0, 32, 138, 131, 137, 0, 0, 33, 138,
320 132, 137, 0, 0, 34, 138, 133, 137, 0, 0,
321 35, 134, 137, 0, 0, 36, 138, 135, 137, 0,
322 0, 37, 174, 184, 95, 184, 95, 184, 95, 184,
323 95, 184, 95, 136, 180, 182, 0, 184, 183, 183,
324 183, 183, 139, 0, 184, 183, 183, 183, 183, 144,
325 182, 139, 0, 184, 183, 183, 183, 183, 144, 183,
326 183, 139, 0, 0, 187, 95, 0, 80, 0, 80,
327 95, 0, 0, 3, 159, 4, 0, 0, 95, 141,
328 180, 0, 0, 95, 143, 180, 0, 0, 95, 145,
329 180, 0, 172, 41, 176, 179, 0, 172, 42, 176,
330 179, 0, 43, 184, 183, 0, 172, 46, 175, 3,
331 150, 4, 0, 0, 150, 151, 0, 48, 80, 183,
332 152, 0, 48, 49, 0, 50, 80, 152, 3, 150,
333 4, 0, 0, 152, 95, 153, 0, 152, 153, 0,
334 51, 0, 52, 0, 53, 0, 54, 0, 55, 0,
335 56, 0, 172, 47, 175, 3, 155, 4, 0, 0,
336 155, 156, 0, 48, 80, 0, 48, 80, 183, 0,
337 48, 80, 183, 183, 182, 0, 48, 49, 0, 50,
338 80, 3, 155, 4, 0, 50, 80, 183, 3, 155,
339 4, 0, 50, 80, 183, 183, 3, 155, 4, 0,
340 50, 80, 183, 183, 183, 182, 3, 155, 4, 0,
341 172, 57, 177, 179, 0, 172, 58, 175, 3, 159,
342 4, 0, 0, 160, 161, 0, 0, 162, 0, 83,
343 0, 185, 0, 162, 95, 83, 0, 162, 95, 185,
344 0, 0, 59, 175, 3, 164, 165, 4, 0, 0,
345 165, 184, 80, 0, 165, 184, 95, 80, 0, 172,
346 172, 175, 3, 159, 4, 0, 172, 172, 175, 179,
347 0, 172, 60, 168, 3, 169, 4, 0, 0, 168,
348 61, 184, 183, 183, 183, 0, 168, 62, 184, 183,
349 183, 183, 0, 168, 63, 184, 0, 168, 64, 184,
350 0, 168, 65, 184, 0, 168, 66, 184, 0, 168,
351 67, 184, 0, 0, 169, 68, 3, 71, 3, 170,
352 4, 4, 0, 169, 69, 3, 70, 80, 171, 4,
353 0, 0, 170, 70, 80, 95, 80, 0, 0, 171,
354 183, 183, 0, 187, 0, 81, 0, 80, 0, 80,
355 95, 0, 81, 95, 0, 187, 95, 0, 173, 0,
356 0, 175, 178, 0, 175, 44, 184, 0, 175, 43,
357 184, 183, 0, 175, 45, 184, 0, 0, 176, 178,
358 0, 0, 177, 178, 0, 72, 0, 73, 0, 74,
359 0, 75, 0, 76, 0, 77, 0, 78, 0, 80,
360 0, 81, 0, 181, 0, 79, 181, 0, 180, 85,
361 181, 0, 180, 85, 79, 181, 0, 82, 0, 97,
362 184, 98, 0, 0, 183, 0, 95, 184, 0, 185,
363 0, 82, 0, 97, 185, 98, 0, 93, 185, 0,
364 89, 185, 0, 185, 90, 185, 0, 185, 91, 185,
365 0, 185, 92, 185, 0, 185, 88, 185, 0, 185,
366 89, 185, 0, 185, 87, 185, 0, 185, 86, 185,
367 0, 185, 85, 185, 0, 95, 187, 0, 188, 0,
368 82, 0, 97, 185, 98, 0, 93, 185, 0, 188,
369 90, 185, 0, 188, 91, 185, 0, 188, 92, 185,
370 0, 188, 88, 185, 0, 188, 89, 185, 0, 188,
371 87, 185, 0, 188, 86, 185, 0, 188, 85, 185,
372 0
373 };
374
375 #endif
376
377 #if YYDEBUG
378 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
379 static const short yyrline[] =
380 {
381 0, 159, 161, 162, 163, 164, 165, 166, 167, 168,
382 169, 170, 171, 172, 173, 174, 175, 180, 190, 195,
383 215, 221, 232, 254, 263, 268, 273, 279, 284, 289,
384 293, 297, 301, 309, 321, 333, 333, 359, 359, 386,
385 386, 416, 421, 427, 429, 435, 439, 444, 448, 452,
386 465, 480, 495, 510, 514, 518, 522, 528, 530, 540,
387 540, 552, 552, 563, 563, 574, 574, 588, 588, 599,
388 599, 612, 623, 632, 645, 656, 656, 667, 667, 678,
389 678, 689, 689, 700, 700, 714, 719, 725, 731, 737,
390 737, 751, 751, 762, 762, 773, 773, 783, 783, 794,
391 794, 805, 805, 816, 816, 827, 827, 838, 838, 855,
392 867, 878, 889, 894, 899, 903, 909, 914, 922, 922,
393 928, 928, 934, 934, 942, 954, 967, 976, 986, 991,
394 1007, 1012, 1016, 1022, 1027, 1031, 1037, 1042, 1046, 1050,
395 1054, 1058, 1066, 1076, 1081, 1097, 1102, 1106, 1110, 1114,
396 1118, 1122, 1126, 1135, 1147, 1160, 1160, 1171, 1177, 1183,
397 1192, 1200, 1209, 1222, 1222, 1228, 1230, 1237, 1249, 1257,
398 1268, 1278, 1285, 1291, 1297, 1302, 1307, 1312, 1317, 1330,
399 1335, 1339, 1345, 1350, 1356, 1361, 1369, 1375, 1390, 1395,
400 1399, 1406, 1412, 1428, 1436, 1442, 1447, 1452, 1461, 1468,
401 1478, 1485, 1496, 1502, 1507, 1512, 1517, 1522, 1527, 1536,
402 1541, 1557, 1562, 1566, 1570, 1576, 1581, 1589, 1594, 1602,
403 1611, 1620, 1625, 1629, 1634, 1639, 1644, 1649, 1654, 1659,
404 1664, 1669, 1674, 1684, 1693, 1704, 1709, 1713, 1718, 1723,
405 1728, 1733, 1738, 1743, 1748, 1753
406 };
407 #endif
408
409
410 #if (YYDEBUG) || defined YYERROR_VERBOSE
411
412 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
413 static const char *const yytname[] =
414 {
415 "$", "error", "$undefined.", "BEG", "END", "ACCELERATORS", "VIRTKEY",
416 "ASCII", "NOINVERT", "SHIFT", "CONTROL", "ALT", "BITMAP", "CURSOR",
417 "DIALOG", "DIALOGEX", "EXSTYLE", "CAPTION", "CLASS", "STYLE",
418 "AUTO3STATE", "AUTOCHECKBOX", "AUTORADIOBUTTON", "CHECKBOX", "COMBOBOX",
419 "CTEXT", "DEFPUSHBUTTON", "EDITTEXT", "GROUPBOX", "LISTBOX", "LTEXT",
420 "PUSHBOX", "PUSHBUTTON", "RADIOBUTTON", "RTEXT", "SCROLLBAR", "STATE3",
421 "USERBUTTON", "BEDIT", "HEDIT", "IEDIT", "FONT", "ICON", "LANGUAGE",
422 "CHARACTERISTICS", "VERSIONK", "MENU", "MENUEX", "MENUITEM",
423 "SEPARATOR", "POPUP", "CHECKED", "GRAYED", "HELP", "INACTIVE",
424 "MENUBARBREAK", "MENUBREAK", "MESSAGETABLE", "RCDATA", "STRINGTABLE",
425 "VERSIONINFO", "FILEVERSION", "PRODUCTVERSION", "FILEFLAGSMASK",
426 "FILEFLAGS", "FILEOS", "FILETYPE", "FILESUBTYPE", "BLOCKSTRINGFILEINFO",
427 "BLOCKVARFILEINFO", "VALUE", "BLOCK", "MOVEABLE", "FIXED", "PURE",
428 "IMPURE", "PRELOAD", "LOADONCALL", "DISCARDABLE", "NOT", "QUOTEDSTRING",
429 "STRING", "NUMBER", "SIZEDSTRING", "IGNORED_TOKEN", "'|'", "'^'", "'&'",
430 "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "NEG", "','", "'='", "'('",
431 "')'", "input", "accelerator", "acc_entries", "acc_entry", "acc_event",
432 "acc_options", "acc_option", "bitmap", "cursor", "dialog", "@1", "@2",
433 "@3", "exstyle", "styles", "controls", "control", "@4", "@5", "@6",
434 "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16",
435 "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24",
436 "control_params", "optresidc", "opt_control_data", "control_styleexpr",
437 "@25", "icon_styleexpr", "@26", "control_params_styleexpr", "@27",
438 "font", "icon", "language", "menu", "menuitems", "menuitem",
439 "menuitem_flags", "menuitem_flag", "menuex", "menuexitems",
440 "menuexitem", "messagetable", "rcdata", "optrcdata_data", "@28",
441 "optrcdata_data_int", "rcdata_data", "stringtable", "@29",
442 "string_data", "user", "versioninfo", "fixedverinfo", "verblocks",
443 "vervals", "vertrans", "id", "resname", "resref", "suboptions",
444 "memflags_move_discard", "memflags_move", "memflag", "file_name",
445 "styleexpr", "parennumber", "optcnumexpr", "cnumexpr", "numexpr",
446 "sizednumexpr", "cposnumexpr", "posnumexpr", "sizedposnumexpr", 0
447 };
448 #endif
449
450 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
451 static const short yyr1[] =
452 {
453 0, 99, 99, 99, 99, 99, 99, 99, 99, 99,
454 99, 99, 99, 99, 99, 99, 99, 100, 101, 101,
455 102, 102, 103, 103, 104, 104, 104, 105, 105, 105,
456 105, 105, 105, 106, 107, 109, 108, 110, 108, 111,
457 108, 112, 112, 113, 113, 113, 113, 113, 113, 113,
458 113, 113, 113, 113, 113, 113, 113, 114, 114, 116,
459 115, 117, 115, 118, 115, 119, 115, 120, 115, 121,
460 115, 115, 115, 115, 115, 122, 115, 123, 115, 124,
461 115, 125, 115, 126, 115, 115, 115, 115, 115, 127,
462 115, 128, 115, 129, 115, 130, 115, 131, 115, 132,
463 115, 133, 115, 134, 115, 135, 115, 136, 115, 137,
464 137, 137, 138, 138, 138, 138, 139, 139, 141, 140,
465 143, 142, 145, 144, 146, 147, 148, 149, 150, 150,
466 151, 151, 151, 152, 152, 152, 153, 153, 153, 153,
467 153, 153, 154, 155, 155, 156, 156, 156, 156, 156,
468 156, 156, 156, 157, 158, 160, 159, 161, 161, 162,
469 162, 162, 162, 164, 163, 165, 165, 165, 166, 166,
470 167, 168, 168, 168, 168, 168, 168, 168, 168, 169,
471 169, 169, 170, 170, 171, 171, 172, 172, 173, 173,
472 173, 174, 174, 175, 175, 175, 175, 175, 176, 176,
473 177, 177, 178, 178, 178, 178, 178, 178, 178, 179,
474 179, 180, 180, 180, 180, 181, 181, 182, 182, 183,
475 184, 185, 185, 185, 185, 185, 185, 185, 185, 185,
476 185, 185, 185, 186, 187, 188, 188, 188, 188, 188,
477 188, 188, 188, 188, 188, 188
478 };
479
480 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
481 static const short yyr2[] =
482 {
483 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 6, 0, 2,
485 2, 4, 1, 1, 1, 3, 2, 1, 1, 1,
486 1, 1, 1, 4, 4, 0, 13, 0, 13, 0,
487 14, 0, 3, 0, 3, 3, 3, 3, 3, 5,
488 6, 7, 8, 3, 3, 4, 3, 0, 2, 0,
489 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
490 3, 11, 12, 12, 13, 0, 4, 0, 4, 0,
491 3, 0, 4, 0, 4, 6, 8, 10, 11, 0,
492 4, 0, 3, 0, 4, 0, 4, 0, 4, 0,
493 4, 0, 4, 0, 3, 0, 4, 0, 15, 6,
494 8, 9, 0, 2, 1, 2, 0, 3, 0, 3,
495 0, 3, 0, 3, 4, 4, 3, 6, 0, 2,
496 4, 2, 6, 0, 3, 2, 1, 1, 1, 1,
497 1, 1, 6, 0, 2, 2, 3, 5, 2, 5,
498 6, 7, 9, 4, 6, 0, 2, 0, 1, 1,
499 1, 3, 3, 0, 6, 0, 3, 4, 6, 4,
500 6, 0, 6, 6, 3, 3, 3, 3, 3, 0,
501 8, 7, 0, 5, 0, 3, 1, 1, 1, 2,
502 2, 2, 1, 0, 2, 3, 4, 3, 0, 2,
503 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
504 1, 1, 2, 3, 4, 1, 3, 0, 1, 2,
505 1, 1, 3, 2, 2, 3, 3, 3, 3, 3,
506 3, 3, 3, 2, 1, 1, 3, 2, 3, 3,
507 3, 3, 3, 3, 3, 3
508 };
509
510 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
511 doesn't specify something else to do. Zero means the default is an
512 error. */
513 static const short yydefact[] =
514 {
515 1, 0, 0, 193, 187, 235, 16, 0, 0, 2,
516 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
517 13, 14, 15, 0, 186, 234, 221, 0, 0, 0,
518 0, 220, 0, 237, 0, 193, 200, 198, 200, 200,
519 198, 198, 193, 193, 200, 193, 171, 193, 0, 0,
520 0, 0, 0, 0, 0, 0, 224, 223, 0, 0,
521 126, 0, 0, 0, 0, 0, 0, 0, 0, 163,
522 0, 0, 0, 202, 203, 204, 205, 206, 207, 208,
523 194, 236, 0, 0, 0, 41, 41, 0, 0, 0,
524 0, 0, 0, 0, 0, 245, 244, 243, 241, 242,
525 238, 239, 240, 222, 219, 232, 231, 230, 228, 229,
526 225, 226, 227, 165, 0, 195, 197, 18, 209, 210,
527 201, 33, 199, 34, 0, 0, 0, 124, 125, 128,
528 143, 153, 155, 179, 0, 0, 0, 0, 0, 0,
529 0, 155, 169, 0, 196, 0, 0, 0, 0, 0,
530 0, 0, 157, 0, 0, 0, 174, 175, 176, 177,
531 178, 0, 164, 0, 17, 22, 19, 0, 23, 42,
532 0, 0, 127, 0, 0, 129, 142, 0, 0, 144,
533 154, 159, 156, 158, 160, 170, 0, 0, 0, 0,
534 168, 166, 0, 0, 20, 0, 0, 131, 0, 133,
535 148, 145, 0, 0, 0, 0, 0, 0, 167, 233,
536 0, 35, 37, 133, 0, 146, 143, 0, 161, 162,
537 0, 0, 172, 173, 27, 28, 29, 30, 31, 32,
538 21, 24, 43, 43, 39, 130, 128, 136, 137, 138,
539 139, 140, 141, 0, 135, 217, 0, 143, 0, 182,
540 184, 0, 26, 0, 0, 43, 0, 134, 147, 218,
541 149, 0, 143, 217, 0, 0, 25, 57, 0, 0,
542 0, 0, 0, 0, 0, 0, 0, 57, 0, 132,
543 150, 0, 0, 0, 0, 181, 0, 0, 47, 44,
544 48, 45, 0, 215, 0, 46, 211, 0, 0, 54,
545 56, 53, 0, 57, 151, 143, 180, 0, 185, 36,
546 112, 112, 112, 112, 112, 69, 112, 112, 79, 112,
547 91, 112, 112, 112, 112, 112, 103, 112, 0, 112,
548 112, 112, 0, 58, 212, 0, 0, 0, 55, 38,
549 0, 0, 0, 114, 0, 0, 59, 61, 63, 67,
550 0, 75, 77, 0, 81, 0, 93, 95, 97, 99,
551 101, 0, 105, 188, 0, 192, 0, 0, 65, 83,
552 89, 0, 216, 0, 213, 49, 40, 152, 183, 115,
553 0, 113, 0, 0, 0, 0, 70, 0, 0, 0,
554 80, 0, 92, 0, 0, 0, 0, 0, 104, 0,
555 189, 190, 0, 191, 0, 0, 0, 0, 214, 50,
556 0, 0, 60, 62, 64, 68, 0, 76, 78, 82,
557 94, 96, 98, 100, 102, 106, 0, 66, 84, 90,
558 0, 51, 0, 118, 0, 0, 0, 116, 52, 0,
559 0, 0, 0, 0, 155, 85, 0, 0, 119, 0,
560 116, 0, 0, 116, 0, 0, 122, 109, 217, 0,
561 117, 120, 86, 217, 0, 217, 0, 116, 218, 0,
562 0, 116, 218, 217, 116, 218, 123, 110, 116, 0,
563 121, 87, 116, 116, 218, 71, 116, 111, 0, 88,
564 73, 116, 72, 107, 74, 0, 217, 108, 0, 0
565 };
566
567 static const short yydefgoto[] =
568 {
569 1, 9, 145, 166, 167, 230, 231, 10, 11, 12,
570 232, 233, 255, 125, 253, 287, 333, 382, 383, 384,
571 404, 385, 350, 388, 389, 353, 391, 405, 406, 355,
572 393, 394, 395, 396, 397, 361, 399, 495, 386, 344,
573 445, 434, 440, 463, 470, 458, 466, 13, 14, 15,
574 16, 149, 175, 214, 244, 17, 150, 179, 18, 19,
575 151, 152, 182, 183, 20, 113, 143, 21, 22, 93,
576 153, 264, 265, 23, 365, 366, 32, 84, 83, 80,
577 121, 295, 296, 258, 259, 387, 31, 194, 345, 25
578 };
579
580 static const short yypact[] =
581 {
582 -32768, 13, 265,-32768,-32768,-32768,-32768, 265, 265,-32768,
583 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
584 -32768,-32768,-32768, 110,-32768, 567,-32768, 265, 265, 265,
585 -70, 605, 300,-32768, 657,-32768,-32768,-32768,-32768,-32768,
586 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 265, 265,
587 265, 265, 265, 265, 265, 265,-32768,-32768, 671, 265,
588 -32768, 265, 265, 265, 265, 265, 265, 265, 265,-32768,
589 265, 265, 265,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
590 -32768,-32768, 307, 698, 698, 224, 224, 698, 698, 323,
591 345, 698, 445, 195, 244, 694, 700, 217, 89, 89,
592 -32768,-32768,-32768,-32768,-32768, 694, 700, 217, 89, 89,
593 -32768,-32768,-32768,-32768, -70,-32768,-32768,-32768,-32768,-32768,
594 -32768,-32768,-32768,-32768, -42, 141, 141,-32768,-32768,-32768,
595 -32768,-32768,-32768,-32768, 265, 265, 265, 265, 265, 265,
596 265,-32768,-32768, -1,-32768, 5, 265, -70, -70, 3,
597 34, 51, 186, 39, -70, -70,-32768,-32768,-32768,-32768,
598 -32768, 54,-32768, 10,-32768,-32768,-32768, -12,-32768,-32768,
599 -70, -70,-32768, -35, 11,-32768,-32768, -31, 31,-32768,
600 -32768,-32768,-32768, 23, 605,-32768, 128, 137, -70, -70,
601 -32768,-32768, 68, 141, 58, -70, -70,-32768, -70,-32768,
602 -32768, -70, 8, 516, 28, 85, -70, -70,-32768,-32768,
603 787,-32768, -70,-32768, 158, -70,-32768, 9,-32768, 605,
604 156, 80,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
605 22,-32768,-32768,-32768,-32768, 359,-32768,-32768,-32768,-32768,
606 -32768,-32768,-32768, 748,-32768, -70, 115,-32768, 14,-32768,
607 -32768, 787,-32768, 529, 540,-32768, 123,-32768,-32768,-32768,
608 -32768, 124,-32768, -70, 30, 6,-32768,-32768, 265, 86,
609 65, 96, 265, 265, 265, 265, 256,-32768, 549,-32768,
610 -32768, 138, 166, 178, 105,-32768, -70, 604,-32768,-32768,
611 -32768,-32768, 57,-32768, 265, 104,-32768, 100, -70,-32768,
612 -32768,-32768, 641,-32768,-32768,-32768,-32768, 107,-32768,-32768,
613 170, 170, 170, 170, 170,-32768, 170, 170,-32768, 170,
614 -32768, 170, 170, 170, 170, 170,-32768, 170, 140, 170,
615 170, 170, 140,-32768,-32768, 106, 108, 139,-32768,-32768,
616 678, 146, 148, 131, 265, 134,-32768,-32768,-32768,-32768,
617 265,-32768,-32768, 265,-32768, 265,-32768,-32768,-32768,-32768,
618 -32768, 265,-32768, 147, 150,-32768, 265, 153,-32768,-32768,
619 -32768, 265,-32768, 57,-32768, -70,-32768,-32768,-32768,-32768,
620 159,-32768, 265, 265, 265, 265,-32768, -70, 265, 265,
621 -32768, 265,-32768, 265, 265, 265, 265, 265,-32768, 265,
622 -32768,-32768, 169,-32768, 265, 265, 265, -70,-32768, -70,
623 346, 181,-32768,-32768,-32768,-32768, -70,-32768,-32768,-32768,
624 -32768,-32768,-32768,-32768,-32768,-32768, 265,-32768,-32768,-32768,
625 -70, -70, 181,-32768, -70, -70, 183, 18,-32768, -70,
626 96, -70, -70, 265,-32768,-32768, -70, -70, 104, -70,
627 19, 187, 228, 21, -70, -70,-32768,-32768, -70, 265,
628 -32768,-32768,-32768, -70, -70, -70, 96, 240, -70, 189,
629 96, 240, -70, -70, 240, -70, 104,-32768, 240, 265,
630 104,-32768, 240, 240, -70,-32768, 240,-32768, 190,-32768,
631 -32768, 240,-32768,-32768,-32768, 96, -59,-32768, 251,-32768
632 };
633
634 static const short yypgoto[] =
635 {
636 -32768,-32768,-32768,-32768,-32768,-32768, -207,-32768,-32768,-32768,
637 -32768,-32768,-32768, 179, -218, -191,-32768,-32768,-32768,-32768,
638 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
639 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 145, 410,
640 129, -151,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
641 -32768, 50,-32768, 77, 48,-32768, -212,-32768,-32768,-32768,
642 -140,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
643 -32768,-32768,-32768, -21,-32768, -39, 288, 7, 82, 424,
644 343, -424, -284, -257, 29, -2, 12,-32768, 4,-32768
645 };
646
647
648 #define YYLAST 804
649
650
651 static const short yytable[] =
652 {
653 30, 161, 47, 162, 246, 24, 282, 172, 334, 164,
654 285, 216, 247, 498, 197, 254, 448, 262, 200, 33,
655 34, 444, 444, 252, 444, 59, 336, 24, 224, 225,
656 226, 227, 228, 229, 283, 261, 59, 278, 176, 56,
657 57, 58, 476, 185, 266, 198, 480, 87, 88, 201,
658 281, 173, 374, 174, 146, 180, 2, 104, 190, 60,
659 95, 96, 97, 98, 99, 100, 101, 102, 114, 115,
660 116, 496, 3, 105, 106, 107, 108, 109, 110, 111,
661 112, 26, 177, 193, 178, 165, 302, 5, 27, 408,
662 191, 199, 28, 341, 4, 5, 29, 6, 7, 220,
663 284, 59, 8, 59, 59, 192, 7, 186, 187, 59,
664 8, 202, 340, 59, 456, 35, 461, 251, 203, 260,
665 85, 86, 36, 37, 38, 39, 91, 279, 280, 147,
666 148, 204, 154, 155, 156, 157, 158, 159, 160, 293,
667 205, 163, 304, 144, 169, 290, 4, 5, 208, 168,
668 377, 40, 41, 210, 294, 221, 42, 43, 7, 249,
669 250, 236, 8, 177, 184, 178, 289, 44, 45, 305,
670 46, 173, 177, 174, 178, 292, 170, 171, 293, 66,
671 67, 68, 306, 188, 189, 307, 177, 373, 178, 336,
672 293, 4, 5, 294, 177, 337, 178, 209, 133, 195,
673 196, 467, 342, 7, 372, 294, 471, 8, 474, 237,
674 238, 239, 240, 241, 242, 219, 483, 206, 207, 375,
675 363, 364, 5, 5, 211, 212, 379, 213, 378, 381,
676 215, 217, 460, 7, 7, 222, 223, 8, 8, 497,
677 124, 234, 400, 444, 245, 401, 248, 141, 403, 291,
678 343, 499, 5, 243, 410, 301, 134, 135, 136, 137,
679 138, 139, 140, 7, 426, 126, 288, 8, 26, 181,
680 297, 298, 299, 300, 24, 27, 433, 263, 443, 28,
681 24, 439, 459, 29, 479, 493, 256, 70, 71, 72,
682 235, 257, 335, 371, 286, 0, 73, 74, 75, 76,
683 77, 78, 79, 69, 452, 64, 65, 66, 67, 68,
684 117, 0, 0, 0, 0, 308, 73, 74, 75, 76,
685 77, 78, 79, 82, 118, 119, 129, 338, 0, 0,
686 89, 90, 367, 92, 0, 94, 367, 4, 5, 0,
687 0, 0, 380, 70, 71, 72, 0, 26, 130, 7,
688 70, 71, 72, 8, 27, 0, 0, 0, 28, 0,
689 0, 0, 29, 0, 402, 0, 70, 71, 72, 407,
690 0, 0, 73, 74, 75, 76, 77, 78, 79, 73,
691 74, 75, 76, 77, 78, 79, 0, 0, 70, 71,
692 72, 0, 0, 0, 0, 73, 74, 75, 76, 77,
693 78, 79, 0, 0, 409, 0, 0, 0, 104, 411,
694 237, 238, 239, 240, 241, 242, 416, 73, 74, 75,
695 76, 77, 78, 79, 436, 0, 432, 123, 26, 0,
696 127, 128, 0, 0, 131, 27, 430, 142, 431, 28,
697 0, 451, 0, 29, 0, 435, 0, 0, 132, 0,
698 0, 0, 0, 0, 243, 0, 0, 469, 0, 437,
699 438, 0, 0, 441, 442, 0, 446, 0, 447, 0,
700 449, 450, 0, 0, 0, 453, 454, 488, 455, 0,
701 0, 0, 0, 464, 465, 0, 0, 468, 70, 71,
702 72, 0, 472, 473, 475, 0, 0, 478, 390, 0,
703 392, 482, 484, 0, 486, 0, 398, 120, 122, 120,
704 120, 122, 122, 491, 0, 120, 0, 73, 74, 75,
705 76, 77, 78, 79, 0, 0, 0, 412, 413, 414,
706 415, 0, 267, 417, 418, 0, 419, 0, 420, 421,
707 422, 423, 424, 277, 425, 268, 269, 270, 271, 427,
708 428, 429, 303, 0, 0, 0, 268, 269, 270, 271,
709 0, 0, 0, 0, 0, 268, 269, 270, 271, 0,
710 272, 0, 273, 274, 275, 276, 0, 0, 0, 457,
711 0, 272, 462, 273, 274, 275, 276, 0, 0, 0,
712 272, 0, 273, 274, 275, 276, 477, 0, 26, 218,
713 481, 0, 0, 485, 0, 27, 0, 487, 309, 28,
714 0, 489, 490, 29, 310, 492, 0, 0, 0, 0,
715 494, 0, 0, 0, 311, 312, 313, 314, 315, 316,
716 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
717 327, 328, 329, 330, 331, 339, 332, 0, 0, 0,
718 0, 310, 48, 49, 50, 51, 52, 53, 54, 55,
719 0, 311, 312, 313, 314, 315, 316, 317, 318, 319,
720 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
721 330, 331, 376, 332, 0, 0, 0, 0, 310, 0,
722 61, 62, 63, 64, 65, 66, 67, 68, 311, 312,
723 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
724 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
725 332, 346, 347, 348, 349, 0, 351, 352, 0, 354,
726 0, 356, 357, 358, 359, 360, 0, 362, 0, 368,
727 369, 370, 61, 62, 63, 64, 65, 66, 67, 68,
728 0, 0, 0, 0, 0, 81, 61, 62, 63, 64,
729 65, 66, 67, 68, 0, 0, 0, 0, 0, 103,
730 73, 74, 75, 76, 77, 78, 79, 0, 118, 119,
731 62, 63, 64, 65, 66, 67, 68, 63, 64, 65,
732 66, 67, 68, 224, 225, 226, 227, 228, 229, 237,
733 238, 239, 240, 241, 242
734 };
735
736 static const short yycheck[] =
737 {
738 2, 141, 23, 4, 216, 1, 263, 4, 292, 4,
739 4, 3, 3, 0, 49, 233, 440, 3, 49, 7,
740 8, 3, 3, 230, 3, 95, 85, 23, 6, 7,
741 8, 9, 10, 11, 4, 247, 95, 255, 4, 27,
742 28, 29, 466, 4, 251, 80, 470, 40, 41, 80,
743 262, 48, 336, 50, 96, 4, 43, 59, 4, 30,
744 48, 49, 50, 51, 52, 53, 54, 55, 70, 71,
745 72, 495, 59, 61, 62, 63, 64, 65, 66, 67,
746 68, 82, 48, 95, 50, 80, 277, 82, 89, 373,
747 80, 80, 93, 305, 81, 82, 97, 84, 93, 71,
748 70, 95, 97, 95, 95, 95, 93, 68, 69, 95,
749 97, 80, 303, 95, 95, 5, 95, 95, 95, 4,
750 38, 39, 12, 13, 14, 15, 44, 4, 4, 125,
751 126, 3, 134, 135, 136, 137, 138, 139, 140, 82,
752 3, 143, 4, 114, 146, 80, 81, 82, 80, 145,
753 4, 41, 42, 95, 97, 70, 46, 47, 93, 3,
754 80, 3, 97, 48, 152, 50, 80, 57, 58, 3,
755 60, 48, 48, 50, 50, 79, 147, 148, 82, 90,
756 91, 92, 4, 154, 155, 80, 48, 79, 50, 85,
757 82, 81, 82, 97, 48, 95, 50, 193, 3, 170,
758 171, 458, 95, 93, 98, 97, 463, 97, 465, 51,
759 52, 53, 54, 55, 56, 203, 473, 188, 189, 80,
760 80, 81, 82, 82, 195, 196, 95, 198, 80, 95,
761 201, 202, 4, 93, 93, 206, 207, 97, 97, 496,
762 16, 212, 95, 3, 215, 95, 217, 3, 95, 270,
763 80, 0, 82, 95, 95, 276, 61, 62, 63, 64,
764 65, 66, 67, 93, 95, 86, 268, 97, 82, 83,
765 272, 273, 274, 275, 270, 89, 95, 248, 95, 93,
766 276, 432, 95, 97, 95, 95, 236, 43, 44, 45,
767 213, 243, 294, 332, 265, -1, 72, 73, 74, 75,
768 76, 77, 78, 3, 444, 88, 89, 90, 91, 92,
769 3, -1, -1, -1, -1, 286, 72, 73, 74, 75,
770 76, 77, 78, 35, 80, 81, 3, 298, -1, -1,
771 42, 43, 328, 45, -1, 47, 332, 81, 82, -1,
772 -1, -1, 344, 43, 44, 45, -1, 82, 3, 93,
773 43, 44, 45, 97, 89, -1, -1, -1, 93, -1,
774 -1, -1, 97, -1, 366, -1, 43, 44, 45, 371,
775 -1, -1, 72, 73, 74, 75, 76, 77, 78, 72,
776 73, 74, 75, 76, 77, 78, -1, -1, 43, 44,
777 45, -1, -1, -1, -1, 72, 73, 74, 75, 76,
778 77, 78, -1, -1, 375, -1, -1, -1, 410, 380,
779 51, 52, 53, 54, 55, 56, 387, 72, 73, 74,
780 75, 76, 77, 78, 426, -1, 80, 84, 82, -1,
781 87, 88, -1, -1, 91, 89, 407, 94, 409, 93,
782 -1, 443, -1, 97, -1, 416, -1, -1, 3, -1,
783 -1, -1, -1, -1, 95, -1, -1, 459, -1, 430,
784 431, -1, -1, 434, 435, -1, 437, -1, 439, -1,
785 441, 442, -1, -1, -1, 446, 447, 479, 449, -1,
786 -1, -1, -1, 454, 455, -1, -1, 458, 43, 44,
787 45, -1, 463, 464, 465, -1, -1, 468, 353, -1,
788 355, 472, 473, -1, 475, -1, 361, 83, 84, 85,
789 86, 87, 88, 484, -1, 91, -1, 72, 73, 74,
790 75, 76, 77, 78, -1, -1, -1, 382, 383, 384,
791 385, -1, 3, 388, 389, -1, 391, -1, 393, 394,
792 395, 396, 397, 3, 399, 16, 17, 18, 19, 404,
793 405, 406, 3, -1, -1, -1, 16, 17, 18, 19,
794 -1, -1, -1, -1, -1, 16, 17, 18, 19, -1,
795 41, -1, 43, 44, 45, 46, -1, -1, -1, 450,
796 -1, 41, 453, 43, 44, 45, 46, -1, -1, -1,
797 41, -1, 43, 44, 45, 46, 467, -1, 82, 83,
798 471, -1, -1, 474, -1, 89, -1, 478, 4, 93,
799 -1, 482, 483, 97, 10, 486, -1, -1, -1, -1,
800 491, -1, -1, -1, 20, 21, 22, 23, 24, 25,
801 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
802 36, 37, 38, 39, 40, 4, 42, -1, -1, -1,
803 -1, 10, 85, 86, 87, 88, 89, 90, 91, 92,
804 -1, 20, 21, 22, 23, 24, 25, 26, 27, 28,
805 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
806 39, 40, 4, 42, -1, -1, -1, -1, 10, -1,
807 85, 86, 87, 88, 89, 90, 91, 92, 20, 21,
808 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
809 32, 33, 34, 35, 36, 37, 38, 39, 40, -1,
810 42, 311, 312, 313, 314, -1, 316, 317, -1, 319,
811 -1, 321, 322, 323, 324, 325, -1, 327, -1, 329,
812 330, 331, 85, 86, 87, 88, 89, 90, 91, 92,
813 -1, -1, -1, -1, -1, 98, 85, 86, 87, 88,
814 89, 90, 91, 92, -1, -1, -1, -1, -1, 98,
815 72, 73, 74, 75, 76, 77, 78, -1, 80, 81,
816 86, 87, 88, 89, 90, 91, 92, 87, 88, 89,
817 90, 91, 92, 6, 7, 8, 9, 10, 11, 51,
818 52, 53, 54, 55, 56
819 };
820 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
821 #line 3 "/usr/share/bison-1.35/bison.simple"
822
823 /* Skeleton output parser for bison,
824
825 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
826 Foundation, Inc.
827
828 This program is free software; you can redistribute it and/or modify
829 it under the terms of the GNU General Public License as published by
830 the Free Software Foundation; either version 2, or (at your option)
831 any later version.
832
833 This program is distributed in the hope that it will be useful,
834 but WITHOUT ANY WARRANTY; without even the implied warranty of
835 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
836 GNU General Public License for more details.
837
838 You should have received a copy of the GNU General Public License
839 along with this program; if not, write to the Free Software
840 Foundation, Inc., 59 Temple Place - Suite 330,
841 Boston, MA 02111-1307, USA. */
842
843 /* As a special exception, when this file is copied by Bison into a
844 Bison output file, you may use that output file without restriction.
845 This special exception was added by the Free Software Foundation
846 in version 1.24 of Bison. */
847
848 /* This is the parser code that is written into each bison parser when
849 the %semantic_parser declaration is not specified in the grammar.
850 It was written by Richard Stallman by simplifying the hairy parser
851 used when %semantic_parser is specified. */
852
853 /* All symbols defined below should begin with yy or YY, to avoid
854 infringing on user name space. This should be done even for local
855 variables, as they might otherwise be expanded by user macros.
856 There are some unavoidable exceptions within include files to
857 define necessary library symbols; they are noted "INFRINGES ON
858 USER NAME SPACE" below. */
859
860 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
861
862 /* The parser invokes alloca or malloc; define the necessary symbols. */
863
864 # if YYSTACK_USE_ALLOCA
865 # define YYSTACK_ALLOC alloca
866 # else
867 # ifndef YYSTACK_USE_ALLOCA
868 # if defined (alloca) || defined (_ALLOCA_H)
869 # define YYSTACK_ALLOC alloca
870 # else
871 # ifdef __GNUC__
872 # define YYSTACK_ALLOC __builtin_alloca
873 # endif
874 # endif
875 # endif
876 # endif
877
878 # ifdef YYSTACK_ALLOC
879 /* Pacify GCC's `empty if-body' warning. */
880 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
881 # else
882 # if defined (__STDC__) || defined (__cplusplus)
883 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
884 # define YYSIZE_T size_t
885 # endif
886 # define YYSTACK_ALLOC malloc
887 # define YYSTACK_FREE free
888 # endif
889 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
890
891
892 #if (! defined (yyoverflow) \
893 && (! defined (__cplusplus) \
894 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
895
896 /* A type that is properly aligned for any stack member. */
897 union yyalloc
898 {
899 short yyss;
900 YYSTYPE yyvs;
901 # if YYLSP_NEEDED
902 YYLTYPE yyls;
903 # endif
904 };
905
906 /* The size of the maximum gap between one aligned stack and the next. */
907 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
908
909 /* The size of an array large to enough to hold all stacks, each with
910 N elements. */
911 # if YYLSP_NEEDED
912 # define YYSTACK_BYTES(N) \
913 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
914 + 2 * YYSTACK_GAP_MAX)
915 # else
916 # define YYSTACK_BYTES(N) \
917 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
918 + YYSTACK_GAP_MAX)
919 # endif
920
921 /* Copy COUNT objects from FROM to TO. The source and destination do
922 not overlap. */
923 # ifndef YYCOPY
924 # if 1 < __GNUC__
925 # define YYCOPY(To, From, Count) \
926 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
927 # else
928 # define YYCOPY(To, From, Count) \
929 do \
930 { \
931 register YYSIZE_T yyi; \
932 for (yyi = 0; yyi < (Count); yyi++) \
933 (To)[yyi] = (From)[yyi]; \
934 } \
935 while (0)
936 # endif
937 # endif
938
939 /* Relocate STACK from its old location to the new one. The
940 local variables YYSIZE and YYSTACKSIZE give the old and new number of
941 elements in the stack, and YYPTR gives the new location of the
942 stack. Advance YYPTR to a properly aligned location for the next
943 stack. */
944 # define YYSTACK_RELOCATE(Stack) \
945 do \
946 { \
947 YYSIZE_T yynewbytes; \
948 YYCOPY (&yyptr->Stack, Stack, yysize); \
949 Stack = &yyptr->Stack; \
950 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
951 yyptr += yynewbytes / sizeof (*yyptr); \
952 } \
953 while (0)
954
955 #endif
956
957
958 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
959 # define YYSIZE_T __SIZE_TYPE__
960 #endif
961 #if ! defined (YYSIZE_T) && defined (size_t)
962 # define YYSIZE_T size_t
963 #endif
964 #if ! defined (YYSIZE_T)
965 # if defined (__STDC__) || defined (__cplusplus)
966 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
967 # define YYSIZE_T size_t
968 # endif
969 #endif
970 #if ! defined (YYSIZE_T)
971 # define YYSIZE_T unsigned int
972 #endif
973
974 #define yyerrok (yyerrstatus = 0)
975 #define yyclearin (yychar = YYEMPTY)
976 #define YYEMPTY -2
977 #define YYEOF 0
978 #define YYACCEPT goto yyacceptlab
979 #define YYABORT goto yyabortlab
980 #define YYERROR goto yyerrlab1
981 /* Like YYERROR except do call yyerror. This remains here temporarily
982 to ease the transition to the new meaning of YYERROR, for GCC.
983 Once GCC version 2 has supplanted version 1, this can go. */
984 #define YYFAIL goto yyerrlab
985 #define YYRECOVERING() (!!yyerrstatus)
986 #define YYBACKUP(Token, Value) \
987 do \
988 if (yychar == YYEMPTY && yylen == 1) \
989 { \
990 yychar = (Token); \
991 yylval = (Value); \
992 yychar1 = YYTRANSLATE (yychar); \
993 YYPOPSTACK; \
994 goto yybackup; \
995 } \
996 else \
997 { \
998 yyerror ("syntax error: cannot back up"); \
999 YYERROR; \
1000 } \
1001 while (0)
1002
1003 #define YYTERROR 1
1004 #define YYERRCODE 256
1005
1006
1007 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
1008 are run).
1009
1010 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
1011 first token. By default, to implement support for ranges, extend
1012 its range to the last symbol. */
1013
1014 #ifndef YYLLOC_DEFAULT
1015 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1016 Current.last_line = Rhs[N].last_line; \
1017 Current.last_column = Rhs[N].last_column;
1018 #endif
1019
1020
1021 /* YYLEX -- calling `yylex' with the right arguments. */
1022
1023 #if YYPURE
1024 # if YYLSP_NEEDED
1025 # ifdef YYLEX_PARAM
1026 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1027 # else
1028 # define YYLEX yylex (&yylval, &yylloc)
1029 # endif
1030 # else /* !YYLSP_NEEDED */
1031 # ifdef YYLEX_PARAM
1032 # define YYLEX yylex (&yylval, YYLEX_PARAM)
1033 # else
1034 # define YYLEX yylex (&yylval)
1035 # endif
1036 # endif /* !YYLSP_NEEDED */
1037 #else /* !YYPURE */
1038 # define YYLEX yylex ()
1039 #endif /* !YYPURE */
1040
1041
1042 /* Enable debugging if requested. */
1043 #if YYDEBUG
1044
1045 # ifndef YYFPRINTF
1046 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1047 # define YYFPRINTF fprintf
1048 # endif
1049
1050 # define YYDPRINTF(Args) \
1051 do { \
1052 if (yydebug) \
1053 YYFPRINTF Args; \
1054 } while (0)
1055 /* Nonzero means print parse trace. It is left uninitialized so that
1056 multiple parsers can coexist. */
1057 int yydebug;
1058 #else /* !YYDEBUG */
1059 # define YYDPRINTF(Args)
1060 #endif /* !YYDEBUG */
1061
1062 /* YYINITDEPTH -- initial size of the parser's stacks. */
1063 #ifndef YYINITDEPTH
1064 # define YYINITDEPTH 200
1065 #endif
1066
1067 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1068 if the built-in stack extension method is used).
1069
1070 Do not make this value too large; the results are undefined if
1071 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1072 evaluated with infinite-precision integer arithmetic. */
1073
1074 #if YYMAXDEPTH == 0
1075 # undef YYMAXDEPTH
1076 #endif
1077
1078 #ifndef YYMAXDEPTH
1079 # define YYMAXDEPTH 10000
1080 #endif
1081
1082 #ifdef YYERROR_VERBOSE
1083
1084 # ifndef yystrlen
1085 # if defined (__GLIBC__) && defined (_STRING_H)
1086 # define yystrlen strlen
1087 # else
1088 /* Return the length of YYSTR. */
1089 static YYSIZE_T
1090 # if defined (__STDC__) || defined (__cplusplus)
yystrlen(const char * yystr)1091 yystrlen (const char *yystr)
1092 # else
1093 yystrlen (yystr)
1094 const char *yystr;
1095 # endif
1096 {
1097 register const char *yys = yystr;
1098
1099 while (*yys++ != '\0')
1100 continue;
1101
1102 return yys - yystr - 1;
1103 }
1104 # endif
1105 # endif
1106
1107 # ifndef yystpcpy
1108 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1109 # define yystpcpy stpcpy
1110 # else
1111 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1112 YYDEST. */
1113 static char *
1114 # if defined (__STDC__) || defined (__cplusplus)
yystpcpy(char * yydest,const char * yysrc)1115 yystpcpy (char *yydest, const char *yysrc)
1116 # else
1117 yystpcpy (yydest, yysrc)
1118 char *yydest;
1119 const char *yysrc;
1120 # endif
1121 {
1122 register char *yyd = yydest;
1123 register const char *yys = yysrc;
1124
1125 while ((*yyd++ = *yys++) != '\0')
1126 continue;
1127
1128 return yyd - 1;
1129 }
1130 # endif
1131 # endif
1132 #endif
1133
1134 #line 315 "/usr/share/bison-1.35/bison.simple"
1135
1136
1137 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1138 into yyparse. The argument should have type void *.
1139 It should actually point to an object.
1140 Grammar actions can access the variable by casting it
1141 to the proper pointer type. */
1142
1143 #ifdef YYPARSE_PARAM
1144 # if defined (__STDC__) || defined (__cplusplus)
1145 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1146 # define YYPARSE_PARAM_DECL
1147 # else
1148 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
1149 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1150 # endif
1151 #else /* !YYPARSE_PARAM */
1152 # define YYPARSE_PARAM_ARG
1153 # define YYPARSE_PARAM_DECL
1154 #endif /* !YYPARSE_PARAM */
1155
1156 /* Prevent warning if -Wstrict-prototypes. */
1157 #ifdef __GNUC__
1158 # ifdef YYPARSE_PARAM
1159 int yyparse (void *);
1160 # else
1161 int yyparse (void);
1162 # endif
1163 #endif
1164
1165 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
1166 variables are global, or local to YYPARSE. */
1167
1168 #define YY_DECL_NON_LSP_VARIABLES \
1169 /* The lookahead symbol. */ \
1170 int yychar; \
1171 \
1172 /* The semantic value of the lookahead symbol. */ \
1173 YYSTYPE yylval; \
1174 \
1175 /* Number of parse errors so far. */ \
1176 int yynerrs;
1177
1178 #if YYLSP_NEEDED
1179 # define YY_DECL_VARIABLES \
1180 YY_DECL_NON_LSP_VARIABLES \
1181 \
1182 /* Location data for the lookahead symbol. */ \
1183 YYLTYPE yylloc;
1184 #else
1185 # define YY_DECL_VARIABLES \
1186 YY_DECL_NON_LSP_VARIABLES
1187 #endif
1188
1189
1190 /* If nonreentrant, generate the variables here. */
1191
1192 #if !YYPURE
1193 YY_DECL_VARIABLES
1194 #endif /* !YYPURE */
1195
1196 int
yyparse(YYPARSE_PARAM_ARG)1197 yyparse (YYPARSE_PARAM_ARG)
1198 YYPARSE_PARAM_DECL
1199 {
1200 /* If reentrant, generate the variables here. */
1201 #if YYPURE
1202 YY_DECL_VARIABLES
1203 #endif /* !YYPURE */
1204
1205 register int yystate;
1206 register int yyn;
1207 int yyresult;
1208 /* Number of tokens to shift before error messages enabled. */
1209 int yyerrstatus;
1210 /* Lookahead token as an internal (translated) token number. */
1211 int yychar1 = 0;
1212
1213 /* Three stacks and their tools:
1214 `yyss': related to states,
1215 `yyvs': related to semantic values,
1216 `yyls': related to locations.
1217
1218 Refer to the stacks thru separate pointers, to allow yyoverflow
1219 to reallocate them elsewhere. */
1220
1221 /* The state stack. */
1222 short yyssa[YYINITDEPTH];
1223 short *yyss = yyssa;
1224 register short *yyssp;
1225
1226 /* The semantic value stack. */
1227 YYSTYPE yyvsa[YYINITDEPTH];
1228 YYSTYPE *yyvs = yyvsa;
1229 register YYSTYPE *yyvsp;
1230
1231 #if YYLSP_NEEDED
1232 /* The location stack. */
1233 YYLTYPE yylsa[YYINITDEPTH];
1234 YYLTYPE *yyls = yylsa;
1235 YYLTYPE *yylsp;
1236 #endif
1237
1238 #if YYLSP_NEEDED
1239 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1240 #else
1241 # define YYPOPSTACK (yyvsp--, yyssp--)
1242 #endif
1243
1244 YYSIZE_T yystacksize = YYINITDEPTH;
1245
1246
1247 /* The variables used to return semantic value and location from the
1248 action routines. */
1249 YYSTYPE yyval;
1250 #if YYLSP_NEEDED
1251 YYLTYPE yyloc;
1252 #endif
1253
1254 /* When reducing, the number of symbols on the RHS of the reduced
1255 rule. */
1256 int yylen;
1257
1258 YYDPRINTF ((stderr, "Starting parse\n"));
1259
1260 yystate = 0;
1261 yyerrstatus = 0;
1262 yynerrs = 0;
1263 yychar = YYEMPTY; /* Cause a token to be read. */
1264
1265 /* Initialize stack pointers.
1266 Waste one element of value and location stack
1267 so that they stay on the same level as the state stack.
1268 The wasted elements are never initialized. */
1269
1270 yyssp = yyss;
1271 yyvsp = yyvs;
1272 #if YYLSP_NEEDED
1273 yylsp = yyls;
1274 #endif
1275 goto yysetstate;
1276
1277 /*------------------------------------------------------------.
1278 | yynewstate -- Push a new state, which is found in yystate. |
1279 `------------------------------------------------------------*/
1280 yynewstate:
1281 /* In all cases, when you get here, the value and location stacks
1282 have just been pushed. so pushing a state here evens the stacks.
1283 */
1284 yyssp++;
1285
1286 yysetstate:
1287 *yyssp = yystate;
1288
1289 if (yyssp >= yyss + yystacksize - 1)
1290 {
1291 /* Get the current used size of the three stacks, in elements. */
1292 YYSIZE_T yysize = yyssp - yyss + 1;
1293
1294 #ifdef yyoverflow
1295 {
1296 /* Give user a chance to reallocate the stack. Use copies of
1297 these so that the &'s don't force the real ones into
1298 memory. */
1299 YYSTYPE *yyvs1 = yyvs;
1300 short *yyss1 = yyss;
1301
1302 /* Each stack pointer address is followed by the size of the
1303 data in use in that stack, in bytes. */
1304 # if YYLSP_NEEDED
1305 YYLTYPE *yyls1 = yyls;
1306 /* This used to be a conditional around just the two extra args,
1307 but that might be undefined if yyoverflow is a macro. */
1308 yyoverflow ("parser stack overflow",
1309 &yyss1, yysize * sizeof (*yyssp),
1310 &yyvs1, yysize * sizeof (*yyvsp),
1311 &yyls1, yysize * sizeof (*yylsp),
1312 &yystacksize);
1313 yyls = yyls1;
1314 # else
1315 yyoverflow ("parser stack overflow",
1316 &yyss1, yysize * sizeof (*yyssp),
1317 &yyvs1, yysize * sizeof (*yyvsp),
1318 &yystacksize);
1319 # endif
1320 yyss = yyss1;
1321 yyvs = yyvs1;
1322 }
1323 #else /* no yyoverflow */
1324 # ifndef YYSTACK_RELOCATE
1325 goto yyoverflowlab;
1326 # else
1327 /* Extend the stack our own way. */
1328 if (yystacksize >= YYMAXDEPTH)
1329 goto yyoverflowlab;
1330 yystacksize *= 2;
1331 if (yystacksize > YYMAXDEPTH)
1332 yystacksize = YYMAXDEPTH;
1333
1334 {
1335 short *yyss1 = yyss;
1336 union yyalloc *yyptr =
1337 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1338 if (! yyptr)
1339 goto yyoverflowlab;
1340 YYSTACK_RELOCATE (yyss);
1341 YYSTACK_RELOCATE (yyvs);
1342 # if YYLSP_NEEDED
1343 YYSTACK_RELOCATE (yyls);
1344 # endif
1345 # undef YYSTACK_RELOCATE
1346 if (yyss1 != yyssa)
1347 YYSTACK_FREE (yyss1);
1348 }
1349 # endif
1350 #endif /* no yyoverflow */
1351
1352 yyssp = yyss + yysize - 1;
1353 yyvsp = yyvs + yysize - 1;
1354 #if YYLSP_NEEDED
1355 yylsp = yyls + yysize - 1;
1356 #endif
1357
1358 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1359 (unsigned long int) yystacksize));
1360
1361 if (yyssp >= yyss + yystacksize - 1)
1362 YYABORT;
1363 }
1364
1365 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1366
1367 goto yybackup;
1368
1369
1370 /*-----------.
1371 | yybackup. |
1372 `-----------*/
1373 yybackup:
1374
1375 /* Do appropriate processing given the current state. */
1376 /* Read a lookahead token if we need one and don't already have one. */
1377 /* yyresume: */
1378
1379 /* First try to decide what to do without reference to lookahead token. */
1380
1381 yyn = yypact[yystate];
1382 if (yyn == YYFLAG)
1383 goto yydefault;
1384
1385 /* Not known => get a lookahead token if don't already have one. */
1386
1387 /* yychar is either YYEMPTY or YYEOF
1388 or a valid token in external form. */
1389
1390 if (yychar == YYEMPTY)
1391 {
1392 YYDPRINTF ((stderr, "Reading a token: "));
1393 yychar = YYLEX;
1394 }
1395
1396 /* Convert token to internal form (in yychar1) for indexing tables with */
1397
1398 if (yychar <= 0) /* This means end of input. */
1399 {
1400 yychar1 = 0;
1401 yychar = YYEOF; /* Don't call YYLEX any more */
1402
1403 YYDPRINTF ((stderr, "Now at end of input.\n"));
1404 }
1405 else
1406 {
1407 yychar1 = YYTRANSLATE (yychar);
1408
1409 #if YYDEBUG
1410 /* We have to keep this `#if YYDEBUG', since we use variables
1411 which are defined only if `YYDEBUG' is set. */
1412 if (yydebug)
1413 {
1414 YYFPRINTF (stderr, "Next token is %d (%s",
1415 yychar, yytname[yychar1]);
1416 /* Give the individual parser a way to print the precise
1417 meaning of a token, for further debugging info. */
1418 # ifdef YYPRINT
1419 YYPRINT (stderr, yychar, yylval);
1420 # endif
1421 YYFPRINTF (stderr, ")\n");
1422 }
1423 #endif
1424 }
1425
1426 yyn += yychar1;
1427 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1428 goto yydefault;
1429
1430 yyn = yytable[yyn];
1431
1432 /* yyn is what to do for this token type in this state.
1433 Negative => reduce, -yyn is rule number.
1434 Positive => shift, yyn is new state.
1435 New state is final state => don't bother to shift,
1436 just return success.
1437 0, or most negative number => error. */
1438
1439 if (yyn < 0)
1440 {
1441 if (yyn == YYFLAG)
1442 goto yyerrlab;
1443 yyn = -yyn;
1444 goto yyreduce;
1445 }
1446 else if (yyn == 0)
1447 goto yyerrlab;
1448
1449 if (yyn == YYFINAL)
1450 YYACCEPT;
1451
1452 /* Shift the lookahead token. */
1453 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1454 yychar, yytname[yychar1]));
1455
1456 /* Discard the token being shifted unless it is eof. */
1457 if (yychar != YYEOF)
1458 yychar = YYEMPTY;
1459
1460 *++yyvsp = yylval;
1461 #if YYLSP_NEEDED
1462 *++yylsp = yylloc;
1463 #endif
1464
1465 /* Count tokens shifted since error; after three, turn off error
1466 status. */
1467 if (yyerrstatus)
1468 yyerrstatus--;
1469
1470 yystate = yyn;
1471 goto yynewstate;
1472
1473
1474 /*-----------------------------------------------------------.
1475 | yydefault -- do the default action for the current state. |
1476 `-----------------------------------------------------------*/
1477 yydefault:
1478 yyn = yydefact[yystate];
1479 if (yyn == 0)
1480 goto yyerrlab;
1481 goto yyreduce;
1482
1483
1484 /*-----------------------------.
1485 | yyreduce -- Do a reduction. |
1486 `-----------------------------*/
1487 yyreduce:
1488 /* yyn is the number of a rule to reduce with. */
1489 yylen = yyr2[yyn];
1490
1491 /* If YYLEN is nonzero, implement the default value of the action:
1492 `$$ = $1'.
1493
1494 Otherwise, the following line sets YYVAL to the semantic value of
1495 the lookahead token. This behavior is undocumented and Bison
1496 users should not rely upon it. Assigning to YYVAL
1497 unconditionally makes the parser a bit smaller, and it avoids a
1498 GCC warning that YYVAL may be used uninitialized. */
1499 yyval = yyvsp[1-yylen];
1500
1501 #if YYLSP_NEEDED
1502 /* Similarly for the default location. Let the user run additional
1503 commands if for instance locations are ranges. */
1504 yyloc = yylsp[1-yylen];
1505 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1506 #endif
1507
1508 #if YYDEBUG
1509 /* We have to keep this `#if YYDEBUG', since we use variables which
1510 are defined only if `YYDEBUG' is set. */
1511 if (yydebug)
1512 {
1513 int yyi;
1514
1515 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1516 yyn, yyrline[yyn]);
1517
1518 /* Print the symbols being reduced, and their result. */
1519 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1520 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1521 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1522 }
1523 #endif
1524
1525 switch (yyn) {
1526
1527 case 17:
1528 #line 182 "rcparse.y"
1529 {
1530 define_accelerator (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].pacc);
1531 if (yychar != YYEMPTY)
1532 YYERROR;
1533 rcparse_discard_strings ();
1534 }
1535 break;
1536 case 18:
1537 #line 192 "rcparse.y"
1538 {
1539 yyval.pacc = NULL;
1540 }
1541 break;
1542 case 19:
1543 #line 196 "rcparse.y"
1544 {
1545 struct accelerator *a;
1546
1547 a = (struct accelerator *) res_alloc (sizeof *a);
1548 *a = yyvsp[0].acc;
1549 if (yyvsp[-1].pacc == NULL)
1550 yyval.pacc = a;
1551 else
1552 {
1553 struct accelerator **pp;
1554
1555 for (pp = &yyvsp[-1].pacc->next; *pp != NULL; pp = &(*pp)->next)
1556 ;
1557 *pp = a;
1558 yyval.pacc = yyvsp[-1].pacc;
1559 }
1560 }
1561 break;
1562 case 20:
1563 #line 217 "rcparse.y"
1564 {
1565 yyval.acc = yyvsp[-1].acc;
1566 yyval.acc.id = yyvsp[0].il;
1567 }
1568 break;
1569 case 21:
1570 #line 222 "rcparse.y"
1571 {
1572 yyval.acc = yyvsp[-3].acc;
1573 yyval.acc.id = yyvsp[-2].il;
1574 yyval.acc.flags |= yyvsp[0].is;
1575 if ((yyval.acc.flags & ACC_VIRTKEY) == 0
1576 && (yyval.acc.flags & (ACC_SHIFT | ACC_CONTROL)) != 0)
1577 rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
1578 }
1579 break;
1580 case 22:
1581 #line 234 "rcparse.y"
1582 {
1583 const char *s = yyvsp[0].s;
1584 char ch;
1585
1586 yyval.acc.next = NULL;
1587 yyval.acc.id = 0;
1588 ch = *s;
1589 if (ch != '^')
1590 yyval.acc.flags = 0;
1591 else
1592 {
1593 yyval.acc.flags = ACC_CONTROL | ACC_VIRTKEY;
1594 ++s;
1595 ch = *s;
1596 ch = TOUPPER (ch);
1597 }
1598 yyval.acc.key = ch;
1599 if (s[1] != '\0')
1600 rcparse_warning (_("accelerator should only be one character"));
1601 }
1602 break;
1603 case 23:
1604 #line 255 "rcparse.y"
1605 {
1606 yyval.acc.next = NULL;
1607 yyval.acc.flags = 0;
1608 yyval.acc.id = 0;
1609 yyval.acc.key = yyvsp[0].il;
1610 }
1611 break;
1612 case 24:
1613 #line 265 "rcparse.y"
1614 {
1615 yyval.is = yyvsp[0].is;
1616 }
1617 break;
1618 case 25:
1619 #line 269 "rcparse.y"
1620 {
1621 yyval.is = yyvsp[-2].is | yyvsp[0].is;
1622 }
1623 break;
1624 case 26:
1625 #line 274 "rcparse.y"
1626 {
1627 yyval.is = yyvsp[-1].is | yyvsp[0].is;
1628 }
1629 break;
1630 case 27:
1631 #line 281 "rcparse.y"
1632 {
1633 yyval.is = ACC_VIRTKEY;
1634 }
1635 break;
1636 case 28:
1637 #line 285 "rcparse.y"
1638 {
1639 /* This is just the absence of VIRTKEY. */
1640 yyval.is = 0;
1641 }
1642 break;
1643 case 29:
1644 #line 290 "rcparse.y"
1645 {
1646 yyval.is = ACC_NOINVERT;
1647 }
1648 break;
1649 case 30:
1650 #line 294 "rcparse.y"
1651 {
1652 yyval.is = ACC_SHIFT;
1653 }
1654 break;
1655 case 31:
1656 #line 298 "rcparse.y"
1657 {
1658 yyval.is = ACC_CONTROL;
1659 }
1660 break;
1661 case 32:
1662 #line 302 "rcparse.y"
1663 {
1664 yyval.is = ACC_ALT;
1665 }
1666 break;
1667 case 33:
1668 #line 311 "rcparse.y"
1669 {
1670 define_bitmap (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1671 if (yychar != YYEMPTY)
1672 YYERROR;
1673 rcparse_discard_strings ();
1674 }
1675 break;
1676 case 34:
1677 #line 323 "rcparse.y"
1678 {
1679 define_cursor (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1680 if (yychar != YYEMPTY)
1681 YYERROR;
1682 rcparse_discard_strings ();
1683 }
1684 break;
1685 case 35:
1686 #line 336 "rcparse.y"
1687 {
1688 memset (&dialog, 0, sizeof dialog);
1689 dialog.x = yyvsp[-3].il;
1690 dialog.y = yyvsp[-2].il;
1691 dialog.width = yyvsp[-1].il;
1692 dialog.height = yyvsp[0].il;
1693 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1694 dialog.exstyle = yyvsp[-4].il;
1695 dialog.menu.named = 1;
1696 dialog.class.named = 1;
1697 dialog.font = NULL;
1698 dialog.ex = NULL;
1699 dialog.controls = NULL;
1700 sub_res_info = yyvsp[-5].res_info;
1701 style = 0;
1702 }
1703 break;
1704 case 36:
1705 #line 353 "rcparse.y"
1706 {
1707 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1708 if (yychar != YYEMPTY)
1709 YYERROR;
1710 rcparse_discard_strings ();
1711 }
1712 break;
1713 case 37:
1714 #line 361 "rcparse.y"
1715 {
1716 memset (&dialog, 0, sizeof dialog);
1717 dialog.x = yyvsp[-3].il;
1718 dialog.y = yyvsp[-2].il;
1719 dialog.width = yyvsp[-1].il;
1720 dialog.height = yyvsp[0].il;
1721 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1722 dialog.exstyle = yyvsp[-4].il;
1723 dialog.menu.named = 1;
1724 dialog.class.named = 1;
1725 dialog.font = NULL;
1726 dialog.ex = ((struct dialog_ex *)
1727 res_alloc (sizeof (struct dialog_ex)));
1728 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1729 dialog.controls = NULL;
1730 sub_res_info = yyvsp[-5].res_info;
1731 style = 0;
1732 }
1733 break;
1734 case 38:
1735 #line 380 "rcparse.y"
1736 {
1737 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1738 if (yychar != YYEMPTY)
1739 YYERROR;
1740 rcparse_discard_strings ();
1741 }
1742 break;
1743 case 39:
1744 #line 388 "rcparse.y"
1745 {
1746 memset (&dialog, 0, sizeof dialog);
1747 dialog.x = yyvsp[-4].il;
1748 dialog.y = yyvsp[-3].il;
1749 dialog.width = yyvsp[-2].il;
1750 dialog.height = yyvsp[-1].il;
1751 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1752 dialog.exstyle = yyvsp[-5].il;
1753 dialog.menu.named = 1;
1754 dialog.class.named = 1;
1755 dialog.font = NULL;
1756 dialog.ex = ((struct dialog_ex *)
1757 res_alloc (sizeof (struct dialog_ex)));
1758 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1759 dialog.ex->help = yyvsp[0].il;
1760 dialog.controls = NULL;
1761 sub_res_info = yyvsp[-6].res_info;
1762 style = 0;
1763 }
1764 break;
1765 case 40:
1766 #line 408 "rcparse.y"
1767 {
1768 define_dialog (yyvsp[-13].id, &sub_res_info, &dialog);
1769 if (yychar != YYEMPTY)
1770 YYERROR;
1771 rcparse_discard_strings ();
1772 }
1773 break;
1774 case 41:
1775 #line 418 "rcparse.y"
1776 {
1777 yyval.il = 0;
1778 }
1779 break;
1780 case 42:
1781 #line 422 "rcparse.y"
1782 {
1783 yyval.il = yyvsp[0].il;
1784 }
1785 break;
1786 case 44:
1787 #line 430 "rcparse.y"
1788 {
1789 dialog.style |= WS_CAPTION;
1790 style |= WS_CAPTION;
1791 unicode_from_ascii ((int *) NULL, &dialog.caption, yyvsp[0].s);
1792 }
1793 break;
1794 case 45:
1795 #line 436 "rcparse.y"
1796 {
1797 dialog.class = yyvsp[0].id;
1798 }
1799 break;
1800 case 46:
1801 #line 441 "rcparse.y"
1802 {
1803 dialog.style = style;
1804 }
1805 break;
1806 case 47:
1807 #line 445 "rcparse.y"
1808 {
1809 dialog.exstyle = yyvsp[0].il;
1810 }
1811 break;
1812 case 48:
1813 #line 449 "rcparse.y"
1814 {
1815 res_string_to_id (& dialog.class, yyvsp[0].s);
1816 }
1817 break;
1818 case 49:
1819 #line 453 "rcparse.y"
1820 {
1821 dialog.style |= DS_SETFONT;
1822 style |= DS_SETFONT;
1823 dialog.pointsize = yyvsp[-2].il;
1824 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[0].s);
1825 if (dialog.ex != NULL)
1826 {
1827 dialog.ex->weight = 0;
1828 dialog.ex->italic = 0;
1829 dialog.ex->charset = 1;
1830 }
1831 }
1832 break;
1833 case 50:
1834 #line 466 "rcparse.y"
1835 {
1836 dialog.style |= DS_SETFONT;
1837 style |= DS_SETFONT;
1838 dialog.pointsize = yyvsp[-3].il;
1839 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-1].s);
1840 if (dialog.ex == NULL)
1841 rcparse_warning (_("extended FONT requires DIALOGEX"));
1842 else
1843 {
1844 dialog.ex->weight = yyvsp[0].il;
1845 dialog.ex->italic = 0;
1846 dialog.ex->charset = 1;
1847 }
1848 }
1849 break;
1850 case 51:
1851 #line 481 "rcparse.y"
1852 {
1853 dialog.style |= DS_SETFONT;
1854 style |= DS_SETFONT;
1855 dialog.pointsize = yyvsp[-4].il;
1856 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-2].s);
1857 if (dialog.ex == NULL)
1858 rcparse_warning (_("extended FONT requires DIALOGEX"));
1859 else
1860 {
1861 dialog.ex->weight = yyvsp[-1].il;
1862 dialog.ex->italic = yyvsp[0].il;
1863 dialog.ex->charset = 1;
1864 }
1865 }
1866 break;
1867 case 52:
1868 #line 496 "rcparse.y"
1869 {
1870 dialog.style |= DS_SETFONT;
1871 style |= DS_SETFONT;
1872 dialog.pointsize = yyvsp[-5].il;
1873 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-3].s);
1874 if (dialog.ex == NULL)
1875 rcparse_warning (_("extended FONT requires DIALOGEX"));
1876 else
1877 {
1878 dialog.ex->weight = yyvsp[-2].il;
1879 dialog.ex->italic = yyvsp[-1].il;
1880 dialog.ex->charset = yyvsp[0].il;
1881 }
1882 }
1883 break;
1884 case 53:
1885 #line 511 "rcparse.y"
1886 {
1887 dialog.menu = yyvsp[0].id;
1888 }
1889 break;
1890 case 54:
1891 #line 515 "rcparse.y"
1892 {
1893 sub_res_info.characteristics = yyvsp[0].il;
1894 }
1895 break;
1896 case 55:
1897 #line 519 "rcparse.y"
1898 {
1899 sub_res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
1900 }
1901 break;
1902 case 56:
1903 #line 523 "rcparse.y"
1904 {
1905 sub_res_info.version = yyvsp[0].il;
1906 }
1907 break;
1908 case 58:
1909 #line 531 "rcparse.y"
1910 {
1911 struct dialog_control **pp;
1912
1913 for (pp = &dialog.controls; *pp != NULL; pp = &(*pp)->next)
1914 ;
1915 *pp = yyvsp[0].dialog_control;
1916 }
1917 break;
1918 case 59:
1919 #line 542 "rcparse.y"
1920 {
1921 default_style = BS_AUTO3STATE | WS_TABSTOP;
1922 base_style = BS_AUTO3STATE;
1923 class = CTL_BUTTON;
1924 res_text_field = yyvsp[0].id;
1925 }
1926 break;
1927 case 60:
1928 #line 549 "rcparse.y"
1929 {
1930 yyval.dialog_control = yyvsp[0].dialog_control;
1931 }
1932 break;
1933 case 61:
1934 #line 553 "rcparse.y"
1935 {
1936 default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
1937 base_style = BS_AUTOCHECKBOX;
1938 class = CTL_BUTTON;
1939 res_text_field = yyvsp[0].id;
1940 }
1941 break;
1942 case 62:
1943 #line 560 "rcparse.y"
1944 {
1945 yyval.dialog_control = yyvsp[0].dialog_control;
1946 }
1947 break;
1948 case 63:
1949 #line 564 "rcparse.y"
1950 {
1951 default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
1952 base_style = BS_AUTORADIOBUTTON;
1953 class = CTL_BUTTON;
1954 res_text_field = yyvsp[0].id;
1955 }
1956 break;
1957 case 64:
1958 #line 571 "rcparse.y"
1959 {
1960 yyval.dialog_control = yyvsp[0].dialog_control;
1961 }
1962 break;
1963 case 65:
1964 #line 575 "rcparse.y"
1965 {
1966 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1967 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1968 class = CTL_EDIT;
1969 res_text_field = yyvsp[0].id;
1970 }
1971 break;
1972 case 66:
1973 #line 582 "rcparse.y"
1974 {
1975 yyval.dialog_control = yyvsp[0].dialog_control;
1976 if (dialog.ex == NULL)
1977 rcparse_warning (_("BEDIT requires DIALOGEX"));
1978 res_string_to_id (&yyval.dialog_control->class, "BEDIT");
1979 }
1980 break;
1981 case 67:
1982 #line 589 "rcparse.y"
1983 {
1984 default_style = BS_CHECKBOX | WS_TABSTOP;
1985 base_style = BS_CHECKBOX | WS_TABSTOP;
1986 class = CTL_BUTTON;
1987 res_text_field = yyvsp[0].id;
1988 }
1989 break;
1990 case 68:
1991 #line 596 "rcparse.y"
1992 {
1993 yyval.dialog_control = yyvsp[0].dialog_control;
1994 }
1995 break;
1996 case 69:
1997 #line 600 "rcparse.y"
1998 {
1999 /* This is as per MSDN documentation. With some (???)
2000 versions of MS rc.exe their is no default style. */
2001 default_style = CBS_SIMPLE | WS_TABSTOP;
2002 base_style = 0;
2003 class = CTL_COMBOBOX;
2004 res_text_field = res_null_text;
2005 }
2006 break;
2007 case 70:
2008 #line 609 "rcparse.y"
2009 {
2010 yyval.dialog_control = yyvsp[0].dialog_control;
2011 }
2012 break;
2013 case 71:
2014 #line 614 "rcparse.y"
2015 {
2016 yyval.dialog_control = define_control (yyvsp[-9].id, yyvsp[-8].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-7].il, style, yyvsp[-1].il);
2017 if (yyvsp[0].rcdata_item != NULL)
2018 {
2019 if (dialog.ex == NULL)
2020 rcparse_warning (_("control data requires DIALOGEX"));
2021 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2022 }
2023 }
2024 break;
2025 case 72:
2026 #line 625 "rcparse.y"
2027 {
2028 yyval.dialog_control = define_control (yyvsp[-10].id, yyvsp[-9].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-8].il, style, yyvsp[-2].il);
2029 if (dialog.ex == NULL)
2030 rcparse_warning (_("help ID requires DIALOGEX"));
2031 yyval.dialog_control->help = yyvsp[-1].il;
2032 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2033 }
2034 break;
2035 case 73:
2036 #line 634 "rcparse.y"
2037 {
2038 yyval.dialog_control = define_control (yyvsp[-10].id, yyvsp[-9].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, 0, style, yyvsp[-1].il);
2039 if (yyvsp[0].rcdata_item != NULL)
2040 {
2041 if (dialog.ex == NULL)
2042 rcparse_warning ("control data requires DIALOGEX");
2043 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2044 }
2045 yyval.dialog_control->class.named = 1;
2046 unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-7].s);
2047 }
2048 break;
2049 case 74:
2050 #line 647 "rcparse.y"
2051 {
2052 yyval.dialog_control = define_control (yyvsp[-11].id, yyvsp[-10].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, style, yyvsp[-2].il);
2053 if (dialog.ex == NULL)
2054 rcparse_warning ("help ID requires DIALOGEX");
2055 yyval.dialog_control->help = yyvsp[-1].il;
2056 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2057 yyval.dialog_control->class.named = 1;
2058 unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-8].s);
2059 }
2060 break;
2061 case 75:
2062 #line 657 "rcparse.y"
2063 {
2064 default_style = SS_CENTER | WS_GROUP;
2065 base_style = SS_CENTER;
2066 class = CTL_STATIC;
2067 res_text_field = yyvsp[0].id;
2068 }
2069 break;
2070 case 76:
2071 #line 664 "rcparse.y"
2072 {
2073 yyval.dialog_control = yyvsp[0].dialog_control;
2074 }
2075 break;
2076 case 77:
2077 #line 668 "rcparse.y"
2078 {
2079 default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
2080 base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
2081 class = CTL_BUTTON;
2082 res_text_field = yyvsp[0].id;
2083 }
2084 break;
2085 case 78:
2086 #line 675 "rcparse.y"
2087 {
2088 yyval.dialog_control = yyvsp[0].dialog_control;
2089 }
2090 break;
2091 case 79:
2092 #line 679 "rcparse.y"
2093 {
2094 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2095 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2096 class = CTL_EDIT;
2097 res_text_field = res_null_text;
2098 }
2099 break;
2100 case 80:
2101 #line 686 "rcparse.y"
2102 {
2103 yyval.dialog_control = yyvsp[0].dialog_control;
2104 }
2105 break;
2106 case 81:
2107 #line 690 "rcparse.y"
2108 {
2109 default_style = BS_GROUPBOX;
2110 base_style = BS_GROUPBOX;
2111 class = CTL_BUTTON;
2112 res_text_field = yyvsp[0].id;
2113 }
2114 break;
2115 case 82:
2116 #line 697 "rcparse.y"
2117 {
2118 yyval.dialog_control = yyvsp[0].dialog_control;
2119 }
2120 break;
2121 case 83:
2122 #line 701 "rcparse.y"
2123 {
2124 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2125 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2126 class = CTL_EDIT;
2127 res_text_field = yyvsp[0].id;
2128 }
2129 break;
2130 case 84:
2131 #line 708 "rcparse.y"
2132 {
2133 yyval.dialog_control = yyvsp[0].dialog_control;
2134 if (dialog.ex == NULL)
2135 rcparse_warning (_("IEDIT requires DIALOGEX"));
2136 res_string_to_id (&yyval.dialog_control->class, "HEDIT");
2137 }
2138 break;
2139 case 85:
2140 #line 715 "rcparse.y"
2141 {
2142 yyval.dialog_control = define_icon_control (yyvsp[-4].id, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, 0, 0, 0, yyvsp[0].rcdata_item,
2143 dialog.ex);
2144 }
2145 break;
2146 case 86:
2147 #line 721 "rcparse.y"
2148 {
2149 yyval.dialog_control = define_icon_control (yyvsp[-6].id, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, 0, 0, yyvsp[0].rcdata_item,
2150 dialog.ex);
2151 }
2152 break;
2153 case 87:
2154 #line 727 "rcparse.y"
2155 {
2156 yyval.dialog_control = define_icon_control (yyvsp[-8].id, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, style, yyvsp[-1].il, 0, yyvsp[0].rcdata_item,
2157 dialog.ex);
2158 }
2159 break;
2160 case 88:
2161 #line 733 "rcparse.y"
2162 {
2163 yyval.dialog_control = define_icon_control (yyvsp[-9].id, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, style, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].rcdata_item,
2164 dialog.ex);
2165 }
2166 break;
2167 case 89:
2168 #line 738 "rcparse.y"
2169 {
2170 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2171 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2172 class = CTL_EDIT;
2173 res_text_field = yyvsp[0].id;
2174 }
2175 break;
2176 case 90:
2177 #line 745 "rcparse.y"
2178 {
2179 yyval.dialog_control = yyvsp[0].dialog_control;
2180 if (dialog.ex == NULL)
2181 rcparse_warning (_("IEDIT requires DIALOGEX"));
2182 res_string_to_id (&yyval.dialog_control->class, "IEDIT");
2183 }
2184 break;
2185 case 91:
2186 #line 752 "rcparse.y"
2187 {
2188 default_style = LBS_NOTIFY | WS_BORDER;
2189 base_style = LBS_NOTIFY | WS_BORDER;
2190 class = CTL_LISTBOX;
2191 res_text_field = res_null_text;
2192 }
2193 break;
2194 case 92:
2195 #line 759 "rcparse.y"
2196 {
2197 yyval.dialog_control = yyvsp[0].dialog_control;
2198 }
2199 break;
2200 case 93:
2201 #line 763 "rcparse.y"
2202 {
2203 default_style = SS_LEFT | WS_GROUP;
2204 base_style = SS_LEFT;
2205 class = CTL_STATIC;
2206 res_text_field = yyvsp[0].id;
2207 }
2208 break;
2209 case 94:
2210 #line 770 "rcparse.y"
2211 {
2212 yyval.dialog_control = yyvsp[0].dialog_control;
2213 }
2214 break;
2215 case 95:
2216 #line 774 "rcparse.y"
2217 {
2218 default_style = BS_PUSHBOX | WS_TABSTOP;
2219 base_style = BS_PUSHBOX;
2220 class = CTL_BUTTON;
2221 }
2222 break;
2223 case 96:
2224 #line 780 "rcparse.y"
2225 {
2226 yyval.dialog_control = yyvsp[0].dialog_control;
2227 }
2228 break;
2229 case 97:
2230 #line 784 "rcparse.y"
2231 {
2232 default_style = BS_PUSHBUTTON | WS_TABSTOP;
2233 base_style = BS_PUSHBUTTON | WS_TABSTOP;
2234 class = CTL_BUTTON;
2235 res_text_field = yyvsp[0].id;
2236 }
2237 break;
2238 case 98:
2239 #line 791 "rcparse.y"
2240 {
2241 yyval.dialog_control = yyvsp[0].dialog_control;
2242 }
2243 break;
2244 case 99:
2245 #line 795 "rcparse.y"
2246 {
2247 default_style = BS_RADIOBUTTON | WS_TABSTOP;
2248 base_style = BS_RADIOBUTTON;
2249 class = CTL_BUTTON;
2250 res_text_field = yyvsp[0].id;
2251 }
2252 break;
2253 case 100:
2254 #line 802 "rcparse.y"
2255 {
2256 yyval.dialog_control = yyvsp[0].dialog_control;
2257 }
2258 break;
2259 case 101:
2260 #line 806 "rcparse.y"
2261 {
2262 default_style = SS_RIGHT | WS_GROUP;
2263 base_style = SS_RIGHT;
2264 class = CTL_STATIC;
2265 res_text_field = yyvsp[0].id;
2266 }
2267 break;
2268 case 102:
2269 #line 813 "rcparse.y"
2270 {
2271 yyval.dialog_control = yyvsp[0].dialog_control;
2272 }
2273 break;
2274 case 103:
2275 #line 817 "rcparse.y"
2276 {
2277 default_style = SBS_HORZ;
2278 base_style = 0;
2279 class = CTL_SCROLLBAR;
2280 res_text_field = res_null_text;
2281 }
2282 break;
2283 case 104:
2284 #line 824 "rcparse.y"
2285 {
2286 yyval.dialog_control = yyvsp[0].dialog_control;
2287 }
2288 break;
2289 case 105:
2290 #line 828 "rcparse.y"
2291 {
2292 default_style = BS_3STATE | WS_TABSTOP;
2293 base_style = BS_3STATE;
2294 class = CTL_BUTTON;
2295 res_text_field = yyvsp[0].id;
2296 }
2297 break;
2298 case 106:
2299 #line 835 "rcparse.y"
2300 {
2301 yyval.dialog_control = yyvsp[0].dialog_control;
2302 }
2303 break;
2304 case 107:
2305 #line 840 "rcparse.y"
2306 { style = WS_CHILD | WS_VISIBLE; }
2307 break;
2308 case 108:
2309 #line 842 "rcparse.y"
2310 {
2311 yyval.dialog_control = define_control (yyvsp[-13].id, yyvsp[-12].il, yyvsp[-10].il, yyvsp[-8].il, yyvsp[-6].il, yyvsp[-4].il, CTL_BUTTON,
2312 style, yyvsp[0].il);
2313 }
2314 break;
2315 case 109:
2316 #line 857 "rcparse.y"
2317 {
2318 yyval.dialog_control = define_control (res_text_field, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, class,
2319 default_style | WS_CHILD | WS_VISIBLE, 0);
2320 if (yyvsp[0].rcdata_item != NULL)
2321 {
2322 if (dialog.ex == NULL)
2323 rcparse_warning (_("control data requires DIALOGEX"));
2324 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2325 }
2326 }
2327 break;
2328 case 110:
2329 #line 869 "rcparse.y"
2330 {
2331 yyval.dialog_control = define_control (res_text_field, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, class, style, yyvsp[-1].il);
2332 if (yyvsp[0].rcdata_item != NULL)
2333 {
2334 if (dialog.ex == NULL)
2335 rcparse_warning (_("control data requires DIALOGEX"));
2336 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2337 }
2338 }
2339 break;
2340 case 111:
2341 #line 880 "rcparse.y"
2342 {
2343 yyval.dialog_control = define_control (res_text_field, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, class, style, yyvsp[-2].il);
2344 if (dialog.ex == NULL)
2345 rcparse_warning (_("help ID requires DIALOGEX"));
2346 yyval.dialog_control->help = yyvsp[-1].il;
2347 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2348 }
2349 break;
2350 case 112:
2351 #line 891 "rcparse.y"
2352 {
2353 res_string_to_id (&yyval.id, "");
2354 }
2355 break;
2356 case 113:
2357 #line 895 "rcparse.y"
2358 {
2359 yyval.id.named = 0;
2360 yyval.id.u.id = yyvsp[-1].il;
2361 }
2362 break;
2363 case 114:
2364 #line 900 "rcparse.y"
2365 {
2366 res_string_to_id (&yyval.id, yyvsp[0].s);
2367 }
2368 break;
2369 case 115:
2370 #line 904 "rcparse.y"
2371 {
2372 res_string_to_id (&yyval.id, yyvsp[-1].s);
2373 }
2374 break;
2375 case 116:
2376 #line 911 "rcparse.y"
2377 {
2378 yyval.rcdata_item = NULL;
2379 }
2380 break;
2381 case 117:
2382 #line 915 "rcparse.y"
2383 {
2384 yyval.rcdata_item = yyvsp[-1].rcdata.first;
2385 }
2386 break;
2387 case 118:
2388 #line 924 "rcparse.y"
2389 { style = WS_CHILD | WS_VISIBLE; }
2390 break;
2391 case 120:
2392 #line 930 "rcparse.y"
2393 { style = SS_ICON | WS_CHILD | WS_VISIBLE; }
2394 break;
2395 case 122:
2396 #line 936 "rcparse.y"
2397 { style = base_style | WS_CHILD | WS_VISIBLE; }
2398 break;
2399 case 124:
2400 #line 944 "rcparse.y"
2401 {
2402 define_font (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2403 if (yychar != YYEMPTY)
2404 YYERROR;
2405 rcparse_discard_strings ();
2406 }
2407 break;
2408 case 125:
2409 #line 956 "rcparse.y"
2410 {
2411 define_icon (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2412 if (yychar != YYEMPTY)
2413 YYERROR;
2414 rcparse_discard_strings ();
2415 }
2416 break;
2417 case 126:
2418 #line 969 "rcparse.y"
2419 {
2420 language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
2421 }
2422 break;
2423 case 127:
2424 #line 978 "rcparse.y"
2425 {
2426 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2427 if (yychar != YYEMPTY)
2428 YYERROR;
2429 rcparse_discard_strings ();
2430 }
2431 break;
2432 case 128:
2433 #line 988 "rcparse.y"
2434 {
2435 yyval.menuitem = NULL;
2436 }
2437 break;
2438 case 129:
2439 #line 992 "rcparse.y"
2440 {
2441 if (yyvsp[-1].menuitem == NULL)
2442 yyval.menuitem = yyvsp[0].menuitem;
2443 else
2444 {
2445 struct menuitem **pp;
2446
2447 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2448 ;
2449 *pp = yyvsp[0].menuitem;
2450 yyval.menuitem = yyvsp[-1].menuitem;
2451 }
2452 }
2453 break;
2454 case 130:
2455 #line 1009 "rcparse.y"
2456 {
2457 yyval.menuitem = define_menuitem (yyvsp[-2].s, yyvsp[-1].il, yyvsp[0].is, 0, 0, NULL);
2458 }
2459 break;
2460 case 131:
2461 #line 1013 "rcparse.y"
2462 {
2463 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2464 }
2465 break;
2466 case 132:
2467 #line 1017 "rcparse.y"
2468 {
2469 yyval.menuitem = define_menuitem (yyvsp[-4].s, 0, yyvsp[-3].is, 0, 0, yyvsp[-1].menuitem);
2470 }
2471 break;
2472 case 133:
2473 #line 1024 "rcparse.y"
2474 {
2475 yyval.is = 0;
2476 }
2477 break;
2478 case 134:
2479 #line 1028 "rcparse.y"
2480 {
2481 yyval.is = yyvsp[-2].is | yyvsp[0].is;
2482 }
2483 break;
2484 case 135:
2485 #line 1032 "rcparse.y"
2486 {
2487 yyval.is = yyvsp[-1].is | yyvsp[0].is;
2488 }
2489 break;
2490 case 136:
2491 #line 1039 "rcparse.y"
2492 {
2493 yyval.is = MENUITEM_CHECKED;
2494 }
2495 break;
2496 case 137:
2497 #line 1043 "rcparse.y"
2498 {
2499 yyval.is = MENUITEM_GRAYED;
2500 }
2501 break;
2502 case 138:
2503 #line 1047 "rcparse.y"
2504 {
2505 yyval.is = MENUITEM_HELP;
2506 }
2507 break;
2508 case 139:
2509 #line 1051 "rcparse.y"
2510 {
2511 yyval.is = MENUITEM_INACTIVE;
2512 }
2513 break;
2514 case 140:
2515 #line 1055 "rcparse.y"
2516 {
2517 yyval.is = MENUITEM_MENUBARBREAK;
2518 }
2519 break;
2520 case 141:
2521 #line 1059 "rcparse.y"
2522 {
2523 yyval.is = MENUITEM_MENUBREAK;
2524 }
2525 break;
2526 case 142:
2527 #line 1068 "rcparse.y"
2528 {
2529 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2530 if (yychar != YYEMPTY)
2531 YYERROR;
2532 rcparse_discard_strings ();
2533 }
2534 break;
2535 case 143:
2536 #line 1078 "rcparse.y"
2537 {
2538 yyval.menuitem = NULL;
2539 }
2540 break;
2541 case 144:
2542 #line 1082 "rcparse.y"
2543 {
2544 if (yyvsp[-1].menuitem == NULL)
2545 yyval.menuitem = yyvsp[0].menuitem;
2546 else
2547 {
2548 struct menuitem **pp;
2549
2550 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2551 ;
2552 *pp = yyvsp[0].menuitem;
2553 yyval.menuitem = yyvsp[-1].menuitem;
2554 }
2555 }
2556 break;
2557 case 145:
2558 #line 1099 "rcparse.y"
2559 {
2560 yyval.menuitem = define_menuitem (yyvsp[0].s, 0, 0, 0, 0, NULL);
2561 }
2562 break;
2563 case 146:
2564 #line 1103 "rcparse.y"
2565 {
2566 yyval.menuitem = define_menuitem (yyvsp[-1].s, yyvsp[0].il, 0, 0, 0, NULL);
2567 }
2568 break;
2569 case 147:
2570 #line 1107 "rcparse.y"
2571 {
2572 yyval.menuitem = define_menuitem (yyvsp[-3].s, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].il, 0, NULL);
2573 }
2574 break;
2575 case 148:
2576 #line 1111 "rcparse.y"
2577 {
2578 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2579 }
2580 break;
2581 case 149:
2582 #line 1115 "rcparse.y"
2583 {
2584 yyval.menuitem = define_menuitem (yyvsp[-3].s, 0, 0, 0, 0, yyvsp[-1].menuitem);
2585 }
2586 break;
2587 case 150:
2588 #line 1119 "rcparse.y"
2589 {
2590 yyval.menuitem = define_menuitem (yyvsp[-4].s, yyvsp[-3].il, 0, 0, 0, yyvsp[-1].menuitem);
2591 }
2592 break;
2593 case 151:
2594 #line 1123 "rcparse.y"
2595 {
2596 yyval.menuitem = define_menuitem (yyvsp[-5].s, yyvsp[-4].il, yyvsp[-3].il, 0, 0, yyvsp[-1].menuitem);
2597 }
2598 break;
2599 case 152:
2600 #line 1128 "rcparse.y"
2601 {
2602 yyval.menuitem = define_menuitem (yyvsp[-7].s, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-1].menuitem);
2603 }
2604 break;
2605 case 153:
2606 #line 1137 "rcparse.y"
2607 {
2608 define_messagetable (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2609 if (yychar != YYEMPTY)
2610 YYERROR;
2611 rcparse_discard_strings ();
2612 }
2613 break;
2614 case 154:
2615 #line 1149 "rcparse.y"
2616 {
2617 define_rcdata (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2618 if (yychar != YYEMPTY)
2619 YYERROR;
2620 rcparse_discard_strings ();
2621 }
2622 break;
2623 case 155:
2624 #line 1161 "rcparse.y"
2625 {
2626 rcparse_rcdata ();
2627 }
2628 break;
2629 case 156:
2630 #line 1165 "rcparse.y"
2631 {
2632 rcparse_normal ();
2633 yyval.rcdata = yyvsp[0].rcdata;
2634 }
2635 break;
2636 case 157:
2637 #line 1173 "rcparse.y"
2638 {
2639 yyval.rcdata.first = NULL;
2640 yyval.rcdata.last = NULL;
2641 }
2642 break;
2643 case 158:
2644 #line 1178 "rcparse.y"
2645 {
2646 yyval.rcdata = yyvsp[0].rcdata;
2647 }
2648 break;
2649 case 159:
2650 #line 1185 "rcparse.y"
2651 {
2652 struct rcdata_item *ri;
2653
2654 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2655 yyval.rcdata.first = ri;
2656 yyval.rcdata.last = ri;
2657 }
2658 break;
2659 case 160:
2660 #line 1193 "rcparse.y"
2661 {
2662 struct rcdata_item *ri;
2663
2664 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2665 yyval.rcdata.first = ri;
2666 yyval.rcdata.last = ri;
2667 }
2668 break;
2669 case 161:
2670 #line 1201 "rcparse.y"
2671 {
2672 struct rcdata_item *ri;
2673
2674 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2675 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2676 yyvsp[-2].rcdata.last->next = ri;
2677 yyval.rcdata.last = ri;
2678 }
2679 break;
2680 case 162:
2681 #line 1210 "rcparse.y"
2682 {
2683 struct rcdata_item *ri;
2684
2685 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2686 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2687 yyvsp[-2].rcdata.last->next = ri;
2688 yyval.rcdata.last = ri;
2689 }
2690 break;
2691 case 163:
2692 #line 1224 "rcparse.y"
2693 { sub_res_info = yyvsp[-1].res_info; }
2694 break;
2695 case 166:
2696 #line 1231 "rcparse.y"
2697 {
2698 define_stringtable (&sub_res_info, yyvsp[-1].il, yyvsp[0].s);
2699 if (yychar != YYEMPTY)
2700 YYERROR;
2701 rcparse_discard_strings ();
2702 }
2703 break;
2704 case 167:
2705 #line 1238 "rcparse.y"
2706 {
2707 define_stringtable (&sub_res_info, yyvsp[-2].il, yyvsp[0].s);
2708 if (yychar != YYEMPTY)
2709 YYERROR;
2710 rcparse_discard_strings ();
2711 }
2712 break;
2713 case 168:
2714 #line 1251 "rcparse.y"
2715 {
2716 define_user_data (yyvsp[-5].id, yyvsp[-4].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2717 if (yychar != YYEMPTY)
2718 YYERROR;
2719 rcparse_discard_strings ();
2720 }
2721 break;
2722 case 169:
2723 #line 1258 "rcparse.y"
2724 {
2725 define_user_file (yyvsp[-3].id, yyvsp[-2].id, &yyvsp[-1].res_info, yyvsp[0].s);
2726 if (yychar != YYEMPTY)
2727 YYERROR;
2728 rcparse_discard_strings ();
2729 }
2730 break;
2731 case 170:
2732 #line 1270 "rcparse.y"
2733 {
2734 define_versioninfo (yyvsp[-5].id, language, yyvsp[-3].fixver, yyvsp[-1].verinfo);
2735 if (yychar != YYEMPTY)
2736 YYERROR;
2737 rcparse_discard_strings ();
2738 }
2739 break;
2740 case 171:
2741 #line 1280 "rcparse.y"
2742 {
2743 yyval.fixver = ((struct fixed_versioninfo *)
2744 res_alloc (sizeof (struct fixed_versioninfo)));
2745 memset (yyval.fixver, 0, sizeof (struct fixed_versioninfo));
2746 }
2747 break;
2748 case 172:
2749 #line 1286 "rcparse.y"
2750 {
2751 yyvsp[-5].fixver->file_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2752 yyvsp[-5].fixver->file_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2753 yyval.fixver = yyvsp[-5].fixver;
2754 }
2755 break;
2756 case 173:
2757 #line 1292 "rcparse.y"
2758 {
2759 yyvsp[-5].fixver->product_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2760 yyvsp[-5].fixver->product_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2761 yyval.fixver = yyvsp[-5].fixver;
2762 }
2763 break;
2764 case 174:
2765 #line 1298 "rcparse.y"
2766 {
2767 yyvsp[-2].fixver->file_flags_mask = yyvsp[0].il;
2768 yyval.fixver = yyvsp[-2].fixver;
2769 }
2770 break;
2771 case 175:
2772 #line 1303 "rcparse.y"
2773 {
2774 yyvsp[-2].fixver->file_flags = yyvsp[0].il;
2775 yyval.fixver = yyvsp[-2].fixver;
2776 }
2777 break;
2778 case 176:
2779 #line 1308 "rcparse.y"
2780 {
2781 yyvsp[-2].fixver->file_os = yyvsp[0].il;
2782 yyval.fixver = yyvsp[-2].fixver;
2783 }
2784 break;
2785 case 177:
2786 #line 1313 "rcparse.y"
2787 {
2788 yyvsp[-2].fixver->file_type = yyvsp[0].il;
2789 yyval.fixver = yyvsp[-2].fixver;
2790 }
2791 break;
2792 case 178:
2793 #line 1318 "rcparse.y"
2794 {
2795 yyvsp[-2].fixver->file_subtype = yyvsp[0].il;
2796 yyval.fixver = yyvsp[-2].fixver;
2797 }
2798 break;
2799 case 179:
2800 #line 1332 "rcparse.y"
2801 {
2802 yyval.verinfo = NULL;
2803 }
2804 break;
2805 case 180:
2806 #line 1336 "rcparse.y"
2807 {
2808 yyval.verinfo = append_ver_stringfileinfo (yyvsp[-7].verinfo, yyvsp[-4].s, yyvsp[-2].verstring);
2809 }
2810 break;
2811 case 181:
2812 #line 1340 "rcparse.y"
2813 {
2814 yyval.verinfo = append_ver_varfileinfo (yyvsp[-6].verinfo, yyvsp[-2].s, yyvsp[-1].vervar);
2815 }
2816 break;
2817 case 182:
2818 #line 1347 "rcparse.y"
2819 {
2820 yyval.verstring = NULL;
2821 }
2822 break;
2823 case 183:
2824 #line 1351 "rcparse.y"
2825 {
2826 yyval.verstring = append_verval (yyvsp[-4].verstring, yyvsp[-2].s, yyvsp[0].s);
2827 }
2828 break;
2829 case 184:
2830 #line 1358 "rcparse.y"
2831 {
2832 yyval.vervar = NULL;
2833 }
2834 break;
2835 case 185:
2836 #line 1362 "rcparse.y"
2837 {
2838 yyval.vervar = append_vertrans (yyvsp[-2].vervar, yyvsp[-1].il, yyvsp[0].il);
2839 }
2840 break;
2841 case 186:
2842 #line 1371 "rcparse.y"
2843 {
2844 yyval.id.named = 0;
2845 yyval.id.u.id = yyvsp[0].il;
2846 }
2847 break;
2848 case 187:
2849 #line 1376 "rcparse.y"
2850 {
2851 char *copy, *s;
2852
2853 /* It seems that resource ID's are forced to upper case. */
2854 copy = xstrdup (yyvsp[0].s);
2855 for (s = copy; *s != '\0'; s++)
2856 *s = TOUPPER (*s);
2857 res_string_to_id (&yyval.id, copy);
2858 free (copy);
2859 }
2860 break;
2861 case 188:
2862 #line 1392 "rcparse.y"
2863 {
2864 yyval.s = yyvsp[0].s;
2865 }
2866 break;
2867 case 189:
2868 #line 1396 "rcparse.y"
2869 {
2870 yyval.s = yyvsp[-1].s;
2871 }
2872 break;
2873 case 190:
2874 #line 1400 "rcparse.y"
2875 {
2876 yyval.s = yyvsp[-1].s;
2877 }
2878 break;
2879 case 191:
2880 #line 1408 "rcparse.y"
2881 {
2882 yyval.id.named = 0;
2883 yyval.id.u.id = yyvsp[-1].il;
2884 }
2885 break;
2886 case 192:
2887 #line 1413 "rcparse.y"
2888 {
2889 char *copy, *s;
2890
2891 /* It seems that resource ID's are forced to upper case. */
2892 copy = xstrdup (yyvsp[0].s);
2893 for (s = copy; *s != '\0'; s++)
2894 *s = TOUPPER (*s);
2895 res_string_to_id (&yyval.id, copy);
2896 free (copy);
2897 }
2898 break;
2899 case 193:
2900 #line 1430 "rcparse.y"
2901 {
2902 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2903 yyval.res_info.language = language;
2904 /* FIXME: Is this the right default? */
2905 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
2906 }
2907 break;
2908 case 194:
2909 #line 1437 "rcparse.y"
2910 {
2911 yyval.res_info = yyvsp[-1].res_info;
2912 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2913 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2914 }
2915 break;
2916 case 195:
2917 #line 1443 "rcparse.y"
2918 {
2919 yyval.res_info = yyvsp[-2].res_info;
2920 yyval.res_info.characteristics = yyvsp[0].il;
2921 }
2922 break;
2923 case 196:
2924 #line 1448 "rcparse.y"
2925 {
2926 yyval.res_info = yyvsp[-3].res_info;
2927 yyval.res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
2928 }
2929 break;
2930 case 197:
2931 #line 1453 "rcparse.y"
2932 {
2933 yyval.res_info = yyvsp[-2].res_info;
2934 yyval.res_info.version = yyvsp[0].il;
2935 }
2936 break;
2937 case 198:
2938 #line 1463 "rcparse.y"
2939 {
2940 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2941 yyval.res_info.language = language;
2942 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE;
2943 }
2944 break;
2945 case 199:
2946 #line 1469 "rcparse.y"
2947 {
2948 yyval.res_info = yyvsp[-1].res_info;
2949 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2950 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2951 }
2952 break;
2953 case 200:
2954 #line 1480 "rcparse.y"
2955 {
2956 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2957 yyval.res_info.language = language;
2958 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
2959 }
2960 break;
2961 case 201:
2962 #line 1486 "rcparse.y"
2963 {
2964 yyval.res_info = yyvsp[-1].res_info;
2965 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2966 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2967 }
2968 break;
2969 case 202:
2970 #line 1498 "rcparse.y"
2971 {
2972 yyval.memflags.on = MEMFLAG_MOVEABLE;
2973 yyval.memflags.off = 0;
2974 }
2975 break;
2976 case 203:
2977 #line 1503 "rcparse.y"
2978 {
2979 yyval.memflags.on = 0;
2980 yyval.memflags.off = MEMFLAG_MOVEABLE;
2981 }
2982 break;
2983 case 204:
2984 #line 1508 "rcparse.y"
2985 {
2986 yyval.memflags.on = MEMFLAG_PURE;
2987 yyval.memflags.off = 0;
2988 }
2989 break;
2990 case 205:
2991 #line 1513 "rcparse.y"
2992 {
2993 yyval.memflags.on = 0;
2994 yyval.memflags.off = MEMFLAG_PURE;
2995 }
2996 break;
2997 case 206:
2998 #line 1518 "rcparse.y"
2999 {
3000 yyval.memflags.on = MEMFLAG_PRELOAD;
3001 yyval.memflags.off = 0;
3002 }
3003 break;
3004 case 207:
3005 #line 1523 "rcparse.y"
3006 {
3007 yyval.memflags.on = 0;
3008 yyval.memflags.off = MEMFLAG_PRELOAD;
3009 }
3010 break;
3011 case 208:
3012 #line 1528 "rcparse.y"
3013 {
3014 yyval.memflags.on = MEMFLAG_DISCARDABLE;
3015 yyval.memflags.off = 0;
3016 }
3017 break;
3018 case 209:
3019 #line 1538 "rcparse.y"
3020 {
3021 yyval.s = yyvsp[0].s;
3022 }
3023 break;
3024 case 210:
3025 #line 1542 "rcparse.y"
3026 {
3027 yyval.s = yyvsp[0].s;
3028 }
3029 break;
3030 case 211:
3031 #line 1559 "rcparse.y"
3032 {
3033 style |= yyvsp[0].il;
3034 }
3035 break;
3036 case 212:
3037 #line 1563 "rcparse.y"
3038 {
3039 style &=~ yyvsp[0].il;
3040 }
3041 break;
3042 case 213:
3043 #line 1567 "rcparse.y"
3044 {
3045 style |= yyvsp[0].il;
3046 }
3047 break;
3048 case 214:
3049 #line 1571 "rcparse.y"
3050 {
3051 style &=~ yyvsp[0].il;
3052 }
3053 break;
3054 case 215:
3055 #line 1578 "rcparse.y"
3056 {
3057 yyval.il = yyvsp[0].i.val;
3058 }
3059 break;
3060 case 216:
3061 #line 1582 "rcparse.y"
3062 {
3063 yyval.il = yyvsp[-1].il;
3064 }
3065 break;
3066 case 217:
3067 #line 1591 "rcparse.y"
3068 {
3069 yyval.il = 0;
3070 }
3071 break;
3072 case 218:
3073 #line 1595 "rcparse.y"
3074 {
3075 yyval.il = yyvsp[0].il;
3076 }
3077 break;
3078 case 219:
3079 #line 1604 "rcparse.y"
3080 {
3081 yyval.il = yyvsp[0].il;
3082 }
3083 break;
3084 case 220:
3085 #line 1613 "rcparse.y"
3086 {
3087 yyval.il = yyvsp[0].i.val;
3088 }
3089 break;
3090 case 221:
3091 #line 1622 "rcparse.y"
3092 {
3093 yyval.i = yyvsp[0].i;
3094 }
3095 break;
3096 case 222:
3097 #line 1626 "rcparse.y"
3098 {
3099 yyval.i = yyvsp[-1].i;
3100 }
3101 break;
3102 case 223:
3103 #line 1630 "rcparse.y"
3104 {
3105 yyval.i.val = ~ yyvsp[0].i.val;
3106 yyval.i.dword = yyvsp[0].i.dword;
3107 }
3108 break;
3109 case 224:
3110 #line 1635 "rcparse.y"
3111 {
3112 yyval.i.val = - yyvsp[0].i.val;
3113 yyval.i.dword = yyvsp[0].i.dword;
3114 }
3115 break;
3116 case 225:
3117 #line 1640 "rcparse.y"
3118 {
3119 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
3120 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3121 }
3122 break;
3123 case 226:
3124 #line 1645 "rcparse.y"
3125 {
3126 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
3127 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3128 }
3129 break;
3130 case 227:
3131 #line 1650 "rcparse.y"
3132 {
3133 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
3134 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3135 }
3136 break;
3137 case 228:
3138 #line 1655 "rcparse.y"
3139 {
3140 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
3141 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3142 }
3143 break;
3144 case 229:
3145 #line 1660 "rcparse.y"
3146 {
3147 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
3148 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3149 }
3150 break;
3151 case 230:
3152 #line 1665 "rcparse.y"
3153 {
3154 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
3155 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3156 }
3157 break;
3158 case 231:
3159 #line 1670 "rcparse.y"
3160 {
3161 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
3162 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3163 }
3164 break;
3165 case 232:
3166 #line 1675 "rcparse.y"
3167 {
3168 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
3169 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3170 }
3171 break;
3172 case 233:
3173 #line 1686 "rcparse.y"
3174 {
3175 yyval.il = yyvsp[0].il;
3176 }
3177 break;
3178 case 234:
3179 #line 1695 "rcparse.y"
3180 {
3181 yyval.il = yyvsp[0].i.val;
3182 }
3183 break;
3184 case 235:
3185 #line 1706 "rcparse.y"
3186 {
3187 yyval.i = yyvsp[0].i;
3188 }
3189 break;
3190 case 236:
3191 #line 1710 "rcparse.y"
3192 {
3193 yyval.i = yyvsp[-1].i;
3194 }
3195 break;
3196 case 237:
3197 #line 1714 "rcparse.y"
3198 {
3199 yyval.i.val = ~ yyvsp[0].i.val;
3200 yyval.i.dword = yyvsp[0].i.dword;
3201 }
3202 break;
3203 case 238:
3204 #line 1719 "rcparse.y"
3205 {
3206 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
3207 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3208 }
3209 break;
3210 case 239:
3211 #line 1724 "rcparse.y"
3212 {
3213 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
3214 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3215 }
3216 break;
3217 case 240:
3218 #line 1729 "rcparse.y"
3219 {
3220 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
3221 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3222 }
3223 break;
3224 case 241:
3225 #line 1734 "rcparse.y"
3226 {
3227 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
3228 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3229 }
3230 break;
3231 case 242:
3232 #line 1739 "rcparse.y"
3233 {
3234 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
3235 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3236 }
3237 break;
3238 case 243:
3239 #line 1744 "rcparse.y"
3240 {
3241 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
3242 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3243 }
3244 break;
3245 case 244:
3246 #line 1749 "rcparse.y"
3247 {
3248 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
3249 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3250 }
3251 break;
3252 case 245:
3253 #line 1754 "rcparse.y"
3254 {
3255 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
3256 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3257 }
3258 break;
3259 }
3260
3261 #line 705 "/usr/share/bison-1.35/bison.simple"
3262
3263
3264 yyvsp -= yylen;
3265 yyssp -= yylen;
3266 #if YYLSP_NEEDED
3267 yylsp -= yylen;
3268 #endif
3269
3270 #if YYDEBUG
3271 if (yydebug)
3272 {
3273 short *yyssp1 = yyss - 1;
3274 YYFPRINTF (stderr, "state stack now");
3275 while (yyssp1 != yyssp)
3276 YYFPRINTF (stderr, " %d", *++yyssp1);
3277 YYFPRINTF (stderr, "\n");
3278 }
3279 #endif
3280
3281 *++yyvsp = yyval;
3282 #if YYLSP_NEEDED
3283 *++yylsp = yyloc;
3284 #endif
3285
3286 /* Now `shift' the result of the reduction. Determine what state
3287 that goes to, based on the state we popped back to and the rule
3288 number reduced by. */
3289
3290 yyn = yyr1[yyn];
3291
3292 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3293 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3294 yystate = yytable[yystate];
3295 else
3296 yystate = yydefgoto[yyn - YYNTBASE];
3297
3298 goto yynewstate;
3299
3300
3301 /*------------------------------------.
3302 | yyerrlab -- here on detecting error |
3303 `------------------------------------*/
3304 yyerrlab:
3305 /* If not already recovering from an error, report this error. */
3306 if (!yyerrstatus)
3307 {
3308 ++yynerrs;
3309
3310 #ifdef YYERROR_VERBOSE
3311 yyn = yypact[yystate];
3312
3313 if (yyn > YYFLAG && yyn < YYLAST)
3314 {
3315 YYSIZE_T yysize = 0;
3316 char *yymsg;
3317 int yyx, yycount;
3318
3319 yycount = 0;
3320 /* Start YYX at -YYN if negative to avoid negative indexes in
3321 YYCHECK. */
3322 for (yyx = yyn < 0 ? -yyn : 0;
3323 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
3324 if (yycheck[yyx + yyn] == yyx)
3325 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
3326 yysize += yystrlen ("parse error, unexpected ") + 1;
3327 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
3328 yymsg = (char *) YYSTACK_ALLOC (yysize);
3329 if (yymsg != 0)
3330 {
3331 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
3332 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
3333
3334 if (yycount < 5)
3335 {
3336 yycount = 0;
3337 for (yyx = yyn < 0 ? -yyn : 0;
3338 yyx < (int) (sizeof (yytname) / sizeof (char *));
3339 yyx++)
3340 if (yycheck[yyx + yyn] == yyx)
3341 {
3342 const char *yyq = ! yycount ? ", expecting " : " or ";
3343 yyp = yystpcpy (yyp, yyq);
3344 yyp = yystpcpy (yyp, yytname[yyx]);
3345 yycount++;
3346 }
3347 }
3348 yyerror (yymsg);
3349 YYSTACK_FREE (yymsg);
3350 }
3351 else
3352 yyerror ("parse error; also virtual memory exhausted");
3353 }
3354 else
3355 #endif /* defined (YYERROR_VERBOSE) */
3356 yyerror ("parse error");
3357 }
3358 goto yyerrlab1;
3359
3360
3361 /*--------------------------------------------------.
3362 | yyerrlab1 -- error raised explicitly by an action |
3363 `--------------------------------------------------*/
3364 yyerrlab1:
3365 if (yyerrstatus == 3)
3366 {
3367 /* If just tried and failed to reuse lookahead token after an
3368 error, discard it. */
3369
3370 /* return failure if at end of input */
3371 if (yychar == YYEOF)
3372 YYABORT;
3373 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
3374 yychar, yytname[yychar1]));
3375 yychar = YYEMPTY;
3376 }
3377
3378 /* Else will try to reuse lookahead token after shifting the error
3379 token. */
3380
3381 yyerrstatus = 3; /* Each real token shifted decrements this */
3382
3383 goto yyerrhandle;
3384
3385
3386 /*-------------------------------------------------------------------.
3387 | yyerrdefault -- current state does not do anything special for the |
3388 | error token. |
3389 `-------------------------------------------------------------------*/
3390 yyerrdefault:
3391 #if 0
3392 /* This is wrong; only states that explicitly want error tokens
3393 should shift them. */
3394
3395 /* If its default is to accept any token, ok. Otherwise pop it. */
3396 yyn = yydefact[yystate];
3397 if (yyn)
3398 goto yydefault;
3399 #endif
3400
3401
3402 /*---------------------------------------------------------------.
3403 | yyerrpop -- pop the current state because it cannot handle the |
3404 | error token |
3405 `---------------------------------------------------------------*/
3406 yyerrpop:
3407 if (yyssp == yyss)
3408 YYABORT;
3409 yyvsp--;
3410 yystate = *--yyssp;
3411 #if YYLSP_NEEDED
3412 yylsp--;
3413 #endif
3414
3415 #if YYDEBUG
3416 if (yydebug)
3417 {
3418 short *yyssp1 = yyss - 1;
3419 YYFPRINTF (stderr, "Error: state stack now");
3420 while (yyssp1 != yyssp)
3421 YYFPRINTF (stderr, " %d", *++yyssp1);
3422 YYFPRINTF (stderr, "\n");
3423 }
3424 #endif
3425
3426 /*--------------.
3427 | yyerrhandle. |
3428 `--------------*/
3429 yyerrhandle:
3430 yyn = yypact[yystate];
3431 if (yyn == YYFLAG)
3432 goto yyerrdefault;
3433
3434 yyn += YYTERROR;
3435 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3436 goto yyerrdefault;
3437
3438 yyn = yytable[yyn];
3439 if (yyn < 0)
3440 {
3441 if (yyn == YYFLAG)
3442 goto yyerrpop;
3443 yyn = -yyn;
3444 goto yyreduce;
3445 }
3446 else if (yyn == 0)
3447 goto yyerrpop;
3448
3449 if (yyn == YYFINAL)
3450 YYACCEPT;
3451
3452 YYDPRINTF ((stderr, "Shifting error token, "));
3453
3454 *++yyvsp = yylval;
3455 #if YYLSP_NEEDED
3456 *++yylsp = yylloc;
3457 #endif
3458
3459 yystate = yyn;
3460 goto yynewstate;
3461
3462
3463 /*-------------------------------------.
3464 | yyacceptlab -- YYACCEPT comes here. |
3465 `-------------------------------------*/
3466 yyacceptlab:
3467 yyresult = 0;
3468 goto yyreturn;
3469
3470 /*-----------------------------------.
3471 | yyabortlab -- YYABORT comes here. |
3472 `-----------------------------------*/
3473 yyabortlab:
3474 yyresult = 1;
3475 goto yyreturn;
3476
3477 /*---------------------------------------------.
3478 | yyoverflowab -- parser overflow comes here. |
3479 `---------------------------------------------*/
3480 yyoverflowlab:
3481 yyerror ("parser stack overflow");
3482 yyresult = 2;
3483 /* Fall through. */
3484
3485 yyreturn:
3486 #ifndef yyoverflow
3487 if (yyss != yyssa)
3488 YYSTACK_FREE (yyss);
3489 #endif
3490 return yyresult;
3491 }
3492 #line 1760 "rcparse.y"
3493
3494
3495 /* Set the language from the command line. */
3496
3497 void
rcparse_set_language(int lang)3498 rcparse_set_language (int lang)
3499 {
3500 language = lang;
3501 }
3502