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