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