1 /* A Bison parser, made from rcparse.y
4 #define YYBISON 1 /* Identify Bison output. */
8 # define ACCELERATORS 259
23 # define AUTO3STATE 274
24 # define AUTOCHECKBOX 275
25 # define AUTORADIOBUTTON 276
29 # define DEFPUSHBUTTON 280
35 # define PUSHBUTTON 286
36 # define RADIOBUTTON 287
38 # define SCROLLBAR 289
40 # define USERBUTTON 291
47 # define CHARACTERISTICS 298
52 # define SEPARATOR 303
58 # define MENUBARBREAK 309
59 # define MENUBREAK 310
60 # define MESSAGETABLE 311
62 # define STRINGTABLE 313
63 # define VERSIONINFO 314
64 # define FILEVERSION 315
65 # define PRODUCTVERSION 316
66 # define FILEFLAGSMASK 317
67 # define FILEFLAGS 318
70 # define FILESUBTYPE 321
71 # define BLOCKSTRINGFILEINFO 322
72 # define BLOCKVARFILEINFO 323
80 # define LOADONCALL 331
81 # define DISCARDABLE 332
83 # define QUOTEDSTRING 334
86 # define SIZEDSTRING 337
87 # define IGNORED_TOKEN 338
91 /* rcparse.y -- parser for Windows rc files
92 Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
93 Written by Ian Lance Taylor, Cygnus Support.
95 This file is part of GNU Binutils.
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.
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.
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
112 /* This is a parser for Windows rc files. It is based on the parser
113 by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
117 #include "libiberty.h"
119 #include "safe-ctype.h"
121 /* The current language. */
123 static unsigned short language;
125 /* The resource information during a sub statement. */
127 static struct res_res_info sub_res_info;
129 /* Dialog information. This is built by the nonterminals styles and
132 static struct dialog dialog;
134 /* This is used when building a style. It is modified by the
135 nonterminal styleexpr. */
137 static unsigned long style;
139 /* These are used when building a control. They are set before using
142 static unsigned long base_style;
143 static unsigned long default_style;
144 static unsigned long class;
151 struct accelerator acc;
152 struct accelerator *pacc;
153 struct dialog_control *dialog_control;
154 struct menuitem *menuitem;
157 struct rcdata_item *first;
158 struct rcdata_item *last;
160 struct rcdata_item *rcdata_item;
161 struct stringtable_data *stringtable;
162 struct fixed_versioninfo *fixver;
163 struct ver_info *verinfo;
164 struct ver_stringinfo *verstring;
165 struct ver_varinfo *vervar;
167 struct res_res_info res_info;
176 /* Nonzero if this number was explicitly specified as long. */
184 unsigned long length;
188 # define YYSTYPE yystype
189 # define YYSTYPE_IS_TRIVIAL 1
198 #define YYFLAG -32768
201 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
202 #define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 189)
204 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
205 static const char yytranslate[] =
207 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
210 2, 2, 2, 2, 2, 2, 2, 92, 87, 2,
211 97, 98, 90, 88, 95, 89, 2, 91, 2, 2,
212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
213 2, 96, 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, 2, 2, 2,
216 2, 2, 2, 2, 86, 2, 2, 2, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
219 2, 2, 2, 2, 85, 2, 93, 2, 2, 2,
220 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
221 2, 2, 2, 2, 2, 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, 2, 2, 2, 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, 1, 3, 4, 5,
233 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
234 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
235 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
236 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
237 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
238 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
239 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
240 76, 77, 78, 79, 80, 81, 82, 83, 84, 94
244 static const short yyprhs[] =
246 0, 0, 1, 4, 7, 10, 13, 16, 19, 22,
247 25, 28, 31, 34, 37, 40, 43, 46, 53, 54,
248 57, 60, 65, 67, 69, 71, 75, 78, 80, 82,
249 84, 86, 88, 90, 95, 100, 101, 115, 116, 130,
250 131, 146, 147, 151, 152, 156, 160, 164, 168, 172,
251 178, 185, 193, 202, 206, 210, 215, 219, 220, 223,
252 224, 228, 229, 233, 234, 238, 239, 243, 244, 248,
253 249, 253, 265, 278, 291, 305, 306, 310, 311, 315,
254 316, 320, 321, 325, 326, 330, 337, 346, 357, 369,
255 370, 374, 375, 379, 380, 384, 385, 389, 390, 394,
256 395, 399, 400, 404, 405, 409, 410, 414, 415, 432,
257 440, 450, 461, 462, 464, 467, 468, 472, 473, 477,
258 478, 482, 483, 487, 492, 497, 501, 508, 509, 512,
259 517, 520, 527, 528, 532, 535, 537, 539, 541, 543,
260 545, 547, 554, 555, 558, 561, 565, 571, 574, 580,
261 587, 595, 605, 610, 617, 618, 621, 622, 624, 626,
262 628, 632, 636, 637, 644, 645, 649, 654, 661, 666,
263 673, 674, 681, 688, 692, 696, 700, 704, 708, 709,
264 718, 726, 727, 733, 734, 738, 740, 742, 744, 747,
265 750, 753, 755, 756, 759, 763, 768, 772, 773, 776,
266 777, 780, 782, 784, 786, 788, 790, 792, 794, 796,
267 798, 800, 803, 807, 812, 814, 818, 819, 821, 824,
268 826, 828, 832, 835, 838, 842, 846, 850, 854, 858,
269 862, 866, 870, 873, 875, 877, 881, 884, 888, 892,
270 896, 900, 904, 908, 912
272 static const short yyrhs[] =
274 -1, 99, 100, 0, 99, 106, 0, 99, 107, 0,
275 99, 108, 0, 99, 146, 0, 99, 147, 0, 99,
276 148, 0, 99, 149, 0, 99, 154, 0, 99, 157,
277 0, 99, 158, 0, 99, 163, 0, 99, 166, 0,
278 99, 167, 0, 99, 84, 0, 172, 5, 175, 3,
279 101, 4, 0, 0, 101, 102, 0, 103, 186, 0,
280 103, 186, 95, 104, 0, 80, 0, 187, 0, 105,
281 0, 104, 95, 105, 0, 104, 105, 0, 6, 0,
282 7, 0, 8, 0, 9, 0, 10, 0, 11, 0,
283 172, 12, 177, 179, 0, 172, 13, 176, 179, 0,
284 0, 172, 14, 177, 112, 187, 183, 183, 183, 109,
285 113, 3, 114, 4, 0, 0, 172, 15, 177, 112,
286 187, 183, 183, 183, 110, 113, 3, 114, 4, 0,
287 0, 172, 15, 177, 112, 187, 183, 183, 183, 183,
288 111, 113, 3, 114, 4, 0, 0, 16, 96, 184,
289 0, 0, 113, 17, 80, 0, 113, 18, 172, 0,
290 113, 19, 180, 0, 113, 16, 184, 0, 113, 18,
291 80, 0, 113, 41, 184, 95, 80, 0, 113, 41,
292 184, 95, 80, 183, 0, 113, 41, 184, 95, 80,
293 183, 183, 0, 113, 41, 184, 95, 80, 183, 183,
294 183, 0, 113, 46, 172, 0, 113, 44, 184, 0,
295 113, 43, 184, 183, 0, 113, 45, 184, 0, 0,
296 114, 115, 0, 0, 20, 116, 137, 0, 0, 21,
297 117, 137, 0, 0, 22, 118, 137, 0, 0, 38,
298 119, 137, 0, 0, 23, 120, 137, 0, 0, 24,
299 121, 137, 0, 10, 138, 184, 183, 140, 183, 183,
300 183, 183, 182, 139, 0, 10, 138, 184, 183, 140,
301 183, 183, 183, 183, 183, 183, 139, 0, 10, 138,
302 184, 95, 80, 140, 183, 183, 183, 183, 182, 139,
303 0, 10, 138, 184, 95, 80, 140, 183, 183, 183,
304 183, 183, 183, 139, 0, 0, 25, 122, 137, 0,
305 0, 26, 123, 137, 0, 0, 27, 124, 137, 0,
306 0, 28, 125, 137, 0, 0, 39, 126, 137, 0,
307 42, 174, 184, 183, 183, 139, 0, 42, 174, 184,
308 183, 183, 183, 183, 139, 0, 42, 174, 184, 183,
309 183, 183, 183, 142, 182, 139, 0, 42, 174, 184,
310 183, 183, 183, 183, 142, 183, 183, 139, 0, 0,
311 40, 127, 137, 0, 0, 29, 128, 137, 0, 0,
312 30, 129, 137, 0, 0, 31, 130, 137, 0, 0,
313 32, 131, 137, 0, 0, 33, 132, 137, 0, 0,
314 34, 133, 137, 0, 0, 35, 134, 137, 0, 0,
315 36, 135, 137, 0, 0, 37, 80, 95, 184, 95,
316 184, 95, 184, 95, 184, 95, 184, 95, 136, 180,
317 182, 0, 138, 184, 183, 183, 183, 183, 139, 0,
318 138, 184, 183, 183, 183, 183, 144, 182, 139, 0,
319 138, 184, 183, 183, 183, 183, 144, 183, 183, 139,
320 0, 0, 80, 0, 80, 95, 0, 0, 3, 159,
321 4, 0, 0, 95, 141, 180, 0, 0, 95, 143,
322 180, 0, 0, 95, 145, 180, 0, 172, 41, 176,
323 179, 0, 172, 42, 176, 179, 0, 43, 184, 183,
324 0, 172, 46, 175, 3, 150, 4, 0, 0, 150,
325 151, 0, 48, 80, 183, 152, 0, 48, 49, 0,
326 50, 80, 152, 3, 150, 4, 0, 0, 152, 95,
327 153, 0, 152, 153, 0, 51, 0, 52, 0, 53,
328 0, 54, 0, 55, 0, 56, 0, 172, 47, 175,
329 3, 155, 4, 0, 0, 155, 156, 0, 48, 80,
330 0, 48, 80, 183, 0, 48, 80, 183, 183, 182,
331 0, 48, 49, 0, 50, 80, 3, 155, 4, 0,
332 50, 80, 183, 3, 155, 4, 0, 50, 80, 183,
333 183, 3, 155, 4, 0, 50, 80, 183, 183, 183,
334 182, 3, 155, 4, 0, 172, 57, 177, 179, 0,
335 172, 58, 175, 3, 159, 4, 0, 0, 160, 161,
336 0, 0, 162, 0, 83, 0, 185, 0, 162, 95,
337 83, 0, 162, 95, 185, 0, 0, 59, 175, 3,
338 164, 165, 4, 0, 0, 165, 184, 80, 0, 165,
339 184, 95, 80, 0, 172, 172, 175, 3, 159, 4,
340 0, 172, 172, 175, 179, 0, 172, 60, 168, 3,
341 169, 4, 0, 0, 168, 61, 184, 183, 183, 183,
342 0, 168, 62, 184, 183, 183, 183, 0, 168, 63,
343 184, 0, 168, 64, 184, 0, 168, 65, 184, 0,
344 168, 66, 184, 0, 168, 67, 184, 0, 0, 169,
345 68, 3, 71, 3, 170, 4, 4, 0, 169, 69,
346 3, 70, 80, 171, 4, 0, 0, 170, 70, 80,
347 95, 80, 0, 0, 171, 183, 183, 0, 187, 0,
348 81, 0, 80, 0, 80, 95, 0, 81, 95, 0,
349 187, 95, 0, 173, 0, 0, 175, 178, 0, 175,
350 44, 184, 0, 175, 43, 184, 183, 0, 175, 45,
351 184, 0, 0, 176, 178, 0, 0, 177, 178, 0,
352 72, 0, 73, 0, 74, 0, 75, 0, 76, 0,
353 77, 0, 78, 0, 80, 0, 81, 0, 181, 0,
354 79, 181, 0, 180, 85, 181, 0, 180, 85, 79,
355 181, 0, 82, 0, 97, 184, 98, 0, 0, 183,
356 0, 95, 184, 0, 185, 0, 82, 0, 97, 185,
357 98, 0, 93, 185, 0, 89, 185, 0, 185, 90,
358 185, 0, 185, 91, 185, 0, 185, 92, 185, 0,
359 185, 88, 185, 0, 185, 89, 185, 0, 185, 87,
360 185, 0, 185, 86, 185, 0, 185, 85, 185, 0,
361 95, 187, 0, 188, 0, 82, 0, 97, 185, 98,
362 0, 93, 185, 0, 188, 90, 185, 0, 188, 91,
363 185, 0, 188, 92, 185, 0, 188, 88, 185, 0,
364 188, 89, 185, 0, 188, 87, 185, 0, 188, 86,
365 185, 0, 188, 85, 185, 0
371 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
372 static const short yyrline[] =
374 0, 154, 156, 157, 158, 159, 160, 161, 162, 163,
375 164, 165, 166, 167, 168, 169, 170, 175, 185, 190,
376 210, 216, 227, 249, 258, 263, 268, 274, 279, 284,
377 288, 292, 296, 304, 316, 328, 328, 354, 354, 381,
378 381, 411, 416, 422, 424, 430, 434, 439, 443, 447,
379 460, 475, 490, 505, 509, 513, 517, 523, 525, 535,
380 535, 546, 546, 556, 556, 566, 566, 579, 579, 589,
381 589, 599, 610, 619, 632, 643, 643, 653, 653, 663,
382 663, 673, 673, 683, 683, 696, 701, 707, 713, 719,
383 719, 732, 732, 742, 742, 752, 752, 762, 762, 772,
384 772, 782, 782, 792, 792, 802, 802, 812, 812, 829,
385 842, 853, 864, 869, 873, 879, 884, 892, 892, 898,
386 898, 904, 904, 912, 924, 937, 946, 956, 961, 977,
387 982, 986, 992, 997, 1001, 1007, 1012, 1016, 1020, 1024,
388 1028, 1036, 1046, 1051, 1067, 1072, 1076, 1080, 1084, 1088,
389 1092, 1096, 1105, 1117, 1130, 1130, 1141, 1147, 1153, 1162,
390 1170, 1179, 1192, 1192, 1198, 1200, 1207, 1219, 1227, 1238,
391 1248, 1255, 1261, 1267, 1272, 1277, 1282, 1287, 1300, 1305,
392 1309, 1315, 1320, 1326, 1331, 1339, 1345, 1360, 1365, 1369,
393 1376, 1382, 1398, 1406, 1412, 1417, 1422, 1431, 1438, 1448,
394 1455, 1466, 1472, 1477, 1482, 1487, 1492, 1497, 1506, 1511,
395 1527, 1532, 1536, 1540, 1546, 1551, 1559, 1564, 1572, 1581,
396 1590, 1595, 1599, 1604, 1609, 1614, 1619, 1624, 1629, 1634,
397 1639, 1644, 1654, 1663, 1674, 1679, 1683, 1688, 1693, 1698,
398 1703, 1708, 1713, 1718, 1723
403 #if (YYDEBUG) || defined YYERROR_VERBOSE
405 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
406 static const char *const yytname[] =
408 "$", "error", "$undefined.", "BEG", "END", "ACCELERATORS", "VIRTKEY",
409 "ASCII", "NOINVERT", "SHIFT", "CONTROL", "ALT", "BITMAP", "CURSOR",
410 "DIALOG", "DIALOGEX", "EXSTYLE", "CAPTION", "CLASS", "STYLE",
411 "AUTO3STATE", "AUTOCHECKBOX", "AUTORADIOBUTTON", "CHECKBOX", "COMBOBOX",
412 "CTEXT", "DEFPUSHBUTTON", "EDITTEXT", "GROUPBOX", "LISTBOX", "LTEXT",
413 "PUSHBOX", "PUSHBUTTON", "RADIOBUTTON", "RTEXT", "SCROLLBAR", "STATE3",
414 "USERBUTTON", "BEDIT", "HEDIT", "IEDIT", "FONT", "ICON", "LANGUAGE",
415 "CHARACTERISTICS", "VERSIONK", "MENU", "MENUEX", "MENUITEM",
416 "SEPARATOR", "POPUP", "CHECKED", "GRAYED", "HELP", "INACTIVE",
417 "MENUBARBREAK", "MENUBREAK", "MESSAGETABLE", "RCDATA", "STRINGTABLE",
418 "VERSIONINFO", "FILEVERSION", "PRODUCTVERSION", "FILEFLAGSMASK",
419 "FILEFLAGS", "FILEOS", "FILETYPE", "FILESUBTYPE", "BLOCKSTRINGFILEINFO",
420 "BLOCKVARFILEINFO", "VALUE", "BLOCK", "MOVEABLE", "FIXED", "PURE",
421 "IMPURE", "PRELOAD", "LOADONCALL", "DISCARDABLE", "NOT", "QUOTEDSTRING",
422 "STRING", "NUMBER", "SIZEDSTRING", "IGNORED_TOKEN", "'|'", "'^'", "'&'",
423 "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "NEG", "','", "'='", "'('",
424 "')'", "input", "accelerator", "acc_entries", "acc_entry", "acc_event",
425 "acc_options", "acc_option", "bitmap", "cursor", "dialog", "@1", "@2",
426 "@3", "exstyle", "styles", "controls", "control", "@4", "@5", "@6",
427 "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16",
428 "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24",
429 "control_params", "optstringc", "opt_control_data", "control_styleexpr",
430 "@25", "icon_styleexpr", "@26", "control_params_styleexpr", "@27",
431 "font", "icon", "language", "menu", "menuitems", "menuitem",
432 "menuitem_flags", "menuitem_flag", "menuex", "menuexitems",
433 "menuexitem", "messagetable", "rcdata", "optrcdata_data", "@28",
434 "optrcdata_data_int", "rcdata_data", "stringtable", "@29",
435 "string_data", "user", "versioninfo", "fixedverinfo", "verblocks",
436 "vervals", "vertrans", "id", "resname", "resref", "suboptions",
437 "memflags_move_discard", "memflags_move", "memflag", "file_name",
438 "styleexpr", "parennumber", "optcnumexpr", "cnumexpr", "numexpr",
439 "sizednumexpr", "cposnumexpr", "posnumexpr", "sizedposnumexpr", 0
443 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
444 static const short yyr1[] =
446 0, 99, 99, 99, 99, 99, 99, 99, 99, 99,
447 99, 99, 99, 99, 99, 99, 99, 100, 101, 101,
448 102, 102, 103, 103, 104, 104, 104, 105, 105, 105,
449 105, 105, 105, 106, 107, 109, 108, 110, 108, 111,
450 108, 112, 112, 113, 113, 113, 113, 113, 113, 113,
451 113, 113, 113, 113, 113, 113, 113, 114, 114, 116,
452 115, 117, 115, 118, 115, 119, 115, 120, 115, 121,
453 115, 115, 115, 115, 115, 122, 115, 123, 115, 124,
454 115, 125, 115, 126, 115, 115, 115, 115, 115, 127,
455 115, 128, 115, 129, 115, 130, 115, 131, 115, 132,
456 115, 133, 115, 134, 115, 135, 115, 136, 115, 137,
457 137, 137, 138, 138, 138, 139, 139, 141, 140, 143,
458 142, 145, 144, 146, 147, 148, 149, 150, 150, 151,
459 151, 151, 152, 152, 152, 153, 153, 153, 153, 153,
460 153, 154, 155, 155, 156, 156, 156, 156, 156, 156,
461 156, 156, 157, 158, 160, 159, 161, 161, 162, 162,
462 162, 162, 164, 163, 165, 165, 165, 166, 166, 167,
463 168, 168, 168, 168, 168, 168, 168, 168, 169, 169,
464 169, 170, 170, 171, 171, 172, 172, 173, 173, 173,
465 174, 174, 175, 175, 175, 175, 175, 176, 176, 177,
466 177, 178, 178, 178, 178, 178, 178, 178, 179, 179,
467 180, 180, 180, 180, 181, 181, 182, 182, 183, 184,
468 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
469 185, 185, 186, 187, 188, 188, 188, 188, 188, 188,
470 188, 188, 188, 188, 188
473 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
474 static const short yyr2[] =
476 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 6, 0, 2,
478 2, 4, 1, 1, 1, 3, 2, 1, 1, 1,
479 1, 1, 1, 4, 4, 0, 13, 0, 13, 0,
480 14, 0, 3, 0, 3, 3, 3, 3, 3, 5,
481 6, 7, 8, 3, 3, 4, 3, 0, 2, 0,
482 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
483 3, 11, 12, 12, 13, 0, 3, 0, 3, 0,
484 3, 0, 3, 0, 3, 6, 8, 10, 11, 0,
485 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
486 3, 0, 3, 0, 3, 0, 3, 0, 16, 7,
487 9, 10, 0, 1, 2, 0, 3, 0, 3, 0,
488 3, 0, 3, 4, 4, 3, 6, 0, 2, 4,
489 2, 6, 0, 3, 2, 1, 1, 1, 1, 1,
490 1, 6, 0, 2, 2, 3, 5, 2, 5, 6,
491 7, 9, 4, 6, 0, 2, 0, 1, 1, 1,
492 3, 3, 0, 6, 0, 3, 4, 6, 4, 6,
493 0, 6, 6, 3, 3, 3, 3, 3, 0, 8,
494 7, 0, 5, 0, 3, 1, 1, 1, 2, 2,
495 2, 1, 0, 2, 3, 4, 3, 0, 2, 0,
496 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 2, 3, 4, 1, 3, 0, 1, 2, 1,
498 1, 3, 2, 2, 3, 3, 3, 3, 3, 3,
499 3, 3, 2, 1, 1, 3, 2, 3, 3, 3,
503 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
504 doesn't specify something else to do. Zero means the default is an
506 static const short yydefact[] =
508 1, 0, 0, 192, 186, 234, 16, 0, 0, 2,
509 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
510 13, 14, 15, 0, 185, 233, 220, 0, 0, 0,
511 0, 219, 0, 236, 0, 192, 199, 197, 199, 199,
512 197, 197, 192, 192, 199, 192, 170, 192, 0, 0,
513 0, 0, 0, 0, 0, 0, 223, 222, 0, 0,
514 125, 0, 0, 0, 0, 0, 0, 0, 0, 162,
515 0, 0, 0, 201, 202, 203, 204, 205, 206, 207,
516 193, 235, 0, 0, 0, 41, 41, 0, 0, 0,
517 0, 0, 0, 0, 0, 244, 243, 242, 240, 241,
518 237, 238, 239, 221, 218, 231, 230, 229, 227, 228,
519 224, 225, 226, 164, 0, 194, 196, 18, 208, 209,
520 200, 33, 198, 34, 0, 0, 0, 123, 124, 127,
521 142, 152, 154, 178, 0, 0, 0, 0, 0, 0,
522 0, 154, 168, 0, 195, 0, 0, 0, 0, 0,
523 0, 0, 156, 0, 0, 0, 173, 174, 175, 176,
524 177, 0, 163, 0, 17, 22, 19, 0, 23, 42,
525 0, 0, 126, 0, 0, 128, 141, 0, 0, 143,
526 153, 158, 155, 157, 159, 169, 0, 0, 0, 0,
527 167, 165, 0, 0, 20, 0, 0, 130, 0, 132,
528 147, 144, 0, 0, 0, 0, 0, 0, 166, 232,
529 0, 35, 37, 132, 0, 145, 142, 0, 160, 161,
530 0, 0, 171, 172, 27, 28, 29, 30, 31, 32,
531 21, 24, 43, 43, 39, 129, 127, 135, 136, 137,
532 138, 139, 140, 0, 134, 216, 0, 142, 0, 181,
533 183, 0, 26, 0, 0, 43, 0, 133, 146, 217,
534 148, 0, 142, 216, 0, 0, 25, 57, 0, 0,
535 0, 0, 0, 0, 0, 0, 0, 57, 0, 131,
536 149, 0, 0, 0, 0, 180, 0, 0, 47, 44,
537 48, 45, 0, 214, 0, 46, 210, 0, 0, 54,
538 56, 53, 0, 57, 150, 142, 179, 0, 184, 36,
539 112, 59, 61, 63, 67, 69, 75, 77, 79, 81,
540 91, 93, 95, 97, 99, 101, 103, 105, 0, 65,
541 83, 89, 0, 58, 211, 0, 0, 0, 55, 38,
542 0, 0, 0, 113, 0, 112, 112, 112, 112, 112,
543 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
544 112, 112, 0, 112, 112, 112, 187, 0, 191, 0,
545 0, 215, 0, 212, 49, 40, 151, 182, 114, 0,
546 60, 0, 62, 64, 68, 70, 76, 78, 80, 82,
547 92, 94, 96, 98, 100, 102, 104, 106, 0, 66,
548 84, 90, 188, 189, 0, 190, 213, 50, 0, 0,
549 0, 0, 0, 51, 0, 117, 0, 0, 0, 115,
550 52, 0, 0, 0, 0, 0, 154, 85, 0, 0,
551 118, 0, 0, 0, 0, 115, 0, 0, 115, 0,
552 116, 119, 86, 216, 0, 216, 121, 109, 216, 0,
553 0, 115, 217, 216, 115, 217, 0, 115, 217, 0,
554 120, 87, 115, 115, 217, 71, 115, 122, 110, 115,
555 0, 88, 73, 115, 72, 111, 0, 74, 107, 0,
559 static const short yydefgoto[] =
561 1, 9, 145, 166, 167, 230, 231, 10, 11, 12,
562 232, 233, 255, 125, 253, 287, 333, 345, 346, 347,
563 363, 348, 349, 350, 351, 352, 353, 364, 365, 354,
564 355, 356, 357, 358, 359, 360, 361, 479, 380, 381,
565 427, 416, 422, 443, 450, 448, 456, 13, 14, 15,
566 16, 149, 175, 214, 244, 17, 150, 179, 18, 19,
567 151, 152, 182, 183, 20, 113, 143, 21, 22, 93,
568 153, 264, 265, 23, 368, 369, 32, 84, 83, 80,
569 121, 295, 296, 258, 259, 104, 31, 194, 24, 25
572 static const short yypact[] =
574 -32768, 13, 412,-32768,-32768,-32768,-32768, 412, 412,-32768,
575 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
576 -32768,-32768,-32768, 111,-32768, 511,-32768, 412, 412, 412,
577 -79, 600, 244,-32768, 562,-32768,-32768,-32768,-32768,-32768,
578 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 412, 412,
579 412, 412, 412, 412, 412, 412,-32768,-32768, 576, 412,
580 -32768, 412, 412, 412, 412, 412, 412, 412, 412,-32768,
581 412, 412, 412,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
582 -32768,-32768, 256, 603, 603, 297, 297, 603, 603, 280,
583 337, 603, 345, 100, 231, 607, 613, 567, 172, 172,
584 -32768,-32768,-32768,-32768,-32768, 607, 613, 567, 172, 172,
585 -32768,-32768,-32768,-32768, -79,-32768,-32768,-32768,-32768,-32768,
586 -32768,-32768,-32768,-32768, -60, 63, 63,-32768,-32768,-32768,
587 -32768,-32768,-32768,-32768, 412, 412, 412, 412, 412, 412,
588 412,-32768,-32768, 7,-32768, 5, 412, -79, -79, 33,
589 34, 35, 254, 51, -79, -79,-32768,-32768,-32768,-32768,
590 -32768, 36,-32768, 60,-32768,-32768,-32768, -38,-32768,-32768,
591 -79, -79,-32768, -39, 11,-32768,-32768, 59, 25,-32768,
592 -32768,-32768,-32768, 27, 600,-32768, 127, 144, -79, -79,
593 -32768,-32768, 74, 63, 87, -79, -79,-32768, -79,-32768,
594 -32768, -79, 12, 294, 118, 128, -79, -79,-32768,-32768,
595 700,-32768, -79,-32768, 22, -79,-32768, 14,-32768, 600,
596 194, 121,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
597 23,-32768,-32768,-32768,-32768, 309,-32768,-32768,-32768,-32768,
598 -32768,-32768,-32768, 661,-32768, -79, 38,-32768, 16,-32768,
599 -32768, 700,-32768, 383, 472,-32768, 42,-32768,-32768,-32768,
600 -32768, 124,-32768, -79, 10, 4,-32768,-32768, 412, 126,
601 187, 99, 412, 412, 412, 412, 200,-32768, 480,-32768,
602 -32768, 125, 204, 207, 135,-32768, -79, 510,-32768,-32768,
603 -32768,-32768, 49,-32768, 412, 136,-32768, 133, -79,-32768,
604 -32768,-32768, 547,-32768,-32768,-32768,-32768, 134,-32768,-32768,
605 152,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
606 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 153,-32768,
607 -32768,-32768, 374,-32768,-32768, 140, 112, 157,-32768,-32768,
608 584, 138, 160, 148, 412, 152, 152, 152, 152, 152,
609 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
610 152, 152, 158, 152, 152, 152, 161, 163,-32768, 412,
611 165,-32768, 49,-32768, -79,-32768,-32768,-32768,-32768, 170,
612 -32768, 412,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
613 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 412,-32768,
614 -32768,-32768,-32768,-32768, -79,-32768,-32768, -79, 123, 183,
615 -79, 184, -79, -79, 183,-32768, -79, -79, 412, 17,
616 -32768, -79, 99, -79, -79, 190,-32768,-32768, -79, -79,
617 136, -79, -79, 412, 248, 18, -79, -79, 19, 195,
618 -32768,-32768,-32768, -79, -79, -79,-32768,-32768, -79, 412,
619 99, 245, -79, -79, 245, -79, 99, 245, -79, 196,
620 136,-32768, 245, 245, -79,-32768, 245, 136,-32768, 245,
621 412,-32768,-32768, 245,-32768,-32768, 201,-32768,-32768, 99,
622 64,-32768, 295,-32768
625 static const short yypgoto[] =
627 -32768,-32768,-32768,-32768,-32768,-32768, -206,-32768,-32768,-32768,
628 -32768,-32768,-32768, 212, -85, -259,-32768,-32768,-32768,-32768,
629 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
630 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 281, -8,
631 -212, -104,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
632 -32768, 78,-32768, 113, 92,-32768, -204,-32768,-32768,-32768,
633 -140,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
634 -32768,-32768,-32768, -21,-32768,-32768, 350, 139, 175, 475,
635 416, -329, -257, -258, 29, -2, -1,-32768, -122,-32768
642 static const short yytable[] =
644 30, 161, 47, 147, 148, 282, 33, 34, 285, 164,
645 197, 162, 246, 482, 283, 216, 59, 247, 302, 262,
646 426, 426, 426, 168, 252, 236, 56, 57, 58, 224,
647 225, 226, 227, 228, 229, 334, 146, 172, 176, 180,
648 190, 198, 260, 261, 340, 266, 279, 95, 96, 97,
649 98, 99, 100, 101, 102, 185, 2, 193, 281, 60,
650 105, 106, 107, 108, 109, 110, 111, 112, 114, 115,
651 116, 209, 3, 237, 238, 239, 240, 241, 242, 373,
652 284, 173, 177, 174, 178, 165, 177, 5, 178, 26,
653 173, 199, 174, 430, 4, 5, 27, 6, 7, 59,
654 28, 341, 8, 133, 29, 202, 7, 59, 200, 59,
655 8, 59, 59, 441, 446, 406, 35, 243, 251, 186,
656 187, 460, 203, 36, 37, 38, 39, 467, 280, 304,
657 204, 293, 154, 155, 156, 157, 158, 159, 160, 201,
658 191, 163, 376, 144, 169, 5, 294, 205, 254, 336,
659 480, 184, 40, 41, 208, 192, 7, 42, 43, 59,
660 8, 134, 135, 136, 137, 138, 139, 140, 44, 45,
661 278, 46, 177, 177, 178, 178, 170, 171, 292, 87,
662 88, 293, 210, 188, 189, 451, 177, 454, 178, 220,
663 457, 372, 4, 5, 293, 463, 294, 249, 221, 195,
664 196, 250, 219, 414, 7, 26, 289, 305, 8, 294,
665 370, 306, 27, 85, 86, 307, 28, 206, 207, 91,
666 29, 336, 481, 442, 211, 212, 447, 213, 337, 342,
667 215, 217, 343, 362, 141, 222, 223, 374, 371, 461,
668 377, 234, 465, 378, 245, 468, 248, 69, 426, 291,
669 471, 472, 440, 398, 474, 301, 402, 475, 403, 117,
670 405, 477, 66, 67, 68, 408, 288, 290, 4, 5,
671 297, 298, 299, 300, 70, 71, 72, 263, 415, 418,
672 7, 4, 5, 129, 8, 433, 434, 70, 71, 72,
673 449, 470, 335, 7, 286, 483, 478, 8, 126, 70,
674 71, 72, 344, 73, 74, 75, 76, 77, 78, 79,
675 421, 118, 119, 124, 256, 308, 73, 74, 75, 76,
676 77, 78, 79, 70, 71, 72, 235, 338, 73, 74,
677 75, 76, 77, 78, 79, 257, 26, 181, 0, 0,
678 130, 0, 379, 27, 0, 0, 0, 28, 132, 0,
679 0, 29, 73, 74, 75, 76, 77, 78, 79, 0,
680 237, 238, 239, 240, 241, 242, 0, 404, 0, 73,
681 74, 75, 76, 77, 78, 79, 26, 218, 0, 410,
682 70, 71, 72, 27, 0, 82, 267, 28, 70, 71,
683 72, 29, 89, 90, 0, 92, 411, 94, 0, 268,
684 269, 270, 271, 407, 243, 0, 0, 0, 409, 73,
685 74, 75, 76, 77, 78, 79, 425, 73, 74, 75,
686 76, 77, 78, 79, 272, 0, 273, 274, 275, 276,
687 0, 439, 0, 412, 0, 0, 413, 0, 0, 417,
688 0, 419, 420, 0, 0, 423, 424, 459, 428, 0,
689 429, 0, 431, 432, 366, 367, 5, 435, 436, 0,
690 437, 438, 0, 0, 0, 444, 445, 7, 476, 0,
691 0, 8, 452, 453, 455, 277, 0, 458, 0, 0,
692 0, 462, 464, 303, 466, 0, 0, 469, 268, 269,
693 270, 271, 0, 473, 26, 0, 268, 269, 270, 271,
694 123, 27, 0, 127, 128, 28, 0, 131, 0, 29,
695 142, 0, 0, 272, 309, 273, 274, 275, 276, 0,
696 310, 272, 0, 273, 274, 275, 276, 0, 0, 0,
697 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
698 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
699 331, 339, 332, 0, 0, 0, 0, 310, 120, 122,
700 120, 120, 122, 122, 0, 0, 120, 311, 312, 313,
701 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
702 324, 325, 326, 327, 328, 329, 330, 331, 375, 332,
703 0, 0, 0, 0, 310, 0, 48, 49, 50, 51,
704 52, 53, 54, 55, 311, 312, 313, 314, 315, 316,
705 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
706 327, 328, 329, 330, 331, 0, 332, 382, 383, 384,
707 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
708 395, 396, 397, 0, 399, 400, 401, 61, 62, 63,
709 64, 65, 66, 67, 68, 64, 65, 66, 67, 68,
710 81, 61, 62, 63, 64, 65, 66, 67, 68, 0,
711 0, 0, 0, 0, 103, 73, 74, 75, 76, 77,
712 78, 79, 0, 118, 119, 61, 62, 63, 64, 65,
713 66, 67, 68, 62, 63, 64, 65, 66, 67, 68,
714 63, 64, 65, 66, 67, 68, 224, 225, 226, 227,
715 228, 229, 237, 238, 239, 240, 241, 242
718 static const short yycheck[] =
720 2, 141, 23, 125, 126, 263, 7, 8, 4, 4,
721 49, 4, 216, 0, 4, 3, 95, 3, 277, 3,
722 3, 3, 3, 145, 230, 3, 27, 28, 29, 6,
723 7, 8, 9, 10, 11, 292, 96, 4, 4, 4,
724 4, 80, 4, 247, 303, 251, 4, 48, 49, 50,
725 51, 52, 53, 54, 55, 4, 43, 95, 262, 30,
726 61, 62, 63, 64, 65, 66, 67, 68, 70, 71,
727 72, 193, 59, 51, 52, 53, 54, 55, 56, 336,
728 70, 48, 48, 50, 50, 80, 48, 82, 50, 82,
729 48, 80, 50, 422, 81, 82, 89, 84, 93, 95,
730 93, 305, 97, 3, 97, 80, 93, 95, 49, 95,
731 97, 95, 95, 95, 95, 372, 5, 95, 95, 68,
732 69, 450, 95, 12, 13, 14, 15, 456, 4, 4,
733 3, 82, 134, 135, 136, 137, 138, 139, 140, 80,
734 80, 143, 4, 114, 146, 82, 97, 3, 233, 85,
735 479, 152, 41, 42, 80, 95, 93, 46, 47, 95,
736 97, 61, 62, 63, 64, 65, 66, 67, 57, 58,
737 255, 60, 48, 48, 50, 50, 147, 148, 79, 40,
738 41, 82, 95, 154, 155, 443, 48, 445, 50, 71,
739 448, 79, 81, 82, 82, 453, 97, 3, 70, 170,
740 171, 80, 203, 80, 93, 82, 80, 3, 97, 97,
741 332, 4, 89, 38, 39, 80, 93, 188, 189, 44,
742 97, 85, 480, 435, 195, 196, 438, 198, 95, 95,
743 201, 202, 80, 80, 3, 206, 207, 80, 98, 451,
744 80, 212, 454, 95, 215, 457, 217, 3, 3, 270,
745 462, 463, 4, 95, 466, 276, 95, 469, 95, 3,
746 95, 473, 90, 91, 92, 95, 268, 80, 81, 82,
747 272, 273, 274, 275, 43, 44, 45, 248, 95, 95,
748 93, 81, 82, 3, 97, 95, 426, 43, 44, 45,
749 95, 95, 294, 93, 265, 0, 95, 97, 86, 43,
750 44, 45, 310, 72, 73, 74, 75, 76, 77, 78,
751 414, 80, 81, 16, 236, 286, 72, 73, 74, 75,
752 76, 77, 78, 43, 44, 45, 213, 298, 72, 73,
753 74, 75, 76, 77, 78, 243, 82, 83, -1, -1,
754 3, -1, 344, 89, -1, -1, -1, 93, 3, -1,
755 -1, 97, 72, 73, 74, 75, 76, 77, 78, -1,
756 51, 52, 53, 54, 55, 56, -1, 369, -1, 72,
757 73, 74, 75, 76, 77, 78, 82, 83, -1, 381,
758 43, 44, 45, 89, -1, 35, 3, 93, 43, 44,
759 45, 97, 42, 43, -1, 45, 398, 47, -1, 16,
760 17, 18, 19, 374, 95, -1, -1, -1, 379, 72,
761 73, 74, 75, 76, 77, 78, 418, 72, 73, 74,
762 75, 76, 77, 78, 41, -1, 43, 44, 45, 46,
763 -1, 433, -1, 404, -1, -1, 407, -1, -1, 410,
764 -1, 412, 413, -1, -1, 416, 417, 449, 419, -1,
765 421, -1, 423, 424, 80, 81, 82, 428, 429, -1,
766 431, 432, -1, -1, -1, 436, 437, 93, 470, -1,
767 -1, 97, 443, 444, 445, 3, -1, 448, -1, -1,
768 -1, 452, 453, 3, 455, -1, -1, 458, 16, 17,
769 18, 19, -1, 464, 82, -1, 16, 17, 18, 19,
770 84, 89, -1, 87, 88, 93, -1, 91, -1, 97,
771 94, -1, -1, 41, 4, 43, 44, 45, 46, -1,
772 10, 41, -1, 43, 44, 45, 46, -1, -1, -1,
773 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
774 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
775 40, 4, 42, -1, -1, -1, -1, 10, 83, 84,
776 85, 86, 87, 88, -1, -1, 91, 20, 21, 22,
777 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
778 33, 34, 35, 36, 37, 38, 39, 40, 4, 42,
779 -1, -1, -1, -1, 10, -1, 85, 86, 87, 88,
780 89, 90, 91, 92, 20, 21, 22, 23, 24, 25,
781 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
782 36, 37, 38, 39, 40, -1, 42, 346, 347, 348,
783 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
784 359, 360, 361, -1, 363, 364, 365, 85, 86, 87,
785 88, 89, 90, 91, 92, 88, 89, 90, 91, 92,
786 98, 85, 86, 87, 88, 89, 90, 91, 92, -1,
787 -1, -1, -1, -1, 98, 72, 73, 74, 75, 76,
788 77, 78, -1, 80, 81, 85, 86, 87, 88, 89,
789 90, 91, 92, 86, 87, 88, 89, 90, 91, 92,
790 87, 88, 89, 90, 91, 92, 6, 7, 8, 9,
791 10, 11, 51, 52, 53, 54, 55, 56
793 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
794 #line 3 "/usr/share/bison/bison.simple"
796 /* Skeleton output parser for bison,
798 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
801 This program is free software; you can redistribute it and/or modify
802 it under the terms of the GNU General Public License as published by
803 the Free Software Foundation; either version 2, or (at your option)
806 This program is distributed in the hope that it will be useful,
807 but WITHOUT ANY WARRANTY; without even the implied warranty of
808 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
809 GNU General Public License for more details.
811 You should have received a copy of the GNU General Public License
812 along with this program; if not, write to the Free Software
813 Foundation, Inc., 59 Temple Place - Suite 330,
814 Boston, MA 02111-1307, USA. */
816 /* As a special exception, when this file is copied by Bison into a
817 Bison output file, you may use that output file without restriction.
818 This special exception was added by the Free Software Foundation
819 in version 1.24 of Bison. */
821 /* This is the parser code that is written into each bison parser when
822 the %semantic_parser declaration is not specified in the grammar.
823 It was written by Richard Stallman by simplifying the hairy parser
824 used when %semantic_parser is specified. */
826 /* All symbols defined below should begin with yy or YY, to avoid
827 infringing on user name space. This should be done even for local
828 variables, as they might otherwise be expanded by user macros.
829 There are some unavoidable exceptions within include files to
830 define necessary library symbols; they are noted "INFRINGES ON
831 USER NAME SPACE" below. */
833 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
835 /* The parser invokes alloca or malloc; define the necessary symbols. */
837 # if YYSTACK_USE_ALLOCA
838 # define YYSTACK_ALLOC alloca
840 # ifndef YYSTACK_USE_ALLOCA
841 # if defined (alloca) || defined (_ALLOCA_H)
842 # define YYSTACK_ALLOC alloca
845 # define YYSTACK_ALLOC __builtin_alloca
851 # ifdef YYSTACK_ALLOC
852 /* Pacify GCC's `empty if-body' warning. */
853 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
855 # if defined (__STDC__) || defined (__cplusplus)
856 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
857 # define YYSIZE_T size_t
859 # define YYSTACK_ALLOC malloc
860 # define YYSTACK_FREE free
862 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
865 #if (! defined (yyoverflow) \
866 && (! defined (__cplusplus) \
867 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
869 /* A type that is properly aligned for any stack member. */
879 /* The size of the maximum gap between one aligned stack and the next. */
880 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
882 /* The size of an array large to enough to hold all stacks, each with
885 # define YYSTACK_BYTES(N) \
886 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
887 + 2 * YYSTACK_GAP_MAX)
889 # define YYSTACK_BYTES(N) \
890 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
894 /* Copy COUNT objects from FROM to TO. The source and destination do
898 # define YYCOPY(To, From, Count) \
899 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
901 # define YYCOPY(To, From, Count) \
904 register YYSIZE_T yyi; \
905 for (yyi = 0; yyi < (Count); yyi++) \
906 (To)[yyi] = (From)[yyi]; \
912 /* Relocate STACK from its old location to the new one. The
913 local variables YYSIZE and YYSTACKSIZE give the old and new number of
914 elements in the stack, and YYPTR gives the new location of the
915 stack. Advance YYPTR to a properly aligned location for the next
917 # define YYSTACK_RELOCATE(Stack) \
920 YYSIZE_T yynewbytes; \
921 YYCOPY (&yyptr->Stack, Stack, yysize); \
922 Stack = &yyptr->Stack; \
923 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
924 yyptr += yynewbytes / sizeof (*yyptr); \
931 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
932 # define YYSIZE_T __SIZE_TYPE__
934 #if ! defined (YYSIZE_T) && defined (size_t)
935 # define YYSIZE_T size_t
937 #if ! defined (YYSIZE_T)
938 # if defined (__STDC__) || defined (__cplusplus)
939 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
940 # define YYSIZE_T size_t
943 #if ! defined (YYSIZE_T)
944 # define YYSIZE_T unsigned int
947 #define yyerrok (yyerrstatus = 0)
948 #define yyclearin (yychar = YYEMPTY)
951 #define YYACCEPT goto yyacceptlab
952 #define YYABORT goto yyabortlab
953 #define YYERROR goto yyerrlab1
954 /* Like YYERROR except do call yyerror. This remains here temporarily
955 to ease the transition to the new meaning of YYERROR, for GCC.
956 Once GCC version 2 has supplanted version 1, this can go. */
957 #define YYFAIL goto yyerrlab
958 #define YYRECOVERING() (!!yyerrstatus)
959 #define YYBACKUP(Token, Value) \
961 if (yychar == YYEMPTY && yylen == 1) \
965 yychar1 = YYTRANSLATE (yychar); \
971 yyerror ("syntax error: cannot back up"); \
977 #define YYERRCODE 256
980 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
983 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
984 first token. By default, to implement support for ranges, extend
985 its range to the last symbol. */
987 #ifndef YYLLOC_DEFAULT
988 # define YYLLOC_DEFAULT(Current, Rhs, N) \
989 Current.last_line = Rhs[N].last_line; \
990 Current.last_column = Rhs[N].last_column;
994 /* YYLEX -- calling `yylex' with the right arguments. */
999 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1001 # define YYLEX yylex (&yylval, &yylloc)
1003 # else /* !YYLSP_NEEDED */
1005 # define YYLEX yylex (&yylval, YYLEX_PARAM)
1007 # define YYLEX yylex (&yylval)
1009 # endif /* !YYLSP_NEEDED */
1011 # define YYLEX yylex ()
1012 #endif /* !YYPURE */
1015 /* Enable debugging if requested. */
1019 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1020 # define YYFPRINTF fprintf
1023 # define YYDPRINTF(Args) \
1028 /* Nonzero means print parse trace. It is left uninitialized so that
1029 multiple parsers can coexist. */
1031 #else /* !YYDEBUG */
1032 # define YYDPRINTF(Args)
1033 #endif /* !YYDEBUG */
1035 /* YYINITDEPTH -- initial size of the parser's stacks. */
1037 # define YYINITDEPTH 200
1040 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1041 if the built-in stack extension method is used).
1043 Do not make this value too large; the results are undefined if
1044 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1045 evaluated with infinite-precision integer arithmetic. */
1052 # define YYMAXDEPTH 10000
1055 #ifdef YYERROR_VERBOSE
1058 # if defined (__GLIBC__) && defined (_STRING_H)
1059 # define yystrlen strlen
1061 /* Return the length of YYSTR. */
1063 # if defined (__STDC__) || defined (__cplusplus)
1064 yystrlen (const char *yystr)
1070 register const char *yys = yystr;
1072 while (*yys++ != '\0')
1075 return yys - yystr - 1;
1081 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1082 # define yystpcpy stpcpy
1084 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1087 # if defined (__STDC__) || defined (__cplusplus)
1088 yystpcpy (char *yydest, const char *yysrc)
1090 yystpcpy (yydest, yysrc)
1095 register char *yyd = yydest;
1096 register const char *yys = yysrc;
1098 while ((*yyd++ = *yys++) != '\0')
1107 #line 315 "/usr/share/bison/bison.simple"
1110 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1111 into yyparse. The argument should have type void *.
1112 It should actually point to an object.
1113 Grammar actions can access the variable by casting it
1114 to the proper pointer type. */
1116 #ifdef YYPARSE_PARAM
1117 # if defined (__STDC__) || defined (__cplusplus)
1118 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1119 # define YYPARSE_PARAM_DECL
1121 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
1122 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1124 #else /* !YYPARSE_PARAM */
1125 # define YYPARSE_PARAM_ARG
1126 # define YYPARSE_PARAM_DECL
1127 #endif /* !YYPARSE_PARAM */
1129 /* Prevent warning if -Wstrict-prototypes. */
1131 # ifdef YYPARSE_PARAM
1132 int yyparse (void *);
1138 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
1139 variables are global, or local to YYPARSE. */
1141 #define YY_DECL_NON_LSP_VARIABLES \
1142 /* The lookahead symbol. */ \
1145 /* The semantic value of the lookahead symbol. */ \
1148 /* Number of parse errors so far. */ \
1152 # define YY_DECL_VARIABLES \
1153 YY_DECL_NON_LSP_VARIABLES \
1155 /* Location data for the lookahead symbol. */ \
1158 # define YY_DECL_VARIABLES \
1159 YY_DECL_NON_LSP_VARIABLES
1163 /* If nonreentrant, generate the variables here. */
1167 #endif /* !YYPURE */
1170 yyparse (YYPARSE_PARAM_ARG)
1173 /* If reentrant, generate the variables here. */
1176 #endif /* !YYPURE */
1178 register int yystate;
1181 /* Number of tokens to shift before error messages enabled. */
1183 /* Lookahead token as an internal (translated) token number. */
1186 /* Three stacks and their tools:
1187 `yyss': related to states,
1188 `yyvs': related to semantic values,
1189 `yyls': related to locations.
1191 Refer to the stacks thru separate pointers, to allow yyoverflow
1192 to reallocate them elsewhere. */
1194 /* The state stack. */
1195 short yyssa[YYINITDEPTH];
1196 short *yyss = yyssa;
1197 register short *yyssp;
1199 /* The semantic value stack. */
1200 YYSTYPE yyvsa[YYINITDEPTH];
1201 YYSTYPE *yyvs = yyvsa;
1202 register YYSTYPE *yyvsp;
1205 /* The location stack. */
1206 YYLTYPE yylsa[YYINITDEPTH];
1207 YYLTYPE *yyls = yylsa;
1212 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1214 # define YYPOPSTACK (yyvsp--, yyssp--)
1217 YYSIZE_T yystacksize = YYINITDEPTH;
1220 /* The variables used to return semantic value and location from the
1227 /* When reducing, the number of symbols on the RHS of the reduced
1231 YYDPRINTF ((stderr, "Starting parse\n"));
1236 yychar = YYEMPTY; /* Cause a token to be read. */
1238 /* Initialize stack pointers.
1239 Waste one element of value and location stack
1240 so that they stay on the same level as the state stack.
1241 The wasted elements are never initialized. */
1250 /*------------------------------------------------------------.
1251 | yynewstate -- Push a new state, which is found in yystate. |
1252 `------------------------------------------------------------*/
1254 /* In all cases, when you get here, the value and location stacks
1255 have just been pushed. so pushing a state here evens the stacks.
1262 if (yyssp >= yyss + yystacksize - 1)
1264 /* Get the current used size of the three stacks, in elements. */
1265 YYSIZE_T yysize = yyssp - yyss + 1;
1269 /* Give user a chance to reallocate the stack. Use copies of
1270 these so that the &'s don't force the real ones into
1272 YYSTYPE *yyvs1 = yyvs;
1273 short *yyss1 = yyss;
1275 /* Each stack pointer address is followed by the size of the
1276 data in use in that stack, in bytes. */
1278 YYLTYPE *yyls1 = yyls;
1279 /* This used to be a conditional around just the two extra args,
1280 but that might be undefined if yyoverflow is a macro. */
1281 yyoverflow ("parser stack overflow",
1282 &yyss1, yysize * sizeof (*yyssp),
1283 &yyvs1, yysize * sizeof (*yyvsp),
1284 &yyls1, yysize * sizeof (*yylsp),
1288 yyoverflow ("parser stack overflow",
1289 &yyss1, yysize * sizeof (*yyssp),
1290 &yyvs1, yysize * sizeof (*yyvsp),
1296 #else /* no yyoverflow */
1297 # ifndef YYSTACK_RELOCATE
1300 /* Extend the stack our own way. */
1301 if (yystacksize >= YYMAXDEPTH)
1304 if (yystacksize > YYMAXDEPTH)
1305 yystacksize = YYMAXDEPTH;
1308 short *yyss1 = yyss;
1309 union yyalloc *yyptr =
1310 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1313 YYSTACK_RELOCATE (yyss);
1314 YYSTACK_RELOCATE (yyvs);
1316 YYSTACK_RELOCATE (yyls);
1318 # undef YYSTACK_RELOCATE
1320 YYSTACK_FREE (yyss1);
1323 #endif /* no yyoverflow */
1325 yyssp = yyss + yysize - 1;
1326 yyvsp = yyvs + yysize - 1;
1328 yylsp = yyls + yysize - 1;
1331 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1332 (unsigned long int) yystacksize));
1334 if (yyssp >= yyss + yystacksize - 1)
1338 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1348 /* Do appropriate processing given the current state. */
1349 /* Read a lookahead token if we need one and don't already have one. */
1352 /* First try to decide what to do without reference to lookahead token. */
1354 yyn = yypact[yystate];
1358 /* Not known => get a lookahead token if don't already have one. */
1360 /* yychar is either YYEMPTY or YYEOF
1361 or a valid token in external form. */
1363 if (yychar == YYEMPTY)
1365 YYDPRINTF ((stderr, "Reading a token: "));
1369 /* Convert token to internal form (in yychar1) for indexing tables with */
1371 if (yychar <= 0) /* This means end of input. */
1374 yychar = YYEOF; /* Don't call YYLEX any more */
1376 YYDPRINTF ((stderr, "Now at end of input.\n"));
1380 yychar1 = YYTRANSLATE (yychar);
1383 /* We have to keep this `#if YYDEBUG', since we use variables
1384 which are defined only if `YYDEBUG' is set. */
1387 YYFPRINTF (stderr, "Next token is %d (%s",
1388 yychar, yytname[yychar1]);
1389 /* Give the individual parser a way to print the precise
1390 meaning of a token, for further debugging info. */
1392 YYPRINT (stderr, yychar, yylval);
1394 YYFPRINTF (stderr, ")\n");
1400 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1405 /* yyn is what to do for this token type in this state.
1406 Negative => reduce, -yyn is rule number.
1407 Positive => shift, yyn is new state.
1408 New state is final state => don't bother to shift,
1409 just return success.
1410 0, or most negative number => error. */
1425 /* Shift the lookahead token. */
1426 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1427 yychar, yytname[yychar1]));
1429 /* Discard the token being shifted unless it is eof. */
1430 if (yychar != YYEOF)
1438 /* Count tokens shifted since error; after three, turn off error
1447 /*-----------------------------------------------------------.
1448 | yydefault -- do the default action for the current state. |
1449 `-----------------------------------------------------------*/
1451 yyn = yydefact[yystate];
1457 /*-----------------------------.
1458 | yyreduce -- Do a reduction. |
1459 `-----------------------------*/
1461 /* yyn is the number of a rule to reduce with. */
1464 /* If YYLEN is nonzero, implement the default value of the action:
1467 Otherwise, the following line sets YYVAL to the semantic value of
1468 the lookahead token. This behavior is undocumented and Bison
1469 users should not rely upon it. Assigning to YYVAL
1470 unconditionally makes the parser a bit smaller, and it avoids a
1471 GCC warning that YYVAL may be used uninitialized. */
1472 yyval = yyvsp[1-yylen];
1475 /* Similarly for the default location. Let the user run additional
1476 commands if for instance locations are ranges. */
1477 yyloc = yylsp[1-yylen];
1478 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1482 /* We have to keep this `#if YYDEBUG', since we use variables which
1483 are defined only if `YYDEBUG' is set. */
1488 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1491 /* Print the symbols being reduced, and their result. */
1492 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1493 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1494 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1501 #line 177 "rcparse.y"
1503 define_accelerator (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].pacc);
1504 if (yychar != YYEMPTY)
1506 rcparse_discard_strings ();
1510 #line 187 "rcparse.y"
1516 #line 191 "rcparse.y"
1518 struct accelerator *a;
1520 a = (struct accelerator *) res_alloc (sizeof *a);
1522 if (yyvsp[-1].pacc == NULL)
1526 struct accelerator **pp;
1528 for (pp = &yyvsp[-1].pacc->next; *pp != NULL; pp = &(*pp)->next)
1531 yyval.pacc = yyvsp[-1].pacc;
1536 #line 212 "rcparse.y"
1538 yyval.acc = yyvsp[-1].acc;
1539 yyval.acc.id = yyvsp[0].il;
1543 #line 217 "rcparse.y"
1545 yyval.acc = yyvsp[-3].acc;
1546 yyval.acc.id = yyvsp[-2].il;
1547 yyval.acc.flags |= yyvsp[0].is;
1548 if ((yyval.acc.flags & ACC_VIRTKEY) == 0
1549 && (yyval.acc.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
1550 rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
1554 #line 229 "rcparse.y"
1556 const char *s = yyvsp[0].s;
1559 yyval.acc.next = NULL;
1563 yyval.acc.flags = 0;
1566 yyval.acc.flags = ACC_CONTROL | ACC_VIRTKEY;
1573 rcparse_warning (_("accelerator should only be one character"));
1577 #line 250 "rcparse.y"
1579 yyval.acc.next = NULL;
1580 yyval.acc.flags = 0;
1582 yyval.acc.key = yyvsp[0].il;
1586 #line 260 "rcparse.y"
1588 yyval.is = yyvsp[0].is;
1592 #line 264 "rcparse.y"
1594 yyval.is = yyvsp[-2].is | yyvsp[0].is;
1598 #line 269 "rcparse.y"
1600 yyval.is = yyvsp[-1].is | yyvsp[0].is;
1604 #line 276 "rcparse.y"
1606 yyval.is = ACC_VIRTKEY;
1610 #line 280 "rcparse.y"
1612 /* This is just the absence of VIRTKEY. */
1617 #line 285 "rcparse.y"
1619 yyval.is = ACC_NOINVERT;
1623 #line 289 "rcparse.y"
1625 yyval.is = ACC_SHIFT;
1629 #line 293 "rcparse.y"
1631 yyval.is = ACC_CONTROL;
1635 #line 297 "rcparse.y"
1641 #line 306 "rcparse.y"
1643 define_bitmap (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1644 if (yychar != YYEMPTY)
1646 rcparse_discard_strings ();
1650 #line 318 "rcparse.y"
1652 define_cursor (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1653 if (yychar != YYEMPTY)
1655 rcparse_discard_strings ();
1659 #line 331 "rcparse.y"
1661 memset (&dialog, 0, sizeof dialog);
1662 dialog.x = yyvsp[-3].il;
1663 dialog.y = yyvsp[-2].il;
1664 dialog.width = yyvsp[-1].il;
1665 dialog.height = yyvsp[0].il;
1666 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1667 dialog.exstyle = yyvsp[-4].il;
1668 dialog.menu.named = 1;
1669 dialog.class.named = 1;
1672 dialog.controls = NULL;
1673 sub_res_info = yyvsp[-5].res_info;
1678 #line 348 "rcparse.y"
1680 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1681 if (yychar != YYEMPTY)
1683 rcparse_discard_strings ();
1687 #line 356 "rcparse.y"
1689 memset (&dialog, 0, sizeof dialog);
1690 dialog.x = yyvsp[-3].il;
1691 dialog.y = yyvsp[-2].il;
1692 dialog.width = yyvsp[-1].il;
1693 dialog.height = yyvsp[0].il;
1694 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1695 dialog.exstyle = yyvsp[-4].il;
1696 dialog.menu.named = 1;
1697 dialog.class.named = 1;
1699 dialog.ex = ((struct dialog_ex *)
1700 res_alloc (sizeof (struct dialog_ex)));
1701 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1702 dialog.controls = NULL;
1703 sub_res_info = yyvsp[-5].res_info;
1708 #line 375 "rcparse.y"
1710 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1711 if (yychar != YYEMPTY)
1713 rcparse_discard_strings ();
1717 #line 383 "rcparse.y"
1719 memset (&dialog, 0, sizeof dialog);
1720 dialog.x = yyvsp[-4].il;
1721 dialog.y = yyvsp[-3].il;
1722 dialog.width = yyvsp[-2].il;
1723 dialog.height = yyvsp[-1].il;
1724 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1725 dialog.exstyle = yyvsp[-5].il;
1726 dialog.menu.named = 1;
1727 dialog.class.named = 1;
1729 dialog.ex = ((struct dialog_ex *)
1730 res_alloc (sizeof (struct dialog_ex)));
1731 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1732 dialog.ex->help = yyvsp[0].il;
1733 dialog.controls = NULL;
1734 sub_res_info = yyvsp[-6].res_info;
1739 #line 403 "rcparse.y"
1741 define_dialog (yyvsp[-13].id, &sub_res_info, &dialog);
1742 if (yychar != YYEMPTY)
1744 rcparse_discard_strings ();
1748 #line 413 "rcparse.y"
1754 #line 417 "rcparse.y"
1756 yyval.il = yyvsp[0].il;
1760 #line 425 "rcparse.y"
1762 dialog.style |= WS_CAPTION;
1763 style |= WS_CAPTION;
1764 unicode_from_ascii ((int *) NULL, &dialog.caption, yyvsp[0].s);
1768 #line 431 "rcparse.y"
1770 dialog.class = yyvsp[0].id;
1774 #line 436 "rcparse.y"
1776 dialog.style = style;
1780 #line 440 "rcparse.y"
1782 dialog.exstyle = yyvsp[0].il;
1786 #line 444 "rcparse.y"
1788 res_string_to_id (& dialog.class, yyvsp[0].s);
1792 #line 448 "rcparse.y"
1794 dialog.style |= DS_SETFONT;
1795 style |= DS_SETFONT;
1796 dialog.pointsize = yyvsp[-2].il;
1797 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[0].s);
1798 if (dialog.ex != NULL)
1800 dialog.ex->weight = 0;
1801 dialog.ex->italic = 0;
1802 dialog.ex->charset = 1;
1807 #line 461 "rcparse.y"
1809 dialog.style |= DS_SETFONT;
1810 style |= DS_SETFONT;
1811 dialog.pointsize = yyvsp[-3].il;
1812 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-1].s);
1813 if (dialog.ex == NULL)
1814 rcparse_warning (_("extended FONT requires DIALOGEX"));
1817 dialog.ex->weight = yyvsp[0].il;
1818 dialog.ex->italic = 0;
1819 dialog.ex->charset = 1;
1824 #line 476 "rcparse.y"
1826 dialog.style |= DS_SETFONT;
1827 style |= DS_SETFONT;
1828 dialog.pointsize = yyvsp[-4].il;
1829 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-2].s);
1830 if (dialog.ex == NULL)
1831 rcparse_warning (_("extended FONT requires DIALOGEX"));
1834 dialog.ex->weight = yyvsp[-1].il;
1835 dialog.ex->italic = yyvsp[0].il;
1836 dialog.ex->charset = 1;
1841 #line 491 "rcparse.y"
1843 dialog.style |= DS_SETFONT;
1844 style |= DS_SETFONT;
1845 dialog.pointsize = yyvsp[-5].il;
1846 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-3].s);
1847 if (dialog.ex == NULL)
1848 rcparse_warning (_("extended FONT requires DIALOGEX"));
1851 dialog.ex->weight = yyvsp[-2].il;
1852 dialog.ex->italic = yyvsp[-1].il;
1853 dialog.ex->charset = yyvsp[0].il;
1858 #line 506 "rcparse.y"
1860 dialog.menu = yyvsp[0].id;
1864 #line 510 "rcparse.y"
1866 sub_res_info.characteristics = yyvsp[0].il;
1870 #line 514 "rcparse.y"
1872 sub_res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
1876 #line 518 "rcparse.y"
1878 sub_res_info.version = yyvsp[0].il;
1882 #line 526 "rcparse.y"
1884 struct dialog_control **pp;
1886 for (pp = &dialog.controls; *pp != NULL; pp = &(*pp)->next)
1888 *pp = yyvsp[0].dialog_control;
1892 #line 537 "rcparse.y"
1894 default_style = BS_AUTO3STATE | WS_TABSTOP;
1895 base_style = BS_AUTO3STATE;
1900 #line 543 "rcparse.y"
1902 yyval.dialog_control = yyvsp[0].dialog_control;
1906 #line 547 "rcparse.y"
1908 default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
1909 base_style = BS_AUTOCHECKBOX;
1914 #line 553 "rcparse.y"
1916 yyval.dialog_control = yyvsp[0].dialog_control;
1920 #line 557 "rcparse.y"
1922 default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
1923 base_style = BS_AUTORADIOBUTTON;
1928 #line 563 "rcparse.y"
1930 yyval.dialog_control = yyvsp[0].dialog_control;
1934 #line 567 "rcparse.y"
1936 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1937 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1942 #line 573 "rcparse.y"
1944 yyval.dialog_control = yyvsp[0].dialog_control;
1945 if (dialog.ex == NULL)
1946 rcparse_warning (_("BEDIT requires DIALOGEX"));
1947 res_string_to_id (&yyval.dialog_control->class, "BEDIT");
1951 #line 580 "rcparse.y"
1953 default_style = BS_CHECKBOX | WS_TABSTOP;
1954 base_style = BS_CHECKBOX | WS_TABSTOP;
1959 #line 586 "rcparse.y"
1961 yyval.dialog_control = yyvsp[0].dialog_control;
1965 #line 590 "rcparse.y"
1967 default_style = CBS_SIMPLE | WS_TABSTOP;
1969 class = CTL_COMBOBOX;
1973 #line 596 "rcparse.y"
1975 yyval.dialog_control = yyvsp[0].dialog_control;
1979 #line 601 "rcparse.y"
1981 yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-7].il, style, yyvsp[-1].il);
1982 if (yyvsp[0].rcdata_item != NULL)
1984 if (dialog.ex == NULL)
1985 rcparse_warning (_("control data requires DIALOGEX"));
1986 yyval.dialog_control->data = yyvsp[0].rcdata_item;
1991 #line 612 "rcparse.y"
1993 yyval.dialog_control = define_control (yyvsp[-10].s, yyvsp[-9].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-8].il, style, yyvsp[-2].il);
1994 if (dialog.ex == NULL)
1995 rcparse_warning (_("help ID requires DIALOGEX"));
1996 yyval.dialog_control->help = yyvsp[-1].il;
1997 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2001 #line 621 "rcparse.y"
2003 yyval.dialog_control = define_control (yyvsp[-10].s, yyvsp[-9].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, 0, style, yyvsp[-1].il);
2004 if (yyvsp[0].rcdata_item != NULL)
2006 if (dialog.ex == NULL)
2007 rcparse_warning ("control data requires DIALOGEX");
2008 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2010 yyval.dialog_control->class.named = 1;
2011 unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-7].s);
2015 #line 634 "rcparse.y"
2017 yyval.dialog_control = define_control (yyvsp[-11].s, yyvsp[-10].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, style, yyvsp[-2].il);
2018 if (dialog.ex == NULL)
2019 rcparse_warning ("help ID requires DIALOGEX");
2020 yyval.dialog_control->help = yyvsp[-1].il;
2021 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2022 yyval.dialog_control->class.named = 1;
2023 unicode_from_ascii (&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-8].s);
2027 #line 644 "rcparse.y"
2029 default_style = SS_CENTER | WS_GROUP;
2030 base_style = SS_CENTER;
2035 #line 650 "rcparse.y"
2037 yyval.dialog_control = yyvsp[0].dialog_control;
2041 #line 654 "rcparse.y"
2043 default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
2044 base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
2049 #line 660 "rcparse.y"
2051 yyval.dialog_control = yyvsp[0].dialog_control;
2055 #line 664 "rcparse.y"
2057 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2058 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2063 #line 670 "rcparse.y"
2065 yyval.dialog_control = yyvsp[0].dialog_control;
2069 #line 674 "rcparse.y"
2071 default_style = BS_GROUPBOX;
2072 base_style = BS_GROUPBOX;
2077 #line 680 "rcparse.y"
2079 yyval.dialog_control = yyvsp[0].dialog_control;
2083 #line 684 "rcparse.y"
2085 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2086 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2091 #line 690 "rcparse.y"
2093 yyval.dialog_control = yyvsp[0].dialog_control;
2094 if (dialog.ex == NULL)
2095 rcparse_warning (_("IEDIT requires DIALOGEX"));
2096 res_string_to_id (&yyval.dialog_control->class, "HEDIT");
2100 #line 697 "rcparse.y"
2102 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,
2107 #line 703 "rcparse.y"
2109 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,
2114 #line 709 "rcparse.y"
2116 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,
2121 #line 715 "rcparse.y"
2123 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,
2128 #line 720 "rcparse.y"
2130 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2131 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
2136 #line 726 "rcparse.y"
2138 yyval.dialog_control = yyvsp[0].dialog_control;
2139 if (dialog.ex == NULL)
2140 rcparse_warning (_("IEDIT requires DIALOGEX"));
2141 res_string_to_id (&yyval.dialog_control->class, "IEDIT");
2145 #line 733 "rcparse.y"
2147 default_style = LBS_NOTIFY | WS_BORDER;
2148 base_style = LBS_NOTIFY | WS_BORDER;
2149 class = CTL_LISTBOX;
2153 #line 739 "rcparse.y"
2155 yyval.dialog_control = yyvsp[0].dialog_control;
2159 #line 743 "rcparse.y"
2161 default_style = SS_LEFT | WS_GROUP;
2162 base_style = SS_LEFT;
2167 #line 749 "rcparse.y"
2169 yyval.dialog_control = yyvsp[0].dialog_control;
2173 #line 753 "rcparse.y"
2175 default_style = BS_PUSHBOX | WS_TABSTOP;
2176 base_style = BS_PUSHBOX;
2181 #line 759 "rcparse.y"
2183 yyval.dialog_control = yyvsp[0].dialog_control;
2187 #line 763 "rcparse.y"
2189 default_style = BS_PUSHBUTTON | WS_TABSTOP;
2190 base_style = BS_PUSHBUTTON | WS_TABSTOP;
2195 #line 769 "rcparse.y"
2197 yyval.dialog_control = yyvsp[0].dialog_control;
2201 #line 773 "rcparse.y"
2203 default_style = BS_RADIOBUTTON | WS_TABSTOP;
2204 base_style = BS_RADIOBUTTON;
2209 #line 779 "rcparse.y"
2211 yyval.dialog_control = yyvsp[0].dialog_control;
2215 #line 783 "rcparse.y"
2217 default_style = SS_RIGHT | WS_GROUP;
2218 base_style = SS_RIGHT;
2223 #line 789 "rcparse.y"
2225 yyval.dialog_control = yyvsp[0].dialog_control;
2229 #line 793 "rcparse.y"
2231 default_style = SBS_HORZ;
2233 class = CTL_SCROLLBAR;
2237 #line 799 "rcparse.y"
2239 yyval.dialog_control = yyvsp[0].dialog_control;
2243 #line 803 "rcparse.y"
2245 default_style = BS_3STATE | WS_TABSTOP;
2246 base_style = BS_3STATE;
2251 #line 809 "rcparse.y"
2253 yyval.dialog_control = yyvsp[0].dialog_control;
2257 #line 814 "rcparse.y"
2258 { style = WS_CHILD | WS_VISIBLE; }
2261 #line 816 "rcparse.y"
2263 yyval.dialog_control = define_control (yyvsp[-14].s, yyvsp[-12].il, yyvsp[-10].il, yyvsp[-8].il, yyvsp[-6].il, yyvsp[-4].il, CTL_BUTTON,
2264 style, yyvsp[0].il);
2268 #line 832 "rcparse.y"
2270 yyval.dialog_control = define_control (yyvsp[-6].s, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, class,
2271 default_style | WS_CHILD | WS_VISIBLE, 0);
2272 if (yyvsp[0].rcdata_item != NULL)
2274 if (dialog.ex == NULL)
2275 rcparse_warning (_("control data requires DIALOGEX"));
2276 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2281 #line 844 "rcparse.y"
2283 yyval.dialog_control = define_control (yyvsp[-8].s, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, class, style, yyvsp[-1].il);
2284 if (yyvsp[0].rcdata_item != NULL)
2286 if (dialog.ex == NULL)
2287 rcparse_warning (_("control data requires DIALOGEX"));
2288 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2293 #line 855 "rcparse.y"
2295 yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, class, style, yyvsp[-2].il);
2296 if (dialog.ex == NULL)
2297 rcparse_warning (_("help ID requires DIALOGEX"));
2298 yyval.dialog_control->help = yyvsp[-1].il;
2299 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2303 #line 866 "rcparse.y"
2309 #line 870 "rcparse.y"
2311 yyval.s = yyvsp[0].s;
2315 #line 874 "rcparse.y"
2317 yyval.s = yyvsp[-1].s;
2321 #line 881 "rcparse.y"
2323 yyval.rcdata_item = NULL;
2327 #line 885 "rcparse.y"
2329 yyval.rcdata_item = yyvsp[-1].rcdata.first;
2333 #line 894 "rcparse.y"
2334 { style = WS_CHILD | WS_VISIBLE; }
2337 #line 900 "rcparse.y"
2338 { style = SS_ICON | WS_CHILD | WS_VISIBLE; }
2341 #line 906 "rcparse.y"
2342 { style = base_style | WS_CHILD | WS_VISIBLE; }
2345 #line 914 "rcparse.y"
2347 define_font (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2348 if (yychar != YYEMPTY)
2350 rcparse_discard_strings ();
2354 #line 926 "rcparse.y"
2356 define_icon (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2357 if (yychar != YYEMPTY)
2359 rcparse_discard_strings ();
2363 #line 939 "rcparse.y"
2365 language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
2369 #line 948 "rcparse.y"
2371 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2372 if (yychar != YYEMPTY)
2374 rcparse_discard_strings ();
2378 #line 958 "rcparse.y"
2380 yyval.menuitem = NULL;
2384 #line 962 "rcparse.y"
2386 if (yyvsp[-1].menuitem == NULL)
2387 yyval.menuitem = yyvsp[0].menuitem;
2390 struct menuitem **pp;
2392 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2394 *pp = yyvsp[0].menuitem;
2395 yyval.menuitem = yyvsp[-1].menuitem;
2400 #line 979 "rcparse.y"
2402 yyval.menuitem = define_menuitem (yyvsp[-2].s, yyvsp[-1].il, yyvsp[0].is, 0, 0, NULL);
2406 #line 983 "rcparse.y"
2408 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2412 #line 987 "rcparse.y"
2414 yyval.menuitem = define_menuitem (yyvsp[-4].s, 0, yyvsp[-3].is, 0, 0, yyvsp[-1].menuitem);
2418 #line 994 "rcparse.y"
2424 #line 998 "rcparse.y"
2426 yyval.is = yyvsp[-2].is | yyvsp[0].is;
2430 #line 1002 "rcparse.y"
2432 yyval.is = yyvsp[-1].is | yyvsp[0].is;
2436 #line 1009 "rcparse.y"
2438 yyval.is = MENUITEM_CHECKED;
2442 #line 1013 "rcparse.y"
2444 yyval.is = MENUITEM_GRAYED;
2448 #line 1017 "rcparse.y"
2450 yyval.is = MENUITEM_HELP;
2454 #line 1021 "rcparse.y"
2456 yyval.is = MENUITEM_INACTIVE;
2460 #line 1025 "rcparse.y"
2462 yyval.is = MENUITEM_MENUBARBREAK;
2466 #line 1029 "rcparse.y"
2468 yyval.is = MENUITEM_MENUBREAK;
2472 #line 1038 "rcparse.y"
2474 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2475 if (yychar != YYEMPTY)
2477 rcparse_discard_strings ();
2481 #line 1048 "rcparse.y"
2483 yyval.menuitem = NULL;
2487 #line 1052 "rcparse.y"
2489 if (yyvsp[-1].menuitem == NULL)
2490 yyval.menuitem = yyvsp[0].menuitem;
2493 struct menuitem **pp;
2495 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2497 *pp = yyvsp[0].menuitem;
2498 yyval.menuitem = yyvsp[-1].menuitem;
2503 #line 1069 "rcparse.y"
2505 yyval.menuitem = define_menuitem (yyvsp[0].s, 0, 0, 0, 0, NULL);
2509 #line 1073 "rcparse.y"
2511 yyval.menuitem = define_menuitem (yyvsp[-1].s, yyvsp[0].il, 0, 0, 0, NULL);
2515 #line 1077 "rcparse.y"
2517 yyval.menuitem = define_menuitem (yyvsp[-3].s, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].il, 0, NULL);
2521 #line 1081 "rcparse.y"
2523 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2527 #line 1085 "rcparse.y"
2529 yyval.menuitem = define_menuitem (yyvsp[-3].s, 0, 0, 0, 0, yyvsp[-1].menuitem);
2533 #line 1089 "rcparse.y"
2535 yyval.menuitem = define_menuitem (yyvsp[-4].s, yyvsp[-3].il, 0, 0, 0, yyvsp[-1].menuitem);
2539 #line 1093 "rcparse.y"
2541 yyval.menuitem = define_menuitem (yyvsp[-5].s, yyvsp[-4].il, yyvsp[-3].il, 0, 0, yyvsp[-1].menuitem);
2545 #line 1098 "rcparse.y"
2547 yyval.menuitem = define_menuitem (yyvsp[-7].s, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-1].menuitem);
2551 #line 1107 "rcparse.y"
2553 define_messagetable (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2554 if (yychar != YYEMPTY)
2556 rcparse_discard_strings ();
2560 #line 1119 "rcparse.y"
2562 define_rcdata (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2563 if (yychar != YYEMPTY)
2565 rcparse_discard_strings ();
2569 #line 1131 "rcparse.y"
2575 #line 1135 "rcparse.y"
2578 yyval.rcdata = yyvsp[0].rcdata;
2582 #line 1143 "rcparse.y"
2584 yyval.rcdata.first = NULL;
2585 yyval.rcdata.last = NULL;
2589 #line 1148 "rcparse.y"
2591 yyval.rcdata = yyvsp[0].rcdata;
2595 #line 1155 "rcparse.y"
2597 struct rcdata_item *ri;
2599 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2600 yyval.rcdata.first = ri;
2601 yyval.rcdata.last = ri;
2605 #line 1163 "rcparse.y"
2607 struct rcdata_item *ri;
2609 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2610 yyval.rcdata.first = ri;
2611 yyval.rcdata.last = ri;
2615 #line 1171 "rcparse.y"
2617 struct rcdata_item *ri;
2619 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2620 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2621 yyvsp[-2].rcdata.last->next = ri;
2622 yyval.rcdata.last = ri;
2626 #line 1180 "rcparse.y"
2628 struct rcdata_item *ri;
2630 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2631 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2632 yyvsp[-2].rcdata.last->next = ri;
2633 yyval.rcdata.last = ri;
2637 #line 1194 "rcparse.y"
2638 { sub_res_info = yyvsp[-1].res_info; }
2641 #line 1201 "rcparse.y"
2643 define_stringtable (&sub_res_info, yyvsp[-1].il, yyvsp[0].s);
2644 if (yychar != YYEMPTY)
2646 rcparse_discard_strings ();
2650 #line 1208 "rcparse.y"
2652 define_stringtable (&sub_res_info, yyvsp[-2].il, yyvsp[0].s);
2653 if (yychar != YYEMPTY)
2655 rcparse_discard_strings ();
2659 #line 1221 "rcparse.y"
2661 define_user_data (yyvsp[-5].id, yyvsp[-4].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2662 if (yychar != YYEMPTY)
2664 rcparse_discard_strings ();
2668 #line 1228 "rcparse.y"
2670 define_user_file (yyvsp[-3].id, yyvsp[-2].id, &yyvsp[-1].res_info, yyvsp[0].s);
2671 if (yychar != YYEMPTY)
2673 rcparse_discard_strings ();
2677 #line 1240 "rcparse.y"
2679 define_versioninfo (yyvsp[-5].id, language, yyvsp[-3].fixver, yyvsp[-1].verinfo);
2680 if (yychar != YYEMPTY)
2682 rcparse_discard_strings ();
2686 #line 1250 "rcparse.y"
2688 yyval.fixver = ((struct fixed_versioninfo *)
2689 res_alloc (sizeof (struct fixed_versioninfo)));
2690 memset (yyval.fixver, 0, sizeof (struct fixed_versioninfo));
2694 #line 1256 "rcparse.y"
2696 yyvsp[-5].fixver->file_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2697 yyvsp[-5].fixver->file_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2698 yyval.fixver = yyvsp[-5].fixver;
2702 #line 1262 "rcparse.y"
2704 yyvsp[-5].fixver->product_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2705 yyvsp[-5].fixver->product_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2706 yyval.fixver = yyvsp[-5].fixver;
2710 #line 1268 "rcparse.y"
2712 yyvsp[-2].fixver->file_flags_mask = yyvsp[0].il;
2713 yyval.fixver = yyvsp[-2].fixver;
2717 #line 1273 "rcparse.y"
2719 yyvsp[-2].fixver->file_flags = yyvsp[0].il;
2720 yyval.fixver = yyvsp[-2].fixver;
2724 #line 1278 "rcparse.y"
2726 yyvsp[-2].fixver->file_os = yyvsp[0].il;
2727 yyval.fixver = yyvsp[-2].fixver;
2731 #line 1283 "rcparse.y"
2733 yyvsp[-2].fixver->file_type = yyvsp[0].il;
2734 yyval.fixver = yyvsp[-2].fixver;
2738 #line 1288 "rcparse.y"
2740 yyvsp[-2].fixver->file_subtype = yyvsp[0].il;
2741 yyval.fixver = yyvsp[-2].fixver;
2745 #line 1302 "rcparse.y"
2747 yyval.verinfo = NULL;
2751 #line 1306 "rcparse.y"
2753 yyval.verinfo = append_ver_stringfileinfo (yyvsp[-7].verinfo, yyvsp[-4].s, yyvsp[-2].verstring);
2757 #line 1310 "rcparse.y"
2759 yyval.verinfo = append_ver_varfileinfo (yyvsp[-6].verinfo, yyvsp[-2].s, yyvsp[-1].vervar);
2763 #line 1317 "rcparse.y"
2765 yyval.verstring = NULL;
2769 #line 1321 "rcparse.y"
2771 yyval.verstring = append_verval (yyvsp[-4].verstring, yyvsp[-2].s, yyvsp[0].s);
2775 #line 1328 "rcparse.y"
2777 yyval.vervar = NULL;
2781 #line 1332 "rcparse.y"
2783 yyval.vervar = append_vertrans (yyvsp[-2].vervar, yyvsp[-1].il, yyvsp[0].il);
2787 #line 1341 "rcparse.y"
2790 yyval.id.u.id = yyvsp[0].il;
2794 #line 1346 "rcparse.y"
2798 /* It seems that resource ID's are forced to upper case. */
2799 copy = xstrdup (yyvsp[0].s);
2800 for (s = copy; *s != '\0'; s++)
2802 res_string_to_id (&yyval.id, copy);
2807 #line 1362 "rcparse.y"
2809 yyval.s = yyvsp[0].s;
2813 #line 1366 "rcparse.y"
2815 yyval.s = yyvsp[-1].s;
2819 #line 1370 "rcparse.y"
2821 yyval.s = yyvsp[-1].s;
2825 #line 1378 "rcparse.y"
2828 yyval.id.u.id = yyvsp[-1].il;
2832 #line 1383 "rcparse.y"
2836 /* It seems that resource ID's are forced to upper case. */
2837 copy = xstrdup (yyvsp[0].s);
2838 for (s = copy; *s != '\0'; s++)
2840 res_string_to_id (&yyval.id, copy);
2845 #line 1400 "rcparse.y"
2847 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2848 yyval.res_info.language = language;
2849 /* FIXME: Is this the right default? */
2850 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
2854 #line 1407 "rcparse.y"
2856 yyval.res_info = yyvsp[-1].res_info;
2857 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2858 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2862 #line 1413 "rcparse.y"
2864 yyval.res_info = yyvsp[-2].res_info;
2865 yyval.res_info.characteristics = yyvsp[0].il;
2869 #line 1418 "rcparse.y"
2871 yyval.res_info = yyvsp[-3].res_info;
2872 yyval.res_info.language = yyvsp[-1].il | (yyvsp[0].il << SUBLANG_SHIFT);
2876 #line 1423 "rcparse.y"
2878 yyval.res_info = yyvsp[-2].res_info;
2879 yyval.res_info.version = yyvsp[0].il;
2883 #line 1433 "rcparse.y"
2885 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2886 yyval.res_info.language = language;
2887 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE;
2891 #line 1439 "rcparse.y"
2893 yyval.res_info = yyvsp[-1].res_info;
2894 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2895 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2899 #line 1450 "rcparse.y"
2901 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2902 yyval.res_info.language = language;
2903 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
2907 #line 1456 "rcparse.y"
2909 yyval.res_info = yyvsp[-1].res_info;
2910 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2911 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2915 #line 1468 "rcparse.y"
2917 yyval.memflags.on = MEMFLAG_MOVEABLE;
2918 yyval.memflags.off = 0;
2922 #line 1473 "rcparse.y"
2924 yyval.memflags.on = 0;
2925 yyval.memflags.off = MEMFLAG_MOVEABLE;
2929 #line 1478 "rcparse.y"
2931 yyval.memflags.on = MEMFLAG_PURE;
2932 yyval.memflags.off = 0;
2936 #line 1483 "rcparse.y"
2938 yyval.memflags.on = 0;
2939 yyval.memflags.off = MEMFLAG_PURE;
2943 #line 1488 "rcparse.y"
2945 yyval.memflags.on = MEMFLAG_PRELOAD;
2946 yyval.memflags.off = 0;
2950 #line 1493 "rcparse.y"
2952 yyval.memflags.on = 0;
2953 yyval.memflags.off = MEMFLAG_PRELOAD;
2957 #line 1498 "rcparse.y"
2959 yyval.memflags.on = MEMFLAG_DISCARDABLE;
2960 yyval.memflags.off = 0;
2964 #line 1508 "rcparse.y"
2966 yyval.s = yyvsp[0].s;
2970 #line 1512 "rcparse.y"
2972 yyval.s = yyvsp[0].s;
2976 #line 1529 "rcparse.y"
2978 style |= yyvsp[0].il;
2982 #line 1533 "rcparse.y"
2984 style &=~ yyvsp[0].il;
2988 #line 1537 "rcparse.y"
2990 style |= yyvsp[0].il;
2994 #line 1541 "rcparse.y"
2996 style &=~ yyvsp[0].il;
3000 #line 1548 "rcparse.y"
3002 yyval.il = yyvsp[0].i.val;
3006 #line 1552 "rcparse.y"
3008 yyval.il = yyvsp[-1].il;
3012 #line 1561 "rcparse.y"
3018 #line 1565 "rcparse.y"
3020 yyval.il = yyvsp[0].il;
3024 #line 1574 "rcparse.y"
3026 yyval.il = yyvsp[0].il;
3030 #line 1583 "rcparse.y"
3032 yyval.il = yyvsp[0].i.val;
3036 #line 1592 "rcparse.y"
3038 yyval.i = yyvsp[0].i;
3042 #line 1596 "rcparse.y"
3044 yyval.i = yyvsp[-1].i;
3048 #line 1600 "rcparse.y"
3050 yyval.i.val = ~ yyvsp[0].i.val;
3051 yyval.i.dword = yyvsp[0].i.dword;
3055 #line 1605 "rcparse.y"
3057 yyval.i.val = - yyvsp[0].i.val;
3058 yyval.i.dword = yyvsp[0].i.dword;
3062 #line 1610 "rcparse.y"
3064 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
3065 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3069 #line 1615 "rcparse.y"
3071 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
3072 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3076 #line 1620 "rcparse.y"
3078 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
3079 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3083 #line 1625 "rcparse.y"
3085 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
3086 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3090 #line 1630 "rcparse.y"
3092 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
3093 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3097 #line 1635 "rcparse.y"
3099 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
3100 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3104 #line 1640 "rcparse.y"
3106 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
3107 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3111 #line 1645 "rcparse.y"
3113 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
3114 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3118 #line 1656 "rcparse.y"
3120 yyval.il = yyvsp[0].il;
3124 #line 1665 "rcparse.y"
3126 yyval.il = yyvsp[0].i.val;
3130 #line 1676 "rcparse.y"
3132 yyval.i = yyvsp[0].i;
3136 #line 1680 "rcparse.y"
3138 yyval.i = yyvsp[-1].i;
3142 #line 1684 "rcparse.y"
3144 yyval.i.val = ~ yyvsp[0].i.val;
3145 yyval.i.dword = yyvsp[0].i.dword;
3149 #line 1689 "rcparse.y"
3151 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
3152 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3156 #line 1694 "rcparse.y"
3158 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
3159 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3163 #line 1699 "rcparse.y"
3165 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
3166 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3170 #line 1704 "rcparse.y"
3172 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
3173 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3177 #line 1709 "rcparse.y"
3179 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
3180 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3184 #line 1714 "rcparse.y"
3186 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
3187 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3191 #line 1719 "rcparse.y"
3193 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
3194 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3198 #line 1724 "rcparse.y"
3200 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
3201 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
3206 #line 705 "/usr/share/bison/bison.simple"
3218 short *yyssp1 = yyss - 1;
3219 YYFPRINTF (stderr, "state stack now");
3220 while (yyssp1 != yyssp)
3221 YYFPRINTF (stderr, " %d", *++yyssp1);
3222 YYFPRINTF (stderr, "\n");
3231 /* Now `shift' the result of the reduction. Determine what state
3232 that goes to, based on the state we popped back to and the rule
3233 number reduced by. */
3237 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3238 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3239 yystate = yytable[yystate];
3241 yystate = yydefgoto[yyn - YYNTBASE];
3246 /*------------------------------------.
3247 | yyerrlab -- here on detecting error |
3248 `------------------------------------*/
3250 /* If not already recovering from an error, report this error. */
3255 #ifdef YYERROR_VERBOSE
3256 yyn = yypact[yystate];
3258 if (yyn > YYFLAG && yyn < YYLAST)
3260 YYSIZE_T yysize = 0;
3265 /* Start YYX at -YYN if negative to avoid negative indexes in
3267 for (yyx = yyn < 0 ? -yyn : 0;
3268 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
3269 if (yycheck[yyx + yyn] == yyx)
3270 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
3271 yysize += yystrlen ("parse error, unexpected ") + 1;
3272 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
3273 yymsg = (char *) YYSTACK_ALLOC (yysize);
3276 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
3277 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
3282 for (yyx = yyn < 0 ? -yyn : 0;
3283 yyx < (int) (sizeof (yytname) / sizeof (char *));
3285 if (yycheck[yyx + yyn] == yyx)
3287 const char *yyq = ! yycount ? ", expecting " : " or ";
3288 yyp = yystpcpy (yyp, yyq);
3289 yyp = yystpcpy (yyp, yytname[yyx]);
3294 YYSTACK_FREE (yymsg);
3297 yyerror ("parse error; also virtual memory exhausted");
3300 #endif /* defined (YYERROR_VERBOSE) */
3301 yyerror ("parse error");
3306 /*--------------------------------------------------.
3307 | yyerrlab1 -- error raised explicitly by an action |
3308 `--------------------------------------------------*/
3310 if (yyerrstatus == 3)
3312 /* If just tried and failed to reuse lookahead token after an
3313 error, discard it. */
3315 /* return failure if at end of input */
3316 if (yychar == YYEOF)
3318 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
3319 yychar, yytname[yychar1]));
3323 /* Else will try to reuse lookahead token after shifting the error
3326 yyerrstatus = 3; /* Each real token shifted decrements this */
3331 /*-------------------------------------------------------------------.
3332 | yyerrdefault -- current state does not do anything special for the |
3334 `-------------------------------------------------------------------*/
3337 /* This is wrong; only states that explicitly want error tokens
3338 should shift them. */
3340 /* If its default is to accept any token, ok. Otherwise pop it. */
3341 yyn = yydefact[yystate];
3347 /*---------------------------------------------------------------.
3348 | yyerrpop -- pop the current state because it cannot handle the |
3350 `---------------------------------------------------------------*/
3363 short *yyssp1 = yyss - 1;
3364 YYFPRINTF (stderr, "Error: state stack now");
3365 while (yyssp1 != yyssp)
3366 YYFPRINTF (stderr, " %d", *++yyssp1);
3367 YYFPRINTF (stderr, "\n");
3375 yyn = yypact[yystate];
3380 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3397 YYDPRINTF ((stderr, "Shifting error token, "));
3408 /*-------------------------------------.
3409 | yyacceptlab -- YYACCEPT comes here. |
3410 `-------------------------------------*/
3415 /*-----------------------------------.
3416 | yyabortlab -- YYABORT comes here. |
3417 `-----------------------------------*/
3422 /*---------------------------------------------.
3423 | yyoverflowab -- parser overflow comes here. |
3424 `---------------------------------------------*/
3426 yyerror ("parser stack overflow");
3433 YYSTACK_FREE (yyss);
3437 #line 1730 "rcparse.y"
3440 /* Set the language from the command line. */
3443 rcparse_set_language (lang)