Regenerate.
[oota-llvm.git] / tools / llvm-upgrade / UpgradeParser.cpp.cvs
1 /* A Bison parser, made by GNU Bison 2.1.  */
2
3 /* Skeleton parser for Yacc-like parsing with Bison,
4    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor,
19    Boston, MA 02110-1301, USA.  */
20
21 /* As a special exception, when this file is copied by Bison into a
22    Bison output file, you may use that output file without restriction.
23    This special exception was added by the Free Software Foundation
24    in version 1.24 of Bison.  */
25
26 /* Written by Richard Stallman by simplifying the original so called
27    ``semantic'' parser.  */
28
29 /* All symbols defined below should begin with yy or YY, to avoid
30    infringing on user name space.  This should be done even for local
31    variables, as they might otherwise be expanded by user macros.
32    There are some unavoidable exceptions within include files to
33    define necessary library symbols; they are noted "INFRINGES ON
34    USER NAME SPACE" below.  */
35
36 /* Identify Bison output.  */
37 #define YYBISON 1
38
39 /* Bison version.  */
40 #define YYBISON_VERSION "2.1"
41
42 /* Skeleton name.  */
43 #define YYSKELETON_NAME "yacc.c"
44
45 /* Pure parsers.  */
46 #define YYPURE 0
47
48 /* Using locations.  */
49 #define YYLSP_NEEDED 0
50
51 /* Substitute the variable and function names.  */
52 #define yyparse Upgradeparse
53 #define yylex   Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval  Upgradelval
56 #define yychar  Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
59
60
61 /* Tokens.  */
62 #ifndef YYTOKENTYPE
63 # define YYTOKENTYPE
64    /* Put the tokens into the symbol table, so that GDB and other debuggers
65       know about them.  */
66    enum yytokentype {
67      VOID = 258,
68      BOOL = 259,
69      SBYTE = 260,
70      UBYTE = 261,
71      SHORT = 262,
72      USHORT = 263,
73      INT = 264,
74      UINT = 265,
75      LONG = 266,
76      ULONG = 267,
77      FLOAT = 268,
78      DOUBLE = 269,
79      LABEL = 270,
80      OPAQUE = 271,
81      ESINT64VAL = 272,
82      EUINT64VAL = 273,
83      SINTVAL = 274,
84      UINTVAL = 275,
85      FPVAL = 276,
86      NULL_TOK = 277,
87      UNDEF = 278,
88      ZEROINITIALIZER = 279,
89      TRUETOK = 280,
90      FALSETOK = 281,
91      TYPE = 282,
92      VAR_ID = 283,
93      LABELSTR = 284,
94      STRINGCONSTANT = 285,
95      IMPLEMENTATION = 286,
96      BEGINTOK = 287,
97      ENDTOK = 288,
98      DECLARE = 289,
99      GLOBAL = 290,
100      CONSTANT = 291,
101      SECTION = 292,
102      VOLATILE = 293,
103      TO = 294,
104      DOTDOTDOT = 295,
105      CONST = 296,
106      INTERNAL = 297,
107      LINKONCE = 298,
108      WEAK = 299,
109      DLLIMPORT = 300,
110      DLLEXPORT = 301,
111      EXTERN_WEAK = 302,
112      APPENDING = 303,
113      NOT = 304,
114      EXTERNAL = 305,
115      TARGET = 306,
116      TRIPLE = 307,
117      ENDIAN = 308,
118      POINTERSIZE = 309,
119      LITTLE = 310,
120      BIG = 311,
121      ALIGN = 312,
122      UNINITIALIZED = 313,
123      DEPLIBS = 314,
124      CALL = 315,
125      TAIL = 316,
126      ASM_TOK = 317,
127      MODULE = 318,
128      SIDEEFFECT = 319,
129      CC_TOK = 320,
130      CCC_TOK = 321,
131      CSRETCC_TOK = 322,
132      FASTCC_TOK = 323,
133      COLDCC_TOK = 324,
134      X86_STDCALLCC_TOK = 325,
135      X86_FASTCALLCC_TOK = 326,
136      DATALAYOUT = 327,
137      RET = 328,
138      BR = 329,
139      SWITCH = 330,
140      INVOKE = 331,
141      EXCEPT = 332,
142      UNWIND = 333,
143      UNREACHABLE = 334,
144      ADD = 335,
145      SUB = 336,
146      MUL = 337,
147      DIV = 338,
148      UDIV = 339,
149      SDIV = 340,
150      FDIV = 341,
151      REM = 342,
152      UREM = 343,
153      SREM = 344,
154      FREM = 345,
155      AND = 346,
156      OR = 347,
157      XOR = 348,
158      SETLE = 349,
159      SETGE = 350,
160      SETLT = 351,
161      SETGT = 352,
162      SETEQ = 353,
163      SETNE = 354,
164      ICMP = 355,
165      FCMP = 356,
166      EQ = 357,
167      NE = 358,
168      SLT = 359,
169      SGT = 360,
170      SLE = 361,
171      SGE = 362,
172      OEQ = 363,
173      ONE = 364,
174      OLT = 365,
175      OGT = 366,
176      OLE = 367,
177      OGE = 368,
178      ORD = 369,
179      UNO = 370,
180      UEQ = 371,
181      UNE = 372,
182      ULT = 373,
183      UGT = 374,
184      ULE = 375,
185      UGE = 376,
186      MALLOC = 377,
187      ALLOCA = 378,
188      FREE = 379,
189      LOAD = 380,
190      STORE = 381,
191      GETELEMENTPTR = 382,
192      PHI_TOK = 383,
193      SELECT = 384,
194      SHL = 385,
195      SHR = 386,
196      ASHR = 387,
197      LSHR = 388,
198      VAARG = 389,
199      EXTRACTELEMENT = 390,
200      INSERTELEMENT = 391,
201      SHUFFLEVECTOR = 392,
202      CAST = 393,
203      TRUNC = 394,
204      ZEXT = 395,
205      SEXT = 396,
206      FPTRUNC = 397,
207      FPEXT = 398,
208      FPTOUI = 399,
209      FPTOSI = 400,
210      UITOFP = 401,
211      SITOFP = 402,
212      PTRTOINT = 403,
213      INTTOPTR = 404,
214      BITCAST = 405
215    };
216 #endif
217 /* Tokens.  */
218 #define VOID 258
219 #define BOOL 259
220 #define SBYTE 260
221 #define UBYTE 261
222 #define SHORT 262
223 #define USHORT 263
224 #define INT 264
225 #define UINT 265
226 #define LONG 266
227 #define ULONG 267
228 #define FLOAT 268
229 #define DOUBLE 269
230 #define LABEL 270
231 #define OPAQUE 271
232 #define ESINT64VAL 272
233 #define EUINT64VAL 273
234 #define SINTVAL 274
235 #define UINTVAL 275
236 #define FPVAL 276
237 #define NULL_TOK 277
238 #define UNDEF 278
239 #define ZEROINITIALIZER 279
240 #define TRUETOK 280
241 #define FALSETOK 281
242 #define TYPE 282
243 #define VAR_ID 283
244 #define LABELSTR 284
245 #define STRINGCONSTANT 285
246 #define IMPLEMENTATION 286
247 #define BEGINTOK 287
248 #define ENDTOK 288
249 #define DECLARE 289
250 #define GLOBAL 290
251 #define CONSTANT 291
252 #define SECTION 292
253 #define VOLATILE 293
254 #define TO 294
255 #define DOTDOTDOT 295
256 #define CONST 296
257 #define INTERNAL 297
258 #define LINKONCE 298
259 #define WEAK 299
260 #define DLLIMPORT 300
261 #define DLLEXPORT 301
262 #define EXTERN_WEAK 302
263 #define APPENDING 303
264 #define NOT 304
265 #define EXTERNAL 305
266 #define TARGET 306
267 #define TRIPLE 307
268 #define ENDIAN 308
269 #define POINTERSIZE 309
270 #define LITTLE 310
271 #define BIG 311
272 #define ALIGN 312
273 #define UNINITIALIZED 313
274 #define DEPLIBS 314
275 #define CALL 315
276 #define TAIL 316
277 #define ASM_TOK 317
278 #define MODULE 318
279 #define SIDEEFFECT 319
280 #define CC_TOK 320
281 #define CCC_TOK 321
282 #define CSRETCC_TOK 322
283 #define FASTCC_TOK 323
284 #define COLDCC_TOK 324
285 #define X86_STDCALLCC_TOK 325
286 #define X86_FASTCALLCC_TOK 326
287 #define DATALAYOUT 327
288 #define RET 328
289 #define BR 329
290 #define SWITCH 330
291 #define INVOKE 331
292 #define EXCEPT 332
293 #define UNWIND 333
294 #define UNREACHABLE 334
295 #define ADD 335
296 #define SUB 336
297 #define MUL 337
298 #define DIV 338
299 #define UDIV 339
300 #define SDIV 340
301 #define FDIV 341
302 #define REM 342
303 #define UREM 343
304 #define SREM 344
305 #define FREM 345
306 #define AND 346
307 #define OR 347
308 #define XOR 348
309 #define SETLE 349
310 #define SETGE 350
311 #define SETLT 351
312 #define SETGT 352
313 #define SETEQ 353
314 #define SETNE 354
315 #define ICMP 355
316 #define FCMP 356
317 #define EQ 357
318 #define NE 358
319 #define SLT 359
320 #define SGT 360
321 #define SLE 361
322 #define SGE 362
323 #define OEQ 363
324 #define ONE 364
325 #define OLT 365
326 #define OGT 366
327 #define OLE 367
328 #define OGE 368
329 #define ORD 369
330 #define UNO 370
331 #define UEQ 371
332 #define UNE 372
333 #define ULT 373
334 #define UGT 374
335 #define ULE 375
336 #define UGE 376
337 #define MALLOC 377
338 #define ALLOCA 378
339 #define FREE 379
340 #define LOAD 380
341 #define STORE 381
342 #define GETELEMENTPTR 382
343 #define PHI_TOK 383
344 #define SELECT 384
345 #define SHL 385
346 #define SHR 386
347 #define ASHR 387
348 #define LSHR 388
349 #define VAARG 389
350 #define EXTRACTELEMENT 390
351 #define INSERTELEMENT 391
352 #define SHUFFLEVECTOR 392
353 #define CAST 393
354 #define TRUNC 394
355 #define ZEXT 395
356 #define SEXT 396
357 #define FPTRUNC 397
358 #define FPEXT 398
359 #define FPTOUI 399
360 #define FPTOSI 400
361 #define UITOFP 401
362 #define SITOFP 402
363 #define PTRTOINT 403
364 #define INTTOPTR 404
365 #define BITCAST 405
366
367
368
369
370 /* Copy the first part of user declarations.  */
371 #line 14 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
372
373 #include "ParserInternals.h"
374 #include <llvm/ADT/StringExtras.h>
375 #include <algorithm>
376 #include <map>
377 #include <utility>
378 #include <iostream>
379 #include <cassert>
380
381 #define YYERROR_VERBOSE 1
382 #define YYINCLUDED_STDLIB_H
383 #define YYDEBUG 1
384 #define UPGRADE_SETCOND_OPS 0
385
386 int yylex();                       // declaration" of xxx warnings.
387 int yyparse();
388 extern int yydebug;
389
390 static std::string CurFilename;
391 static std::ostream *O = 0;
392 std::istream* LexInput = 0;
393 unsigned SizeOfPointer = 32;
394 static uint64_t unique = 1;
395
396 typedef std::vector<TypeInfo> TypeVector;
397 static TypeVector EnumeratedTypes;
398 typedef std::map<std::string,TypeInfo> TypeMap;
399 static TypeMap NamedTypes;
400 static TypeMap Globals;
401
402 void destroy(ValueList* VL) {
403   while (!VL->empty()) {
404     ValueInfo& VI = VL->back();
405     VI.destroy();
406     VL->pop_back();
407   }
408   delete VL;
409 }
410
411 void UpgradeAssembly(const std::string &infile, std::istream& in, 
412                      std::ostream &out, bool debug)
413 {
414   Upgradelineno = 1; 
415   CurFilename = infile;
416   LexInput = &in;
417   yydebug = debug;
418   O = &out;
419
420   if (yyparse()) {
421     std::cerr << "Parse failed.\n";
422     exit(1);
423   }
424 }
425
426 static void ResolveType(TypeInfo& Ty) {
427   if (Ty.oldTy == UnresolvedTy) {
428     TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
429     if (I != NamedTypes.end()) {
430       Ty.oldTy = I->second.oldTy;
431       Ty.elemTy = I->second.elemTy;
432     } else {
433       std::string msg("Can't resolve type: ");
434       msg += *Ty.newTy;
435       yyerror(msg.c_str());
436     }
437   } else if (Ty.oldTy == NumericTy) {
438     unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
439     if (ref < EnumeratedTypes.size()) {
440       Ty.oldTy = EnumeratedTypes[ref].oldTy;
441       Ty.elemTy = EnumeratedTypes[ref].elemTy;
442     } else {
443       std::string msg("Can't resolve type: ");
444       msg += *Ty.newTy;
445       yyerror(msg.c_str());
446     }
447   }
448   // otherwise its already resolved.
449 }
450
451 static const char* getCastOpcode(
452   std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy) 
453 {
454   unsigned SrcBits = SrcTy.getBitWidth();
455   unsigned DstBits = DstTy.getBitWidth();
456   const char* opcode = "bitcast";
457   // Run through the possibilities ...
458   if (DstTy.isIntegral()) {                        // Casting to integral
459     if (SrcTy.isIntegral()) {                      // Casting from integral
460       if (DstBits < SrcBits)
461         opcode = "trunc";
462       else if (DstBits > SrcBits) {                // its an extension
463         if (SrcTy.isSigned())
464           opcode ="sext";                          // signed -> SEXT
465         else
466           opcode = "zext";                         // unsigned -> ZEXT
467       } else {
468         opcode = "bitcast";                        // Same size, No-op cast
469       }
470     } else if (SrcTy.isFloatingPoint()) {          // Casting from floating pt
471       if (DstTy.isSigned()) 
472         opcode = "fptosi";                         // FP -> sint
473       else
474         opcode = "fptoui";                         // FP -> uint 
475     } else if (SrcTy.isPacked()) {
476       assert(DstBits == SrcTy.getBitWidth() &&
477                "Casting packed to integer of different width");
478         opcode = "bitcast";                        // same size, no-op cast
479     } else {
480       assert(SrcTy.isPointer() &&
481              "Casting from a value that is not first-class type");
482       opcode = "ptrtoint";                         // ptr -> int
483     }
484   } else if (DstTy.isFloatingPoint()) {           // Casting to floating pt
485     if (SrcTy.isIntegral()) {                     // Casting from integral
486       if (SrcTy.isSigned())
487         opcode = "sitofp";                         // sint -> FP
488       else
489         opcode = "uitofp";                         // uint -> FP
490     } else if (SrcTy.isFloatingPoint()) {         // Casting from floating pt
491       if (DstBits < SrcBits) {
492         opcode = "fptrunc";                        // FP -> smaller FP
493       } else if (DstBits > SrcBits) {
494         opcode = "fpext";                          // FP -> larger FP
495       } else  {
496         opcode ="bitcast";                         // same size, no-op cast
497       }
498     } else if (SrcTy.isPacked()) {
499       assert(DstBits == SrcTy.getBitWidth() &&
500              "Casting packed to floating point of different width");
501         opcode = "bitcast";                        // same size, no-op cast
502     } else {
503       assert(0 && "Casting pointer or non-first class to float");
504     }
505   } else if (DstTy.isPacked()) {
506     if (SrcTy.isPacked()) {
507       assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
508              "Casting packed to packed of different widths");
509       opcode = "bitcast";                          // packed -> packed
510     } else if (DstTy.getBitWidth() == SrcBits) {
511       opcode = "bitcast";                          // float/int -> packed
512     } else {
513       assert(!"Illegal cast to packed (wrong type or size)");
514     }
515   } else if (DstTy.isPointer()) {
516     if (SrcTy.isPointer()) {
517       opcode = "bitcast";                          // ptr -> ptr
518     } else if (SrcTy.isIntegral()) {
519       opcode = "inttoptr";                         // int -> ptr
520     } else {
521       assert(!"Casting invalid type to pointer");
522     }
523   } else {
524     assert(!"Casting to type that is not first-class");
525   }
526   return opcode;
527 }
528
529 static std::string getCastUpgrade(
530   const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
531 {
532   std::string Result;
533   std::string Source = Src;
534   if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
535     // fp -> ptr cast is no longer supported but we must upgrade this
536     // by doing a double cast: fp -> int -> ptr
537     if (isConst)
538       Source = "ulong fptoui(" + Source + " to ulong)";
539     else {
540       *O << "    %cast_upgrade" << unique << " = fptoui " << Source 
541          << " to ulong\n";
542       Source = "ulong %cast_upgrade" + llvm::utostr(unique);
543     }
544     // Update the SrcTy for the getCastOpcode call below
545     SrcTy.destroy();
546     SrcTy.newTy = new std::string("ulong");
547     SrcTy.oldTy = ULongTy;
548   } else if (DstTy.oldTy == BoolTy) {
549     // cast ptr %x to  bool was previously defined as setne ptr %x, null
550     // The ptrtoint semantic is to truncate, not compare so we must retain
551     // the original intent by replace the cast with a setne
552     const char* comparator = SrcTy.isPointer() ? ", null" : 
553       (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
554     if (isConst) 
555       Result = "setne (" + Source + comparator + ")";
556     else
557       Result = "setne " + Source + comparator;
558     return Result; // skip cast processing below
559   }
560   ResolveType(SrcTy);
561   ResolveType(DstTy);
562   std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
563   if (isConst)
564     Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
565   else
566     Result += Opcode + " " + Source + " to " + *DstTy.newTy;
567   return Result;
568 }
569
570 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
571   const char* op = opcode.c_str();
572   TypeInfo Ty = TI;
573   ResolveType(Ty);
574   if (Ty.isPacked())
575     Ty.oldTy = Ty.getElementType();
576   if (opcode == "div")
577     if (Ty.isFloatingPoint())
578       op = "fdiv";
579     else if (Ty.isUnsigned())
580       op = "udiv";
581     else if (Ty.isSigned())
582       op = "sdiv";
583     else
584       yyerror("Invalid type for div instruction");
585   else if (opcode == "rem")
586     if (Ty.isFloatingPoint())
587       op = "frem";
588     else if (Ty.isUnsigned())
589       op = "urem";
590     else if (Ty.isSigned())
591       op = "srem";
592     else
593       yyerror("Invalid type for rem instruction");
594   return op;
595 }
596
597 std::string 
598 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
599   assert(setcc.length() == 5);
600   char cc1 = setcc[3];
601   char cc2 = setcc[4];
602   assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
603   assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
604   std::string result("xcmp xxx");
605   result[6] = cc1;
606   result[7] = cc2;
607   if (TI.isFloatingPoint()) {
608     result[0] = 'f';
609     result[5] = 'o'; // FIXME: Always map to ordered comparison ?
610   } else if (TI.isIntegral() || TI.isPointer()) {
611     result[0] = 'i';
612     if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
613       result.erase(5,1);
614     else if (TI.isSigned())
615       result[5] = 's';
616     else if (TI.isUnsigned() || TI.isPointer() || TI.isBool())
617       result[5] = 'u';
618     else
619       yyerror("Invalid integral type for setcc");
620   }
621   return result;
622 }
623
624
625
626 /* Enabling traces.  */
627 #ifndef YYDEBUG
628 # define YYDEBUG 0
629 #endif
630
631 /* Enabling verbose error messages.  */
632 #ifdef YYERROR_VERBOSE
633 # undef YYERROR_VERBOSE
634 # define YYERROR_VERBOSE 1
635 #else
636 # define YYERROR_VERBOSE 0
637 #endif
638
639 /* Enabling the token table.  */
640 #ifndef YYTOKEN_TABLE
641 # define YYTOKEN_TABLE 0
642 #endif
643
644 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
645 #line 270 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
646 typedef union YYSTYPE {
647   std::string*    String;
648   TypeInfo        Type;
649   ValueInfo       Value;
650   ConstInfo       Const;
651   ValueList*      ValList;
652 } YYSTYPE;
653 /* Line 196 of yacc.c.  */
654 #line 655 "UpgradeParser.tab.c"
655 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
656 # define YYSTYPE_IS_DECLARED 1
657 # define YYSTYPE_IS_TRIVIAL 1
658 #endif
659
660
661
662 /* Copy the second part of user declarations.  */
663
664
665 /* Line 219 of yacc.c.  */
666 #line 667 "UpgradeParser.tab.c"
667
668 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
669 # define YYSIZE_T __SIZE_TYPE__
670 #endif
671 #if ! defined (YYSIZE_T) && defined (size_t)
672 # define YYSIZE_T size_t
673 #endif
674 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
675 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
676 # define YYSIZE_T size_t
677 #endif
678 #if ! defined (YYSIZE_T)
679 # define YYSIZE_T unsigned int
680 #endif
681
682 #ifndef YY_
683 # if YYENABLE_NLS
684 #  if ENABLE_NLS
685 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
686 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
687 #  endif
688 # endif
689 # ifndef YY_
690 #  define YY_(msgid) msgid
691 # endif
692 #endif
693
694 #if ! defined (yyoverflow) || YYERROR_VERBOSE
695
696 /* The parser invokes alloca or malloc; define the necessary symbols.  */
697
698 # ifdef YYSTACK_USE_ALLOCA
699 #  if YYSTACK_USE_ALLOCA
700 #   ifdef __GNUC__
701 #    define YYSTACK_ALLOC __builtin_alloca
702 #   else
703 #    define YYSTACK_ALLOC alloca
704 #    if defined (__STDC__) || defined (__cplusplus)
705 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
706 #     define YYINCLUDED_STDLIB_H
707 #    endif
708 #   endif
709 #  endif
710 # endif
711
712 # ifdef YYSTACK_ALLOC
713    /* Pacify GCC's `empty if-body' warning. */
714 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
715 #  ifndef YYSTACK_ALLOC_MAXIMUM
716     /* The OS might guarantee only one guard page at the bottom of the stack,
717        and a page size can be as small as 4096 bytes.  So we cannot safely
718        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
719        to allow for a few compiler-allocated temporary stack slots.  */
720 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
721 #  endif
722 # else
723 #  define YYSTACK_ALLOC YYMALLOC
724 #  define YYSTACK_FREE YYFREE
725 #  ifndef YYSTACK_ALLOC_MAXIMUM
726 #   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
727 #  endif
728 #  ifdef __cplusplus
729 extern "C" {
730 #  endif
731 #  ifndef YYMALLOC
732 #   define YYMALLOC malloc
733 #   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
734         && (defined (__STDC__) || defined (__cplusplus)))
735 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
736 #   endif
737 #  endif
738 #  ifndef YYFREE
739 #   define YYFREE free
740 #   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
741         && (defined (__STDC__) || defined (__cplusplus)))
742 void free (void *); /* INFRINGES ON USER NAME SPACE */
743 #   endif
744 #  endif
745 #  ifdef __cplusplus
746 }
747 #  endif
748 # endif
749 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
750
751
752 #if (! defined (yyoverflow) \
753      && (! defined (__cplusplus) \
754          || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
755
756 /* A type that is properly aligned for any stack member.  */
757 union yyalloc
758 {
759   short int yyss;
760   YYSTYPE yyvs;
761   };
762
763 /* The size of the maximum gap between one aligned stack and the next.  */
764 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
765
766 /* The size of an array large to enough to hold all stacks, each with
767    N elements.  */
768 # define YYSTACK_BYTES(N) \
769      ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
770       + YYSTACK_GAP_MAXIMUM)
771
772 /* Copy COUNT objects from FROM to TO.  The source and destination do
773    not overlap.  */
774 # ifndef YYCOPY
775 #  if defined (__GNUC__) && 1 < __GNUC__
776 #   define YYCOPY(To, From, Count) \
777       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
778 #  else
779 #   define YYCOPY(To, From, Count)              \
780       do                                        \
781         {                                       \
782           YYSIZE_T yyi;                         \
783           for (yyi = 0; yyi < (Count); yyi++)   \
784             (To)[yyi] = (From)[yyi];            \
785         }                                       \
786       while (0)
787 #  endif
788 # endif
789
790 /* Relocate STACK from its old location to the new one.  The
791    local variables YYSIZE and YYSTACKSIZE give the old and new number of
792    elements in the stack, and YYPTR gives the new location of the
793    stack.  Advance YYPTR to a properly aligned location for the next
794    stack.  */
795 # define YYSTACK_RELOCATE(Stack)                                        \
796     do                                                                  \
797       {                                                                 \
798         YYSIZE_T yynewbytes;                                            \
799         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
800         Stack = &yyptr->Stack;                                          \
801         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
802         yyptr += yynewbytes / sizeof (*yyptr);                          \
803       }                                                                 \
804     while (0)
805
806 #endif
807
808 #if defined (__STDC__) || defined (__cplusplus)
809    typedef signed char yysigned_char;
810 #else
811    typedef short int yysigned_char;
812 #endif
813
814 /* YYFINAL -- State number of the termination state. */
815 #define YYFINAL  4
816 /* YYLAST -- Last index in YYTABLE.  */
817 #define YYLAST   1483
818
819 /* YYNTOKENS -- Number of terminals. */
820 #define YYNTOKENS  165
821 /* YYNNTS -- Number of nonterminals. */
822 #define YYNNTS  75
823 /* YYNRULES -- Number of rules. */
824 #define YYNRULES  299
825 /* YYNRULES -- Number of states. */
826 #define YYNSTATES  582
827
828 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
829 #define YYUNDEFTOK  2
830 #define YYMAXUTOK   405
831
832 #define YYTRANSLATE(YYX)                                                \
833   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
834
835 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
836 static const unsigned char yytranslate[] =
837 {
838        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
839        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
840        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
841        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
842      154,   155,   163,     2,   152,     2,     2,     2,     2,     2,
843        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
844      159,   151,   160,     2,     2,     2,     2,     2,     2,     2,
845        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
846        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
847        2,   156,   153,   158,     2,     2,     2,     2,     2,   164,
848        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
849        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
850      157,     2,     2,   161,     2,   162,     2,     2,     2,     2,
851        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
852        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
853        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
854        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
855        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
856        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
857        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
858        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
859        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
860        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
861        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
862        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
863        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
864        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
865       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
866       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
867       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
868       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
869       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
870       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
871       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
872       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
873       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
874      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
875      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
876      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
877      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
878      145,   146,   147,   148,   149,   150
879 };
880
881 #if YYDEBUG
882 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
883    YYRHS.  */
884 static const unsigned short int yyprhs[] =
885 {
886        0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
887       19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
888       39,    41,    43,    45,    47,    49,    51,    53,    55,    57,
889       59,    61,    63,    65,    67,    69,    71,    73,    75,    77,
890       79,    81,    83,    85,    87,    89,    91,    93,    95,    97,
891       99,   101,   103,   105,   107,   109,   111,   113,   115,   117,
892      119,   121,   123,   125,   127,   129,   131,   133,   135,   137,
893      139,   141,   143,   145,   147,   149,   151,   153,   155,   157,
894      159,   161,   164,   165,   167,   169,   171,   173,   175,   177,
895      179,   180,   182,   184,   186,   188,   190,   192,   195,   196,
896      197,   200,   201,   205,   208,   209,   211,   212,   216,   218,
897      221,   223,   225,   227,   229,   231,   233,   235,   237,   239,
898      241,   243,   245,   247,   249,   251,   253,   255,   257,   259,
899      261,   264,   269,   275,   281,   285,   288,   291,   293,   297,
900      299,   303,   305,   306,   311,   315,   319,   324,   329,   333,
901      336,   339,   342,   345,   348,   351,   354,   357,   360,   363,
902      370,   376,   385,   392,   399,   406,   414,   422,   429,   436,
903      445,   454,   458,   460,   462,   464,   466,   469,   472,   477,
904      480,   482,   484,   486,   491,   494,   499,   506,   513,   520,
905      527,   531,   536,   537,   539,   541,   543,   547,   551,   555,
906      559,   563,   567,   569,   570,   572,   574,   576,   577,   580,
907      584,   586,   588,   592,   594,   595,   604,   606,   608,   612,
908      614,   616,   620,   621,   623,   625,   629,   630,   632,   634,
909      636,   638,   640,   642,   644,   646,   648,   652,   654,   660,
910      662,   664,   666,   668,   671,   674,   676,   679,   682,   683,
911      685,   687,   689,   692,   695,   699,   709,   719,   728,   743,
912      745,   747,   754,   760,   763,   770,   778,   780,   784,   786,
913      787,   790,   792,   798,   804,   810,   818,   826,   829,   834,
914      839,   846,   851,   856,   863,   870,   873,   881,   883,   886,
915      887,   889,   890,   894,   901,   905,   912,   915,   920,   927
916 };
917
918 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
919 static const short int yyrhs[] =
920 {
921      199,     0,    -1,    19,    -1,    20,    -1,    17,    -1,    18,
922       -1,    80,    -1,    81,    -1,    82,    -1,    83,    -1,    84,
923       -1,    85,    -1,    86,    -1,    87,    -1,    88,    -1,    89,
924       -1,    90,    -1,    91,    -1,    92,    -1,    93,    -1,    94,
925       -1,    95,    -1,    96,    -1,    97,    -1,    98,    -1,    99,
926       -1,   102,    -1,   103,    -1,   104,    -1,   105,    -1,   106,
927       -1,   107,    -1,   118,    -1,   119,    -1,   120,    -1,   121,
928       -1,   108,    -1,   109,    -1,   110,    -1,   111,    -1,   112,
929       -1,   113,    -1,   114,    -1,   115,    -1,   116,    -1,   117,
930       -1,   118,    -1,   119,    -1,   120,    -1,   121,    -1,    25,
931       -1,    26,    -1,   130,    -1,   131,    -1,   132,    -1,   133,
932       -1,   139,    -1,   140,    -1,   141,    -1,   142,    -1,   143,
933       -1,   144,    -1,   145,    -1,   146,    -1,   147,    -1,   148,
934       -1,   149,    -1,   150,    -1,   138,    -1,    11,    -1,     9,
935       -1,     7,    -1,     5,    -1,    12,    -1,    10,    -1,     8,
936       -1,     6,    -1,   175,    -1,   176,    -1,    13,    -1,    14,
937       -1,   208,   151,    -1,    -1,    42,    -1,    43,    -1,    44,
938       -1,    48,    -1,    45,    -1,    46,    -1,    47,    -1,    -1,
939       66,    -1,    67,    -1,    68,    -1,    69,    -1,    70,    -1,
940       71,    -1,    65,    18,    -1,    -1,    -1,    57,    18,    -1,
941       -1,   152,    57,    18,    -1,    37,    30,    -1,    -1,   184,
942       -1,    -1,   152,   187,   186,    -1,   184,    -1,    57,    18,
943       -1,   190,    -1,     3,    -1,   192,    -1,     3,    -1,   192,
944       -1,     4,    -1,     5,    -1,     6,    -1,     7,    -1,     8,
945       -1,     9,    -1,    10,    -1,    11,    -1,    12,    -1,    13,
946       -1,    14,    -1,    15,    -1,    16,    -1,   222,    -1,   191,
947       -1,   153,    18,    -1,   189,   154,   194,   155,    -1,   156,
948       18,   157,   192,   158,    -1,   159,    18,   157,   192,   160,
949       -1,   161,   193,   162,    -1,   161,   162,    -1,   192,   163,
950       -1,   192,    -1,   193,   152,   192,    -1,   193,    -1,   193,
951      152,    40,    -1,    40,    -1,    -1,   190,   156,   197,   158,
952       -1,   190,   156,   158,    -1,   190,   164,    30,    -1,   190,
953      159,   197,   160,    -1,   190,   161,   197,   162,    -1,   190,
954      161,   162,    -1,   190,    22,    -1,   190,    23,    -1,   190,
955      222,    -1,   190,   196,    -1,   190,    24,    -1,   175,   167,
956       -1,   176,    18,    -1,     4,    25,    -1,     4,    26,    -1,
957      178,    21,    -1,   174,   154,   195,    39,   190,   155,    -1,
958      127,   154,   195,   237,   155,    -1,   129,   154,   195,   152,
959      195,   152,   195,   155,    -1,   168,   154,   195,   152,   195,
960      155,    -1,   169,   154,   195,   152,   195,   155,    -1,   170,
961      154,   195,   152,   195,   155,    -1,   100,   171,   154,   195,
962      152,   195,   155,    -1,   101,   172,   154,   195,   152,   195,
963      155,    -1,   173,   154,   195,   152,   195,   155,    -1,   135,
964      154,   195,   152,   195,   155,    -1,   136,   154,   195,   152,
965      195,   152,   195,   155,    -1,   137,   154,   195,   152,   195,
966      152,   195,   155,    -1,   197,   152,   195,    -1,   195,    -1,
967       35,    -1,    36,    -1,   200,    -1,   200,   217,    -1,   200,
968      219,    -1,   200,    63,    62,   203,    -1,   200,    31,    -1,
969      202,    -1,    50,    -1,    58,    -1,   202,   179,    27,   188,
970       -1,   202,   219,    -1,   202,    63,    62,   203,    -1,   202,
971      179,   180,   198,   195,   186,    -1,   202,   179,   201,   198,
972      190,   186,    -1,   202,   179,    45,   198,   190,   186,    -1,
973      202,   179,    47,   198,   190,   186,    -1,   202,    51,   205,
974       -1,   202,    59,   151,   206,    -1,    -1,    30,    -1,    56,
975       -1,    55,    -1,    53,   151,   204,    -1,    54,   151,    18,
976       -1,    52,   151,    30,    -1,    72,   151,    30,    -1,   156,
977      207,   158,    -1,   207,   152,    30,    -1,    30,    -1,    -1,
978       28,    -1,    30,    -1,   208,    -1,    -1,   190,   209,    -1,
979      211,   152,   210,    -1,   210,    -1,   211,    -1,   211,   152,
980       40,    -1,    40,    -1,    -1,   181,   188,   208,   154,   212,
981      155,   185,   182,    -1,    32,    -1,   161,    -1,   180,   213,
982      214,    -1,    33,    -1,   162,    -1,   215,   225,   216,    -1,
983       -1,    45,    -1,    47,    -1,    34,   218,   213,    -1,    -1,
984       64,    -1,    17,    -1,    18,    -1,    21,    -1,    25,    -1,
985       26,    -1,    22,    -1,    23,    -1,    24,    -1,   159,   197,
986      160,    -1,   196,    -1,    62,   220,    30,   152,    30,    -1,
987      166,    -1,   208,    -1,   222,    -1,   221,    -1,   190,   223,
988       -1,   225,   226,    -1,   226,    -1,   227,   229,    -1,   227,
989      231,    -1,    -1,    29,    -1,    78,    -1,    77,    -1,    73,
990      224,    -1,    73,     3,    -1,    74,    15,   223,    -1,    74,
991        4,   223,   152,    15,   223,   152,    15,   223,    -1,    75,
992      177,   223,   152,    15,   223,   156,   230,   158,    -1,    75,
993      177,   223,   152,    15,   223,   156,   158,    -1,   179,    76,
994      181,   188,   223,   154,   234,   155,    39,    15,   223,   228,
995       15,   223,    -1,   228,    -1,    79,    -1,   230,   177,   221,
996      152,    15,   223,    -1,   177,   221,   152,    15,   223,    -1,
997      179,   236,    -1,   190,   156,   223,   152,   223,   158,    -1,
998      232,   152,   156,   223,   152,   223,   158,    -1,   224,    -1,
999      233,   152,   224,    -1,   233,    -1,    -1,    61,    60,    -1,
1000       60,    -1,   168,   190,   223,   152,   223,    -1,   169,   190,
1001      223,   152,   223,    -1,   170,   190,   223,   152,   223,    -1,
1002      100,   171,   190,   223,   152,   223,   155,    -1,   101,   172,
1003      190,   223,   152,   223,   155,    -1,    49,   224,    -1,   173,
1004      224,   152,   224,    -1,   174,   224,    39,   190,    -1,   129,
1005      224,   152,   224,   152,   224,    -1,   134,   224,   152,   190,
1006       -1,   135,   224,   152,   224,    -1,   136,   224,   152,   224,
1007      152,   224,    -1,   137,   224,   152,   224,   152,   224,    -1,
1008      128,   232,    -1,   235,   181,   188,   223,   154,   234,   155,
1009       -1,   239,    -1,   152,   233,    -1,    -1,    38,    -1,    -1,
1010      122,   190,   183,    -1,   122,   190,   152,    10,   223,   183,
1011       -1,   123,   190,   183,    -1,   123,   190,   152,    10,   223,
1012      183,    -1,   124,   224,    -1,   238,   125,   190,   223,    -1,
1013      238,   126,   224,   152,   190,   223,    -1,   127,   190,   223,
1014      237,    -1
1015 };
1016
1017 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
1018 static const unsigned short int yyrline[] =
1019 {
1020        0,   333,   333,   333,   334,   334,   338,   338,   338,   338,
1021      338,   338,   338,   339,   339,   339,   339,   340,   340,   340,
1022      341,   341,   341,   341,   341,   341,   342,   342,   342,   342,
1023      342,   342,   342,   342,   342,   342,   343,   343,   343,   343,
1024      343,   343,   343,   343,   343,   343,   344,   344,   344,   344,
1025      344,   344,   345,   345,   345,   345,   346,   346,   346,   346,
1026      346,   346,   346,   347,   347,   347,   347,   347,   347,   352,
1027      352,   352,   352,   353,   353,   353,   353,   354,   354,   355,
1028      355,   358,   361,   366,   366,   366,   366,   366,   366,   367,
1029      368,   371,   371,   371,   371,   371,   372,   373,   378,   383,
1030      384,   387,   388,   396,   402,   403,   406,   407,   416,   417,
1031      430,   430,   431,   431,   432,   436,   436,   436,   436,   436,
1032      436,   436,   437,   437,   437,   437,   437,   439,   443,   447,
1033      450,   455,   461,   469,   477,   483,   487,   498,   501,   509,
1034      510,   515,   518,   528,   534,   539,   545,   551,   557,   562,
1035      568,   574,   580,   586,   592,   598,   604,   610,   616,   624,
1036      638,   650,   655,   661,   666,   674,   679,   684,   692,   697,
1037      702,   712,   717,   722,   722,   732,   737,   740,   745,   749,
1038      753,   755,   755,   758,   770,   775,   780,   789,   798,   807,
1039      816,   821,   826,   831,   833,   833,   836,   841,   848,   853,
1040      860,   867,   872,   873,   881,   881,   882,   882,   884,   891,
1041      895,   899,   902,   907,   910,   912,   932,   933,   935,   944,
1042      945,   947,   955,   956,   957,   961,   974,   975,   978,   978,
1043      978,   978,   978,   978,   978,   979,   980,   985,   986,   995,
1044      995,   999,  1005,  1016,  1022,  1025,  1033,  1037,  1042,  1045,
1045     1051,  1051,  1053,  1058,  1063,  1068,  1076,  1083,  1089,  1109,
1046     1114,  1120,  1125,  1133,  1142,  1149,  1157,  1161,  1168,  1169,
1047     1173,  1178,  1181,  1187,  1192,  1200,  1205,  1210,  1215,  1223,
1048     1237,  1242,  1247,  1252,  1257,  1262,  1267,  1284,  1289,  1290,
1049     1294,  1295,  1298,  1305,  1312,  1319,  1326,  1331,  1338,  1345
1050 };
1051 #endif
1052
1053 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1054 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1055    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1056 static const char *const yytname[] =
1057 {
1058   "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1059   "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1060   "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1061   "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1062   "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1063   "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1064   "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1065   "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1066   "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1067   "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1068   "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1069   "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1070   "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1071   "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1072   "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1073   "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1074   "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1075   "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1076   "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1077   "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1078   "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1079   "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1080   "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1081   "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1082   "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1083   "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1084   "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1085   "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1086   "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1087   "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1088   "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1089   "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1090   "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1091   "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1092   "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1093   "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1094   "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1095   "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1096   "IndexList", "OptVolatile", "MemoryInst", 0
1097 };
1098 #endif
1099
1100 # ifdef YYPRINT
1101 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1102    token YYLEX-NUM.  */
1103 static const unsigned short int yytoknum[] =
1104 {
1105        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1106      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1107      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1108      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1109      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1110      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1111      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
1112      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
1113      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
1114      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
1115      355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
1116      365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
1117      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
1118      385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
1119      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
1120      405,    61,    44,    92,    40,    41,    91,   120,    93,    60,
1121       62,   123,   125,    42,    99
1122 };
1123 # endif
1124
1125 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1126 static const unsigned char yyr1[] =
1127 {
1128        0,   165,   166,   166,   167,   167,   168,   168,   168,   168,
1129      168,   168,   168,   168,   168,   168,   168,   169,   169,   169,
1130      170,   170,   170,   170,   170,   170,   171,   171,   171,   171,
1131      171,   171,   171,   171,   171,   171,   172,   172,   172,   172,
1132      172,   172,   172,   172,   172,   172,   172,   172,   172,   172,
1133      172,   172,   173,   173,   173,   173,   174,   174,   174,   174,
1134      174,   174,   174,   174,   174,   174,   174,   174,   174,   175,
1135      175,   175,   175,   176,   176,   176,   176,   177,   177,   178,
1136      178,   179,   179,   180,   180,   180,   180,   180,   180,   180,
1137      180,   181,   181,   181,   181,   181,   181,   181,   181,   182,
1138      182,   183,   183,   184,   185,   185,   186,   186,   187,   187,
1139      188,   188,   189,   189,   190,   191,   191,   191,   191,   191,
1140      191,   191,   191,   191,   191,   191,   191,   192,   192,   192,
1141      192,   192,   192,   192,   192,   192,   192,   193,   193,   194,
1142      194,   194,   194,   195,   195,   195,   195,   195,   195,   195,
1143      195,   195,   195,   195,   195,   195,   195,   195,   195,   196,
1144      196,   196,   196,   196,   196,   196,   196,   196,   196,   196,
1145      196,   197,   197,   198,   198,   199,   200,   200,   200,   200,
1146      200,   201,   201,   202,   202,   202,   202,   202,   202,   202,
1147      202,   202,   202,   203,   204,   204,   205,   205,   205,   205,
1148      206,   207,   207,   207,   208,   208,   209,   209,   210,   211,
1149      211,   212,   212,   212,   212,   213,   214,   214,   215,   216,
1150      216,   217,   218,   218,   218,   219,   220,   220,   221,   221,
1151      221,   221,   221,   221,   221,   221,   221,   221,   221,   222,
1152      222,   223,   223,   224,   225,   225,   226,   227,   227,   227,
1153      228,   228,   229,   229,   229,   229,   229,   229,   229,   229,
1154      229,   230,   230,   231,   232,   232,   233,   233,   234,   234,
1155      235,   235,   236,   236,   236,   236,   236,   236,   236,   236,
1156      236,   236,   236,   236,   236,   236,   236,   236,   237,   237,
1157      238,   238,   239,   239,   239,   239,   239,   239,   239,   239
1158 };
1159
1160 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
1161 static const unsigned char yyr2[] =
1162 {
1163        0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
1164        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1165        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1166        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1167        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1168        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1169        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1170        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1171        1,     2,     0,     1,     1,     1,     1,     1,     1,     1,
1172        0,     1,     1,     1,     1,     1,     1,     2,     0,     0,
1173        2,     0,     3,     2,     0,     1,     0,     3,     1,     2,
1174        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1175        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1176        2,     4,     5,     5,     3,     2,     2,     1,     3,     1,
1177        3,     1,     0,     4,     3,     3,     4,     4,     3,     2,
1178        2,     2,     2,     2,     2,     2,     2,     2,     2,     6,
1179        5,     8,     6,     6,     6,     7,     7,     6,     6,     8,
1180        8,     3,     1,     1,     1,     1,     2,     2,     4,     2,
1181        1,     1,     1,     4,     2,     4,     6,     6,     6,     6,
1182        3,     4,     0,     1,     1,     1,     3,     3,     3,     3,
1183        3,     3,     1,     0,     1,     1,     1,     0,     2,     3,
1184        1,     1,     3,     1,     0,     8,     1,     1,     3,     1,
1185        1,     3,     0,     1,     1,     3,     0,     1,     1,     1,
1186        1,     1,     1,     1,     1,     1,     3,     1,     5,     1,
1187        1,     1,     1,     2,     2,     1,     2,     2,     0,     1,
1188        1,     1,     2,     2,     3,     9,     9,     8,    14,     1,
1189        1,     6,     5,     2,     6,     7,     1,     3,     1,     0,
1190        2,     1,     5,     5,     5,     7,     7,     2,     4,     4,
1191        6,     4,     4,     6,     6,     2,     7,     1,     2,     0,
1192        1,     0,     3,     6,     3,     6,     2,     4,     6,     4
1193 };
1194
1195 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1196    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
1197    means the default is an error.  */
1198 static const unsigned short int yydefact[] =
1199 {
1200      192,     0,    90,   180,     1,   179,   222,    83,    84,    85,
1201       87,    88,    89,    86,     0,    98,   248,   176,   177,   204,
1202      205,     0,     0,     0,    90,     0,   184,   223,   224,    98,
1203        0,     0,    91,    92,    93,    94,    95,    96,     0,     0,
1204      249,   248,   245,    82,     0,     0,     0,     0,   190,     0,
1205        0,     0,     0,     0,   181,   182,     0,     0,    81,   225,
1206      193,   178,    97,   111,   115,   116,   117,   118,   119,   120,
1207      121,   122,   123,   124,   125,   126,   127,     2,     3,     0,
1208        0,     0,     0,   239,     0,     0,   110,   129,   114,   240,
1209      128,   216,   217,   218,   219,   220,   221,   244,     0,     0,
1210        0,   251,   250,   260,   291,   259,   246,   247,     0,     0,
1211        0,     0,   203,   191,   185,   183,   173,   174,     0,     0,
1212        0,     0,   130,     0,     0,   113,   135,   137,     0,     0,
1213      142,   136,   253,     0,   252,     0,     0,    72,    76,    71,
1214       75,    70,    74,    69,    73,    77,    78,     0,   290,     0,
1215      271,     0,    98,     6,     7,     8,     9,    10,    11,    12,
1216       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
1217       23,    24,    25,     0,     0,     0,     0,     0,     0,     0,
1218        0,    52,    53,    54,    55,     0,     0,     0,     0,    68,
1219       56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
1220       66,    67,     0,     0,     0,     0,     0,    98,   263,     0,
1221      287,   198,   195,   194,   196,   197,   199,   202,     0,   106,
1222      106,   115,   116,   117,   118,   119,   120,   121,   122,   123,
1223      124,   125,     0,     0,     0,     0,   106,   106,     0,     0,
1224        0,   134,   214,   141,   139,     0,   228,   229,   230,   233,
1225      234,   235,   231,   232,   226,     0,     0,     0,     0,     0,
1226        0,     0,     0,     0,     0,     0,     0,     0,   237,   242,
1227      241,   243,     0,   254,     0,   277,   270,     0,    26,    27,
1228       28,    29,    30,    31,    32,    33,    34,    35,     0,    50,
1229       51,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1230       45,    46,    47,    48,    49,     0,   101,   101,   296,     0,
1231        0,   285,     0,     0,     0,     0,     0,     0,     0,     0,
1232        0,     0,     0,     0,     0,     0,   200,     0,   188,   189,
1233      156,   157,     4,     5,   154,   155,   158,   149,   150,   153,
1234        0,     0,     0,     0,   152,   151,   186,   187,   112,   112,
1235      138,   213,   207,   210,   211,     0,     0,   131,   227,     0,
1236        0,     0,     0,     0,     0,     0,     0,   172,     0,     0,
1237        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1238      292,     0,   294,   289,     0,     0,     0,     0,     0,     0,
1239        0,     0,     0,     0,     0,     0,     0,     0,     0,   201,
1240        0,     0,   108,   106,   144,     0,     0,   148,     0,   145,
1241      132,   133,   206,   208,     0,   104,   140,     0,     0,     0,
1242      289,     0,     0,     0,     0,     0,   236,     0,     0,     0,
1243        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1244        0,   299,     0,     0,     0,   281,   282,     0,     0,     0,
1245        0,     0,   278,   279,     0,   297,     0,   103,   109,   107,
1246      143,   146,   147,   212,   209,   105,    99,     0,     0,     0,
1247        0,     0,     0,     0,     0,   171,     0,     0,     0,     0,
1248        0,     0,     0,   269,     0,     0,   101,   102,   101,   266,
1249      288,     0,     0,     0,     0,     0,   272,   273,   274,   269,
1250        0,     0,   215,   238,     0,     0,   160,     0,     0,     0,
1251        0,     0,     0,     0,     0,     0,     0,     0,   268,     0,
1252        0,     0,     0,   293,   295,     0,     0,     0,   280,   283,
1253      284,     0,   298,   100,     0,     0,     0,   168,     0,     0,
1254      162,   163,   164,   167,   159,     0,   257,     0,     0,     0,
1255      275,   276,   267,   264,     0,   286,   165,   166,     0,     0,
1256        0,   255,     0,   256,     0,     0,   265,   161,   169,   170,
1257        0,     0,     0,     0,     0,     0,   262,     0,     0,   261,
1258        0,   258
1259 };
1260
1261 /* YYDEFGOTO[NTERM-NUM]. */
1262 static const short int yydefgoto[] =
1263 {
1264       -1,    83,   334,   263,   264,   265,   288,   305,   266,   267,
1265      232,   233,   147,   234,    24,    15,    38,   502,   380,   402,
1266      466,   328,   403,    84,    85,   235,    87,    88,   128,   245,
1267      367,   268,   368,   118,     1,     2,    57,     3,    61,   214,
1268       48,   113,   218,    89,   413,   353,   354,   355,    39,    93,
1269       16,    96,    17,    29,    18,   359,   269,    90,   271,   489,
1270       41,    42,    43,   105,   106,   548,   107,   311,   518,   519,
1271      207,   208,   441,   209,   210
1272 };
1273
1274 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1275    STATE-NUM.  */
1276 #define YYPACT_NINF -501
1277 static const short int yypact[] =
1278 {
1279     -501,    82,     9,   975,  -501,  -501,    72,  -501,  -501,  -501,
1280     -501,  -501,  -501,  -501,    29,    34,    94,  -501,  -501,  -501,
1281     -501,   -28,   -42,    66,   127,    25,  -501,  -501,  -501,    34,
1282      122,   199,  -501,  -501,  -501,  -501,  -501,  -501,   839,   -17,
1283     -501,   -19,  -501,    47,    67,    68,    69,    75,  -501,    71,
1284      122,   839,    11,    11,  -501,  -501,    11,    11,  -501,  -501,
1285     -501,  -501,  -501,    76,  -501,  -501,  -501,  -501,  -501,  -501,
1286     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,   207,
1287      210,   211,   518,  -501,   123,    77,  -501,  -501,   -84,  -501,
1288     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,   876,     8,
1289      253,  -501,  -501,  -501,  1333,  -501,  -501,  -501,   203,    80,
1290      217,   206,   208,  -501,  -501,  -501,  -501,  -501,   922,   922,
1291      960,   922,  -501,    83,    84,  -501,  -501,   -84,  -134,    88,
1292      604,  -501,    76,  1131,  -501,  1131,  1131,  -501,  -501,  -501,
1293     -501,  -501,  -501,  -501,  -501,  -501,  -501,  1131,  -501,   922,
1294     -501,   177,    34,  -501,  -501,  -501,  -501,  -501,  -501,  -501,
1295     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,
1296     -501,  -501,  -501,   103,    81,   922,   922,   922,   922,   922,
1297      922,  -501,  -501,  -501,  -501,   922,   922,   922,   922,  -501,
1298     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,
1299     -501,  -501,   922,   922,   922,   922,   922,    34,  -501,    20,
1300     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,   -44,    91,
1301       91,   130,   143,   226,   145,   227,   161,   230,   163,   231,
1302      232,   233,   165,   234,   245,  1042,    91,    91,   922,   922,
1303      922,  -501,   679,  -501,    99,   113,  -501,  -501,  -501,  -501,
1304     -501,  -501,  -501,  -501,   205,   103,    81,   119,   120,   125,
1305      128,   129,   960,   133,   134,   135,   139,   140,  -501,  -501,
1306     -501,  -501,   124,  -501,   149,  -501,  -501,   839,  -501,  -501,
1307     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,   922,  -501,
1308     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,
1309     -501,  -501,  -501,  -501,  -501,   922,   150,   151,  -501,  1131,
1310      136,   153,   154,   155,   156,   157,   158,  1131,  1131,  1131,
1311      159,   241,   839,   922,   922,   251,  -501,   -18,  -501,  -501,
1312     -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,  -501,
1313      717,   960,   549,   265,  -501,  -501,  -501,  -501,   -69,   -50,
1314      -84,  -501,   123,  -501,   160,   142,   763,  -501,  -501,   283,
1315      164,   166,   960,   960,   960,   960,   960,  -501,  -110,   960,
1316      960,   960,   960,   960,   302,   304,  1131,  1131,  1131,     1,
1317     -501,    12,  -501,   169,  1131,   167,   922,   922,   922,   922,
1318      922,   172,   173,   176,   922,   922,  1131,  1131,   178,  -501,
1319      299,   314,  -501,    91,  -501,   -40,   -68,  -501,   -74,  -501,
1320     -501,  -501,  -501,  -501,   801,   301,  -501,   184,   960,   960,
1321      169,   187,   188,   189,   190,   960,  -501,   194,   195,   201,
1322      209,   316,  1131,  1131,   204,   212,   213,  1131,   341,  1131,
1323      922,  -501,   214,  1131,   215,  -501,  -501,   216,   220,  1131,
1324     1131,  1131,  -501,  -501,   219,  -501,   922,  -501,  -501,  -501,
1325     -501,  -501,  -501,  -501,  -501,  -501,   303,   332,   222,   228,
1326      229,   960,   960,   960,   960,  -501,   960,   960,   960,   960,
1327      922,   238,   235,   922,  1131,  1131,   240,  -501,   240,  -501,
1328      243,  1131,   244,   922,   922,   922,  -501,  -501,  -501,   922,
1329     1131,   345,  -501,  -501,   960,   960,  -501,   246,   242,   247,
1330      248,   252,   254,   255,   256,   257,   354,    26,   243,   258,
1331      259,   260,   325,  -501,  -501,   922,   225,  1131,  -501,  -501,
1332     -501,   261,  -501,  -501,   262,   269,   960,  -501,   960,   960,
1333     -501,  -501,  -501,  -501,  -501,  1131,  -501,  1220,    56,   347,
1334     -501,  -501,  -501,  -501,   250,  -501,  -501,  -501,   270,   271,
1335      272,  -501,   249,  -501,  1220,   378,  -501,  -501,  -501,  -501,
1336      391,   276,  1131,  1131,   415,   138,  -501,  1131,   416,  -501,
1337     1131,  -501
1338 };
1339
1340 /* YYPGOTO[NTERM-NUM].  */
1341 static const short int yypgoto[] =
1342 {
1343     -501,  -501,  -501,   328,   329,   330,   181,   185,   333,   336,
1344      -98,   -97,  -500,  -501,   400,   420,  -136,  -501,  -300,    31,
1345     -501,  -216,  -501,   -45,  -501,   -38,  -501,   -81,   317,  -501,
1346      126,   218,  -208,    74,  -501,  -501,  -501,  -501,   398,  -501,
1347     -501,  -501,  -501,     2,  -501,    35,  -501,  -501,   423,  -501,
1348     -501,  -501,  -501,  -501,   451,  -501,  -471,  -106,   -62,   -90,
1349     -501,   417,  -501,  -116,  -501,  -501,  -501,  -501,    22,   -39,
1350     -501,  -501,    43,  -501,  -501
1351 };
1352
1353 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1354    positive, shift that token.  If negative, reduce the rule which
1355    number is the opposite.  If zero, do what YYDEFACT says.
1356    If YYTABLE_NINF, syntax error.  */
1357 #define YYTABLE_NINF -176
1358 static const short int yytable[] =
1359 {
1360       86,   127,   145,   146,   329,    25,   115,   382,   134,  -175,
1361       40,   437,   135,    86,    94,    91,   277,   547,   240,   400,
1362      346,   347,   439,   136,    44,    45,    46,   270,   241,   270,
1363      270,   137,   138,   139,   140,   141,   142,   143,   144,   401,
1364        5,   270,   425,     6,    47,    25,   116,   117,   564,   127,
1365      426,     7,     8,     9,    10,    11,    12,    13,   438,   275,
1366      133,   137,   138,   139,   140,   141,   142,   143,   144,   438,
1367     -112,   322,    14,   272,   273,    19,   562,    20,   425,   131,
1368      219,   220,     4,   237,   425,   274,   129,   308,   462,   410,
1369      312,    30,   461,   571,   131,   313,   314,   315,   316,    31,
1370       32,    33,    34,    35,    36,    37,   289,   290,   325,    49,
1371      411,   133,   425,   131,   326,   320,   321,    27,   460,    28,
1372       98,    99,   100,    40,   101,   102,   103,   119,    50,   345,
1373      120,   121,   405,   406,   408,   212,   213,   306,   307,   133,
1374      309,   310,   133,    95,    92,   323,   324,   133,   133,   133,
1375      133,    19,    60,    20,    51,   330,   331,   348,   349,   350,
1376      -72,   -72,   -71,   -71,   317,   318,   319,   133,   133,     7,
1377        8,     9,    52,    11,    53,    13,    58,    54,   -70,   -70,
1378      -69,   -69,   332,   333,   546,    55,   523,   459,   524,   291,
1379      292,   293,   294,   295,   296,   297,   298,   299,   300,   301,
1380      302,   303,   304,   270,   352,   278,   279,   280,   281,   282,
1381      283,   270,   270,   270,   563,   101,   102,    62,   108,   109,
1382      110,   284,   285,   286,   287,   122,   111,   112,   123,   124,
1383     -113,   130,   376,   211,   398,   215,   216,   276,   217,    86,
1384      238,   239,   242,   327,   -76,   -75,   236,   383,   -74,   -73,
1385      377,   356,   335,   -79,   -80,   391,   392,   393,   137,   138,
1386      139,   140,   141,   142,   143,   144,   336,   378,   357,   358,
1387      270,   270,   270,   362,   363,   350,   374,   396,   270,   364,
1388      395,   399,   365,   366,    86,   397,   133,   369,   370,   371,
1389      270,   270,   384,   372,   373,   409,   444,   415,   446,   447,
1390      448,   375,   379,   381,   452,   385,   386,   387,   388,   389,
1391      390,   394,   414,   417,   434,   435,   436,   432,   418,   433,
1392      419,   440,   442,   443,   449,   450,   270,   270,   451,   457,
1393      456,   270,   458,   270,   454,   455,   467,   270,   400,   471,
1394      472,   473,   474,   270,   270,   270,   476,   477,   133,   445,
1395      133,   133,   133,   478,   412,   480,   133,   453,   483,   487,
1396      501,   479,   503,   533,   484,   485,   491,   493,   494,   545,
1397      481,   482,   495,   499,   504,   486,   352,   488,   270,   270,
1398      505,   492,   438,   553,   506,   270,   565,   496,   497,   498,
1399      516,   517,   522,   572,   270,   525,   527,   537,   536,   538,
1400      539,   570,   133,   528,   529,   530,   573,   540,   566,   541,
1401      542,   543,   544,   549,   550,   551,   555,   556,   500,   145,
1402      146,   270,   520,   521,   557,   567,   568,   569,   574,   526,
1403      577,   580,   202,   203,   204,   552,   360,   205,   532,   270,
1404      206,   361,   515,   104,    56,   133,   465,   244,   114,   464,
1405      145,   146,    59,   344,    26,   133,   133,   133,    97,   578,
1406      531,   133,   490,   470,     0,   554,   270,   270,     0,     0,
1407        0,   270,     0,     0,   270,     0,     0,     0,     0,     0,
1408        0,     0,     0,   561,     0,     0,     0,   133,   420,   421,
1409      422,   423,   424,     0,     0,   427,   428,   429,   430,   431,
1410        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1411      575,   576,     0,     0,     0,   579,     0,     0,   581,     0,
1412        0,   125,    64,    65,    66,    67,    68,    69,    70,    71,
1413       72,    73,    74,    75,    76,     0,     0,    77,    78,     0,
1414        0,     0,     0,     0,   468,   469,    19,     0,    20,     0,
1415        0,   475,   125,   221,   222,   223,   224,   225,   226,   227,
1416      228,   229,   230,   231,    75,    76,     0,     0,    77,    78,
1417        0,     0,     0,     0,     0,     0,     0,    19,     0,    20,
1418        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1419        0,     0,     0,     0,     0,     0,     0,   507,   508,   509,
1420      510,     0,   511,   512,   513,   514,     0,   125,    64,    65,
1421       66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
1422       76,     0,     0,    77,    78,     0,     0,     0,     0,     0,
1423      534,   535,    19,     0,    20,     0,     0,     0,     0,     0,
1424        0,     0,     0,     0,   243,     0,     0,     0,     0,     0,
1425        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1426        0,     0,   558,     0,   559,   560,     0,     0,     0,     0,
1427        0,    79,     0,     0,    80,     0,     0,    81,     0,    82,
1428      126,     0,   125,    64,    65,    66,    67,    68,    69,    70,
1429       71,    72,    73,    74,    75,    76,     0,     0,    77,    78,
1430        0,     0,    79,     0,     0,    80,     0,    19,    81,    20,
1431       82,   407,     0,     0,     0,     0,     0,     0,     0,   351,
1432      125,   221,   222,   223,   224,   225,   226,   227,   228,   229,
1433      230,   231,    75,    76,     0,     0,    77,    78,     0,     0,
1434        0,     0,     0,     0,     0,    19,     0,    20,     0,     0,
1435        0,     0,     0,     0,     0,     0,     0,    79,     0,     0,
1436       80,     0,     0,    81,     0,    82,   125,    64,    65,    66,
1437       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
1438        0,     0,    77,    78,     0,     0,     0,     0,     0,     0,
1439        0,    19,     0,    20,     0,     0,     0,     0,     0,     0,
1440        0,     0,     0,   416,   125,    64,    65,    66,    67,    68,
1441       69,    70,    71,    72,    73,    74,    75,    76,     0,     0,
1442       77,    78,     0,     0,     0,     0,     0,     0,     0,    19,
1443        0,    20,    79,     0,     0,    80,     0,     0,    81,     0,
1444       82,   463,    63,    64,    65,    66,    67,    68,    69,    70,
1445       71,    72,    73,    74,    75,    76,     0,     0,    77,    78,
1446        0,     0,     0,     0,     0,     0,     0,    19,     0,    20,
1447       79,     0,     0,    80,     0,   404,    81,     0,    82,   132,
1448       64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
1449       74,    75,    76,     0,     0,    77,    78,     0,     0,     0,
1450        0,     0,     0,     0,    19,     0,    20,     0,     0,     0,
1451        0,     0,     0,     0,     0,     0,    79,     0,     0,    80,
1452        0,     0,    81,     0,    82,   125,    64,    65,    66,    67,
1453       68,    69,    70,    71,    72,    73,    74,    75,    76,     0,
1454        0,    77,    78,     0,     0,     0,     0,     0,     0,     0,
1455       19,     0,    20,     0,    79,     0,     0,    80,     0,     0,
1456       81,     0,    82,   125,   221,   222,   223,   224,   225,   226,
1457      227,   228,   229,   230,   231,    75,    76,     0,     0,    77,
1458       78,     0,     0,     0,     0,     0,     0,     0,    19,     0,
1459       20,     0,    79,     0,     0,    80,     0,     0,    81,     0,
1460       82,     0,   -82,    19,     0,    20,     0,     0,     0,     6,
1461      -82,   -82,     0,     0,     0,     0,     0,   -82,   -82,   -82,
1462      -82,   -82,   -82,   -82,     0,   -82,    21,     0,     0,    79,
1463        0,     0,    80,   -82,    22,    81,     0,    82,    23,     0,
1464        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1465        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1466        0,    77,    78,     0,   337,   338,   339,     0,     0,     0,
1467       19,     0,    20,     0,     0,    79,     0,     0,    80,     0,
1468        0,    81,     0,    82,     0,     0,     0,     0,     0,     0,
1469        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1470        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1471        0,     0,     0,    79,     0,     0,    80,     0,     0,    81,
1472        0,    82,   153,   154,   155,   156,   157,   158,   159,   160,
1473      161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
1474      171,   172,   255,   256,     0,     0,     0,     0,   246,   247,
1475       77,    78,   248,   249,   250,   251,   252,   253,     0,    19,
1476        0,    20,     0,     0,     0,     0,     0,     0,     0,   257,
1477        0,   258,   181,   182,   183,   184,     0,   259,   260,   261,
1478      189,   190,   191,   192,   193,   194,   195,   196,   197,   198,
1479      199,   200,   201,   254,     0,     0,     0,     0,   340,     0,
1480        0,   341,     0,   342,     0,     0,   343,     0,     0,     0,
1481        0,   153,   154,   155,   156,   157,   158,   159,   160,   161,
1482      162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
1483      172,   255,   256,     0,     0,     0,     0,   246,   247,     0,
1484        0,   248,   249,   250,   251,   252,   253,     0,     0,     0,
1485        0,     0,     0,     0,     0,     0,     0,     0,   257,     0,
1486      258,   181,   182,   183,   184,     0,   259,   260,   261,   189,
1487      190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
1488      200,   201,   254,     0,     0,     0,     0,     0,     0,     0,
1489      262,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1490      153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
1491      163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
1492      255,   256,     0,     0,     0,     0,     0,     0,     0,     0,
1493        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1494        0,     0,     0,     0,     0,     0,     0,   257,     0,   258,
1495      181,   182,   183,   184,     0,   259,   260,   261,   189,   190,
1496      191,   192,   193,   194,   195,   196,   197,   198,   199,   200,
1497      201,   148,     0,     0,     0,     0,     0,     0,     0,   262,
1498        0,     0,   149,     0,     0,     0,     0,     0,     0,     0,
1499        0,     0,     0,   150,   151,     0,     0,     0,     0,     0,
1500        0,     0,     0,     0,     0,     0,     0,     0,     0,   152,
1501        0,     0,     0,   153,   154,   155,   156,   157,   158,   159,
1502      160,   161,   162,   163,   164,   165,   166,   167,   168,   169,
1503      170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
1504        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1505        0,     0,     0,     0,     0,   175,   176,   177,     0,     0,
1506      178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
1507      188,   189,   190,   191,   192,   193,   194,   195,   196,   197,
1508      198,   199,   200,   201
1509 };
1510
1511 static const short int yycheck[] =
1512 {
1513       38,    82,   100,   100,   220,     3,    51,   307,    98,     0,
1514       29,    10,     4,    51,    33,    32,   152,   517,   152,    37,
1515      236,   237,    10,    15,    52,    53,    54,   133,   162,   135,
1516      136,     5,     6,     7,     8,     9,    10,    11,    12,    57,
1517       31,   147,   152,    34,    72,    43,    35,    36,   548,   130,
1518      160,    42,    43,    44,    45,    46,    47,    48,    57,   149,
1519       98,     5,     6,     7,     8,     9,    10,    11,    12,    57,
1520      154,   207,    63,   135,   136,    28,   547,    30,   152,   163,
1521      118,   119,     0,   121,   152,   147,    84,   177,   162,   158,
1522      180,    62,   160,   564,   163,   185,   186,   187,   188,    65,
1523       66,    67,    68,    69,    70,    71,    25,    26,   152,   151,
1524      160,   149,   152,   163,   158,   205,   206,    45,   158,    47,
1525       73,    74,    75,    29,    77,    78,    79,    53,    62,   235,
1526       56,    57,   340,   341,   342,    55,    56,   175,   176,   177,
1527      178,   179,   180,   162,   161,   125,   126,   185,   186,   187,
1528      188,    28,    30,    30,    27,    25,    26,   238,   239,   240,
1529       17,    18,    17,    18,   202,   203,   204,   205,   206,    42,
1530       43,    44,    45,    46,    47,    48,   151,    50,    17,    18,
1531       17,    18,    17,    18,   158,    58,   486,   403,   488,   108,
1532      109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
1533      119,   120,   121,   309,   242,   102,   103,   104,   105,   106,
1534      107,   317,   318,   319,   158,    77,    78,    18,   151,   151,
1535      151,   118,   119,   120,   121,    18,   151,   156,    18,    18,
1536      154,   154,   277,    30,   324,    18,    30,    60,    30,   277,
1537      157,   157,   154,   152,    18,    18,   120,   309,    18,    18,
1538      288,   152,    18,    21,    21,   317,   318,   319,     5,     6,
1539        7,     8,     9,    10,    11,    12,    21,   305,   155,    64,
1540      376,   377,   378,   154,   154,   356,   152,   322,   384,   154,
1541       39,    30,   154,   154,   322,   323,   324,   154,   154,   154,
1542      396,   397,   156,   154,   154,    30,   386,   155,   388,   389,
1543      390,   152,   152,   152,   394,   152,   152,   152,   152,   152,
1544      152,   152,   152,    30,   376,   377,   378,    15,   154,    15,
1545      154,   152,   384,   156,   152,   152,   432,   433,   152,    30,
1546      152,   437,    18,   439,   396,   397,   152,   443,    37,   152,
1547      152,   152,   152,   449,   450,   451,   152,   152,   386,   387,
1548      388,   389,   390,   152,   352,    39,   394,   395,   154,    18,
1549       57,   152,    30,    18,   152,   152,   152,   152,   152,    15,
1550      432,   433,   152,   154,   152,   437,   414,   439,   484,   485,
1551      152,   443,    57,   158,   155,   491,    39,   449,   450,   451,
1552      152,   156,   152,    15,   500,   152,   152,   155,   152,   152,
1553      152,   152,   440,   493,   494,   495,    15,   155,   158,   155,
1554      155,   155,   155,   155,   155,   155,   155,   155,   456,   517,
1555      517,   527,   484,   485,   155,   155,   155,   155,   152,   491,
1556       15,    15,   104,   104,   104,   525,   255,   104,   500,   545,
1557      104,   256,   480,    43,    24,   483,   415,   130,    50,   414,
1558      548,   548,    29,   235,     3,   493,   494,   495,    41,   575,
1559      499,   499,   440,   420,    -1,   527,   572,   573,    -1,    -1,
1560       -1,   577,    -1,    -1,   580,    -1,    -1,    -1,    -1,    -1,
1561       -1,    -1,    -1,   545,    -1,    -1,    -1,   525,   362,   363,
1562      364,   365,   366,    -1,    -1,   369,   370,   371,   372,   373,
1563       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1564      572,   573,    -1,    -1,    -1,   577,    -1,    -1,   580,    -1,
1565       -1,     3,     4,     5,     6,     7,     8,     9,    10,    11,
1566       12,    13,    14,    15,    16,    -1,    -1,    19,    20,    -1,
1567       -1,    -1,    -1,    -1,   418,   419,    28,    -1,    30,    -1,
1568       -1,   425,     3,     4,     5,     6,     7,     8,     9,    10,
1569       11,    12,    13,    14,    15,    16,    -1,    -1,    19,    20,
1570       -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,    -1,    30,
1571       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1572       -1,    -1,    -1,    -1,    -1,    -1,    -1,   471,   472,   473,
1573      474,    -1,   476,   477,   478,   479,    -1,     3,     4,     5,
1574        6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
1575       16,    -1,    -1,    19,    20,    -1,    -1,    -1,    -1,    -1,
1576      504,   505,    28,    -1,    30,    -1,    -1,    -1,    -1,    -1,
1577       -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,    -1,    -1,
1578       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1579       -1,    -1,   536,    -1,   538,   539,    -1,    -1,    -1,    -1,
1580       -1,   153,    -1,    -1,   156,    -1,    -1,   159,    -1,   161,
1581      162,    -1,     3,     4,     5,     6,     7,     8,     9,    10,
1582       11,    12,    13,    14,    15,    16,    -1,    -1,    19,    20,
1583       -1,    -1,   153,    -1,    -1,   156,    -1,    28,   159,    30,
1584      161,   162,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
1585        3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
1586       13,    14,    15,    16,    -1,    -1,    19,    20,    -1,    -1,
1587       -1,    -1,    -1,    -1,    -1,    28,    -1,    30,    -1,    -1,
1588       -1,    -1,    -1,    -1,    -1,    -1,    -1,   153,    -1,    -1,
1589      156,    -1,    -1,   159,    -1,   161,     3,     4,     5,     6,
1590        7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
1591       -1,    -1,    19,    20,    -1,    -1,    -1,    -1,    -1,    -1,
1592       -1,    28,    -1,    30,    -1,    -1,    -1,    -1,    -1,    -1,
1593       -1,    -1,    -1,    40,     3,     4,     5,     6,     7,     8,
1594        9,    10,    11,    12,    13,    14,    15,    16,    -1,    -1,
1595       19,    20,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,
1596       -1,    30,   153,    -1,    -1,   156,    -1,    -1,   159,    -1,
1597      161,    40,     3,     4,     5,     6,     7,     8,     9,    10,
1598       11,    12,    13,    14,    15,    16,    -1,    -1,    19,    20,
1599       -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,    -1,    30,
1600      153,    -1,    -1,   156,    -1,   158,   159,    -1,   161,     3,
1601        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
1602       14,    15,    16,    -1,    -1,    19,    20,    -1,    -1,    -1,
1603       -1,    -1,    -1,    -1,    28,    -1,    30,    -1,    -1,    -1,
1604       -1,    -1,    -1,    -1,    -1,    -1,   153,    -1,    -1,   156,
1605       -1,    -1,   159,    -1,   161,     3,     4,     5,     6,     7,
1606        8,     9,    10,    11,    12,    13,    14,    15,    16,    -1,
1607       -1,    19,    20,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1608       28,    -1,    30,    -1,   153,    -1,    -1,   156,    -1,    -1,
1609      159,    -1,   161,     3,     4,     5,     6,     7,     8,     9,
1610       10,    11,    12,    13,    14,    15,    16,    -1,    -1,    19,
1611       20,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    28,    -1,
1612       30,    -1,   153,    -1,    -1,   156,    -1,    -1,   159,    -1,
1613      161,    -1,    27,    28,    -1,    30,    -1,    -1,    -1,    34,
1614       35,    36,    -1,    -1,    -1,    -1,    -1,    42,    43,    44,
1615       45,    46,    47,    48,    -1,    50,    51,    -1,    -1,   153,
1616       -1,    -1,   156,    58,    59,   159,    -1,   161,    63,    -1,
1617       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1618       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1619       -1,    19,    20,    -1,    22,    23,    24,    -1,    -1,    -1,
1620       28,    -1,    30,    -1,    -1,   153,    -1,    -1,   156,    -1,
1621       -1,   159,    -1,   161,    -1,    -1,    -1,    -1,    -1,    -1,
1622       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1623       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1624       -1,    -1,    -1,   153,    -1,    -1,   156,    -1,    -1,   159,
1625       -1,   161,    80,    81,    82,    83,    84,    85,    86,    87,
1626       88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
1627       98,    99,   100,   101,    -1,    -1,    -1,    -1,    17,    18,
1628       19,    20,    21,    22,    23,    24,    25,    26,    -1,    28,
1629       -1,    30,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,
1630       -1,   129,   130,   131,   132,   133,    -1,   135,   136,   137,
1631      138,   139,   140,   141,   142,   143,   144,   145,   146,   147,
1632      148,   149,   150,    62,    -1,    -1,    -1,    -1,   156,    -1,
1633       -1,   159,    -1,   161,    -1,    -1,   164,    -1,    -1,    -1,
1634       -1,    80,    81,    82,    83,    84,    85,    86,    87,    88,
1635       89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
1636       99,   100,   101,    -1,    -1,    -1,    -1,    17,    18,    -1,
1637       -1,    21,    22,    23,    24,    25,    26,    -1,    -1,    -1,
1638       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,    -1,
1639      129,   130,   131,   132,   133,    -1,   135,   136,   137,   138,
1640      139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
1641      149,   150,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1642      159,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1643       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
1644       90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
1645      100,   101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1646       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1647       -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,    -1,   129,
1648      130,   131,   132,   133,    -1,   135,   136,   137,   138,   139,
1649      140,   141,   142,   143,   144,   145,   146,   147,   148,   149,
1650      150,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   159,
1651       -1,    -1,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1652       -1,    -1,    -1,    60,    61,    -1,    -1,    -1,    -1,    -1,
1653       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    76,
1654       -1,    -1,    -1,    80,    81,    82,    83,    84,    85,    86,
1655       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
1656       97,    98,    99,   100,   101,    -1,    -1,    -1,    -1,    -1,
1657       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1658       -1,    -1,    -1,    -1,    -1,   122,   123,   124,    -1,    -1,
1659      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
1660      137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
1661      147,   148,   149,   150
1662 };
1663
1664 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1665    symbol of state STATE-NUM.  */
1666 static const unsigned char yystos[] =
1667 {
1668        0,   199,   200,   202,     0,    31,    34,    42,    43,    44,
1669       45,    46,    47,    48,    63,   180,   215,   217,   219,    28,
1670       30,    51,    59,    63,   179,   208,   219,    45,    47,   218,
1671       62,    65,    66,    67,    68,    69,    70,    71,   181,   213,
1672       29,   225,   226,   227,    52,    53,    54,    72,   205,   151,
1673       62,    27,    45,    47,    50,    58,   180,   201,   151,   213,
1674       30,   203,    18,     3,     4,     5,     6,     7,     8,     9,
1675       10,    11,    12,    13,    14,    15,    16,    19,    20,   153,
1676      156,   159,   161,   166,   188,   189,   190,   191,   192,   208,
1677      222,    32,   161,   214,    33,   162,   216,   226,    73,    74,
1678       75,    77,    78,    79,   179,   228,   229,   231,   151,   151,
1679      151,   151,   156,   206,   203,   188,    35,    36,   198,   198,
1680      198,   198,    18,    18,    18,     3,   162,   192,   193,   208,
1681      154,   163,     3,   190,   224,     4,    15,     5,     6,     7,
1682        8,     9,    10,    11,    12,   175,   176,   177,    38,    49,
1683       60,    61,    76,    80,    81,    82,    83,    84,    85,    86,
1684       87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
1685       97,    98,    99,   100,   101,   122,   123,   124,   127,   128,
1686      129,   130,   131,   132,   133,   134,   135,   136,   137,   138,
1687      139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
1688      149,   150,   168,   169,   170,   173,   174,   235,   236,   238,
1689      239,    30,    55,    56,   204,    18,    30,    30,   207,   190,
1690      190,     4,     5,     6,     7,     8,     9,    10,    11,    12,
1691       13,    14,   175,   176,   178,   190,   195,   190,   157,   157,
1692      152,   162,   154,    40,   193,   194,    17,    18,    21,    22,
1693       23,    24,    25,    26,    62,   100,   101,   127,   129,   135,
1694      136,   137,   159,   168,   169,   170,   173,   174,   196,   221,
1695      222,   223,   223,   223,   223,   224,    60,   181,   102,   103,
1696      104,   105,   106,   107,   118,   119,   120,   121,   171,    25,
1697       26,   108,   109,   110,   111,   112,   113,   114,   115,   116,
1698      117,   118,   119,   120,   121,   172,   190,   190,   224,   190,
1699      190,   232,   224,   224,   224,   224,   224,   190,   190,   190,
1700      224,   224,   181,   125,   126,   152,   158,   152,   186,   186,
1701       25,    26,    17,    18,   167,    18,    21,    22,    23,    24,
1702      156,   159,   161,   164,   196,   222,   186,   186,   192,   192,
1703      192,    40,   190,   210,   211,   212,   152,   155,    64,   220,
1704      171,   172,   154,   154,   154,   154,   154,   195,   197,   154,
1705      154,   154,   154,   154,   152,   152,   188,   190,   190,   152,
1706      183,   152,   183,   223,   156,   152,   152,   152,   152,   152,
1707      152,   223,   223,   223,   152,    39,   188,   190,   224,    30,
1708       37,    57,   184,   187,   158,   197,   197,   162,   197,    30,
1709      158,   160,   208,   209,   152,   155,    40,    30,   154,   154,
1710      195,   195,   195,   195,   195,   152,   160,   195,   195,   195,
1711      195,   195,    15,    15,   223,   223,   223,    10,    57,    10,
1712      152,   237,   223,   156,   224,   190,   224,   224,   224,   152,
1713      152,   152,   224,   190,   223,   223,   152,    30,    18,   186,
1714      158,   160,   162,    40,   210,   184,   185,   152,   195,   195,
1715      237,   152,   152,   152,   152,   195,   152,   152,   152,   152,
1716       39,   223,   223,   154,   152,   152,   223,    18,   223,   224,
1717      233,   152,   223,   152,   152,   152,   223,   223,   223,   154,
1718      190,    57,   182,    30,   152,   152,   155,   195,   195,   195,
1719      195,   195,   195,   195,   195,   190,   152,   156,   233,   234,
1720      223,   223,   152,   183,   183,   152,   223,   152,   224,   224,
1721      224,   234,   223,    18,   195,   195,   152,   155,   152,   152,
1722      155,   155,   155,   155,   155,    15,   158,   177,   230,   155,
1723      155,   155,   224,   158,   223,   155,   155,   155,   195,   195,
1724      195,   223,   221,   158,   177,    39,   158,   155,   155,   155,
1725      152,   221,    15,    15,   152,   223,   223,    15,   228,   223,
1726       15,   223
1727 };
1728
1729 #define yyerrok         (yyerrstatus = 0)
1730 #define yyclearin       (yychar = YYEMPTY)
1731 #define YYEMPTY         (-2)
1732 #define YYEOF           0
1733
1734 #define YYACCEPT        goto yyacceptlab
1735 #define YYABORT         goto yyabortlab
1736 #define YYERROR         goto yyerrorlab
1737
1738
1739 /* Like YYERROR except do call yyerror.  This remains here temporarily
1740    to ease the transition to the new meaning of YYERROR, for GCC.
1741    Once GCC version 2 has supplanted version 1, this can go.  */
1742
1743 #define YYFAIL          goto yyerrlab
1744
1745 #define YYRECOVERING()  (!!yyerrstatus)
1746
1747 #define YYBACKUP(Token, Value)                                  \
1748 do                                                              \
1749   if (yychar == YYEMPTY && yylen == 1)                          \
1750     {                                                           \
1751       yychar = (Token);                                         \
1752       yylval = (Value);                                         \
1753       yytoken = YYTRANSLATE (yychar);                           \
1754       YYPOPSTACK;                                               \
1755       goto yybackup;                                            \
1756     }                                                           \
1757   else                                                          \
1758     {                                                           \
1759       yyerror (YY_("syntax error: cannot back up")); \
1760       YYERROR;                                                  \
1761     }                                                           \
1762 while (0)
1763
1764
1765 #define YYTERROR        1
1766 #define YYERRCODE       256
1767
1768
1769 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1770    If N is 0, then set CURRENT to the empty location which ends
1771    the previous symbol: RHS[0] (always defined).  */
1772
1773 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1774 #ifndef YYLLOC_DEFAULT
1775 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1776     do                                                                  \
1777       if (N)                                                            \
1778         {                                                               \
1779           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1780           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1781           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1782           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1783         }                                                               \
1784       else                                                              \
1785         {                                                               \
1786           (Current).first_line   = (Current).last_line   =              \
1787             YYRHSLOC (Rhs, 0).last_line;                                \
1788           (Current).first_column = (Current).last_column =              \
1789             YYRHSLOC (Rhs, 0).last_column;                              \
1790         }                                                               \
1791     while (0)
1792 #endif
1793
1794
1795 /* YY_LOCATION_PRINT -- Print the location on the stream.
1796    This macro was not mandated originally: define only if we know
1797    we won't break user code: when these are the locations we know.  */
1798
1799 #ifndef YY_LOCATION_PRINT
1800 # if YYLTYPE_IS_TRIVIAL
1801 #  define YY_LOCATION_PRINT(File, Loc)                  \
1802      fprintf (File, "%d.%d-%d.%d",                      \
1803               (Loc).first_line, (Loc).first_column,     \
1804               (Loc).last_line,  (Loc).last_column)
1805 # else
1806 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1807 # endif
1808 #endif
1809
1810
1811 /* YYLEX -- calling `yylex' with the right arguments.  */
1812
1813 #ifdef YYLEX_PARAM
1814 # define YYLEX yylex (YYLEX_PARAM)
1815 #else
1816 # define YYLEX yylex ()
1817 #endif
1818
1819 /* Enable debugging if requested.  */
1820 #if YYDEBUG
1821
1822 # ifndef YYFPRINTF
1823 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1824 #  define YYFPRINTF fprintf
1825 # endif
1826
1827 # define YYDPRINTF(Args)                        \
1828 do {                                            \
1829   if (yydebug)                                  \
1830     YYFPRINTF Args;                             \
1831 } while (0)
1832
1833 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)          \
1834 do {                                                            \
1835   if (yydebug)                                                  \
1836     {                                                           \
1837       YYFPRINTF (stderr, "%s ", Title);                         \
1838       yysymprint (stderr,                                       \
1839                   Type, Value); \
1840       YYFPRINTF (stderr, "\n");                                 \
1841     }                                                           \
1842 } while (0)
1843
1844 /*------------------------------------------------------------------.
1845 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1846 | TOP (included).                                                   |
1847 `------------------------------------------------------------------*/
1848
1849 #if defined (__STDC__) || defined (__cplusplus)
1850 static void
1851 yy_stack_print (short int *bottom, short int *top)
1852 #else
1853 static void
1854 yy_stack_print (bottom, top)
1855     short int *bottom;
1856     short int *top;
1857 #endif
1858 {
1859   YYFPRINTF (stderr, "Stack now");
1860   for (/* Nothing. */; bottom <= top; ++bottom)
1861     YYFPRINTF (stderr, " %d", *bottom);
1862   YYFPRINTF (stderr, "\n");
1863 }
1864
1865 # define YY_STACK_PRINT(Bottom, Top)                            \
1866 do {                                                            \
1867   if (yydebug)                                                  \
1868     yy_stack_print ((Bottom), (Top));                           \
1869 } while (0)
1870
1871
1872 /*------------------------------------------------.
1873 | Report that the YYRULE is going to be reduced.  |
1874 `------------------------------------------------*/
1875
1876 #if defined (__STDC__) || defined (__cplusplus)
1877 static void
1878 yy_reduce_print (int yyrule)
1879 #else
1880 static void
1881 yy_reduce_print (yyrule)
1882     int yyrule;
1883 #endif
1884 {
1885   int yyi;
1886   unsigned long int yylno = yyrline[yyrule];
1887   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1888              yyrule - 1, yylno);
1889   /* Print the symbols being reduced, and their result.  */
1890   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1891     YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1892   YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1893 }
1894
1895 # define YY_REDUCE_PRINT(Rule)          \
1896 do {                                    \
1897   if (yydebug)                          \
1898     yy_reduce_print (Rule);             \
1899 } while (0)
1900
1901 /* Nonzero means print parse trace.  It is left uninitialized so that
1902    multiple parsers can coexist.  */
1903 int yydebug;
1904 #else /* !YYDEBUG */
1905 # define YYDPRINTF(Args)
1906 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1907 # define YY_STACK_PRINT(Bottom, Top)
1908 # define YY_REDUCE_PRINT(Rule)
1909 #endif /* !YYDEBUG */
1910
1911
1912 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1913 #ifndef YYINITDEPTH
1914 # define YYINITDEPTH 200
1915 #endif
1916
1917 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1918    if the built-in stack extension method is used).
1919
1920    Do not make this value too large; the results are undefined if
1921    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1922    evaluated with infinite-precision integer arithmetic.  */
1923
1924 #ifndef YYMAXDEPTH
1925 # define YYMAXDEPTH 10000
1926 #endif
1927
1928 \f
1929
1930 #if YYERROR_VERBOSE
1931
1932 # ifndef yystrlen
1933 #  if defined (__GLIBC__) && defined (_STRING_H)
1934 #   define yystrlen strlen
1935 #  else
1936 /* Return the length of YYSTR.  */
1937 static YYSIZE_T
1938 #   if defined (__STDC__) || defined (__cplusplus)
1939 yystrlen (const char *yystr)
1940 #   else
1941 yystrlen (yystr)
1942      const char *yystr;
1943 #   endif
1944 {
1945   const char *yys = yystr;
1946
1947   while (*yys++ != '\0')
1948     continue;
1949
1950   return yys - yystr - 1;
1951 }
1952 #  endif
1953 # endif
1954
1955 # ifndef yystpcpy
1956 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1957 #   define yystpcpy stpcpy
1958 #  else
1959 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1960    YYDEST.  */
1961 static char *
1962 #   if defined (__STDC__) || defined (__cplusplus)
1963 yystpcpy (char *yydest, const char *yysrc)
1964 #   else
1965 yystpcpy (yydest, yysrc)
1966      char *yydest;
1967      const char *yysrc;
1968 #   endif
1969 {
1970   char *yyd = yydest;
1971   const char *yys = yysrc;
1972
1973   while ((*yyd++ = *yys++) != '\0')
1974     continue;
1975
1976   return yyd - 1;
1977 }
1978 #  endif
1979 # endif
1980
1981 # ifndef yytnamerr
1982 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1983    quotes and backslashes, so that it's suitable for yyerror.  The
1984    heuristic is that double-quoting is unnecessary unless the string
1985    contains an apostrophe, a comma, or backslash (other than
1986    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1987    null, do not copy; instead, return the length of what the result
1988    would have been.  */
1989 static YYSIZE_T
1990 yytnamerr (char *yyres, const char *yystr)
1991 {
1992   if (*yystr == '"')
1993     {
1994       size_t yyn = 0;
1995       char const *yyp = yystr;
1996
1997       for (;;)
1998         switch (*++yyp)
1999           {
2000           case '\'':
2001           case ',':
2002             goto do_not_strip_quotes;
2003
2004           case '\\':
2005             if (*++yyp != '\\')
2006               goto do_not_strip_quotes;
2007             /* Fall through.  */
2008           default:
2009             if (yyres)
2010               yyres[yyn] = *yyp;
2011             yyn++;
2012             break;
2013
2014           case '"':
2015             if (yyres)
2016               yyres[yyn] = '\0';
2017             return yyn;
2018           }
2019     do_not_strip_quotes: ;
2020     }
2021
2022   if (! yyres)
2023     return yystrlen (yystr);
2024
2025   return yystpcpy (yyres, yystr) - yyres;
2026 }
2027 # endif
2028
2029 #endif /* YYERROR_VERBOSE */
2030
2031 \f
2032
2033 #if YYDEBUG
2034 /*--------------------------------.
2035 | Print this symbol on YYOUTPUT.  |
2036 `--------------------------------*/
2037
2038 #if defined (__STDC__) || defined (__cplusplus)
2039 static void
2040 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2041 #else
2042 static void
2043 yysymprint (yyoutput, yytype, yyvaluep)
2044     FILE *yyoutput;
2045     int yytype;
2046     YYSTYPE *yyvaluep;
2047 #endif
2048 {
2049   /* Pacify ``unused variable'' warnings.  */
2050   (void) yyvaluep;
2051
2052   if (yytype < YYNTOKENS)
2053     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2054   else
2055     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2056
2057
2058 # ifdef YYPRINT
2059   if (yytype < YYNTOKENS)
2060     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2061 # endif
2062   switch (yytype)
2063     {
2064       default:
2065         break;
2066     }
2067   YYFPRINTF (yyoutput, ")");
2068 }
2069
2070 #endif /* ! YYDEBUG */
2071 /*-----------------------------------------------.
2072 | Release the memory associated to this symbol.  |
2073 `-----------------------------------------------*/
2074
2075 #if defined (__STDC__) || defined (__cplusplus)
2076 static void
2077 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2078 #else
2079 static void
2080 yydestruct (yymsg, yytype, yyvaluep)
2081     const char *yymsg;
2082     int yytype;
2083     YYSTYPE *yyvaluep;
2084 #endif
2085 {
2086   /* Pacify ``unused variable'' warnings.  */
2087   (void) yyvaluep;
2088
2089   if (!yymsg)
2090     yymsg = "Deleting";
2091   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2092
2093   switch (yytype)
2094     {
2095
2096       default:
2097         break;
2098     }
2099 }
2100 \f
2101
2102 /* Prevent warnings from -Wmissing-prototypes.  */
2103
2104 #ifdef YYPARSE_PARAM
2105 # if defined (__STDC__) || defined (__cplusplus)
2106 int yyparse (void *YYPARSE_PARAM);
2107 # else
2108 int yyparse ();
2109 # endif
2110 #else /* ! YYPARSE_PARAM */
2111 #if defined (__STDC__) || defined (__cplusplus)
2112 int yyparse (void);
2113 #else
2114 int yyparse ();
2115 #endif
2116 #endif /* ! YYPARSE_PARAM */
2117
2118
2119
2120 /* The look-ahead symbol.  */
2121 int yychar;
2122
2123 /* The semantic value of the look-ahead symbol.  */
2124 YYSTYPE yylval;
2125
2126 /* Number of syntax errors so far.  */
2127 int yynerrs;
2128
2129
2130
2131 /*----------.
2132 | yyparse.  |
2133 `----------*/
2134
2135 #ifdef YYPARSE_PARAM
2136 # if defined (__STDC__) || defined (__cplusplus)
2137 int yyparse (void *YYPARSE_PARAM)
2138 # else
2139 int yyparse (YYPARSE_PARAM)
2140   void *YYPARSE_PARAM;
2141 # endif
2142 #else /* ! YYPARSE_PARAM */
2143 #if defined (__STDC__) || defined (__cplusplus)
2144 int
2145 yyparse (void)
2146 #else
2147 int
2148 yyparse ()
2149
2150 #endif
2151 #endif
2152 {
2153   
2154   int yystate;
2155   int yyn;
2156   int yyresult;
2157   /* Number of tokens to shift before error messages enabled.  */
2158   int yyerrstatus;
2159   /* Look-ahead token as an internal (translated) token number.  */
2160   int yytoken = 0;
2161
2162   /* Three stacks and their tools:
2163      `yyss': related to states,
2164      `yyvs': related to semantic values,
2165      `yyls': related to locations.
2166
2167      Refer to the stacks thru separate pointers, to allow yyoverflow
2168      to reallocate them elsewhere.  */
2169
2170   /* The state stack.  */
2171   short int yyssa[YYINITDEPTH];
2172   short int *yyss = yyssa;
2173   short int *yyssp;
2174
2175   /* The semantic value stack.  */
2176   YYSTYPE yyvsa[YYINITDEPTH];
2177   YYSTYPE *yyvs = yyvsa;
2178   YYSTYPE *yyvsp;
2179
2180
2181
2182 #define YYPOPSTACK   (yyvsp--, yyssp--)
2183
2184   YYSIZE_T yystacksize = YYINITDEPTH;
2185
2186   /* The variables used to return semantic value and location from the
2187      action routines.  */
2188   YYSTYPE yyval;
2189
2190
2191   /* When reducing, the number of symbols on the RHS of the reduced
2192      rule.  */
2193   int yylen;
2194
2195   YYDPRINTF ((stderr, "Starting parse\n"));
2196
2197   yystate = 0;
2198   yyerrstatus = 0;
2199   yynerrs = 0;
2200   yychar = YYEMPTY;             /* Cause a token to be read.  */
2201
2202   /* Initialize stack pointers.
2203      Waste one element of value and location stack
2204      so that they stay on the same level as the state stack.
2205      The wasted elements are never initialized.  */
2206
2207   yyssp = yyss;
2208   yyvsp = yyvs;
2209
2210   goto yysetstate;
2211
2212 /*------------------------------------------------------------.
2213 | yynewstate -- Push a new state, which is found in yystate.  |
2214 `------------------------------------------------------------*/
2215  yynewstate:
2216   /* In all cases, when you get here, the value and location stacks
2217      have just been pushed. so pushing a state here evens the stacks.
2218      */
2219   yyssp++;
2220
2221  yysetstate:
2222   *yyssp = yystate;
2223
2224   if (yyss + yystacksize - 1 <= yyssp)
2225     {
2226       /* Get the current used size of the three stacks, in elements.  */
2227       YYSIZE_T yysize = yyssp - yyss + 1;
2228
2229 #ifdef yyoverflow
2230       {
2231         /* Give user a chance to reallocate the stack. Use copies of
2232            these so that the &'s don't force the real ones into
2233            memory.  */
2234         YYSTYPE *yyvs1 = yyvs;
2235         short int *yyss1 = yyss;
2236
2237
2238         /* Each stack pointer address is followed by the size of the
2239            data in use in that stack, in bytes.  This used to be a
2240            conditional around just the two extra args, but that might
2241            be undefined if yyoverflow is a macro.  */
2242         yyoverflow (YY_("memory exhausted"),
2243                     &yyss1, yysize * sizeof (*yyssp),
2244                     &yyvs1, yysize * sizeof (*yyvsp),
2245
2246                     &yystacksize);
2247
2248         yyss = yyss1;
2249         yyvs = yyvs1;
2250       }
2251 #else /* no yyoverflow */
2252 # ifndef YYSTACK_RELOCATE
2253       goto yyexhaustedlab;
2254 # else
2255       /* Extend the stack our own way.  */
2256       if (YYMAXDEPTH <= yystacksize)
2257         goto yyexhaustedlab;
2258       yystacksize *= 2;
2259       if (YYMAXDEPTH < yystacksize)
2260         yystacksize = YYMAXDEPTH;
2261
2262       {
2263         short int *yyss1 = yyss;
2264         union yyalloc *yyptr =
2265           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2266         if (! yyptr)
2267           goto yyexhaustedlab;
2268         YYSTACK_RELOCATE (yyss);
2269         YYSTACK_RELOCATE (yyvs);
2270
2271 #  undef YYSTACK_RELOCATE
2272         if (yyss1 != yyssa)
2273           YYSTACK_FREE (yyss1);
2274       }
2275 # endif
2276 #endif /* no yyoverflow */
2277
2278       yyssp = yyss + yysize - 1;
2279       yyvsp = yyvs + yysize - 1;
2280
2281
2282       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2283                   (unsigned long int) yystacksize));
2284
2285       if (yyss + yystacksize - 1 <= yyssp)
2286         YYABORT;
2287     }
2288
2289   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2290
2291   goto yybackup;
2292
2293 /*-----------.
2294 | yybackup.  |
2295 `-----------*/
2296 yybackup:
2297
2298 /* Do appropriate processing given the current state.  */
2299 /* Read a look-ahead token if we need one and don't already have one.  */
2300 /* yyresume: */
2301
2302   /* First try to decide what to do without reference to look-ahead token.  */
2303
2304   yyn = yypact[yystate];
2305   if (yyn == YYPACT_NINF)
2306     goto yydefault;
2307
2308   /* Not known => get a look-ahead token if don't already have one.  */
2309
2310   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
2311   if (yychar == YYEMPTY)
2312     {
2313       YYDPRINTF ((stderr, "Reading a token: "));
2314       yychar = YYLEX;
2315     }
2316
2317   if (yychar <= YYEOF)
2318     {
2319       yychar = yytoken = YYEOF;
2320       YYDPRINTF ((stderr, "Now at end of input.\n"));
2321     }
2322   else
2323     {
2324       yytoken = YYTRANSLATE (yychar);
2325       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2326     }
2327
2328   /* If the proper action on seeing token YYTOKEN is to reduce or to
2329      detect an error, take that action.  */
2330   yyn += yytoken;
2331   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2332     goto yydefault;
2333   yyn = yytable[yyn];
2334   if (yyn <= 0)
2335     {
2336       if (yyn == 0 || yyn == YYTABLE_NINF)
2337         goto yyerrlab;
2338       yyn = -yyn;
2339       goto yyreduce;
2340     }
2341
2342   if (yyn == YYFINAL)
2343     YYACCEPT;
2344
2345   /* Shift the look-ahead token.  */
2346   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2347
2348   /* Discard the token being shifted unless it is eof.  */
2349   if (yychar != YYEOF)
2350     yychar = YYEMPTY;
2351
2352   *++yyvsp = yylval;
2353
2354
2355   /* Count tokens shifted since error; after three, turn off error
2356      status.  */
2357   if (yyerrstatus)
2358     yyerrstatus--;
2359
2360   yystate = yyn;
2361   goto yynewstate;
2362
2363
2364 /*-----------------------------------------------------------.
2365 | yydefault -- do the default action for the current state.  |
2366 `-----------------------------------------------------------*/
2367 yydefault:
2368   yyn = yydefact[yystate];
2369   if (yyn == 0)
2370     goto yyerrlab;
2371   goto yyreduce;
2372
2373
2374 /*-----------------------------.
2375 | yyreduce -- Do a reduction.  |
2376 `-----------------------------*/
2377 yyreduce:
2378   /* yyn is the number of a rule to reduce with.  */
2379   yylen = yyr2[yyn];
2380
2381   /* If YYLEN is nonzero, implement the default value of the action:
2382      `$$ = $1'.
2383
2384      Otherwise, the following line sets YYVAL to garbage.
2385      This behavior is undocumented and Bison
2386      users should not rely upon it.  Assigning to YYVAL
2387      unconditionally makes the parser a bit smaller, and it avoids a
2388      GCC warning that YYVAL may be used uninitialized.  */
2389   yyval = yyvsp[1-yylen];
2390
2391
2392   YY_REDUCE_PRINT (yyn);
2393   switch (yyn)
2394     {
2395         case 81:
2396 #line 358 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2397     {
2398     (yyval.String) = (yyvsp[-1].String);
2399   ;}
2400     break;
2401
2402   case 82:
2403 #line 361 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2404     {
2405     (yyval.String) = new std::string(""); 
2406   ;}
2407     break;
2408
2409   case 90:
2410 #line 368 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2411     { (yyval.String) = new std::string(""); ;}
2412     break;
2413
2414   case 97:
2415 #line 373 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2416     { 
2417     *(yyvsp[-1].String) += *(yyvsp[0].String); 
2418     delete (yyvsp[0].String);
2419     (yyval.String) = (yyvsp[-1].String); 
2420     ;}
2421     break;
2422
2423   case 98:
2424 #line 378 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2425     { (yyval.String) = new std::string(""); ;}
2426     break;
2427
2428   case 99:
2429 #line 383 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2430     { (yyval.String) = new std::string(); ;}
2431     break;
2432
2433   case 100:
2434 #line 384 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2435     { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2436     break;
2437
2438   case 101:
2439 #line 387 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2440     { (yyval.String) = new std::string(); ;}
2441     break;
2442
2443   case 102:
2444 #line 388 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2445     { 
2446     (yyvsp[-1].String)->insert(0, ", "); 
2447     *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2448     delete (yyvsp[0].String);
2449     (yyval.String) = (yyvsp[-1].String);
2450   ;}
2451     break;
2452
2453   case 103:
2454 #line 396 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2455     { 
2456     *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2457     delete (yyvsp[0].String);
2458     (yyval.String) = (yyvsp[-1].String);
2459   ;}
2460     break;
2461
2462   case 104:
2463 #line 402 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2464     { (yyval.String) = new std::string(); ;}
2465     break;
2466
2467   case 106:
2468 #line 406 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2469     { (yyval.String) = new std::string(); ;}
2470     break;
2471
2472   case 107:
2473 #line 407 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2474     {
2475       (yyvsp[-1].String)->insert(0, ", ");
2476       if (!(yyvsp[0].String)->empty())
2477         *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2478       delete (yyvsp[0].String);
2479       (yyval.String) = (yyvsp[-1].String);
2480     ;}
2481     break;
2482
2483   case 109:
2484 #line 417 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2485     {
2486       *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2487       delete (yyvsp[0].String);
2488       (yyval.String) = (yyvsp[-1].String);
2489     ;}
2490     break;
2491
2492   case 127:
2493 #line 439 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2494     { 
2495     (yyval.Type).newTy = (yyvsp[0].String); 
2496     (yyval.Type).oldTy = OpaqueTy; 
2497   ;}
2498     break;
2499
2500   case 128:
2501 #line 443 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2502     { 
2503     (yyval.Type).newTy = (yyvsp[0].String);
2504     (yyval.Type).oldTy = UnresolvedTy;
2505   ;}
2506     break;
2507
2508   case 129:
2509 #line 447 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2510     { 
2511     (yyval.Type) = (yyvsp[0].Type); 
2512   ;}
2513     break;
2514
2515   case 130:
2516 #line 450 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2517     {                   // Type UpReference
2518     (yyvsp[0].String)->insert(0, "\\");
2519     (yyval.Type).newTy = (yyvsp[0].String);
2520     (yyval.Type).oldTy = NumericTy;
2521   ;}
2522     break;
2523
2524   case 131:
2525 #line 455 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2526     {           // Function derived type?
2527     *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2528     delete (yyvsp[-1].String);
2529     (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2530     (yyval.Type).oldTy = FunctionTy;
2531   ;}
2532     break;
2533
2534   case 132:
2535 #line 461 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2536     {          // Sized array type?
2537     (yyvsp[-3].String)->insert(0,"[ ");
2538     *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2539     delete (yyvsp[-1].Type).newTy;
2540     (yyval.Type).newTy = (yyvsp[-3].String);
2541     (yyval.Type).oldTy = ArrayTy;
2542     (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2543   ;}
2544     break;
2545
2546   case 133:
2547 #line 469 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2548     {          // Packed array type?
2549     (yyvsp[-3].String)->insert(0,"< ");
2550     *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2551     delete (yyvsp[-1].Type).newTy;
2552     (yyval.Type).newTy = (yyvsp[-3].String);
2553     (yyval.Type).oldTy = PackedTy;
2554     (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2555   ;}
2556     break;
2557
2558   case 134:
2559 #line 477 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2560     {                        // Structure type?
2561     (yyvsp[-1].String)->insert(0, "{ ");
2562     *(yyvsp[-1].String) += " }";
2563     (yyval.Type).newTy = (yyvsp[-1].String);
2564     (yyval.Type).oldTy = StructTy;
2565   ;}
2566     break;
2567
2568   case 135:
2569 #line 483 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2570     {                                  // Empty structure type?
2571     (yyval.Type).newTy = new std::string("{}");
2572     (yyval.Type).oldTy = StructTy;
2573   ;}
2574     break;
2575
2576   case 136:
2577 #line 487 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2578     {                             // Pointer type?
2579     *(yyvsp[-1].Type).newTy += '*';
2580     (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2581     (yyvsp[-1].Type).oldTy = PointerTy;
2582     (yyval.Type) = (yyvsp[-1].Type);
2583   ;}
2584     break;
2585
2586   case 137:
2587 #line 498 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2588     {
2589     (yyval.String) = (yyvsp[0].Type).newTy;
2590   ;}
2591     break;
2592
2593   case 138:
2594 #line 501 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2595     {
2596     *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2597     delete (yyvsp[0].Type).newTy;
2598     (yyval.String) = (yyvsp[-2].String);
2599   ;}
2600     break;
2601
2602   case 140:
2603 #line 510 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2604     {
2605     *(yyvsp[-2].String) += ", ...";
2606     delete (yyvsp[0].String);
2607     (yyval.String) = (yyvsp[-2].String);
2608   ;}
2609     break;
2610
2611   case 141:
2612 #line 515 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2613     {
2614     (yyval.String) = (yyvsp[0].String);
2615   ;}
2616     break;
2617
2618   case 142:
2619 #line 518 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2620     {
2621     (yyval.String) = new std::string();
2622   ;}
2623     break;
2624
2625   case 143:
2626 #line 528 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2627     { // Nonempty unsized arr
2628     (yyval.Const).type = (yyvsp[-3].Type);
2629     (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2630     *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2631     delete (yyvsp[-1].String);
2632   ;}
2633     break;
2634
2635   case 144:
2636 #line 534 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2637     {
2638     (yyval.Const).type = (yyvsp[-2].Type);
2639     (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2640     *(yyval.Const).cnst += "[ ]";
2641   ;}
2642     break;
2643
2644   case 145:
2645 #line 539 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2646     {
2647     (yyval.Const).type = (yyvsp[-2].Type);
2648     (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2649     *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2650     delete (yyvsp[0].String);
2651   ;}
2652     break;
2653
2654   case 146:
2655 #line 545 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2656     { // Nonempty unsized arr
2657     (yyval.Const).type = (yyvsp[-3].Type);
2658     (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2659     *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2660     delete (yyvsp[-1].String);
2661   ;}
2662     break;
2663
2664   case 147:
2665 #line 551 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2666     {
2667     (yyval.Const).type = (yyvsp[-3].Type);
2668     (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2669     *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2670     delete (yyvsp[-1].String);
2671   ;}
2672     break;
2673
2674   case 148:
2675 #line 557 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2676     {
2677     (yyval.Const).type = (yyvsp[-2].Type);
2678     (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2679     *(yyval.Const).cnst += " {}";
2680   ;}
2681     break;
2682
2683   case 149:
2684 #line 562 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2685     {
2686     (yyval.Const).type = (yyvsp[-1].Type);
2687     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2688     *(yyval.Const).cnst +=  " " + *(yyvsp[0].String);
2689     delete (yyvsp[0].String);
2690   ;}
2691     break;
2692
2693   case 150:
2694 #line 568 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2695     {
2696     (yyval.Const).type = (yyvsp[-1].Type);
2697     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2698     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2699     delete (yyvsp[0].String);
2700   ;}
2701     break;
2702
2703   case 151:
2704 #line 574 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2705     {
2706     (yyval.Const).type = (yyvsp[-1].Type);
2707     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2708     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2709     delete (yyvsp[0].String);
2710   ;}
2711     break;
2712
2713   case 152:
2714 #line 580 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2715     {
2716     (yyval.Const).type = (yyvsp[-1].Type);
2717     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2718     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2719     delete (yyvsp[0].String);
2720   ;}
2721     break;
2722
2723   case 153:
2724 #line 586 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2725     {
2726     (yyval.Const).type = (yyvsp[-1].Type);
2727     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2728     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2729     delete (yyvsp[0].String);
2730   ;}
2731     break;
2732
2733   case 154:
2734 #line 592 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2735     {      // integral constants
2736     (yyval.Const).type = (yyvsp[-1].Type);
2737     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2738     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2739     delete (yyvsp[0].String);
2740   ;}
2741     break;
2742
2743   case 155:
2744 #line 598 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2745     {            // integral constants
2746     (yyval.Const).type = (yyvsp[-1].Type);
2747     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2748     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2749     delete (yyvsp[0].String);
2750   ;}
2751     break;
2752
2753   case 156:
2754 #line 604 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2755     {                      // Boolean constants
2756     (yyval.Const).type = (yyvsp[-1].Type);
2757     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2758     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2759     delete (yyvsp[0].String);
2760   ;}
2761     break;
2762
2763   case 157:
2764 #line 610 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2765     {                     // Boolean constants
2766     (yyval.Const).type = (yyvsp[-1].Type);
2767     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2768     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2769     delete (yyvsp[0].String);
2770   ;}
2771     break;
2772
2773   case 158:
2774 #line 616 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2775     {                   // Float & Double constants
2776     (yyval.Const).type = (yyvsp[-1].Type);
2777     (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2778     *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2779     delete (yyvsp[0].String);
2780   ;}
2781     break;
2782
2783   case 159:
2784 #line 624 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2785     {
2786     std::string source = *(yyvsp[-3].Const).cnst;
2787     TypeInfo DstTy = (yyvsp[-1].Type);
2788     ResolveType(DstTy);
2789     if (*(yyvsp[-5].String) == "cast") {
2790       // Call getCastUpgrade to upgrade the old cast
2791       (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2792     } else {
2793       // Nothing to upgrade, just create the cast constant expr
2794       (yyval.String) = new std::string(*(yyvsp[-5].String));
2795       *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2796     }
2797     delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2798   ;}
2799     break;
2800
2801   case 160:
2802 #line 638 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2803     {
2804     *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2805     for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2806       ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2807       *(yyvsp[-4].String) += ", " + *VI.val;
2808       VI.destroy();
2809     }
2810     *(yyvsp[-4].String) += ")";
2811     (yyval.String) = (yyvsp[-4].String);
2812     (yyvsp[-2].Const).destroy();
2813     delete (yyvsp[-1].ValList);
2814   ;}
2815     break;
2816
2817   case 161:
2818 #line 650 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2819     {
2820     *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2821     (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2822     (yyval.String) = (yyvsp[-7].String);
2823   ;}
2824     break;
2825
2826   case 162:
2827 #line 655 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2828     {
2829     const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type); 
2830     (yyval.String) = new std::string(op);
2831     *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2832     delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2833   ;}
2834     break;
2835
2836   case 163:
2837 #line 661 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2838     {
2839     *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2840     (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2841     (yyval.String) = (yyvsp[-5].String);
2842   ;}
2843     break;
2844
2845   case 164:
2846 #line 666 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2847     {
2848 #if UPGRADE_SETCOND_OPS
2849     *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2850 #endif
2851     *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2852     (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2853     (yyval.String) = (yyvsp[-5].String);
2854   ;}
2855     break;
2856
2857   case 165:
2858 #line 674 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2859     {
2860     *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2861     delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2862     (yyval.String) = (yyvsp[-6].String);
2863   ;}
2864     break;
2865
2866   case 166:
2867 #line 679 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2868     {
2869     *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2870     delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2871     (yyval.String) = (yyvsp[-6].String);
2872   ;}
2873     break;
2874
2875   case 167:
2876 #line 684 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2877     {
2878     const char* shiftop = (yyvsp[-5].String)->c_str();
2879     if (*(yyvsp[-5].String) == "shr")
2880       shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2881     (yyval.String) = new std::string(shiftop);
2882     *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2883     delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2884   ;}
2885     break;
2886
2887   case 168:
2888 #line 692 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2889     {
2890     *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2891     (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2892     (yyval.String) = (yyvsp[-5].String);
2893   ;}
2894     break;
2895
2896   case 169:
2897 #line 697 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2898     {
2899     *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2900     (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2901     (yyval.String) = (yyvsp[-7].String);
2902   ;}
2903     break;
2904
2905   case 170:
2906 #line 702 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2907     {
2908     *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2909     (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2910     (yyval.String) = (yyvsp[-7].String);
2911   ;}
2912     break;
2913
2914   case 171:
2915 #line 712 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2916     {
2917     *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2918     (yyvsp[0].Const).destroy();
2919     (yyval.String) = (yyvsp[-2].String);
2920   ;}
2921     break;
2922
2923   case 172:
2924 #line 717 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2925     { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2926     break;
2927
2928   case 175:
2929 #line 732 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2930     {
2931 ;}
2932     break;
2933
2934   case 176:
2935 #line 737 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2936     {
2937     (yyval.String) = 0;
2938   ;}
2939     break;
2940
2941   case 177:
2942 #line 740 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2943     {
2944     *O << *(yyvsp[0].String) << "\n";
2945     delete (yyvsp[0].String);
2946     (yyval.String) = 0;
2947   ;}
2948     break;
2949
2950   case 178:
2951 #line 745 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2952     {
2953     *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2954     (yyval.String) = 0;
2955   ;}
2956     break;
2957
2958   case 179:
2959 #line 749 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2960     {
2961     *O << "implementation\n";
2962     (yyval.String) = 0;
2963   ;}
2964     break;
2965
2966   case 180:
2967 #line 753 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2968     { (yyval.String) = 0; ;}
2969     break;
2970
2971   case 182:
2972 #line 755 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2973     { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2974     break;
2975
2976   case 183:
2977 #line 758 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2978     {
2979     EnumeratedTypes.push_back((yyvsp[0].Type));
2980     if (!(yyvsp[-2].String)->empty()) {
2981       NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2982       NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2983       NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2984       *O << *(yyvsp[-2].String) << " = ";
2985     }
2986     *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2987     delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2988     (yyval.String) = 0;
2989   ;}
2990     break;
2991
2992   case 184:
2993 #line 770 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
2994     {       // Function prototypes can be in const pool
2995     *O << *(yyvsp[0].String) << "\n";
2996     delete (yyvsp[0].String);
2997     (yyval.String) = 0;
2998   ;}
2999     break;
3000
3001   case 185:
3002 #line 775 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3003     {  // Asm blocks can be in the const pool
3004     *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3005     delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String); 
3006     (yyval.String) = 0;
3007   ;}
3008     break;
3009
3010   case 186:
3011 #line 780 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3012     {
3013     if (!(yyvsp[-4].String)->empty()) {
3014       *O << *(yyvsp[-4].String) << " = ";
3015       Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Const).type.clone();
3016     }
3017     *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
3018     delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String); 
3019     (yyval.String) = 0;
3020   ;}
3021     break;
3022
3023   case 187:
3024 #line 789 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3025     {
3026     if (!(yyvsp[-4].String)->empty()) {
3027       *O << *(yyvsp[-4].String) << " = ";
3028       Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3029     }
3030     *O <<  *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3031     delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3032     (yyval.String) = 0;
3033   ;}
3034     break;
3035
3036   case 188:
3037 #line 798 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3038     {
3039     if (!(yyvsp[-4].String)->empty()) {
3040       *O << *(yyvsp[-4].String) << " = ";
3041       Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3042     }
3043     *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3044     delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3045     (yyval.String) = 0;
3046   ;}
3047     break;
3048
3049   case 189:
3050 #line 807 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3051     {
3052     if (!(yyvsp[-4].String)->empty()) {
3053       *O << *(yyvsp[-4].String) << " = ";
3054       Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3055     }
3056     *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3057     delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3058     (yyval.String) = 0;
3059   ;}
3060     break;
3061
3062   case 190:
3063 #line 816 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3064     { 
3065     *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3066     delete (yyvsp[-1].String); delete (yyvsp[0].String);
3067     (yyval.String) = 0;
3068   ;}
3069     break;
3070
3071   case 191:
3072 #line 821 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3073     {
3074     *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3075     delete (yyvsp[-2].String); delete (yyvsp[0].String);
3076     (yyval.String) = 0;
3077   ;}
3078     break;
3079
3080   case 192:
3081 #line 826 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3082     { 
3083     (yyval.String) = 0;
3084   ;}
3085     break;
3086
3087   case 196:
3088 #line 836 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3089     {
3090     *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3091     delete (yyvsp[0].String);
3092     (yyval.String) = (yyvsp[-2].String);
3093   ;}
3094     break;
3095
3096   case 197:
3097 #line 841 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3098     {
3099     *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3100     if (*(yyvsp[0].String) == "64")
3101       SizeOfPointer = 64;
3102     delete (yyvsp[0].String);
3103     (yyval.String) = (yyvsp[-2].String);
3104   ;}
3105     break;
3106
3107   case 198:
3108 #line 848 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3109     {
3110     *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3111     delete (yyvsp[0].String);
3112     (yyval.String) = (yyvsp[-2].String);
3113   ;}
3114     break;
3115
3116   case 199:
3117 #line 853 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3118     {
3119     *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3120     delete (yyvsp[0].String);
3121     (yyval.String) = (yyvsp[-2].String);
3122   ;}
3123     break;
3124
3125   case 200:
3126 #line 860 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3127     {
3128     (yyvsp[-1].String)->insert(0, "[ ");
3129     *(yyvsp[-1].String) += " ]";
3130     (yyval.String) = (yyvsp[-1].String);
3131   ;}
3132     break;
3133
3134   case 201:
3135 #line 867 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3136     {
3137     *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3138     delete (yyvsp[0].String);
3139     (yyval.String) = (yyvsp[-2].String);
3140   ;}
3141     break;
3142
3143   case 203:
3144 #line 873 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3145     {
3146     (yyval.String) = new std::string();
3147   ;}
3148     break;
3149
3150   case 207:
3151 #line 882 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3152     { (yyval.String) = new std::string(); ;}
3153     break;
3154
3155   case 208:
3156 #line 884 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3157     {
3158   (yyval.String) = (yyvsp[-1].Type).newTy;
3159   if (!(yyvsp[0].String)->empty())
3160     *(yyval.String) += " " + *(yyvsp[0].String);
3161   delete (yyvsp[0].String);
3162 ;}
3163     break;
3164
3165   case 209:
3166 #line 891 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3167     {
3168     *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3169     delete (yyvsp[0].String);
3170   ;}
3171     break;
3172
3173   case 210:
3174 #line 895 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3175     {
3176     (yyval.String) = (yyvsp[0].String);
3177   ;}
3178     break;
3179
3180   case 211:
3181 #line 899 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3182     {
3183     (yyval.String) = (yyvsp[0].String);
3184   ;}
3185     break;
3186
3187   case 212:
3188 #line 902 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3189     {
3190     *(yyvsp[-2].String) += ", ...";
3191     (yyval.String) = (yyvsp[-2].String);
3192     delete (yyvsp[0].String);
3193   ;}
3194     break;
3195
3196   case 213:
3197 #line 907 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3198     {
3199     (yyval.String) = (yyvsp[0].String);
3200   ;}
3201     break;
3202
3203   case 214:
3204 #line 910 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3205     { (yyval.String) = new std::string(); ;}
3206     break;
3207
3208   case 215:
3209 #line 913 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3210     {
3211     if (!(yyvsp[-7].String)->empty()) {
3212       *(yyvsp[-7].String) += " ";
3213     }
3214     *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3215     if (!(yyvsp[-1].String)->empty()) {
3216       *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3217     }
3218     if (!(yyvsp[0].String)->empty()) {
3219       *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3220     }
3221     (yyvsp[-6].Type).destroy();
3222     delete (yyvsp[-5].String);
3223     delete (yyvsp[-3].String);
3224     delete (yyvsp[-1].String);
3225     delete (yyvsp[0].String);
3226     (yyval.String) = (yyvsp[-7].String);
3227   ;}
3228     break;
3229
3230   case 216:
3231 #line 932 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3232     { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3233     break;
3234
3235   case 217:
3236 #line 933 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3237     { (yyval.String) = new std::string ("{"); ;}
3238     break;
3239
3240   case 218:
3241 #line 935 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3242     {
3243   if (!(yyvsp[-2].String)->empty()) {
3244     *O << *(yyvsp[-2].String) << " ";
3245   }
3246   *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3247   delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3248   (yyval.String) = 0;
3249 ;}
3250     break;
3251
3252   case 219:
3253 #line 944 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3254     { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3255     break;
3256
3257   case 220:
3258 #line 945 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3259     { (yyval.String) = new std::string("}"); ;}
3260     break;
3261
3262   case 221:
3263 #line 947 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3264     {
3265   if ((yyvsp[-1].String))
3266     *O << *(yyvsp[-1].String);
3267   *O << '\n' << *(yyvsp[0].String) << "\n";
3268   (yyval.String) = 0;
3269 ;}
3270     break;
3271
3272   case 222:
3273 #line 955 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3274     { (yyval.String) = new std::string(); ;}
3275     break;
3276
3277   case 225:
3278 #line 961 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3279     { 
3280     if (!(yyvsp[-1].String)->empty())
3281       *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3282     *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3283     delete (yyvsp[-1].String);
3284     delete (yyvsp[0].String);
3285     (yyval.String) = (yyvsp[-2].String);
3286   ;}
3287     break;
3288
3289   case 226:
3290 #line 974 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3291     { (yyval.String) = new std::string(); ;}
3292     break;
3293
3294   case 236:
3295 #line 980 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3296     { 
3297     (yyvsp[-1].String)->insert(0, "<");
3298     *(yyvsp[-1].String) += ">";
3299     (yyval.String) = (yyvsp[-1].String);
3300   ;}
3301     break;
3302
3303   case 238:
3304 #line 986 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3305     {
3306     if (!(yyvsp[-3].String)->empty()) {
3307       *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3308     }
3309     *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3310     delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3311     (yyval.String) = (yyvsp[-4].String);
3312   ;}
3313     break;
3314
3315   case 241:
3316 #line 999 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3317     {
3318     (yyval.Value).val = (yyvsp[0].String);
3319     (yyval.Value).constant = false;
3320     (yyval.Value).type.newTy = 0;
3321     (yyval.Value).type.oldTy = UnresolvedTy;
3322   ;}
3323     break;
3324
3325   case 242:
3326 #line 1005 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3327     {
3328     (yyval.Value).val = (yyvsp[0].String);
3329     (yyval.Value).constant = true;
3330     (yyval.Value).type.newTy = 0;
3331     (yyval.Value).type.oldTy = UnresolvedTy;
3332   ;}
3333     break;
3334
3335   case 243:
3336 #line 1016 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3337     {
3338     (yyval.Value) = (yyvsp[0].Value);
3339     (yyval.Value).type = (yyvsp[-1].Type);
3340     (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3341   ;}
3342     break;
3343
3344   case 244:
3345 #line 1022 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3346     {
3347     (yyval.String) = 0;
3348   ;}
3349     break;
3350
3351   case 245:
3352 #line 1025 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3353     { // Do not allow functions with 0 basic blocks   
3354     (yyval.String) = 0;
3355   ;}
3356     break;
3357
3358   case 246:
3359 #line 1033 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3360     {
3361     (yyval.String) = 0;
3362   ;}
3363     break;
3364
3365   case 247:
3366 #line 1037 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3367     {
3368     *O << "    " << *(yyvsp[0].String) << "\n";
3369     delete (yyvsp[0].String);
3370     (yyval.String) = 0;
3371   ;}
3372     break;
3373
3374   case 248:
3375 #line 1042 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3376     {
3377     (yyval.String) = 0;
3378   ;}
3379     break;
3380
3381   case 249:
3382 #line 1045 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3383     {
3384     *O << *(yyvsp[0].String) << "\n";
3385     delete (yyvsp[0].String);
3386     (yyval.String) = 0;
3387   ;}
3388     break;
3389
3390   case 251:
3391 #line 1051 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3392     { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3393     break;
3394
3395   case 252:
3396 #line 1053 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3397     {              // Return with a result...
3398     *O << "    " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3399     delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3400     (yyval.String) = 0;
3401   ;}
3402     break;
3403
3404   case 253:
3405 #line 1058 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3406     {                                       // Return with no result...
3407     *O << "    " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3408     delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3409     (yyval.String) = 0;
3410   ;}
3411     break;
3412
3413   case 254:
3414 #line 1063 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3415     {                         // Unconditional Branch...
3416     *O << "    " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3417     delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3418     (yyval.String) = 0;
3419   ;}
3420     break;
3421
3422   case 255:
3423 #line 1068 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3424     {  
3425     *O << "    " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", " 
3426        << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " " 
3427        << *(yyvsp[0].Value).val << "\n";
3428     delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); 
3429     (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3430     (yyval.String) = 0;
3431   ;}
3432     break;
3433
3434   case 256:
3435 #line 1076 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3436     {
3437     *O << "    " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", " 
3438        << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3439     delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); 
3440     delete (yyvsp[-1].String);
3441     (yyval.String) = 0;
3442   ;}
3443     break;
3444
3445   case 257:
3446 #line 1083 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3447     {
3448     *O << "    " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", " 
3449        << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3450     delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3451     (yyval.String) = 0;
3452   ;}
3453     break;
3454
3455   case 258:
3456 #line 1090 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3457     {
3458     *O << "    ";
3459     if (!(yyvsp[-13].String)->empty())
3460       *O << *(yyvsp[-13].String) << " = ";
3461     *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3462     for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3463       ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3464       *O << *VI.val;
3465       if (i+1 < (yyvsp[-7].ValList)->size())
3466         *O << ", ";
3467       VI.destroy();
3468     }
3469     *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " " 
3470        << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3471     delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList); 
3472     delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); 
3473     (yyvsp[0].Value).destroy(); 
3474     (yyval.String) = 0;
3475   ;}
3476     break;
3477
3478   case 259:
3479 #line 1109 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3480     {
3481     *O << "    " << *(yyvsp[0].String) << "\n";
3482     delete (yyvsp[0].String);
3483     (yyval.String) = 0;
3484   ;}
3485     break;
3486
3487   case 260:
3488 #line 1114 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3489     {
3490     *O << "    " << *(yyvsp[0].String) << "\n";
3491     delete (yyvsp[0].String);
3492     (yyval.String) = 0;
3493   ;}
3494     break;
3495
3496   case 261:
3497 #line 1120 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3498     {
3499     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3500     (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3501     (yyval.String) = (yyvsp[-5].String);
3502   ;}
3503     break;
3504
3505   case 262:
3506 #line 1125 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3507     {
3508     (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3509     *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3510     (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3511     (yyval.String) = (yyvsp[-3].String);
3512   ;}
3513     break;
3514
3515   case 263:
3516 #line 1133 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3517     {
3518     if (!(yyvsp[-1].String)->empty())
3519       *(yyvsp[-1].String) += " = ";
3520     *(yyvsp[-1].String) += *(yyvsp[0].String);
3521     delete (yyvsp[0].String);
3522     (yyval.String) = (yyvsp[-1].String); 
3523   ;}
3524     break;
3525
3526   case 264:
3527 #line 1142 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3528     {    // Used for PHI nodes
3529     (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3530     *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3531     (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3532     (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3533     (yyvsp[-3].Value).destroy();
3534   ;}
3535     break;
3536
3537   case 265:
3538 #line 1149 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3539     {
3540     *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3541     (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3542     (yyval.String) = (yyvsp[-6].String);
3543   ;}
3544     break;
3545
3546   case 266:
3547 #line 1157 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3548     { 
3549     (yyval.ValList) = new ValueList();
3550     (yyval.ValList)->push_back((yyvsp[0].Value));
3551   ;}
3552     break;
3553
3554   case 267:
3555 #line 1161 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3556     {
3557     (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3558     (yyval.ValList) = (yyvsp[-2].ValList);
3559   ;}
3560     break;
3561
3562   case 268:
3563 #line 1168 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3564     { (yyval.ValList) = (yyvsp[0].ValList); ;}
3565     break;
3566
3567   case 269:
3568 #line 1169 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3569     { (yyval.ValList) = new ValueList(); ;}
3570     break;
3571
3572   case 270:
3573 #line 1173 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3574     {
3575     *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3576     delete (yyvsp[0].String);
3577     (yyval.String) = (yyvsp[-1].String);
3578   ;}
3579     break;
3580
3581   case 272:
3582 #line 1181 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3583     {
3584     const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type)); 
3585     (yyval.String) = new std::string(op);
3586     *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3587     delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3588   ;}
3589     break;
3590
3591   case 273:
3592 #line 1187 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3593     {
3594     *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3595     (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3596     (yyval.String) = (yyvsp[-4].String);
3597   ;}
3598     break;
3599
3600   case 274:
3601 #line 1192 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3602     {
3603 #if UPGRADE_SETCOND_OPS
3604     *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3605 #endif
3606     *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3607     (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3608     (yyval.String) = (yyvsp[-4].String);
3609   ;}
3610     break;
3611
3612   case 275:
3613 #line 1200 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3614     {
3615     *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3616     delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3617     (yyval.String) = (yyvsp[-6].String);
3618   ;}
3619     break;
3620
3621   case 276:
3622 #line 1205 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3623     {
3624     *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3625     delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3626     (yyval.String) = (yyvsp[-6].String);
3627   ;}
3628     break;
3629
3630   case 277:
3631 #line 1210 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3632     {
3633     *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3634     (yyvsp[0].Value).destroy();
3635     (yyval.String) = (yyvsp[-1].String);
3636   ;}
3637     break;
3638
3639   case 278:
3640 #line 1215 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3641     {
3642     const char* shiftop = (yyvsp[-3].String)->c_str();
3643     if (*(yyvsp[-3].String) == "shr")
3644       shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3645     (yyval.String) = new std::string(shiftop);
3646     *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3647     delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3648   ;}
3649     break;
3650
3651   case 279:
3652 #line 1223 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3653     {
3654     std::string source = *(yyvsp[-2].Value).val;
3655     TypeInfo SrcTy = (yyvsp[-2].Value).type;
3656     TypeInfo DstTy = (yyvsp[0].Type);
3657     ResolveType(DstTy);
3658     (yyval.String) = new std::string();
3659     if (*(yyvsp[-3].String) == "cast") {
3660       *(yyval.String) +=  getCastUpgrade(source, SrcTy, DstTy, false);
3661     } else {
3662       *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3663     }
3664     delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3665     delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3666   ;}
3667     break;
3668
3669   case 280:
3670 #line 1237 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3671     {
3672     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3673     (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3674     (yyval.String) = (yyvsp[-5].String);
3675   ;}
3676     break;
3677
3678   case 281:
3679 #line 1242 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3680     {
3681     *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3682     (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3683     (yyval.String) = (yyvsp[-3].String);
3684   ;}
3685     break;
3686
3687   case 282:
3688 #line 1247 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3689     {
3690     *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3691     (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3692     (yyval.String) = (yyvsp[-3].String);
3693   ;}
3694     break;
3695
3696   case 283:
3697 #line 1252 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3698     {
3699     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3700     (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3701     (yyval.String) = (yyvsp[-5].String);
3702   ;}
3703     break;
3704
3705   case 284:
3706 #line 1257 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3707     {
3708     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3709     (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3710     (yyval.String) = (yyvsp[-5].String);
3711   ;}
3712     break;
3713
3714   case 285:
3715 #line 1262 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3716     {
3717     *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3718     delete (yyvsp[0].String);
3719     (yyval.String) = (yyvsp[-1].String);
3720   ;}
3721     break;
3722
3723   case 286:
3724 #line 1267 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3725     {
3726     if (!(yyvsp[-5].String)->empty())
3727       *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3728     if (!(yyvsp[-6].String)->empty())
3729       *(yyvsp[-6].String) += " ";
3730     *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3731     for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3732       ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3733       *(yyvsp[-6].String) += *VI.val;
3734       if (i+1 < (yyvsp[-1].ValList)->size())
3735         *(yyvsp[-6].String) += ", ";
3736       VI.destroy();
3737     }
3738     *(yyvsp[-6].String) += ")";
3739     delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3740     (yyval.String) = (yyvsp[-6].String);
3741   ;}
3742     break;
3743
3744   case 288:
3745 #line 1289 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3746     { (yyval.ValList) = (yyvsp[0].ValList); ;}
3747     break;
3748
3749   case 289:
3750 #line 1290 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3751     {  (yyval.ValList) = new ValueList(); ;}
3752     break;
3753
3754   case 291:
3755 #line 1295 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3756     { (yyval.String) = new std::string(); ;}
3757     break;
3758
3759   case 292:
3760 #line 1298 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3761     {
3762     *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3763     if (!(yyvsp[0].String)->empty())
3764       *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3765     (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3766     (yyval.String) = (yyvsp[-2].String);
3767   ;}
3768     break;
3769
3770   case 293:
3771 #line 1305 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3772     {
3773     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3774     if (!(yyvsp[0].String)->empty())
3775       *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3776     (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3777     (yyval.String) = (yyvsp[-5].String);
3778   ;}
3779     break;
3780
3781   case 294:
3782 #line 1312 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3783     {
3784     *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3785     if (!(yyvsp[0].String)->empty())
3786       *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3787     (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3788     (yyval.String) = (yyvsp[-2].String);
3789   ;}
3790     break;
3791
3792   case 295:
3793 #line 1319 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3794     {
3795     *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3796     if (!(yyvsp[0].String)->empty())
3797       *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3798     (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3799     (yyval.String) = (yyvsp[-5].String);
3800   ;}
3801     break;
3802
3803   case 296:
3804 #line 1326 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3805     {
3806     *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3807     (yyvsp[0].Value).destroy();
3808     (yyval.String) = (yyvsp[-1].String);
3809   ;}
3810     break;
3811
3812   case 297:
3813 #line 1331 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3814     {
3815     if (!(yyvsp[-3].String)->empty())
3816       *(yyvsp[-3].String) += " ";
3817     *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3818     delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3819     (yyval.String) = (yyvsp[-3].String);
3820   ;}
3821     break;
3822
3823   case 298:
3824 #line 1338 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3825     {
3826     if (!(yyvsp[-5].String)->empty())
3827       *(yyvsp[-5].String) += " ";
3828     *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3829     delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3830     (yyval.String) = (yyvsp[-5].String);
3831   ;}
3832     break;
3833
3834   case 299:
3835 #line 1345 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
3836     {
3837     // Upgrade the indices
3838     for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3839       ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3840       if (VI.type.isUnsigned() && !VI.isConstant() && 
3841           VI.type.getBitWidth() < 64) {
3842         std::string* old = VI.val;
3843         *O << "    %gep_upgrade" << unique << " = zext " << *old 
3844            << " to ulong\n";
3845         VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3846         VI.type.oldTy = ULongTy;
3847         delete old;
3848       }
3849     }
3850     *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3851     for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3852       ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3853       *(yyvsp[-3].String) += ", " + *VI.val;
3854       VI.destroy();
3855     }
3856     (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3857     (yyval.String) = (yyvsp[-3].String);
3858   ;}
3859     break;
3860
3861
3862       default: break;
3863     }
3864
3865 /* Line 1126 of yacc.c.  */
3866 #line 3867 "UpgradeParser.tab.c"
3867 \f
3868   yyvsp -= yylen;
3869   yyssp -= yylen;
3870
3871
3872   YY_STACK_PRINT (yyss, yyssp);
3873
3874   *++yyvsp = yyval;
3875
3876
3877   /* Now `shift' the result of the reduction.  Determine what state
3878      that goes to, based on the state we popped back to and the rule
3879      number reduced by.  */
3880
3881   yyn = yyr1[yyn];
3882
3883   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3884   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3885     yystate = yytable[yystate];
3886   else
3887     yystate = yydefgoto[yyn - YYNTOKENS];
3888
3889   goto yynewstate;
3890
3891
3892 /*------------------------------------.
3893 | yyerrlab -- here on detecting error |
3894 `------------------------------------*/
3895 yyerrlab:
3896   /* If not already recovering from an error, report this error.  */
3897   if (!yyerrstatus)
3898     {
3899       ++yynerrs;
3900 #if YYERROR_VERBOSE
3901       yyn = yypact[yystate];
3902
3903       if (YYPACT_NINF < yyn && yyn < YYLAST)
3904         {
3905           int yytype = YYTRANSLATE (yychar);
3906           YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3907           YYSIZE_T yysize = yysize0;
3908           YYSIZE_T yysize1;
3909           int yysize_overflow = 0;
3910           char *yymsg = 0;
3911 #         define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3912           char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3913           int yyx;
3914
3915 #if 0
3916           /* This is so xgettext sees the translatable formats that are
3917              constructed on the fly.  */
3918           YY_("syntax error, unexpected %s");
3919           YY_("syntax error, unexpected %s, expecting %s");
3920           YY_("syntax error, unexpected %s, expecting %s or %s");
3921           YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3922           YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3923 #endif
3924           char *yyfmt;
3925           char const *yyf;
3926           static char const yyunexpected[] = "syntax error, unexpected %s";
3927           static char const yyexpecting[] = ", expecting %s";
3928           static char const yyor[] = " or %s";
3929           char yyformat[sizeof yyunexpected
3930                         + sizeof yyexpecting - 1
3931                         + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3932                            * (sizeof yyor - 1))];
3933           char const *yyprefix = yyexpecting;
3934
3935           /* Start YYX at -YYN if negative to avoid negative indexes in
3936              YYCHECK.  */
3937           int yyxbegin = yyn < 0 ? -yyn : 0;
3938
3939           /* Stay within bounds of both yycheck and yytname.  */
3940           int yychecklim = YYLAST - yyn;
3941           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3942           int yycount = 1;
3943
3944           yyarg[0] = yytname[yytype];
3945           yyfmt = yystpcpy (yyformat, yyunexpected);
3946
3947           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3948             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3949               {
3950                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3951                   {
3952                     yycount = 1;
3953                     yysize = yysize0;
3954                     yyformat[sizeof yyunexpected - 1] = '\0';
3955                     break;
3956                   }
3957                 yyarg[yycount++] = yytname[yyx];
3958                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3959                 yysize_overflow |= yysize1 < yysize;
3960                 yysize = yysize1;
3961                 yyfmt = yystpcpy (yyfmt, yyprefix);
3962                 yyprefix = yyor;
3963               }
3964
3965           yyf = YY_(yyformat);
3966           yysize1 = yysize + yystrlen (yyf);
3967           yysize_overflow |= yysize1 < yysize;
3968           yysize = yysize1;
3969
3970           if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3971             yymsg = (char *) YYSTACK_ALLOC (yysize);
3972           if (yymsg)
3973             {
3974               /* Avoid sprintf, as that infringes on the user's name space.
3975                  Don't have undefined behavior even if the translation
3976                  produced a string with the wrong number of "%s"s.  */
3977               char *yyp = yymsg;
3978               int yyi = 0;
3979               while ((*yyp = *yyf))
3980                 {
3981                   if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3982                     {
3983                       yyp += yytnamerr (yyp, yyarg[yyi++]);
3984                       yyf += 2;
3985                     }
3986                   else
3987                     {
3988                       yyp++;
3989                       yyf++;
3990                     }
3991                 }
3992               yyerror (yymsg);
3993               YYSTACK_FREE (yymsg);
3994             }
3995           else
3996             {
3997               yyerror (YY_("syntax error"));
3998               goto yyexhaustedlab;
3999             }
4000         }
4001       else
4002 #endif /* YYERROR_VERBOSE */
4003         yyerror (YY_("syntax error"));
4004     }
4005
4006
4007
4008   if (yyerrstatus == 3)
4009     {
4010       /* If just tried and failed to reuse look-ahead token after an
4011          error, discard it.  */
4012
4013       if (yychar <= YYEOF)
4014         {
4015           /* Return failure if at end of input.  */
4016           if (yychar == YYEOF)
4017             YYABORT;
4018         }
4019       else
4020         {
4021           yydestruct ("Error: discarding", yytoken, &yylval);
4022           yychar = YYEMPTY;
4023         }
4024     }
4025
4026   /* Else will try to reuse look-ahead token after shifting the error
4027      token.  */
4028   goto yyerrlab1;
4029
4030
4031 /*---------------------------------------------------.
4032 | yyerrorlab -- error raised explicitly by YYERROR.  |
4033 `---------------------------------------------------*/
4034 yyerrorlab:
4035
4036   /* Pacify compilers like GCC when the user code never invokes
4037      YYERROR and the label yyerrorlab therefore never appears in user
4038      code.  */
4039   if (0)
4040      goto yyerrorlab;
4041
4042 yyvsp -= yylen;
4043   yyssp -= yylen;
4044   yystate = *yyssp;
4045   goto yyerrlab1;
4046
4047
4048 /*-------------------------------------------------------------.
4049 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
4050 `-------------------------------------------------------------*/
4051 yyerrlab1:
4052   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
4053
4054   for (;;)
4055     {
4056       yyn = yypact[yystate];
4057       if (yyn != YYPACT_NINF)
4058         {
4059           yyn += YYTERROR;
4060           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4061             {
4062               yyn = yytable[yyn];
4063               if (0 < yyn)
4064                 break;
4065             }
4066         }
4067
4068       /* Pop the current state because it cannot handle the error token.  */
4069       if (yyssp == yyss)
4070         YYABORT;
4071
4072
4073       yydestruct ("Error: popping", yystos[yystate], yyvsp);
4074       YYPOPSTACK;
4075       yystate = *yyssp;
4076       YY_STACK_PRINT (yyss, yyssp);
4077     }
4078
4079   if (yyn == YYFINAL)
4080     YYACCEPT;
4081
4082   *++yyvsp = yylval;
4083
4084
4085   /* Shift the error token. */
4086   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4087
4088   yystate = yyn;
4089   goto yynewstate;
4090
4091
4092 /*-------------------------------------.
4093 | yyacceptlab -- YYACCEPT comes here.  |
4094 `-------------------------------------*/
4095 yyacceptlab:
4096   yyresult = 0;
4097   goto yyreturn;
4098
4099 /*-----------------------------------.
4100 | yyabortlab -- YYABORT comes here.  |
4101 `-----------------------------------*/
4102 yyabortlab:
4103   yyresult = 1;
4104   goto yyreturn;
4105
4106 #ifndef yyoverflow
4107 /*-------------------------------------------------.
4108 | yyexhaustedlab -- memory exhaustion comes here.  |
4109 `-------------------------------------------------*/
4110 yyexhaustedlab:
4111   yyerror (YY_("memory exhausted"));
4112   yyresult = 2;
4113   /* Fall through.  */
4114 #endif
4115
4116 yyreturn:
4117   if (yychar != YYEOF && yychar != YYEMPTY)
4118      yydestruct ("Cleanup: discarding lookahead",
4119                  yytoken, &yylval);
4120   while (yyssp != yyss)
4121     {
4122       yydestruct ("Cleanup: popping",
4123                   yystos[*yyssp], yyvsp);
4124       YYPOPSTACK;
4125     }
4126 #ifndef yyoverflow
4127   if (yyss != yyssa)
4128     YYSTACK_FREE (yyss);
4129 #endif
4130   return yyresult;
4131 }
4132
4133
4134 #line 1369 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
4135
4136
4137 int yyerror(const char *ErrorMsg) {
4138   std::string where 
4139     = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4140                   + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4141   std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4142   if (yychar == YYEMPTY || yychar == 0)
4143     errMsg += "end-of-file.";
4144   else
4145     errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4146   std::cerr << errMsg << '\n';
4147   exit(1);
4148 }
4149