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