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