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