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