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