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