update generated files
[binutils.git] / binutils / rcparse.c
blob8e050df426d8876227639d7369b97bf0756603c1
2 /* A Bison parser, made from rcparse.y
3 by GNU Bison version 1.28 */
5 #define YYBISON 1 /* Identify Bison output. */
7 #define BEG 257
8 #define END 258
9 #define ACCELERATORS 259
10 #define VIRTKEY 260
11 #define ASCII 261
12 #define NOINVERT 262
13 #define SHIFT 263
14 #define CONTROL 264
15 #define ALT 265
16 #define BITMAP 266
17 #define CURSOR 267
18 #define DIALOG 268
19 #define DIALOGEX 269
20 #define EXSTYLE 270
21 #define CAPTION 271
22 #define CLASS 272
23 #define STYLE 273
24 #define AUTO3STATE 274
25 #define AUTOCHECKBOX 275
26 #define AUTORADIOBUTTON 276
27 #define CHECKBOX 277
28 #define COMBOBOX 278
29 #define CTEXT 279
30 #define DEFPUSHBUTTON 280
31 #define EDITTEXT 281
32 #define GROUPBOX 282
33 #define LISTBOX 283
34 #define LTEXT 284
35 #define PUSHBOX 285
36 #define PUSHBUTTON 286
37 #define RADIOBUTTON 287
38 #define RTEXT 288
39 #define SCROLLBAR 289
40 #define STATE3 290
41 #define USERBUTTON 291
42 #define BEDIT 292
43 #define HEDIT 293
44 #define IEDIT 294
45 #define FONT 295
46 #define ICON 296
47 #define LANGUAGE 297
48 #define CHARACTERISTICS 298
49 #define VERSIONK 299
50 #define MENU 300
51 #define MENUEX 301
52 #define MENUITEM 302
53 #define SEPARATOR 303
54 #define POPUP 304
55 #define CHECKED 305
56 #define GRAYED 306
57 #define HELP 307
58 #define INACTIVE 308
59 #define MENUBARBREAK 309
60 #define MENUBREAK 310
61 #define MESSAGETABLE 311
62 #define RCDATA 312
63 #define STRINGTABLE 313
64 #define VERSIONINFO 314
65 #define FILEVERSION 315
66 #define PRODUCTVERSION 316
67 #define FILEFLAGSMASK 317
68 #define FILEFLAGS 318
69 #define FILEOS 319
70 #define FILETYPE 320
71 #define FILESUBTYPE 321
72 #define BLOCKSTRINGFILEINFO 322
73 #define BLOCKVARFILEINFO 323
74 #define VALUE 324
75 #define BLOCK 325
76 #define MOVEABLE 326
77 #define FIXED 327
78 #define PURE 328
79 #define IMPURE 329
80 #define PRELOAD 330
81 #define LOADONCALL 331
82 #define DISCARDABLE 332
83 #define NOT 333
84 #define QUOTEDSTRING 334
85 #define STRING 335
86 #define NUMBER 336
87 #define SIZEDSTRING 337
88 #define IGNORED_TOKEN 338
89 #define NEG 339
91 #line 1 "rcparse.y"
92 /* rcparse.y -- parser for Windows rc files
93 Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
94 Written by Ian Lance Taylor, Cygnus Support.
96 This file is part of GNU Binutils.
98 This program is free software; you can redistribute it and/or modify
99 it under the terms of the GNU General Public License as published by
100 the Free Software Foundation; either version 2 of the License, or
101 (at your option) any later version.
103 This program is distributed in the hope that it will be useful,
104 but WITHOUT ANY WARRANTY; without even the implied warranty of
105 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106 GNU General Public License for more details.
108 You should have received a copy of the GNU General Public License
109 along with this program; if not, write to the Free Software
110 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
111 02111-1307, USA. */
113 /* This is a parser for Windows rc files. It is based on the parser
114 by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
116 #include "bfd.h"
117 #include "bucomm.h"
118 #include "libiberty.h"
119 #include "windres.h"
121 #include <ctype.h>
123 /* The current language. */
125 static unsigned short language;
127 /* The resource information during a sub statement. */
129 static struct res_res_info sub_res_info;
131 /* Dialog information. This is built by the nonterminals styles and
132 controls. */
134 static struct dialog dialog;
136 /* This is used when building a style. It is modified by the
137 nonterminal styleexpr. */
139 static unsigned long style;
141 /* These are used when building a control. They are set before using
142 control_params. */
144 static unsigned long base_style;
145 static unsigned long default_style;
146 static unsigned long class;
149 #line 59 "rcparse.y"
150 typedef union
152 struct accelerator acc;
153 struct accelerator *pacc;
154 struct dialog_control *dialog_control;
155 struct menuitem *menuitem;
156 struct
158 struct rcdata_item *first;
159 struct rcdata_item *last;
160 } rcdata;
161 struct rcdata_item *rcdata_item;
162 struct stringtable_data *stringtable;
163 struct fixed_versioninfo *fixver;
164 struct ver_info *verinfo;
165 struct ver_stringinfo *verstring;
166 struct ver_varinfo *vervar;
167 struct res_id id;
168 struct res_res_info res_info;
169 struct
171 unsigned short on;
172 unsigned short off;
173 } memflags;
174 struct
176 unsigned long val;
177 /* Nonzero if this number was explicitly specified as long. */
178 int dword;
179 } i;
180 unsigned long il;
181 unsigned short is;
182 const char *s;
183 struct
185 unsigned long length;
186 const char *s;
187 } ss;
188 } YYSTYPE;
189 #include <stdio.h>
191 #ifndef __cplusplus
192 #ifndef __STDC__
193 #define const
194 #endif
195 #endif
199 #define YYFINAL 483
200 #define YYFLAG -32768
201 #define YYNTBASE 99
203 #define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 191)
205 static const char yytranslate[] = { 0,
206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
207 2, 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, 92, 87, 2, 97,
210 98, 90, 88, 95, 89, 2, 91, 2, 2, 2,
211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
212 96, 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, 86, 2, 2, 2, 2, 2, 2,
216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
218 2, 2, 2, 85, 2, 93, 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, 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, 1, 3, 4, 5, 6,
232 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
233 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
234 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
235 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
236 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
237 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
238 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
239 77, 78, 79, 80, 81, 82, 83, 84, 94
242 #if YYDEBUG != 0
243 static const short yyprhs[] = { 0,
244 0, 1, 5, 9, 13, 17, 21, 25, 29, 33,
245 37, 41, 45, 49, 53, 57, 61, 62, 69, 70,
246 73, 76, 81, 83, 85, 87, 91, 94, 96, 98,
247 100, 102, 104, 106, 111, 116, 117, 131, 132, 146,
248 147, 162, 163, 167, 168, 172, 176, 177, 182, 186,
249 192, 200, 204, 208, 213, 217, 218, 221, 222, 226,
250 227, 231, 232, 236, 237, 241, 242, 246, 247, 251,
251 263, 276, 289, 303, 304, 308, 309, 313, 314, 318,
252 319, 323, 324, 328, 335, 344, 355, 367, 368, 372,
253 373, 377, 378, 382, 383, 387, 388, 392, 393, 397,
254 398, 402, 403, 407, 408, 412, 413, 430, 438, 448,
255 459, 460, 462, 465, 466, 470, 471, 475, 476, 480,
256 481, 485, 490, 495, 499, 506, 507, 510, 515, 518,
257 525, 526, 530, 533, 535, 537, 539, 541, 543, 545,
258 552, 553, 556, 559, 563, 569, 572, 578, 585, 593,
259 603, 608, 615, 616, 619, 620, 622, 624, 626, 630,
260 634, 635, 642, 643, 647, 652, 659, 664, 671, 672,
261 679, 686, 690, 694, 698, 702, 706, 707, 716, 724,
262 725, 731, 732, 736, 738, 740, 742, 745, 748, 751,
263 753, 754, 757, 761, 766, 770, 771, 774, 775, 778,
264 780, 782, 784, 786, 788, 790, 792, 794, 796, 798,
265 801, 805, 810, 812, 816, 817, 819, 822, 824, 826,
266 830, 833, 836, 840, 844, 848, 852, 856, 860, 864,
267 868, 871, 873, 875, 879, 882, 886, 890, 894, 898,
268 902, 906, 910
271 static const short yyrhs[] = { -1,
272 99, 100, 101, 0, 99, 100, 107, 0, 99, 100,
273 108, 0, 99, 100, 109, 0, 99, 100, 148, 0,
274 99, 100, 149, 0, 99, 100, 150, 0, 99, 100,
275 151, 0, 99, 100, 156, 0, 99, 100, 159, 0,
276 99, 100, 160, 0, 99, 100, 165, 0, 99, 100,
277 168, 0, 99, 100, 169, 0, 99, 100, 84, 0,
278 0, 174, 5, 177, 3, 102, 4, 0, 0, 102,
279 103, 0, 104, 188, 0, 104, 188, 95, 105, 0,
280 80, 0, 189, 0, 106, 0, 105, 95, 106, 0,
281 105, 106, 0, 6, 0, 7, 0, 8, 0, 9,
282 0, 10, 0, 11, 0, 174, 12, 179, 181, 0,
283 174, 13, 178, 181, 0, 0, 174, 14, 179, 113,
284 189, 185, 185, 185, 110, 114, 3, 116, 4, 0,
285 0, 174, 15, 179, 113, 189, 185, 185, 185, 111,
286 114, 3, 116, 4, 0, 0, 174, 15, 179, 113,
287 189, 185, 185, 185, 185, 112, 114, 3, 116, 4,
288 0, 0, 16, 96, 186, 0, 0, 114, 17, 80,
289 0, 114, 18, 174, 0, 0, 114, 19, 115, 182,
290 0, 114, 16, 186, 0, 114, 41, 186, 95, 80,
291 0, 114, 41, 186, 95, 80, 185, 185, 0, 114,
292 46, 174, 0, 114, 44, 186, 0, 114, 43, 186,
293 185, 0, 114, 45, 186, 0, 0, 116, 117, 0,
294 0, 20, 118, 139, 0, 0, 21, 119, 139, 0,
295 0, 22, 120, 139, 0, 0, 38, 121, 139, 0,
296 0, 23, 122, 139, 0, 0, 24, 123, 139, 0,
297 10, 140, 186, 185, 142, 185, 185, 185, 185, 184,
298 141, 0, 10, 140, 186, 185, 142, 185, 185, 185,
299 185, 185, 185, 141, 0, 10, 140, 186, 95, 80,
300 142, 185, 185, 185, 185, 184, 141, 0, 10, 140,
301 186, 95, 80, 142, 185, 185, 185, 185, 185, 185,
302 141, 0, 0, 25, 124, 139, 0, 0, 26, 125,
303 139, 0, 0, 27, 126, 139, 0, 0, 28, 127,
304 139, 0, 0, 39, 128, 139, 0, 42, 176, 186,
305 185, 185, 141, 0, 42, 176, 186, 185, 185, 185,
306 185, 141, 0, 42, 176, 186, 185, 185, 185, 185,
307 144, 184, 141, 0, 42, 176, 186, 185, 185, 185,
308 185, 144, 185, 185, 141, 0, 0, 40, 129, 139,
309 0, 0, 29, 130, 139, 0, 0, 30, 131, 139,
310 0, 0, 31, 132, 139, 0, 0, 32, 133, 139,
311 0, 0, 33, 134, 139, 0, 0, 34, 135, 139,
312 0, 0, 35, 136, 139, 0, 0, 36, 137, 139,
313 0, 0, 37, 80, 95, 186, 95, 186, 95, 186,
314 95, 186, 95, 186, 95, 138, 182, 184, 0, 140,
315 186, 185, 185, 185, 185, 141, 0, 140, 186, 185,
316 185, 185, 185, 146, 184, 141, 0, 140, 186, 185,
317 185, 185, 185, 146, 185, 185, 141, 0, 0, 80,
318 0, 80, 95, 0, 0, 3, 161, 4, 0, 0,
319 95, 143, 182, 0, 0, 95, 145, 182, 0, 0,
320 95, 147, 182, 0, 174, 41, 178, 181, 0, 174,
321 42, 178, 181, 0, 43, 186, 185, 0, 174, 46,
322 177, 3, 152, 4, 0, 0, 152, 153, 0, 48,
323 80, 185, 154, 0, 48, 49, 0, 50, 80, 154,
324 3, 152, 4, 0, 0, 154, 95, 155, 0, 154,
325 155, 0, 51, 0, 52, 0, 53, 0, 54, 0,
326 55, 0, 56, 0, 174, 47, 177, 3, 157, 4,
327 0, 0, 157, 158, 0, 48, 80, 0, 48, 80,
328 185, 0, 48, 80, 185, 185, 184, 0, 48, 49,
329 0, 50, 80, 3, 157, 4, 0, 50, 80, 185,
330 3, 157, 4, 0, 50, 80, 185, 185, 3, 157,
331 4, 0, 50, 80, 185, 185, 185, 184, 3, 157,
332 4, 0, 174, 57, 179, 181, 0, 174, 58, 177,
333 3, 161, 4, 0, 0, 162, 163, 0, 0, 164,
334 0, 83, 0, 187, 0, 164, 95, 83, 0, 164,
335 95, 187, 0, 0, 59, 177, 3, 166, 167, 4,
336 0, 0, 167, 186, 80, 0, 167, 186, 95, 80,
337 0, 174, 174, 177, 3, 161, 4, 0, 174, 174,
338 177, 181, 0, 174, 60, 170, 3, 171, 4, 0,
339 0, 170, 61, 186, 185, 185, 185, 0, 170, 62,
340 186, 185, 185, 185, 0, 170, 63, 186, 0, 170,
341 64, 186, 0, 170, 65, 186, 0, 170, 66, 186,
342 0, 170, 67, 186, 0, 0, 171, 68, 3, 71,
343 3, 172, 4, 4, 0, 171, 69, 3, 70, 80,
344 173, 4, 0, 0, 172, 70, 80, 95, 80, 0,
345 0, 173, 185, 185, 0, 189, 0, 81, 0, 80,
346 0, 80, 95, 0, 81, 95, 0, 189, 95, 0,
347 175, 0, 0, 177, 180, 0, 177, 44, 186, 0,
348 177, 43, 186, 185, 0, 177, 45, 186, 0, 0,
349 178, 180, 0, 0, 179, 180, 0, 72, 0, 73,
350 0, 74, 0, 75, 0, 76, 0, 77, 0, 78,
351 0, 80, 0, 81, 0, 183, 0, 79, 183, 0,
352 182, 85, 183, 0, 182, 85, 79, 183, 0, 82,
353 0, 97, 186, 98, 0, 0, 185, 0, 95, 186,
354 0, 187, 0, 82, 0, 97, 187, 98, 0, 93,
355 187, 0, 89, 187, 0, 187, 90, 187, 0, 187,
356 91, 187, 0, 187, 92, 187, 0, 187, 88, 187,
357 0, 187, 89, 187, 0, 187, 87, 187, 0, 187,
358 86, 187, 0, 187, 85, 187, 0, 95, 189, 0,
359 190, 0, 82, 0, 97, 187, 98, 0, 93, 187,
360 0, 190, 90, 187, 0, 190, 91, 187, 0, 190,
361 92, 187, 0, 190, 88, 187, 0, 190, 89, 187,
362 0, 190, 87, 187, 0, 190, 86, 187, 0, 190,
363 85, 187, 0
366 #endif
368 #if YYDEBUG != 0
369 static const short yyrline[] = { 0,
370 155, 157, 158, 159, 160, 161, 162, 163, 164, 165,
371 166, 167, 168, 169, 170, 171, 174, 183, 190, 195,
372 215, 221, 232, 254, 263, 268, 273, 279, 284, 289,
373 293, 297, 301, 309, 318, 327, 345, 349, 368, 372,
374 392, 398, 403, 409, 411, 415, 419, 422, 425, 429,
375 435, 448, 452, 456, 460, 466, 468, 478, 486, 489,
376 496, 499, 506, 509, 516, 522, 529, 532, 539, 542,
377 553, 562, 575, 586, 593, 596, 603, 606, 613, 616,
378 623, 626, 633, 639, 644, 650, 656, 662, 669, 675,
379 682, 685, 692, 695, 702, 705, 712, 715, 722, 725,
380 732, 735, 742, 745, 752, 755, 758, 772, 785, 796,
381 807, 812, 816, 822, 827, 835, 839, 841, 845, 847,
382 851, 855, 864, 874, 883, 890, 895, 911, 916, 920,
383 926, 931, 935, 941, 946, 950, 954, 958, 962, 970,
384 977, 982, 998, 1003, 1007, 1011, 1015, 1019, 1023, 1027,
385 1036, 1045, 1055, 1060, 1066, 1072, 1078, 1087, 1095, 1104,
386 1117, 1120, 1123, 1125, 1129, 1138, 1143, 1151, 1158, 1165,
387 1171, 1177, 1182, 1187, 1192, 1197, 1210, 1215, 1219, 1225,
388 1230, 1236, 1241, 1249, 1255, 1271, 1276, 1280, 1287, 1293,
389 1310, 1318, 1324, 1329, 1334, 1343, 1350, 1360, 1367, 1378,
390 1384, 1389, 1394, 1399, 1404, 1409, 1418, 1423, 1439, 1444,
391 1448, 1452, 1458, 1463, 1471, 1476, 1484, 1493, 1502, 1507,
392 1511, 1516, 1521, 1526, 1531, 1536, 1541, 1546, 1551, 1556,
393 1566, 1575, 1586, 1591, 1595, 1600, 1605, 1610, 1615, 1620,
394 1625, 1630, 1635
396 #endif
399 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
401 static const char * const yytname[] = { "$","error","$undefined.","BEG","END",
402 "ACCELERATORS","VIRTKEY","ASCII","NOINVERT","SHIFT","CONTROL","ALT","BITMAP",
403 "CURSOR","DIALOG","DIALOGEX","EXSTYLE","CAPTION","CLASS","STYLE","AUTO3STATE",
404 "AUTOCHECKBOX","AUTORADIOBUTTON","CHECKBOX","COMBOBOX","CTEXT","DEFPUSHBUTTON",
405 "EDITTEXT","GROUPBOX","LISTBOX","LTEXT","PUSHBOX","PUSHBUTTON","RADIOBUTTON",
406 "RTEXT","SCROLLBAR","STATE3","USERBUTTON","BEDIT","HEDIT","IEDIT","FONT","ICON",
407 "LANGUAGE","CHARACTERISTICS","VERSIONK","MENU","MENUEX","MENUITEM","SEPARATOR",
408 "POPUP","CHECKED","GRAYED","HELP","INACTIVE","MENUBARBREAK","MENUBREAK","MESSAGETABLE",
409 "RCDATA","STRINGTABLE","VERSIONINFO","FILEVERSION","PRODUCTVERSION","FILEFLAGSMASK",
410 "FILEFLAGS","FILEOS","FILETYPE","FILESUBTYPE","BLOCKSTRINGFILEINFO","BLOCKVARFILEINFO",
411 "VALUE","BLOCK","MOVEABLE","FIXED","PURE","IMPURE","PRELOAD","LOADONCALL","DISCARDABLE",
412 "NOT","QUOTEDSTRING","STRING","NUMBER","SIZEDSTRING","IGNORED_TOKEN","'|'","'^'",
413 "'&'","'+'","'-'","'*'","'/'","'%'","'~'","NEG","','","'='","'('","')'","input",
414 "newcmd","accelerator","acc_entries","acc_entry","acc_event","acc_options","acc_option",
415 "bitmap","cursor","dialog","@1","@2","@3","exstyle","styles","@4","controls",
416 "control","@5","@6","@7","@8","@9","@10","@11","@12","@13","@14","@15","@16",
417 "@17","@18","@19","@20","@21","@22","@23","@24","@25","control_params","optstringc",
418 "opt_control_data","control_styleexpr","@26","icon_styleexpr","@27","control_params_styleexpr",
419 "@28","font","icon","language","menu","menuitems","menuitem","menuitem_flags",
420 "menuitem_flag","menuex","menuexitems","menuexitem","messagetable","rcdata",
421 "optrcdata_data","@29","optrcdata_data_int","rcdata_data","stringtable","@30",
422 "string_data","user","versioninfo","fixedverinfo","verblocks","vervals","vertrans",
423 "id","resname","resref","suboptions","memflags_move_discard","memflags_move",
424 "memflag","file_name","styleexpr","parennumber","optcnumexpr","cnumexpr","numexpr",
425 "sizednumexpr","cposnumexpr","posnumexpr","sizedposnumexpr", NULL
427 #endif
429 static const short yyr1[] = { 0,
430 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
431 99, 99, 99, 99, 99, 99, 100, 101, 102, 102,
432 103, 103, 104, 104, 105, 105, 105, 106, 106, 106,
433 106, 106, 106, 107, 108, 110, 109, 111, 109, 112,
434 109, 113, 113, 114, 114, 114, 115, 114, 114, 114,
435 114, 114, 114, 114, 114, 116, 116, 118, 117, 119,
436 117, 120, 117, 121, 117, 122, 117, 123, 117, 117,
437 117, 117, 117, 124, 117, 125, 117, 126, 117, 127,
438 117, 128, 117, 117, 117, 117, 117, 129, 117, 130,
439 117, 131, 117, 132, 117, 133, 117, 134, 117, 135,
440 117, 136, 117, 137, 117, 138, 117, 139, 139, 139,
441 140, 140, 140, 141, 141, 143, 142, 145, 144, 147,
442 146, 148, 149, 150, 151, 152, 152, 153, 153, 153,
443 154, 154, 154, 155, 155, 155, 155, 155, 155, 156,
444 157, 157, 158, 158, 158, 158, 158, 158, 158, 158,
445 159, 160, 162, 161, 163, 163, 164, 164, 164, 164,
446 166, 165, 167, 167, 167, 168, 168, 169, 170, 170,
447 170, 170, 170, 170, 170, 170, 171, 171, 171, 172,
448 172, 173, 173, 174, 174, 175, 175, 175, 176, 176,
449 177, 177, 177, 177, 177, 178, 178, 179, 179, 180,
450 180, 180, 180, 180, 180, 180, 181, 181, 182, 182,
451 182, 182, 183, 183, 184, 184, 185, 186, 187, 187,
452 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
453 188, 189, 190, 190, 190, 190, 190, 190, 190, 190,
454 190, 190, 190
457 static const short yyr2[] = { 0,
458 0, 3, 3, 3, 3, 3, 3, 3, 3, 3,
459 3, 3, 3, 3, 3, 3, 0, 6, 0, 2,
460 2, 4, 1, 1, 1, 3, 2, 1, 1, 1,
461 1, 1, 1, 4, 4, 0, 13, 0, 13, 0,
462 14, 0, 3, 0, 3, 3, 0, 4, 3, 5,
463 7, 3, 3, 4, 3, 0, 2, 0, 3, 0,
464 3, 0, 3, 0, 3, 0, 3, 0, 3, 11,
465 12, 12, 13, 0, 3, 0, 3, 0, 3, 0,
466 3, 0, 3, 6, 8, 10, 11, 0, 3, 0,
467 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
468 3, 0, 3, 0, 3, 0, 16, 7, 9, 10,
469 0, 1, 2, 0, 3, 0, 3, 0, 3, 0,
470 3, 4, 4, 3, 6, 0, 2, 4, 2, 6,
471 0, 3, 2, 1, 1, 1, 1, 1, 1, 6,
472 0, 2, 2, 3, 5, 2, 5, 6, 7, 9,
473 4, 6, 0, 2, 0, 1, 1, 1, 3, 3,
474 0, 6, 0, 3, 4, 6, 4, 6, 0, 6,
475 6, 3, 3, 3, 3, 3, 0, 8, 7, 0,
476 5, 0, 3, 1, 1, 1, 2, 2, 2, 1,
477 0, 2, 3, 4, 3, 0, 2, 0, 2, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
479 3, 4, 1, 3, 0, 1, 2, 1, 1, 3,
480 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
481 2, 1, 1, 3, 2, 3, 3, 3, 3, 3,
482 3, 3, 3
485 static const short yydefact[] = { 1,
486 17, 0, 0, 191, 185, 233, 16, 0, 0, 2,
487 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
488 13, 14, 15, 0, 184, 232, 219, 0, 0, 0,
489 0, 218, 0, 235, 0, 191, 198, 196, 198, 198,
490 196, 196, 191, 191, 198, 191, 169, 191, 0, 0,
491 0, 0, 0, 0, 0, 0, 222, 221, 0, 0,
492 124, 0, 0, 0, 0, 0, 0, 0, 0, 161,
493 0, 0, 0, 200, 201, 202, 203, 204, 205, 206,
494 192, 234, 0, 0, 0, 42, 42, 0, 0, 0,
495 0, 0, 0, 0, 0, 243, 242, 241, 239, 240,
496 236, 237, 238, 220, 217, 230, 229, 228, 226, 227,
497 223, 224, 225, 163, 0, 193, 195, 19, 207, 208,
498 199, 34, 197, 35, 0, 0, 0, 122, 123, 126,
499 141, 151, 153, 177, 0, 0, 0, 0, 0, 0,
500 0, 153, 167, 0, 194, 0, 0, 0, 0, 0,
501 0, 0, 155, 0, 0, 0, 172, 173, 174, 175,
502 176, 0, 162, 0, 18, 23, 20, 0, 24, 43,
503 0, 0, 125, 0, 0, 127, 140, 0, 0, 142,
504 152, 157, 154, 156, 158, 168, 0, 0, 0, 0,
505 166, 164, 0, 0, 21, 0, 0, 129, 0, 131,
506 146, 143, 0, 0, 0, 0, 0, 0, 165, 231,
507 0, 36, 38, 131, 0, 144, 141, 0, 159, 160,
508 0, 0, 170, 171, 28, 29, 30, 31, 32, 33,
509 22, 25, 44, 44, 40, 128, 126, 134, 135, 136,
510 137, 138, 139, 0, 133, 215, 0, 141, 0, 180,
511 182, 0, 27, 0, 0, 44, 0, 132, 145, 216,
512 147, 0, 141, 215, 0, 0, 26, 56, 0, 0,
513 0, 47, 0, 0, 0, 0, 0, 56, 0, 130,
514 148, 0, 0, 0, 0, 179, 0, 0, 49, 45,
515 46, 0, 0, 0, 53, 55, 52, 0, 56, 149,
516 141, 178, 0, 183, 37, 111, 58, 60, 62, 66,
517 68, 74, 76, 78, 80, 90, 92, 94, 96, 98,
518 100, 102, 104, 0, 64, 82, 88, 0, 57, 0,
519 213, 0, 48, 209, 0, 54, 39, 0, 0, 0,
520 112, 0, 111, 111, 111, 111, 111, 111, 111, 111,
521 111, 111, 111, 111, 111, 111, 111, 111, 111, 0,
522 111, 111, 111, 186, 0, 190, 0, 0, 210, 0,
523 0, 50, 41, 150, 181, 113, 0, 59, 0, 61,
524 63, 67, 69, 75, 77, 79, 81, 91, 93, 95,
525 97, 99, 101, 103, 105, 0, 65, 83, 89, 187,
526 188, 0, 189, 214, 0, 211, 0, 0, 0, 0,
527 0, 0, 212, 51, 0, 116, 0, 0, 0, 114,
528 0, 0, 0, 0, 0, 153, 84, 0, 0, 117,
529 0, 0, 0, 0, 114, 0, 0, 114, 0, 115,
530 118, 85, 215, 0, 215, 120, 108, 215, 0, 0,
531 114, 216, 215, 114, 216, 0, 114, 216, 0, 119,
532 86, 114, 114, 216, 70, 114, 121, 109, 114, 0,
533 87, 72, 114, 71, 110, 0, 73, 106, 0, 215,
534 107, 0, 0
537 static const short yydefgoto[] = { 1,
538 2, 10, 146, 167, 168, 231, 232, 11, 12, 13,
539 233, 234, 256, 126, 254, 292, 288, 329, 343, 344,
540 345, 361, 346, 347, 348, 349, 350, 351, 362, 363,
541 352, 353, 354, 355, 356, 357, 358, 359, 479, 378,
542 379, 427, 417, 422, 443, 450, 448, 456, 14, 15,
543 16, 17, 150, 176, 215, 245, 18, 151, 180, 19,
544 20, 152, 153, 183, 184, 21, 114, 144, 22, 23,
545 94, 154, 265, 266, 24, 366, 367, 33, 85, 84,
546 81, 122, 333, 334, 259, 260, 105, 32, 195, 25,
550 static const short yypact[] = {-32768,
551 31, 240, 241,-32768,-32768,-32768,-32768, 241, 241,-32768,
552 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
553 -32768,-32768,-32768, 68,-32768, 578,-32768, 241, 241, 241,
554 -73, 586, 169,-32768, 388,-32768,-32768,-32768,-32768,-32768,
555 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 241, 241,
556 241, 241, 241, 241, 241, 241,-32768,-32768, 513, 241,
557 -32768, 241, 241, 241, 241, 241, 241, 241, 241,-32768,
558 241, 241, 241,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
559 -32768,-32768, 215, 581, 581, 268, 268, 581, 581, 232,
560 275, 581, 283, 250, 156, 593, 599, 616, 98, 98,
561 -32768,-32768,-32768,-32768,-32768, 593, 599, 616, 98, 98,
562 -32768,-32768,-32768,-32768, -73,-32768,-32768,-32768,-32768,-32768,
563 -32768,-32768,-32768,-32768, -61, 290, 290,-32768,-32768,-32768,
564 -32768,-32768,-32768,-32768, 241, 241, 241, 241, 241, 241,
565 241,-32768,-32768, 4,-32768, 5, 241, -73, -73, 9,
566 92, 32, 309, 10, -73, -73,-32768,-32768,-32768,-32768,
567 -32768, 54,-32768, -57,-32768,-32768,-32768, -20,-32768,-32768,
568 -73, -73,-32768, 39, -9,-32768,-32768, 40, 11,-32768,
569 -32768,-32768,-32768, 36, 586,-32768, 145, 151, -73, -73,
570 -32768,-32768, 78, 290, 79, -73, -73,-32768, -73,-32768,
571 -32768, -73, 16, 365, 106, 108, -73, -73,-32768,-32768,
572 686,-32768, -73,-32768, 52, -73,-32768, 17,-32768, 586,
573 178, 128,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
574 34,-32768,-32768,-32768,-32768, 314,-32768,-32768,-32768,-32768,
575 -32768,-32768,-32768, 647,-32768, -73, 95,-32768, 18,-32768,
576 -32768, 686,-32768, 150, 378,-32768, 112,-32768,-32768,-32768,
577 -32768, 123,-32768, -73, 6, 29,-32768,-32768, 241, 129,
578 281,-32768, 241, 241, 241, 241, 281,-32768, 452,-32768,
579 -32768, 135, 200, 213, 143,-32768, -73, 479,-32768,-32768,
580 -32768, 182, 91, -73,-32768,-32768,-32768, 516,-32768,-32768,
581 -32768,-32768, 130,-32768,-32768, 147,-32768,-32768,-32768,-32768,
582 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
583 -32768,-32768,-32768, 158,-32768,-32768,-32768, 170,-32768, 73,
584 -32768, 241, 154,-32768, 160,-32768,-32768, 553, 172, 168,
585 161, 241, 147, 147, 147, 147, 147, 147, 147, 147,
586 147, 147, 147, 147, 147, 147, 147, 147, 147, 173,
587 147, 147, 147, 174, 186,-32768, 241, 187,-32768, 196,
588 183, -73,-32768,-32768,-32768,-32768, 201,-32768, 241,-32768,
589 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
590 -32768,-32768,-32768,-32768,-32768, 241,-32768,-32768,-32768,-32768,
591 -32768, -73,-32768,-32768, 73,-32768, -73, 293, 202, -73,
592 203, -73,-32768,-32768, 202,-32768, -73, -73, 241, 22,
593 -73, 182, -73, -73, 205,-32768,-32768, -73, -73, 154,
594 -73, -73, 241, 297, 26, -73, -73, 27, 208,-32768,
595 -32768,-32768, -73, -73, -73,-32768,-32768, -73, 241, 182,
596 251, -73, -73, 251, -73, 182, 251, -73, 230, 154,
597 -32768, 251, 251, -73,-32768, 251, 154,-32768, 251, 241,
598 -32768,-32768, 251,-32768,-32768, 236,-32768,-32768, 182, -11,
599 -32768, 332,-32768
602 static const short yypgoto[] = {-32768,
603 -32768,-32768,-32768,-32768,-32768,-32768, -220,-32768,-32768,-32768,
604 -32768,-32768,-32768, 248, -222,-32768, -262,-32768,-32768,-32768,
605 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
606 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 289,
607 30, 159, -44,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
608 -32768,-32768, 117,-32768, 163, 140,-32768, -171,-32768,-32768,
609 -32768, -141,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
610 -32768,-32768,-32768,-32768, -22,-32768,-32768, 486, -24, 55,
611 480, 316, -304, -315, -261, 8, -3, -2,-32768, -122,
612 -32768
616 #define YYLAST 708
619 static const short yytable[] = { 31,
620 162, 48, 283, 148, 149, 34, 35, 163, 165, 284,
621 253, 255, 173, 186, 369, 298, 88, 89, 217, 248,
622 263, 60, 192, 169, 426, 57, 58, 59, 426, 426,
623 482, 267, 286, 279, 147, 181, 338, 193, 61, 225,
624 226, 227, 228, 229, 230, 247, 96, 97, 98, 99,
625 100, 101, 102, 103, 237, 406, 174, 191, 175, 106,
626 107, 108, 109, 110, 111, 112, 113, 115, 116, 117,
627 200, 210, 36, 371, 194, 285, 262, 187, 188, 37,
628 38, 39, 40, 60, 166, 27, 6, 198, 201, 413,
629 203, 282, 28, 86, 87, 177, 29, 8, 261, 92,
630 30, 9, 238, 239, 240, 241, 242, 243, 41, 42,
631 60, 60, 60, 43, 44, 280, 60, 430, 199, 202,
632 441, 446, 145, 60, 45, 46, 281, 47, 252, 339,
633 204, 155, 156, 157, 158, 159, 160, 161, 300, 178,
634 164, 179, 178, 170, 179, 460, 244, 205, 5, 6,
635 185, 467, 268, 206, 331, 171, 172, 209, 142, 174,
636 8, 175, 189, 190, 9, 269, 270, 271, 272, 332,
637 178, 70, 179, 211, 480, 374, 221, 222, 196, 197,
638 250, 451, 178, 454, 179, 335, 457, 67, 68, 69,
639 273, 463, 274, 275, 276, 277, 207, 208, 71, 72,
640 73, 220, 301, 212, 213, 368, 214, 251, 290, 216,
641 218, 71, 72, 73, 223, 224, 302, 118, 481, 178,
642 235, 179, 303, 246, 340, 249, 341, 74, 75, 76,
643 77, 78, 79, 80, 130, 119, 120, 360, 371, 372,
644 74, 75, 76, 77, 78, 79, 80, 375, 291, 364,
645 365, 6, 134, 426, 297, 376, 264, 71, 72, 73,
646 330, 405, 8, 331, 331, 289, 9, 396, 400, 293,
647 294, 295, 296, 287, 71, 72, 73, 131, 332, 332,
648 401, 403, 3, 125, 434, 133, 74, 75, 76, 77,
649 78, 79, 80, 404, 304, 408, 416, 419, 4, 433,
650 440, 336, 449, 74, 75, 76, 77, 78, 79, 80,
651 135, 136, 137, 138, 139, 140, 141, 71, 72, 73,
652 5, 6, 27, 7, 470, 71, 72, 73, 370, 28,
653 478, 483, 8, 29, 127, 342, 9, 30, 377, 74,
654 75, 76, 77, 78, 79, 80, 74, 75, 76, 77,
655 78, 79, 80, 257, 74, 75, 76, 77, 78, 79,
656 80, 5, 6, 402, 238, 239, 240, 241, 242, 243,
657 421, 6, 415, 8, 27, 410, 236, 9, 0, 407,
658 278, 28, 8, 258, 409, 29, 9, 0, 0, 30,
659 27, 182, 411, 269, 270, 271, 272, 28, 0, 0,
660 124, 29, 0, 128, 129, 30, 0, 132, 244, 412,
661 143, 0, 0, 0, 414, 425, 0, 418, 273, 420,
662 274, 275, 276, 277, 423, 424, 0, 428, 429, 439,
663 431, 432, 0, 0, 0, 435, 436, 0, 437, 438,
664 0, 0, 0, 444, 445, 459, 27, 219, 0, 0,
665 452, 453, 455, 28, 299, 458, 0, 29, 0, 462,
666 464, 30, 466, 0, 0, 469, 476, 269, 270, 271,
667 272, 473, 62, 63, 64, 65, 66, 67, 68, 69,
668 0, 0, 305, 0, 0, 82, 0, 0, 306, 0,
669 0, 0, 273, 0, 274, 275, 276, 277, 307, 308,
670 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
671 319, 320, 321, 322, 323, 324, 325, 326, 327, 337,
672 328, 83, 0, 0, 0, 306, 0, 0, 90, 91,
673 0, 93, 0, 95, 0, 307, 308, 309, 310, 311,
674 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
675 322, 323, 324, 325, 326, 327, 373, 328, 0, 0,
676 0, 0, 306, 121, 123, 121, 121, 123, 123, 0,
677 0, 121, 307, 308, 309, 310, 311, 312, 313, 314,
678 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
679 325, 326, 327, 442, 328, 0, 447, 62, 63, 64,
680 65, 66, 67, 68, 69, 0, 0, 0, 0, 461,
681 104, 0, 465, 0, 0, 468, 0, 0, 0, 0,
682 471, 472, 0, 0, 474, 0, 0, 475, 0, 0,
683 0, 477, 380, 381, 382, 383, 384, 385, 386, 387,
684 388, 389, 390, 391, 392, 393, 394, 395, 0, 397,
685 398, 399, 74, 75, 76, 77, 78, 79, 80, 0,
686 119, 120, 49, 50, 51, 52, 53, 54, 55, 56,
687 62, 63, 64, 65, 66, 67, 68, 69, 63, 64,
688 65, 66, 67, 68, 69, 64, 65, 66, 67, 68,
689 69, 225, 226, 227, 228, 229, 230, 238, 239, 240,
690 241, 242, 243, 65, 66, 67, 68, 69
693 static const short yycheck[] = { 3,
694 142, 24, 264, 126, 127, 8, 9, 4, 4, 4,
695 231, 234, 4, 4, 330, 278, 41, 42, 3, 3,
696 3, 95, 80, 146, 3, 28, 29, 30, 3, 3,
697 0, 252, 4, 256, 96, 4, 299, 95, 31, 6,
698 7, 8, 9, 10, 11, 217, 49, 50, 51, 52,
699 53, 54, 55, 56, 3, 371, 48, 4, 50, 62,
700 63, 64, 65, 66, 67, 68, 69, 71, 72, 73,
701 80, 194, 5, 85, 95, 70, 248, 68, 69, 12,
702 13, 14, 15, 95, 80, 82, 82, 49, 49, 405,
703 80, 263, 89, 39, 40, 4, 93, 93, 4, 45,
704 97, 97, 51, 52, 53, 54, 55, 56, 41, 42,
705 95, 95, 95, 46, 47, 4, 95, 422, 80, 80,
706 95, 95, 115, 95, 57, 58, 4, 60, 95, 301,
707 95, 135, 136, 137, 138, 139, 140, 141, 4, 48,
708 144, 50, 48, 147, 50, 450, 95, 3, 81, 82,
709 153, 456, 3, 3, 82, 148, 149, 80, 3, 48,
710 93, 50, 155, 156, 97, 16, 17, 18, 19, 97,
711 48, 3, 50, 95, 479, 4, 71, 70, 171, 172,
712 3, 443, 48, 445, 50, 95, 448, 90, 91, 92,
713 41, 453, 43, 44, 45, 46, 189, 190, 43, 44,
714 45, 204, 3, 196, 197, 328, 199, 80, 80, 202,
715 203, 43, 44, 45, 207, 208, 4, 3, 480, 48,
716 213, 50, 80, 216, 95, 218, 80, 72, 73, 74,
717 75, 76, 77, 78, 3, 80, 81, 80, 85, 80,
718 72, 73, 74, 75, 76, 77, 78, 80, 271, 80,
719 81, 82, 3, 3, 277, 95, 249, 43, 44, 45,
720 79, 79, 93, 82, 82, 269, 97, 95, 95, 273,
721 274, 275, 276, 266, 43, 44, 45, 3, 97, 97,
722 95, 95, 43, 16, 426, 3, 72, 73, 74, 75,
723 76, 77, 78, 98, 287, 95, 95, 95, 59, 95,
724 4, 294, 95, 72, 73, 74, 75, 76, 77, 78,
725 61, 62, 63, 64, 65, 66, 67, 43, 44, 45,
726 81, 82, 82, 84, 95, 43, 44, 45, 332, 89,
727 95, 0, 93, 93, 87, 306, 97, 97, 342, 72,
728 73, 74, 75, 76, 77, 78, 72, 73, 74, 75,
729 76, 77, 78, 237, 72, 73, 74, 75, 76, 77,
730 78, 81, 82, 367, 51, 52, 53, 54, 55, 56,
731 415, 82, 80, 93, 82, 379, 214, 97, -1, 372,
732 3, 89, 93, 244, 377, 93, 97, -1, -1, 97,
733 82, 83, 396, 16, 17, 18, 19, 89, -1, -1,
734 85, 93, -1, 88, 89, 97, -1, 92, 95, 402,
735 95, -1, -1, -1, 407, 419, -1, 410, 41, 412,
736 43, 44, 45, 46, 417, 418, -1, 420, 421, 433,
737 423, 424, -1, -1, -1, 428, 429, -1, 431, 432,
738 -1, -1, -1, 436, 437, 449, 82, 83, -1, -1,
739 443, 444, 445, 89, 3, 448, -1, 93, -1, 452,
740 453, 97, 455, -1, -1, 458, 470, 16, 17, 18,
741 19, 464, 85, 86, 87, 88, 89, 90, 91, 92,
742 -1, -1, 4, -1, -1, 98, -1, -1, 10, -1,
743 -1, -1, 41, -1, 43, 44, 45, 46, 20, 21,
744 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
745 32, 33, 34, 35, 36, 37, 38, 39, 40, 4,
746 42, 36, -1, -1, -1, 10, -1, -1, 43, 44,
747 -1, 46, -1, 48, -1, 20, 21, 22, 23, 24,
748 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
749 35, 36, 37, 38, 39, 40, 4, 42, -1, -1,
750 -1, -1, 10, 84, 85, 86, 87, 88, 89, -1,
751 -1, 92, 20, 21, 22, 23, 24, 25, 26, 27,
752 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
753 38, 39, 40, 435, 42, -1, 438, 85, 86, 87,
754 88, 89, 90, 91, 92, -1, -1, -1, -1, 451,
755 98, -1, 454, -1, -1, 457, -1, -1, -1, -1,
756 462, 463, -1, -1, 466, -1, -1, 469, -1, -1,
757 -1, 473, 344, 345, 346, 347, 348, 349, 350, 351,
758 352, 353, 354, 355, 356, 357, 358, 359, -1, 361,
759 362, 363, 72, 73, 74, 75, 76, 77, 78, -1,
760 80, 81, 85, 86, 87, 88, 89, 90, 91, 92,
761 85, 86, 87, 88, 89, 90, 91, 92, 86, 87,
762 88, 89, 90, 91, 92, 87, 88, 89, 90, 91,
763 92, 6, 7, 8, 9, 10, 11, 51, 52, 53,
764 54, 55, 56, 88, 89, 90, 91, 92
766 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
767 #line 3 "/usr/share/bison/bison.simple"
768 /* This file comes from bison-1.28. */
770 /* Skeleton output parser for bison,
771 Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
773 This program is free software; you can redistribute it and/or modify
774 it under the terms of the GNU General Public License as published by
775 the Free Software Foundation; either version 2, or (at your option)
776 any later version.
778 This program is distributed in the hope that it will be useful,
779 but WITHOUT ANY WARRANTY; without even the implied warranty of
780 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
781 GNU General Public License for more details.
783 You should have received a copy of the GNU General Public License
784 along with this program; if not, write to the Free Software
785 Foundation, Inc., 59 Temple Place - Suite 330,
786 Boston, MA 02111-1307, USA. */
788 /* As a special exception, when this file is copied by Bison into a
789 Bison output file, you may use that output file without restriction.
790 This special exception was added by the Free Software Foundation
791 in version 1.24 of Bison. */
793 /* This is the parser code that is written into each bison parser
794 when the %semantic_parser declaration is not specified in the grammar.
795 It was written by Richard Stallman by simplifying the hairy parser
796 used when %semantic_parser is specified. */
798 #ifndef YYSTACK_USE_ALLOCA
799 #ifdef alloca
800 #define YYSTACK_USE_ALLOCA
801 #else /* alloca not defined */
802 #ifdef __GNUC__
803 #define YYSTACK_USE_ALLOCA
804 #define alloca __builtin_alloca
805 #else /* not GNU C. */
806 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
807 #define YYSTACK_USE_ALLOCA
808 #include <alloca.h>
809 #else /* not sparc */
810 /* We think this test detects Watcom and Microsoft C. */
811 /* This used to test MSDOS, but that is a bad idea
812 since that symbol is in the user namespace. */
813 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
814 #if 0 /* No need for malloc.h, which pollutes the namespace;
815 instead, just don't use alloca. */
816 #include <malloc.h>
817 #endif
818 #else /* not MSDOS, or __TURBOC__ */
819 #if defined(_AIX)
820 /* I don't know what this was needed for, but it pollutes the namespace.
821 So I turned it off. rms, 2 May 1997. */
822 /* #include <malloc.h> */
823 #pragma alloca
824 #define YYSTACK_USE_ALLOCA
825 #else /* not MSDOS, or __TURBOC__, or _AIX */
826 #if 0
827 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
828 and on HPUX 10. Eventually we can turn this on. */
829 #define YYSTACK_USE_ALLOCA
830 #define alloca __builtin_alloca
831 #endif /* __hpux */
832 #endif
833 #endif /* not _AIX */
834 #endif /* not MSDOS, or __TURBOC__ */
835 #endif /* not sparc */
836 #endif /* not GNU C */
837 #endif /* alloca not defined */
838 #endif /* YYSTACK_USE_ALLOCA not defined */
840 #ifdef YYSTACK_USE_ALLOCA
841 #define YYSTACK_ALLOC alloca
842 #else
843 #define YYSTACK_ALLOC malloc
844 #endif
846 /* Note: there must be only one dollar sign in this file.
847 It is replaced by the list of actions, each action
848 as one case of the switch. */
850 #define yyerrok (yyerrstatus = 0)
851 #define yyclearin (yychar = YYEMPTY)
852 #define YYEMPTY -2
853 #define YYEOF 0
854 #define YYACCEPT goto yyacceptlab
855 #define YYABORT goto yyabortlab
856 #define YYERROR goto yyerrlab1
857 /* Like YYERROR except do call yyerror.
858 This remains here temporarily to ease the
859 transition to the new meaning of YYERROR, for GCC.
860 Once GCC version 2 has supplanted version 1, this can go. */
861 #define YYFAIL goto yyerrlab
862 #define YYRECOVERING() (!!yyerrstatus)
863 #define YYBACKUP(token, value) \
864 do \
865 if (yychar == YYEMPTY && yylen == 1) \
866 { yychar = (token), yylval = (value); \
867 yychar1 = YYTRANSLATE (yychar); \
868 YYPOPSTACK; \
869 goto yybackup; \
871 else \
872 { yyerror ("syntax error: cannot back up"); YYERROR; } \
873 while (0)
875 #define YYTERROR 1
876 #define YYERRCODE 256
878 #ifndef YYPURE
879 #define YYLEX yylex()
880 #endif
882 #ifdef YYPURE
883 #ifdef YYLSP_NEEDED
884 #ifdef YYLEX_PARAM
885 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
886 #else
887 #define YYLEX yylex(&yylval, &yylloc)
888 #endif
889 #else /* not YYLSP_NEEDED */
890 #ifdef YYLEX_PARAM
891 #define YYLEX yylex(&yylval, YYLEX_PARAM)
892 #else
893 #define YYLEX yylex(&yylval)
894 #endif
895 #endif /* not YYLSP_NEEDED */
896 #endif
898 /* If nonreentrant, generate the variables here */
900 #ifndef YYPURE
902 int yychar; /* the lookahead symbol */
903 YYSTYPE yylval; /* the semantic value of the */
904 /* lookahead symbol */
906 #ifdef YYLSP_NEEDED
907 YYLTYPE yylloc; /* location data for the lookahead */
908 /* symbol */
909 #endif
911 int yynerrs; /* number of parse errors so far */
912 #endif /* not YYPURE */
914 #if YYDEBUG != 0
915 int yydebug; /* nonzero means print parse trace */
916 /* Since this is uninitialized, it does not stop multiple parsers
917 from coexisting. */
918 #endif
920 /* YYINITDEPTH indicates the initial size of the parser's stacks */
922 #ifndef YYINITDEPTH
923 #define YYINITDEPTH 200
924 #endif
926 /* YYMAXDEPTH is the maximum size the stacks can grow to
927 (effective only if the built-in stack extension method is used). */
929 #if YYMAXDEPTH == 0
930 #undef YYMAXDEPTH
931 #endif
933 #ifndef YYMAXDEPTH
934 #define YYMAXDEPTH 10000
935 #endif
937 /* Define __yy_memcpy. Note that the size argument
938 should be passed with type unsigned int, because that is what the non-GCC
939 definitions require. With GCC, __builtin_memcpy takes an arg
940 of type size_t, but it can handle unsigned int. */
942 #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
943 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
944 #else /* not GNU C or C++ */
945 #ifndef __cplusplus
947 /* This is the most reliable way to avoid incompatibilities
948 in available built-in functions on various systems. */
949 static void
950 __yy_memcpy (to, from, count)
951 char *to;
952 char *from;
953 unsigned int count;
955 register char *f = from;
956 register char *t = to;
957 register int i = count;
959 while (i-- > 0)
960 *t++ = *f++;
963 #else /* __cplusplus */
965 /* This is the most reliable way to avoid incompatibilities
966 in available built-in functions on various systems. */
967 static void
968 __yy_memcpy (char *to, char *from, unsigned int count)
970 register char *t = to;
971 register char *f = from;
972 register int i = count;
974 while (i-- > 0)
975 *t++ = *f++;
978 #endif
979 #endif
981 #line 217 "/usr/share/bison/bison.simple"
983 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
984 into yyparse. The argument should have type void *.
985 It should actually point to an object.
986 Grammar actions can access the variable by casting it
987 to the proper pointer type. */
989 #ifdef YYPARSE_PARAM
990 #ifdef __cplusplus
991 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
992 #define YYPARSE_PARAM_DECL
993 #else /* not __cplusplus */
994 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
995 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
996 #endif /* not __cplusplus */
997 #else /* not YYPARSE_PARAM */
998 #define YYPARSE_PARAM_ARG
999 #define YYPARSE_PARAM_DECL
1000 #endif /* not YYPARSE_PARAM */
1002 /* Prevent warning if -Wstrict-prototypes. */
1003 #ifdef __GNUC__
1004 #ifdef YYPARSE_PARAM
1005 int yyparse (void *);
1006 #else
1007 int yyparse (void);
1008 #endif
1009 #endif
1012 yyparse(YYPARSE_PARAM_ARG)
1013 YYPARSE_PARAM_DECL
1015 register int yystate;
1016 register int yyn;
1017 register short *yyssp;
1018 register YYSTYPE *yyvsp;
1019 int yyerrstatus; /* number of tokens to shift before error messages enabled */
1020 int yychar1 = 0; /* lookahead token as an internal (translated) token number */
1022 short yyssa[YYINITDEPTH]; /* the state stack */
1023 YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
1025 short *yyss = yyssa; /* refer to the stacks thru separate pointers */
1026 YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
1028 #ifdef YYLSP_NEEDED
1029 YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
1030 YYLTYPE *yyls = yylsa;
1031 YYLTYPE *yylsp;
1033 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1034 #else
1035 #define YYPOPSTACK (yyvsp--, yyssp--)
1036 #endif
1038 int yystacksize = YYINITDEPTH;
1039 int yyfree_stacks = 0;
1041 #ifdef YYPURE
1042 int yychar;
1043 YYSTYPE yylval;
1044 int yynerrs;
1045 #ifdef YYLSP_NEEDED
1046 YYLTYPE yylloc;
1047 #endif
1048 #endif
1050 YYSTYPE yyval; /* the variable used to return */
1051 /* semantic values from the action */
1052 /* routines */
1054 int yylen;
1056 #if YYDEBUG != 0
1057 if (yydebug)
1058 fprintf(stderr, "Starting parse\n");
1059 #endif
1061 yystate = 0;
1062 yyerrstatus = 0;
1063 yynerrs = 0;
1064 yychar = YYEMPTY; /* Cause a token to be read. */
1066 /* Initialize stack pointers.
1067 Waste one element of value and location stack
1068 so that they stay on the same level as the state stack.
1069 The wasted elements are never initialized. */
1071 yyssp = yyss - 1;
1072 yyvsp = yyvs;
1073 #ifdef YYLSP_NEEDED
1074 yylsp = yyls;
1075 #endif
1077 /* Push a new state, which is found in yystate . */
1078 /* In all cases, when you get here, the value and location stacks
1079 have just been pushed. so pushing a state here evens the stacks. */
1080 yynewstate:
1082 *++yyssp = yystate;
1084 if (yyssp >= yyss + yystacksize - 1)
1086 /* Give user a chance to reallocate the stack */
1087 /* Use copies of these so that the &'s don't force the real ones into memory. */
1088 YYSTYPE *yyvs1 = yyvs;
1089 short *yyss1 = yyss;
1090 #ifdef YYLSP_NEEDED
1091 YYLTYPE *yyls1 = yyls;
1092 #endif
1094 /* Get the current used size of the three stacks, in elements. */
1095 int size = yyssp - yyss + 1;
1097 #ifdef yyoverflow
1098 /* Each stack pointer address is followed by the size of
1099 the data in use in that stack, in bytes. */
1100 #ifdef YYLSP_NEEDED
1101 /* This used to be a conditional around just the two extra args,
1102 but that might be undefined if yyoverflow is a macro. */
1103 yyoverflow("parser stack overflow",
1104 &yyss1, size * sizeof (*yyssp),
1105 &yyvs1, size * sizeof (*yyvsp),
1106 &yyls1, size * sizeof (*yylsp),
1107 &yystacksize);
1108 #else
1109 yyoverflow("parser stack overflow",
1110 &yyss1, size * sizeof (*yyssp),
1111 &yyvs1, size * sizeof (*yyvsp),
1112 &yystacksize);
1113 #endif
1115 yyss = yyss1; yyvs = yyvs1;
1116 #ifdef YYLSP_NEEDED
1117 yyls = yyls1;
1118 #endif
1119 #else /* no yyoverflow */
1120 /* Extend the stack our own way. */
1121 if (yystacksize >= YYMAXDEPTH)
1123 yyerror("parser stack overflow");
1124 if (yyfree_stacks)
1126 free (yyss);
1127 free (yyvs);
1128 #ifdef YYLSP_NEEDED
1129 free (yyls);
1130 #endif
1132 return 2;
1134 yystacksize *= 2;
1135 if (yystacksize > YYMAXDEPTH)
1136 yystacksize = YYMAXDEPTH;
1137 #ifndef YYSTACK_USE_ALLOCA
1138 yyfree_stacks = 1;
1139 #endif
1140 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1141 __yy_memcpy ((char *)yyss, (char *)yyss1,
1142 size * (unsigned int) sizeof (*yyssp));
1143 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1144 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1145 size * (unsigned int) sizeof (*yyvsp));
1146 #ifdef YYLSP_NEEDED
1147 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1148 __yy_memcpy ((char *)yyls, (char *)yyls1,
1149 size * (unsigned int) sizeof (*yylsp));
1150 #endif
1151 #endif /* no yyoverflow */
1153 yyssp = yyss + size - 1;
1154 yyvsp = yyvs + size - 1;
1155 #ifdef YYLSP_NEEDED
1156 yylsp = yyls + size - 1;
1157 #endif
1159 #if YYDEBUG != 0
1160 if (yydebug)
1161 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1162 #endif
1164 if (yyssp >= yyss + yystacksize - 1)
1165 YYABORT;
1168 #if YYDEBUG != 0
1169 if (yydebug)
1170 fprintf(stderr, "Entering state %d\n", yystate);
1171 #endif
1173 goto yybackup;
1174 yybackup:
1176 /* Do appropriate processing given the current state. */
1177 /* Read a lookahead token if we need one and don't already have one. */
1178 /* yyresume: */
1180 /* First try to decide what to do without reference to lookahead token. */
1182 yyn = yypact[yystate];
1183 if (yyn == YYFLAG)
1184 goto yydefault;
1186 /* Not known => get a lookahead token if don't already have one. */
1188 /* yychar is either YYEMPTY or YYEOF
1189 or a valid token in external form. */
1191 if (yychar == YYEMPTY)
1193 #if YYDEBUG != 0
1194 if (yydebug)
1195 fprintf(stderr, "Reading a token: ");
1196 #endif
1197 yychar = YYLEX;
1200 /* Convert token to internal form (in yychar1) for indexing tables with */
1202 if (yychar <= 0) /* This means end of input. */
1204 yychar1 = 0;
1205 yychar = YYEOF; /* Don't call YYLEX any more */
1207 #if YYDEBUG != 0
1208 if (yydebug)
1209 fprintf(stderr, "Now at end of input.\n");
1210 #endif
1212 else
1214 yychar1 = YYTRANSLATE(yychar);
1216 #if YYDEBUG != 0
1217 if (yydebug)
1219 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1220 /* Give the individual parser a way to print the precise meaning
1221 of a token, for further debugging info. */
1222 #ifdef YYPRINT
1223 YYPRINT (stderr, yychar, yylval);
1224 #endif
1225 fprintf (stderr, ")\n");
1227 #endif
1230 yyn += yychar1;
1231 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1232 goto yydefault;
1234 yyn = yytable[yyn];
1236 /* yyn is what to do for this token type in this state.
1237 Negative => reduce, -yyn is rule number.
1238 Positive => shift, yyn is new state.
1239 New state is final state => don't bother to shift,
1240 just return success.
1241 0, or most negative number => error. */
1243 if (yyn < 0)
1245 if (yyn == YYFLAG)
1246 goto yyerrlab;
1247 yyn = -yyn;
1248 goto yyreduce;
1250 else if (yyn == 0)
1251 goto yyerrlab;
1253 if (yyn == YYFINAL)
1254 YYACCEPT;
1256 /* Shift the lookahead token. */
1258 #if YYDEBUG != 0
1259 if (yydebug)
1260 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1261 #endif
1263 /* Discard the token being shifted unless it is eof. */
1264 if (yychar != YYEOF)
1265 yychar = YYEMPTY;
1267 *++yyvsp = yylval;
1268 #ifdef YYLSP_NEEDED
1269 *++yylsp = yylloc;
1270 #endif
1272 /* count tokens shifted since error; after three, turn off error status. */
1273 if (yyerrstatus) yyerrstatus--;
1275 yystate = yyn;
1276 goto yynewstate;
1278 /* Do the default action for the current state. */
1279 yydefault:
1281 yyn = yydefact[yystate];
1282 if (yyn == 0)
1283 goto yyerrlab;
1285 /* Do a reduction. yyn is the number of a rule to reduce with. */
1286 yyreduce:
1287 yylen = yyr2[yyn];
1288 if (yylen > 0)
1289 yyval = yyvsp[1-yylen]; /* implement default value of the action */
1291 #if YYDEBUG != 0
1292 if (yydebug)
1294 int i;
1296 fprintf (stderr, "Reducing via rule %d (line %d), ",
1297 yyn, yyrline[yyn]);
1299 /* Print the symbols being reduced, and their result. */
1300 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1301 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1302 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1304 #endif
1307 switch (yyn) {
1309 case 17:
1310 #line 176 "rcparse.y"
1312 rcparse_discard_strings ();
1314 break;}
1315 case 18:
1316 #line 185 "rcparse.y"
1318 define_accelerator (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].pacc);
1320 break;}
1321 case 19:
1322 #line 192 "rcparse.y"
1324 yyval.pacc = NULL;
1326 break;}
1327 case 20:
1328 #line 196 "rcparse.y"
1330 struct accelerator *a;
1332 a = (struct accelerator *) res_alloc (sizeof *a);
1333 *a = yyvsp[0].acc;
1334 if (yyvsp[-1].pacc == NULL)
1335 yyval.pacc = a;
1336 else
1338 struct accelerator **pp;
1340 for (pp = &yyvsp[-1].pacc->next; *pp != NULL; pp = &(*pp)->next)
1342 *pp = a;
1343 yyval.pacc = yyvsp[-1].pacc;
1346 break;}
1347 case 21:
1348 #line 217 "rcparse.y"
1350 yyval.acc = yyvsp[-1].acc;
1351 yyval.acc.id = yyvsp[0].il;
1353 break;}
1354 case 22:
1355 #line 222 "rcparse.y"
1357 yyval.acc = yyvsp[-3].acc;
1358 yyval.acc.id = yyvsp[-2].il;
1359 yyval.acc.flags |= yyvsp[0].is;
1360 if ((yyval.acc.flags & ACC_VIRTKEY) == 0
1361 && (yyval.acc.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
1362 rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
1364 break;}
1365 case 23:
1366 #line 234 "rcparse.y"
1368 const char *s = yyvsp[0].s;
1369 char ch;
1371 yyval.acc.next = NULL;
1372 yyval.acc.id = 0;
1373 ch = *s;
1374 if (ch != '^')
1375 yyval.acc.flags = 0;
1376 else
1378 yyval.acc.flags = ACC_CONTROL | ACC_VIRTKEY;
1379 ++s;
1380 ch = *s;
1381 ch = toupper ((unsigned char) ch);
1383 yyval.acc.key = ch;
1384 if (s[1] != '\0')
1385 rcparse_warning (_("accelerator should only be one character"));
1387 break;}
1388 case 24:
1389 #line 255 "rcparse.y"
1391 yyval.acc.next = NULL;
1392 yyval.acc.flags = 0;
1393 yyval.acc.id = 0;
1394 yyval.acc.key = yyvsp[0].il;
1396 break;}
1397 case 25:
1398 #line 265 "rcparse.y"
1400 yyval.is = yyvsp[0].is;
1402 break;}
1403 case 26:
1404 #line 269 "rcparse.y"
1406 yyval.is = yyvsp[-2].is | yyvsp[0].is;
1408 break;}
1409 case 27:
1410 #line 274 "rcparse.y"
1412 yyval.is = yyvsp[-1].is | yyvsp[0].is;
1414 break;}
1415 case 28:
1416 #line 281 "rcparse.y"
1418 yyval.is = ACC_VIRTKEY;
1420 break;}
1421 case 29:
1422 #line 285 "rcparse.y"
1424 /* This is just the absence of VIRTKEY. */
1425 yyval.is = 0;
1427 break;}
1428 case 30:
1429 #line 290 "rcparse.y"
1431 yyval.is = ACC_NOINVERT;
1433 break;}
1434 case 31:
1435 #line 294 "rcparse.y"
1437 yyval.is = ACC_SHIFT;
1439 break;}
1440 case 32:
1441 #line 298 "rcparse.y"
1443 yyval.is = ACC_CONTROL;
1445 break;}
1446 case 33:
1447 #line 302 "rcparse.y"
1449 yyval.is = ACC_ALT;
1451 break;}
1452 case 34:
1453 #line 311 "rcparse.y"
1455 define_bitmap (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1457 break;}
1458 case 35:
1459 #line 320 "rcparse.y"
1461 define_cursor (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
1463 break;}
1464 case 36:
1465 #line 330 "rcparse.y"
1467 memset (&dialog, 0, sizeof dialog);
1468 dialog.x = yyvsp[-3].il;
1469 dialog.y = yyvsp[-2].il;
1470 dialog.width = yyvsp[-1].il;
1471 dialog.height = yyvsp[0].il;
1472 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1473 dialog.exstyle = yyvsp[-4].il;
1474 dialog.menu.named = 1;
1475 dialog.class.named = 1;
1476 dialog.font = NULL;
1477 dialog.ex = NULL;
1478 dialog.controls = NULL;
1479 sub_res_info = yyvsp[-5].res_info;
1481 break;}
1482 case 37:
1483 #line 346 "rcparse.y"
1485 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1487 break;}
1488 case 38:
1489 #line 351 "rcparse.y"
1491 memset (&dialog, 0, sizeof dialog);
1492 dialog.x = yyvsp[-3].il;
1493 dialog.y = yyvsp[-2].il;
1494 dialog.width = yyvsp[-1].il;
1495 dialog.height = yyvsp[0].il;
1496 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1497 dialog.exstyle = yyvsp[-4].il;
1498 dialog.menu.named = 1;
1499 dialog.class.named = 1;
1500 dialog.font = NULL;
1501 dialog.ex = ((struct dialog_ex *)
1502 res_alloc (sizeof (struct dialog_ex)));
1503 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1504 dialog.controls = NULL;
1505 sub_res_info = yyvsp[-5].res_info;
1507 break;}
1508 case 39:
1509 #line 369 "rcparse.y"
1511 define_dialog (yyvsp[-12].id, &sub_res_info, &dialog);
1513 break;}
1514 case 40:
1515 #line 374 "rcparse.y"
1517 memset (&dialog, 0, sizeof dialog);
1518 dialog.x = yyvsp[-4].il;
1519 dialog.y = yyvsp[-3].il;
1520 dialog.width = yyvsp[-2].il;
1521 dialog.height = yyvsp[-1].il;
1522 dialog.style = WS_POPUP | WS_BORDER | WS_SYSMENU;
1523 dialog.exstyle = yyvsp[-5].il;
1524 dialog.menu.named = 1;
1525 dialog.class.named = 1;
1526 dialog.font = NULL;
1527 dialog.ex = ((struct dialog_ex *)
1528 res_alloc (sizeof (struct dialog_ex)));
1529 memset (dialog.ex, 0, sizeof (struct dialog_ex));
1530 dialog.ex->help = yyvsp[0].il;
1531 dialog.controls = NULL;
1532 sub_res_info = yyvsp[-6].res_info;
1534 break;}
1535 case 41:
1536 #line 393 "rcparse.y"
1538 define_dialog (yyvsp[-13].id, &sub_res_info, &dialog);
1540 break;}
1541 case 42:
1542 #line 400 "rcparse.y"
1544 yyval.il = 0;
1546 break;}
1547 case 43:
1548 #line 404 "rcparse.y"
1550 yyval.il = yyvsp[0].il;
1552 break;}
1553 case 45:
1554 #line 412 "rcparse.y"
1556 unicode_from_ascii ((int *) NULL, &dialog.caption, yyvsp[0].s);
1558 break;}
1559 case 46:
1560 #line 416 "rcparse.y"
1562 dialog.class = yyvsp[0].id;
1564 break;}
1565 case 47:
1566 #line 420 "rcparse.y"
1567 { style = dialog.style; ;
1568 break;}
1569 case 48:
1570 #line 422 "rcparse.y"
1572 dialog.style = style;
1574 break;}
1575 case 49:
1576 #line 426 "rcparse.y"
1578 dialog.exstyle = yyvsp[0].il;
1580 break;}
1581 case 50:
1582 #line 430 "rcparse.y"
1584 dialog.style |= DS_SETFONT;
1585 dialog.pointsize = yyvsp[-2].il;
1586 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[0].s);
1588 break;}
1589 case 51:
1590 #line 436 "rcparse.y"
1592 dialog.style |= DS_SETFONT;
1593 dialog.pointsize = yyvsp[-4].il;
1594 unicode_from_ascii ((int *) NULL, &dialog.font, yyvsp[-2].s);
1595 if (dialog.ex == NULL)
1596 rcparse_warning (_("extended FONT requires DIALOGEX"));
1597 else
1599 dialog.ex->weight = yyvsp[-1].il;
1600 dialog.ex->italic = yyvsp[0].il;
1603 break;}
1604 case 52:
1605 #line 449 "rcparse.y"
1607 dialog.menu = yyvsp[0].id;
1609 break;}
1610 case 53:
1611 #line 453 "rcparse.y"
1613 sub_res_info.characteristics = yyvsp[0].il;
1615 break;}
1616 case 54:
1617 #line 457 "rcparse.y"
1619 sub_res_info.language = yyvsp[-1].il | (yyvsp[0].il << 8);
1621 break;}
1622 case 55:
1623 #line 461 "rcparse.y"
1625 sub_res_info.version = yyvsp[0].il;
1627 break;}
1628 case 57:
1629 #line 469 "rcparse.y"
1631 struct dialog_control **pp;
1633 for (pp = &dialog.controls; *pp != NULL; pp = &(*pp)->next)
1635 *pp = yyvsp[0].dialog_control;
1637 break;}
1638 case 58:
1639 #line 480 "rcparse.y"
1641 default_style = BS_AUTO3STATE | WS_TABSTOP;
1642 base_style = BS_AUTO3STATE;
1643 class = CTL_BUTTON;
1645 break;}
1646 case 59:
1647 #line 486 "rcparse.y"
1649 yyval.dialog_control = yyvsp[0].dialog_control;
1651 break;}
1652 case 60:
1653 #line 490 "rcparse.y"
1655 default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
1656 base_style = BS_AUTOCHECKBOX;
1657 class = CTL_BUTTON;
1659 break;}
1660 case 61:
1661 #line 496 "rcparse.y"
1663 yyval.dialog_control = yyvsp[0].dialog_control;
1665 break;}
1666 case 62:
1667 #line 500 "rcparse.y"
1669 default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
1670 base_style = BS_AUTORADIOBUTTON;
1671 class = CTL_BUTTON;
1673 break;}
1674 case 63:
1675 #line 506 "rcparse.y"
1677 yyval.dialog_control = yyvsp[0].dialog_control;
1679 break;}
1680 case 64:
1681 #line 510 "rcparse.y"
1683 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1684 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1685 class = CTL_EDIT;
1687 break;}
1688 case 65:
1689 #line 516 "rcparse.y"
1691 yyval.dialog_control = yyvsp[0].dialog_control;
1692 if (dialog.ex == NULL)
1693 rcparse_warning (_("IEDIT requires DIALOGEX"));
1694 res_string_to_id (&yyval.dialog_control->class, "BEDIT");
1696 break;}
1697 case 66:
1698 #line 523 "rcparse.y"
1700 default_style = BS_CHECKBOX | WS_TABSTOP;
1701 base_style = BS_CHECKBOX | WS_TABSTOP;
1702 class = CTL_BUTTON;
1704 break;}
1705 case 67:
1706 #line 529 "rcparse.y"
1708 yyval.dialog_control = yyvsp[0].dialog_control;
1710 break;}
1711 case 68:
1712 #line 533 "rcparse.y"
1714 default_style = CBS_SIMPLE | WS_TABSTOP;
1715 base_style = 0;
1716 class = CTL_COMBOBOX;
1718 break;}
1719 case 69:
1720 #line 539 "rcparse.y"
1722 yyval.dialog_control = yyvsp[0].dialog_control;
1724 break;}
1725 case 70:
1726 #line 544 "rcparse.y"
1728 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);
1729 if (yyvsp[0].rcdata_item != NULL)
1731 if (dialog.ex == NULL)
1732 rcparse_warning (_("control data requires DIALOGEX"));
1733 yyval.dialog_control->data = yyvsp[0].rcdata_item;
1736 break;}
1737 case 71:
1738 #line 555 "rcparse.y"
1740 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);
1741 if (dialog.ex == NULL)
1742 rcparse_warning (_("help ID requires DIALOGEX"));
1743 yyval.dialog_control->help = yyvsp[-1].il;
1744 yyval.dialog_control->data = yyvsp[0].rcdata_item;
1746 break;}
1747 case 72:
1748 #line 564 "rcparse.y"
1750 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);
1751 if (yyvsp[0].rcdata_item != NULL)
1753 if (dialog.ex == NULL)
1754 rcparse_warning ("control data requires DIALOGEX");
1755 yyval.dialog_control->data = yyvsp[0].rcdata_item;
1757 yyval.dialog_control->class.named = 1;
1758 unicode_from_ascii(&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-7].s);
1760 break;}
1761 case 73:
1762 #line 577 "rcparse.y"
1764 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);
1765 if (dialog.ex == NULL)
1766 rcparse_warning ("help ID requires DIALOGEX");
1767 yyval.dialog_control->help = yyvsp[-1].il;
1768 yyval.dialog_control->data = yyvsp[0].rcdata_item;
1769 yyval.dialog_control->class.named = 1;
1770 unicode_from_ascii(&yyval.dialog_control->class.u.n.length, &yyval.dialog_control->class.u.n.name, yyvsp[-8].s);
1772 break;}
1773 case 74:
1774 #line 587 "rcparse.y"
1776 default_style = SS_CENTER | WS_GROUP;
1777 base_style = SS_CENTER;
1778 class = CTL_STATIC;
1780 break;}
1781 case 75:
1782 #line 593 "rcparse.y"
1784 yyval.dialog_control = yyvsp[0].dialog_control;
1786 break;}
1787 case 76:
1788 #line 597 "rcparse.y"
1790 default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
1791 base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
1792 class = CTL_BUTTON;
1794 break;}
1795 case 77:
1796 #line 603 "rcparse.y"
1798 yyval.dialog_control = yyvsp[0].dialog_control;
1800 break;}
1801 case 78:
1802 #line 607 "rcparse.y"
1804 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1805 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1806 class = CTL_EDIT;
1808 break;}
1809 case 79:
1810 #line 613 "rcparse.y"
1812 yyval.dialog_control = yyvsp[0].dialog_control;
1814 break;}
1815 case 80:
1816 #line 617 "rcparse.y"
1818 default_style = BS_GROUPBOX;
1819 base_style = BS_GROUPBOX;
1820 class = CTL_BUTTON;
1822 break;}
1823 case 81:
1824 #line 623 "rcparse.y"
1826 yyval.dialog_control = yyvsp[0].dialog_control;
1828 break;}
1829 case 82:
1830 #line 627 "rcparse.y"
1832 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1833 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1834 class = CTL_EDIT;
1836 break;}
1837 case 83:
1838 #line 633 "rcparse.y"
1840 yyval.dialog_control = yyvsp[0].dialog_control;
1841 if (dialog.ex == NULL)
1842 rcparse_warning (_("IEDIT requires DIALOGEX"));
1843 res_string_to_id (&yyval.dialog_control->class, "HEDIT");
1845 break;}
1846 case 84:
1847 #line 640 "rcparse.y"
1849 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,
1850 dialog.ex);
1852 break;}
1853 case 85:
1854 #line 646 "rcparse.y"
1856 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,
1857 dialog.ex);
1859 break;}
1860 case 86:
1861 #line 652 "rcparse.y"
1863 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,
1864 dialog.ex);
1866 break;}
1867 case 87:
1868 #line 658 "rcparse.y"
1870 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,
1871 dialog.ex);
1873 break;}
1874 case 88:
1875 #line 663 "rcparse.y"
1877 default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1878 base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
1879 class = CTL_EDIT;
1881 break;}
1882 case 89:
1883 #line 669 "rcparse.y"
1885 yyval.dialog_control = yyvsp[0].dialog_control;
1886 if (dialog.ex == NULL)
1887 rcparse_warning (_("IEDIT requires DIALOGEX"));
1888 res_string_to_id (&yyval.dialog_control->class, "IEDIT");
1890 break;}
1891 case 90:
1892 #line 676 "rcparse.y"
1894 default_style = LBS_NOTIFY | WS_BORDER;
1895 base_style = LBS_NOTIFY | WS_BORDER;
1896 class = CTL_LISTBOX;
1898 break;}
1899 case 91:
1900 #line 682 "rcparse.y"
1902 yyval.dialog_control = yyvsp[0].dialog_control;
1904 break;}
1905 case 92:
1906 #line 686 "rcparse.y"
1908 default_style = SS_LEFT | WS_GROUP;
1909 base_style = SS_LEFT;
1910 class = CTL_STATIC;
1912 break;}
1913 case 93:
1914 #line 692 "rcparse.y"
1916 yyval.dialog_control = yyvsp[0].dialog_control;
1918 break;}
1919 case 94:
1920 #line 696 "rcparse.y"
1922 default_style = BS_PUSHBOX | WS_TABSTOP;
1923 base_style = BS_PUSHBOX;
1924 class = CTL_BUTTON;
1926 break;}
1927 case 95:
1928 #line 702 "rcparse.y"
1930 yyval.dialog_control = yyvsp[0].dialog_control;
1932 break;}
1933 case 96:
1934 #line 706 "rcparse.y"
1936 default_style = BS_PUSHBUTTON | WS_TABSTOP;
1937 base_style = BS_PUSHBUTTON | WS_TABSTOP;
1938 class = CTL_BUTTON;
1940 break;}
1941 case 97:
1942 #line 712 "rcparse.y"
1944 yyval.dialog_control = yyvsp[0].dialog_control;
1946 break;}
1947 case 98:
1948 #line 716 "rcparse.y"
1950 default_style = BS_RADIOBUTTON | WS_TABSTOP;
1951 base_style = BS_RADIOBUTTON;
1952 class = CTL_BUTTON;
1954 break;}
1955 case 99:
1956 #line 722 "rcparse.y"
1958 yyval.dialog_control = yyvsp[0].dialog_control;
1960 break;}
1961 case 100:
1962 #line 726 "rcparse.y"
1964 default_style = SS_RIGHT | WS_GROUP;
1965 base_style = SS_RIGHT;
1966 class = CTL_STATIC;
1968 break;}
1969 case 101:
1970 #line 732 "rcparse.y"
1972 yyval.dialog_control = yyvsp[0].dialog_control;
1974 break;}
1975 case 102:
1976 #line 736 "rcparse.y"
1978 default_style = SBS_HORZ;
1979 base_style = 0;
1980 class = CTL_SCROLLBAR;
1982 break;}
1983 case 103:
1984 #line 742 "rcparse.y"
1986 yyval.dialog_control = yyvsp[0].dialog_control;
1988 break;}
1989 case 104:
1990 #line 746 "rcparse.y"
1992 default_style = BS_3STATE | WS_TABSTOP;
1993 base_style = BS_3STATE;
1994 class = CTL_BUTTON;
1996 break;}
1997 case 105:
1998 #line 752 "rcparse.y"
2000 yyval.dialog_control = yyvsp[0].dialog_control;
2002 break;}
2003 case 106:
2004 #line 757 "rcparse.y"
2005 { style = WS_CHILD | WS_VISIBLE; ;
2006 break;}
2007 case 107:
2008 #line 759 "rcparse.y"
2010 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,
2011 style, yyvsp[0].il);
2013 break;}
2014 case 108:
2015 #line 775 "rcparse.y"
2017 yyval.dialog_control = define_control (yyvsp[-6].s, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, class,
2018 default_style | WS_CHILD | WS_VISIBLE, 0);
2019 if (yyvsp[0].rcdata_item != NULL)
2021 if (dialog.ex == NULL)
2022 rcparse_warning (_("control data requires DIALOGEX"));
2023 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2026 break;}
2027 case 109:
2028 #line 787 "rcparse.y"
2030 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);
2031 if (yyvsp[0].rcdata_item != NULL)
2033 if (dialog.ex == NULL)
2034 rcparse_warning (_("control data requires DIALOGEX"));
2035 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2038 break;}
2039 case 110:
2040 #line 798 "rcparse.y"
2042 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);
2043 if (dialog.ex == NULL)
2044 rcparse_warning (_("help ID requires DIALOGEX"));
2045 yyval.dialog_control->help = yyvsp[-1].il;
2046 yyval.dialog_control->data = yyvsp[0].rcdata_item;
2048 break;}
2049 case 111:
2050 #line 809 "rcparse.y"
2052 yyval.s = NULL;
2054 break;}
2055 case 112:
2056 #line 813 "rcparse.y"
2058 yyval.s = yyvsp[0].s;
2060 break;}
2061 case 113:
2062 #line 817 "rcparse.y"
2064 yyval.s = yyvsp[-1].s;
2066 break;}
2067 case 114:
2068 #line 824 "rcparse.y"
2070 yyval.rcdata_item = NULL;
2072 break;}
2073 case 115:
2074 #line 828 "rcparse.y"
2076 yyval.rcdata_item = yyvsp[-1].rcdata.first;
2078 break;}
2079 case 116:
2080 #line 837 "rcparse.y"
2081 { style = WS_CHILD | WS_VISIBLE; ;
2082 break;}
2083 case 118:
2084 #line 843 "rcparse.y"
2085 { style = SS_ICON | WS_CHILD | WS_VISIBLE; ;
2086 break;}
2087 case 120:
2088 #line 849 "rcparse.y"
2089 { style = base_style | WS_CHILD | WS_VISIBLE; ;
2090 break;}
2091 case 122:
2092 #line 857 "rcparse.y"
2094 define_font (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2096 break;}
2097 case 123:
2098 #line 866 "rcparse.y"
2100 define_icon (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2102 break;}
2103 case 124:
2104 #line 876 "rcparse.y"
2106 language = yyvsp[-1].il | (yyvsp[0].il << 8);
2108 break;}
2109 case 125:
2110 #line 885 "rcparse.y"
2112 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2114 break;}
2115 case 126:
2116 #line 892 "rcparse.y"
2118 yyval.menuitem = NULL;
2120 break;}
2121 case 127:
2122 #line 896 "rcparse.y"
2124 if (yyvsp[-1].menuitem == NULL)
2125 yyval.menuitem = yyvsp[0].menuitem;
2126 else
2128 struct menuitem **pp;
2130 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2132 *pp = yyvsp[0].menuitem;
2133 yyval.menuitem = yyvsp[-1].menuitem;
2136 break;}
2137 case 128:
2138 #line 913 "rcparse.y"
2140 yyval.menuitem = define_menuitem (yyvsp[-2].s, yyvsp[-1].il, yyvsp[0].is, 0, 0, NULL);
2142 break;}
2143 case 129:
2144 #line 917 "rcparse.y"
2146 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2148 break;}
2149 case 130:
2150 #line 921 "rcparse.y"
2152 yyval.menuitem = define_menuitem (yyvsp[-4].s, 0, yyvsp[-3].is, 0, 0, yyvsp[-1].menuitem);
2154 break;}
2155 case 131:
2156 #line 928 "rcparse.y"
2158 yyval.is = 0;
2160 break;}
2161 case 132:
2162 #line 932 "rcparse.y"
2164 yyval.is = yyvsp[-2].is | yyvsp[0].is;
2166 break;}
2167 case 133:
2168 #line 936 "rcparse.y"
2170 yyval.is = yyvsp[-1].is | yyvsp[0].is;
2172 break;}
2173 case 134:
2174 #line 943 "rcparse.y"
2176 yyval.is = MENUITEM_CHECKED;
2178 break;}
2179 case 135:
2180 #line 947 "rcparse.y"
2182 yyval.is = MENUITEM_GRAYED;
2184 break;}
2185 case 136:
2186 #line 951 "rcparse.y"
2188 yyval.is = MENUITEM_HELP;
2190 break;}
2191 case 137:
2192 #line 955 "rcparse.y"
2194 yyval.is = MENUITEM_INACTIVE;
2196 break;}
2197 case 138:
2198 #line 959 "rcparse.y"
2200 yyval.is = MENUITEM_MENUBARBREAK;
2202 break;}
2203 case 139:
2204 #line 963 "rcparse.y"
2206 yyval.is = MENUITEM_MENUBREAK;
2208 break;}
2209 case 140:
2210 #line 972 "rcparse.y"
2212 define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem);
2214 break;}
2215 case 141:
2216 #line 979 "rcparse.y"
2218 yyval.menuitem = NULL;
2220 break;}
2221 case 142:
2222 #line 983 "rcparse.y"
2224 if (yyvsp[-1].menuitem == NULL)
2225 yyval.menuitem = yyvsp[0].menuitem;
2226 else
2228 struct menuitem **pp;
2230 for (pp = &yyvsp[-1].menuitem->next; *pp != NULL; pp = &(*pp)->next)
2232 *pp = yyvsp[0].menuitem;
2233 yyval.menuitem = yyvsp[-1].menuitem;
2236 break;}
2237 case 143:
2238 #line 1000 "rcparse.y"
2240 yyval.menuitem = define_menuitem (yyvsp[0].s, 0, 0, 0, 0, NULL);
2242 break;}
2243 case 144:
2244 #line 1004 "rcparse.y"
2246 yyval.menuitem = define_menuitem (yyvsp[-1].s, yyvsp[0].il, 0, 0, 0, NULL);
2248 break;}
2249 case 145:
2250 #line 1008 "rcparse.y"
2252 yyval.menuitem = define_menuitem (yyvsp[-3].s, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].il, 0, NULL);
2254 break;}
2255 case 146:
2256 #line 1012 "rcparse.y"
2258 yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL);
2260 break;}
2261 case 147:
2262 #line 1016 "rcparse.y"
2264 yyval.menuitem = define_menuitem (yyvsp[-3].s, 0, 0, 0, 0, yyvsp[-1].menuitem);
2266 break;}
2267 case 148:
2268 #line 1020 "rcparse.y"
2270 yyval.menuitem = define_menuitem (yyvsp[-4].s, yyvsp[-3].il, 0, 0, 0, yyvsp[-1].menuitem);
2272 break;}
2273 case 149:
2274 #line 1024 "rcparse.y"
2276 yyval.menuitem = define_menuitem (yyvsp[-5].s, yyvsp[-4].il, yyvsp[-3].il, 0, 0, yyvsp[-1].menuitem);
2278 break;}
2279 case 150:
2280 #line 1029 "rcparse.y"
2282 yyval.menuitem = define_menuitem (yyvsp[-7].s, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-1].menuitem);
2284 break;}
2285 case 151:
2286 #line 1038 "rcparse.y"
2288 define_messagetable (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s);
2290 break;}
2291 case 152:
2292 #line 1047 "rcparse.y"
2294 define_rcdata (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2296 break;}
2297 case 153:
2298 #line 1056 "rcparse.y"
2300 rcparse_rcdata ();
2302 break;}
2303 case 154:
2304 #line 1060 "rcparse.y"
2306 rcparse_normal ();
2307 yyval.rcdata = yyvsp[0].rcdata;
2309 break;}
2310 case 155:
2311 #line 1068 "rcparse.y"
2313 yyval.rcdata.first = NULL;
2314 yyval.rcdata.last = NULL;
2316 break;}
2317 case 156:
2318 #line 1073 "rcparse.y"
2320 yyval.rcdata = yyvsp[0].rcdata;
2322 break;}
2323 case 157:
2324 #line 1080 "rcparse.y"
2326 struct rcdata_item *ri;
2328 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2329 yyval.rcdata.first = ri;
2330 yyval.rcdata.last = ri;
2332 break;}
2333 case 158:
2334 #line 1088 "rcparse.y"
2336 struct rcdata_item *ri;
2338 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2339 yyval.rcdata.first = ri;
2340 yyval.rcdata.last = ri;
2342 break;}
2343 case 159:
2344 #line 1096 "rcparse.y"
2346 struct rcdata_item *ri;
2348 ri = define_rcdata_string (yyvsp[0].ss.s, yyvsp[0].ss.length);
2349 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2350 yyvsp[-2].rcdata.last->next = ri;
2351 yyval.rcdata.last = ri;
2353 break;}
2354 case 160:
2355 #line 1105 "rcparse.y"
2357 struct rcdata_item *ri;
2359 ri = define_rcdata_number (yyvsp[0].i.val, yyvsp[0].i.dword);
2360 yyval.rcdata.first = yyvsp[-2].rcdata.first;
2361 yyvsp[-2].rcdata.last->next = ri;
2362 yyval.rcdata.last = ri;
2364 break;}
2365 case 161:
2366 #line 1119 "rcparse.y"
2367 { sub_res_info = yyvsp[-1].res_info; ;
2368 break;}
2369 case 164:
2370 #line 1126 "rcparse.y"
2372 define_stringtable (&sub_res_info, yyvsp[-1].il, yyvsp[0].s);
2374 break;}
2375 case 165:
2376 #line 1130 "rcparse.y"
2378 define_stringtable (&sub_res_info, yyvsp[-2].il, yyvsp[0].s);
2380 break;}
2381 case 166:
2382 #line 1140 "rcparse.y"
2384 define_user_data (yyvsp[-5].id, yyvsp[-4].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first);
2386 break;}
2387 case 167:
2388 #line 1144 "rcparse.y"
2390 define_user_file (yyvsp[-3].id, yyvsp[-2].id, &yyvsp[-1].res_info, yyvsp[0].s);
2392 break;}
2393 case 168:
2394 #line 1153 "rcparse.y"
2396 define_versioninfo (yyvsp[-5].id, language, yyvsp[-3].fixver, yyvsp[-1].verinfo);
2398 break;}
2399 case 169:
2400 #line 1160 "rcparse.y"
2402 yyval.fixver = ((struct fixed_versioninfo *)
2403 res_alloc (sizeof (struct fixed_versioninfo)));
2404 memset (yyval.fixver, 0, sizeof (struct fixed_versioninfo));
2406 break;}
2407 case 170:
2408 #line 1166 "rcparse.y"
2410 yyvsp[-5].fixver->file_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2411 yyvsp[-5].fixver->file_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2412 yyval.fixver = yyvsp[-5].fixver;
2414 break;}
2415 case 171:
2416 #line 1172 "rcparse.y"
2418 yyvsp[-5].fixver->product_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il;
2419 yyvsp[-5].fixver->product_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il;
2420 yyval.fixver = yyvsp[-5].fixver;
2422 break;}
2423 case 172:
2424 #line 1178 "rcparse.y"
2426 yyvsp[-2].fixver->file_flags_mask = yyvsp[0].il;
2427 yyval.fixver = yyvsp[-2].fixver;
2429 break;}
2430 case 173:
2431 #line 1183 "rcparse.y"
2433 yyvsp[-2].fixver->file_flags = yyvsp[0].il;
2434 yyval.fixver = yyvsp[-2].fixver;
2436 break;}
2437 case 174:
2438 #line 1188 "rcparse.y"
2440 yyvsp[-2].fixver->file_os = yyvsp[0].il;
2441 yyval.fixver = yyvsp[-2].fixver;
2443 break;}
2444 case 175:
2445 #line 1193 "rcparse.y"
2447 yyvsp[-2].fixver->file_type = yyvsp[0].il;
2448 yyval.fixver = yyvsp[-2].fixver;
2450 break;}
2451 case 176:
2452 #line 1198 "rcparse.y"
2454 yyvsp[-2].fixver->file_subtype = yyvsp[0].il;
2455 yyval.fixver = yyvsp[-2].fixver;
2457 break;}
2458 case 177:
2459 #line 1212 "rcparse.y"
2461 yyval.verinfo = NULL;
2463 break;}
2464 case 178:
2465 #line 1216 "rcparse.y"
2467 yyval.verinfo = append_ver_stringfileinfo (yyvsp[-7].verinfo, yyvsp[-4].s, yyvsp[-2].verstring);
2469 break;}
2470 case 179:
2471 #line 1220 "rcparse.y"
2473 yyval.verinfo = append_ver_varfileinfo (yyvsp[-6].verinfo, yyvsp[-2].s, yyvsp[-1].vervar);
2475 break;}
2476 case 180:
2477 #line 1227 "rcparse.y"
2479 yyval.verstring = NULL;
2481 break;}
2482 case 181:
2483 #line 1231 "rcparse.y"
2485 yyval.verstring = append_verval (yyvsp[-4].verstring, yyvsp[-2].s, yyvsp[0].s);
2487 break;}
2488 case 182:
2489 #line 1238 "rcparse.y"
2491 yyval.vervar = NULL;
2493 break;}
2494 case 183:
2495 #line 1242 "rcparse.y"
2497 yyval.vervar = append_vertrans (yyvsp[-2].vervar, yyvsp[-1].il, yyvsp[0].il);
2499 break;}
2500 case 184:
2501 #line 1251 "rcparse.y"
2503 yyval.id.named = 0;
2504 yyval.id.u.id = yyvsp[0].il;
2506 break;}
2507 case 185:
2508 #line 1256 "rcparse.y"
2510 char *copy, *s;
2512 /* It seems that resource ID's are forced to upper case. */
2513 copy = xstrdup (yyvsp[0].s);
2514 for (s = copy; *s != '\0'; s++)
2515 if (islower ((unsigned char) *s))
2516 *s = toupper ((unsigned char) *s);
2517 res_string_to_id (&yyval.id, copy);
2518 free (copy);
2520 break;}
2521 case 186:
2522 #line 1273 "rcparse.y"
2524 yyval.s = yyvsp[0].s;
2526 break;}
2527 case 187:
2528 #line 1277 "rcparse.y"
2530 yyval.s = yyvsp[-1].s;
2532 break;}
2533 case 188:
2534 #line 1281 "rcparse.y"
2536 yyval.s = yyvsp[-1].s;
2538 break;}
2539 case 189:
2540 #line 1289 "rcparse.y"
2542 yyval.id.named = 0;
2543 yyval.id.u.id = yyvsp[-1].il;
2545 break;}
2546 case 190:
2547 #line 1294 "rcparse.y"
2549 char *copy, *s;
2551 /* It seems that resource ID's are forced to upper case. */
2552 copy = xstrdup (yyvsp[0].s);
2553 for (s = copy; *s != '\0'; s++)
2554 if (islower ((unsigned char) *s))
2555 *s = toupper ((unsigned char) *s);
2556 res_string_to_id (&yyval.id, copy);
2557 free (copy);
2559 break;}
2560 case 191:
2561 #line 1312 "rcparse.y"
2563 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2564 yyval.res_info.language = language;
2565 /* FIXME: Is this the right default? */
2566 yyval.res_info.memflags = MEMFLAG_MOVEABLE;
2568 break;}
2569 case 192:
2570 #line 1319 "rcparse.y"
2572 yyval.res_info = yyvsp[-1].res_info;
2573 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2574 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2576 break;}
2577 case 193:
2578 #line 1325 "rcparse.y"
2580 yyval.res_info = yyvsp[-2].res_info;
2581 yyval.res_info.characteristics = yyvsp[0].il;
2583 break;}
2584 case 194:
2585 #line 1330 "rcparse.y"
2587 yyval.res_info = yyvsp[-3].res_info;
2588 yyval.res_info.language = yyvsp[-1].il | (yyvsp[0].il << 8);
2590 break;}
2591 case 195:
2592 #line 1335 "rcparse.y"
2594 yyval.res_info = yyvsp[-2].res_info;
2595 yyval.res_info.version = yyvsp[0].il;
2597 break;}
2598 case 196:
2599 #line 1345 "rcparse.y"
2601 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2602 yyval.res_info.language = language;
2603 yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE;
2605 break;}
2606 case 197:
2607 #line 1351 "rcparse.y"
2609 yyval.res_info = yyvsp[-1].res_info;
2610 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2611 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2613 break;}
2614 case 198:
2615 #line 1362 "rcparse.y"
2617 memset (&yyval.res_info, 0, sizeof (struct res_res_info));
2618 yyval.res_info.language = language;
2619 yyval.res_info.memflags = MEMFLAG_MOVEABLE;
2621 break;}
2622 case 199:
2623 #line 1368 "rcparse.y"
2625 yyval.res_info = yyvsp[-1].res_info;
2626 yyval.res_info.memflags |= yyvsp[0].memflags.on;
2627 yyval.res_info.memflags &=~ yyvsp[0].memflags.off;
2629 break;}
2630 case 200:
2631 #line 1380 "rcparse.y"
2633 yyval.memflags.on = MEMFLAG_MOVEABLE;
2634 yyval.memflags.off = 0;
2636 break;}
2637 case 201:
2638 #line 1385 "rcparse.y"
2640 yyval.memflags.on = 0;
2641 yyval.memflags.off = MEMFLAG_MOVEABLE;
2643 break;}
2644 case 202:
2645 #line 1390 "rcparse.y"
2647 yyval.memflags.on = MEMFLAG_PURE;
2648 yyval.memflags.off = 0;
2650 break;}
2651 case 203:
2652 #line 1395 "rcparse.y"
2654 yyval.memflags.on = 0;
2655 yyval.memflags.off = MEMFLAG_PURE;
2657 break;}
2658 case 204:
2659 #line 1400 "rcparse.y"
2661 yyval.memflags.on = MEMFLAG_PRELOAD;
2662 yyval.memflags.off = 0;
2664 break;}
2665 case 205:
2666 #line 1405 "rcparse.y"
2668 yyval.memflags.on = 0;
2669 yyval.memflags.off = MEMFLAG_PRELOAD;
2671 break;}
2672 case 206:
2673 #line 1410 "rcparse.y"
2675 yyval.memflags.on = MEMFLAG_DISCARDABLE;
2676 yyval.memflags.off = 0;
2678 break;}
2679 case 207:
2680 #line 1420 "rcparse.y"
2682 yyval.s = yyvsp[0].s;
2684 break;}
2685 case 208:
2686 #line 1424 "rcparse.y"
2688 yyval.s = yyvsp[0].s;
2690 break;}
2691 case 209:
2692 #line 1441 "rcparse.y"
2694 style |= yyvsp[0].il;
2696 break;}
2697 case 210:
2698 #line 1445 "rcparse.y"
2700 style &=~ yyvsp[0].il;
2702 break;}
2703 case 211:
2704 #line 1449 "rcparse.y"
2706 style |= yyvsp[0].il;
2708 break;}
2709 case 212:
2710 #line 1453 "rcparse.y"
2712 style &=~ yyvsp[0].il;
2714 break;}
2715 case 213:
2716 #line 1460 "rcparse.y"
2718 yyval.il = yyvsp[0].i.val;
2720 break;}
2721 case 214:
2722 #line 1464 "rcparse.y"
2724 yyval.il = yyvsp[-1].il;
2726 break;}
2727 case 215:
2728 #line 1473 "rcparse.y"
2730 yyval.il = 0;
2732 break;}
2733 case 216:
2734 #line 1477 "rcparse.y"
2736 yyval.il = yyvsp[0].il;
2738 break;}
2739 case 217:
2740 #line 1486 "rcparse.y"
2742 yyval.il = yyvsp[0].il;
2744 break;}
2745 case 218:
2746 #line 1495 "rcparse.y"
2748 yyval.il = yyvsp[0].i.val;
2750 break;}
2751 case 219:
2752 #line 1504 "rcparse.y"
2754 yyval.i = yyvsp[0].i;
2756 break;}
2757 case 220:
2758 #line 1508 "rcparse.y"
2760 yyval.i = yyvsp[-1].i;
2762 break;}
2763 case 221:
2764 #line 1512 "rcparse.y"
2766 yyval.i.val = ~ yyvsp[0].i.val;
2767 yyval.i.dword = yyvsp[0].i.dword;
2769 break;}
2770 case 222:
2771 #line 1517 "rcparse.y"
2773 yyval.i.val = - yyvsp[0].i.val;
2774 yyval.i.dword = yyvsp[0].i.dword;
2776 break;}
2777 case 223:
2778 #line 1522 "rcparse.y"
2780 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
2781 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2783 break;}
2784 case 224:
2785 #line 1527 "rcparse.y"
2787 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
2788 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2790 break;}
2791 case 225:
2792 #line 1532 "rcparse.y"
2794 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
2795 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2797 break;}
2798 case 226:
2799 #line 1537 "rcparse.y"
2801 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
2802 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2804 break;}
2805 case 227:
2806 #line 1542 "rcparse.y"
2808 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
2809 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2811 break;}
2812 case 228:
2813 #line 1547 "rcparse.y"
2815 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
2816 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2818 break;}
2819 case 229:
2820 #line 1552 "rcparse.y"
2822 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
2823 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2825 break;}
2826 case 230:
2827 #line 1557 "rcparse.y"
2829 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
2830 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2832 break;}
2833 case 231:
2834 #line 1568 "rcparse.y"
2836 yyval.il = yyvsp[0].il;
2838 break;}
2839 case 232:
2840 #line 1577 "rcparse.y"
2842 yyval.il = yyvsp[0].i.val;
2844 break;}
2845 case 233:
2846 #line 1588 "rcparse.y"
2848 yyval.i = yyvsp[0].i;
2850 break;}
2851 case 234:
2852 #line 1592 "rcparse.y"
2854 yyval.i = yyvsp[-1].i;
2856 break;}
2857 case 235:
2858 #line 1596 "rcparse.y"
2860 yyval.i.val = ~ yyvsp[0].i.val;
2861 yyval.i.dword = yyvsp[0].i.dword;
2863 break;}
2864 case 236:
2865 #line 1601 "rcparse.y"
2867 yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val;
2868 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2870 break;}
2871 case 237:
2872 #line 1606 "rcparse.y"
2874 yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val;
2875 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2877 break;}
2878 case 238:
2879 #line 1611 "rcparse.y"
2881 yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val;
2882 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2884 break;}
2885 case 239:
2886 #line 1616 "rcparse.y"
2888 yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val;
2889 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2891 break;}
2892 case 240:
2893 #line 1621 "rcparse.y"
2895 yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val;
2896 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2898 break;}
2899 case 241:
2900 #line 1626 "rcparse.y"
2902 yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val;
2903 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2905 break;}
2906 case 242:
2907 #line 1631 "rcparse.y"
2909 yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val;
2910 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2912 break;}
2913 case 243:
2914 #line 1636 "rcparse.y"
2916 yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val;
2917 yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword;
2919 break;}
2921 /* the action file gets copied in in place of this dollarsign */
2922 #line 543 "/usr/share/bison/bison.simple"
2924 yyvsp -= yylen;
2925 yyssp -= yylen;
2926 #ifdef YYLSP_NEEDED
2927 yylsp -= yylen;
2928 #endif
2930 #if YYDEBUG != 0
2931 if (yydebug)
2933 short *ssp1 = yyss - 1;
2934 fprintf (stderr, "state stack now");
2935 while (ssp1 != yyssp)
2936 fprintf (stderr, " %d", *++ssp1);
2937 fprintf (stderr, "\n");
2939 #endif
2941 *++yyvsp = yyval;
2943 #ifdef YYLSP_NEEDED
2944 yylsp++;
2945 if (yylen == 0)
2947 yylsp->first_line = yylloc.first_line;
2948 yylsp->first_column = yylloc.first_column;
2949 yylsp->last_line = (yylsp-1)->last_line;
2950 yylsp->last_column = (yylsp-1)->last_column;
2951 yylsp->text = 0;
2953 else
2955 yylsp->last_line = (yylsp+yylen-1)->last_line;
2956 yylsp->last_column = (yylsp+yylen-1)->last_column;
2958 #endif
2960 /* Now "shift" the result of the reduction.
2961 Determine what state that goes to,
2962 based on the state we popped back to
2963 and the rule number reduced by. */
2965 yyn = yyr1[yyn];
2967 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
2968 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2969 yystate = yytable[yystate];
2970 else
2971 yystate = yydefgoto[yyn - YYNTBASE];
2973 goto yynewstate;
2975 yyerrlab: /* here on detecting error */
2977 if (! yyerrstatus)
2978 /* If not already recovering from an error, report this error. */
2980 ++yynerrs;
2982 #ifdef YYERROR_VERBOSE
2983 yyn = yypact[yystate];
2985 if (yyn > YYFLAG && yyn < YYLAST)
2987 int size = 0;
2988 char *msg;
2989 int x, count;
2991 count = 0;
2992 /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
2993 for (x = (yyn < 0 ? -yyn : 0);
2994 x < (sizeof(yytname) / sizeof(char *)); x++)
2995 if (yycheck[x + yyn] == x)
2996 size += strlen(yytname[x]) + 15, count++;
2997 msg = (char *) malloc(size + 15);
2998 if (msg != 0)
3000 strcpy(msg, "parse error");
3002 if (count < 5)
3004 count = 0;
3005 for (x = (yyn < 0 ? -yyn : 0);
3006 x < (sizeof(yytname) / sizeof(char *)); x++)
3007 if (yycheck[x + yyn] == x)
3009 strcat(msg, count == 0 ? ", expecting `" : " or `");
3010 strcat(msg, yytname[x]);
3011 strcat(msg, "'");
3012 count++;
3015 yyerror(msg);
3016 free(msg);
3018 else
3019 yyerror ("parse error; also virtual memory exceeded");
3021 else
3022 #endif /* YYERROR_VERBOSE */
3023 yyerror("parse error");
3026 goto yyerrlab1;
3027 yyerrlab1: /* here on error raised explicitly by an action */
3029 if (yyerrstatus == 3)
3031 /* if just tried and failed to reuse lookahead token after an error, discard it. */
3033 /* return failure if at end of input */
3034 if (yychar == YYEOF)
3035 YYABORT;
3037 #if YYDEBUG != 0
3038 if (yydebug)
3039 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
3040 #endif
3042 yychar = YYEMPTY;
3045 /* Else will try to reuse lookahead token
3046 after shifting the error token. */
3048 yyerrstatus = 3; /* Each real token shifted decrements this */
3050 goto yyerrhandle;
3052 yyerrdefault: /* current state does not do anything special for the error token. */
3054 #if 0
3055 /* This is wrong; only states that explicitly want error tokens
3056 should shift them. */
3057 yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
3058 if (yyn) goto yydefault;
3059 #endif
3061 yyerrpop: /* pop the current state because it cannot handle the error token */
3063 if (yyssp == yyss) YYABORT;
3064 yyvsp--;
3065 yystate = *--yyssp;
3066 #ifdef YYLSP_NEEDED
3067 yylsp--;
3068 #endif
3070 #if YYDEBUG != 0
3071 if (yydebug)
3073 short *ssp1 = yyss - 1;
3074 fprintf (stderr, "Error: state stack now");
3075 while (ssp1 != yyssp)
3076 fprintf (stderr, " %d", *++ssp1);
3077 fprintf (stderr, "\n");
3079 #endif
3081 yyerrhandle:
3083 yyn = yypact[yystate];
3084 if (yyn == YYFLAG)
3085 goto yyerrdefault;
3087 yyn += YYTERROR;
3088 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3089 goto yyerrdefault;
3091 yyn = yytable[yyn];
3092 if (yyn < 0)
3094 if (yyn == YYFLAG)
3095 goto yyerrpop;
3096 yyn = -yyn;
3097 goto yyreduce;
3099 else if (yyn == 0)
3100 goto yyerrpop;
3102 if (yyn == YYFINAL)
3103 YYACCEPT;
3105 #if YYDEBUG != 0
3106 if (yydebug)
3107 fprintf(stderr, "Shifting error token, ");
3108 #endif
3110 *++yyvsp = yylval;
3111 #ifdef YYLSP_NEEDED
3112 *++yylsp = yylloc;
3113 #endif
3115 yystate = yyn;
3116 goto yynewstate;
3118 yyacceptlab:
3119 /* YYACCEPT comes here. */
3120 if (yyfree_stacks)
3122 free (yyss);
3123 free (yyvs);
3124 #ifdef YYLSP_NEEDED
3125 free (yyls);
3126 #endif
3128 return 0;
3130 yyabortlab:
3131 /* YYABORT comes here. */
3132 if (yyfree_stacks)
3134 free (yyss);
3135 free (yyvs);
3136 #ifdef YYLSP_NEEDED
3137 free (yyls);
3138 #endif
3140 return 1;
3142 #line 1642 "rcparse.y"
3145 /* Set the language from the command line. */
3147 void
3148 rcparse_set_language (lang)
3149 int lang;
3151 language = lang;