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