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