Adding a collector name attribute to Function in the IR. These
[oota-llvm.git] / lib / AsmParser / llvmAsmParser.cpp.cvs
1 /* A Bison parser, made by GNU Bison 2.3.  */
2
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4
5    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6    Free Software Foundation, Inc.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2, or (at your option)
11    any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor,
21    Boston, MA 02110-1301, USA.  */
22
23 /* As a special exception, you may create a larger work that contains
24    part or all of the Bison parser skeleton and distribute that work
25    under terms of your choice, so long as that work isn't itself a
26    parser generator using the skeleton or a modified version thereof
27    as a parser skeleton.  Alternatively, if you modify or redistribute
28    the parser skeleton itself, you may (at your option) remove this
29    special exception, which will cause the skeleton and the resulting
30    Bison output files to be licensed under the GNU General Public
31    License without this special exception.
32
33    This special exception was added by the Free Software Foundation in
34    version 2.2 of Bison.  */
35
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37    simplifying the original so-called "semantic" parser.  */
38
39 /* All symbols defined below should begin with yy or YY, to avoid
40    infringing on user name space.  This should be done even for local
41    variables, as they might otherwise be expanded by user macros.
42    There are some unavoidable exceptions within include files to
43    define necessary library symbols; they are noted "INFRINGES ON
44    USER NAME SPACE" below.  */
45
46 /* Identify Bison output.  */
47 #define YYBISON 1
48
49 /* Bison version.  */
50 #define YYBISON_VERSION "2.3"
51
52 /* Skeleton name.  */
53 #define YYSKELETON_NAME "yacc.c"
54
55 /* Pure parsers.  */
56 #define YYPURE 0
57
58 /* Using locations.  */
59 #define YYLSP_NEEDED 0
60
61 /* Substitute the variable and function names.  */
62 #define yyparse llvmAsmparse
63 #define yylex   llvmAsmlex
64 #define yyerror llvmAsmerror
65 #define yylval  llvmAsmlval
66 #define yychar  llvmAsmchar
67 #define yydebug llvmAsmdebug
68 #define yynerrs llvmAsmnerrs
69
70
71 /* Tokens.  */
72 #ifndef YYTOKENTYPE
73 # define YYTOKENTYPE
74    /* Put the tokens into the symbol table, so that GDB and other debuggers
75       know about them.  */
76    enum yytokentype {
77      ESINT64VAL = 258,
78      EUINT64VAL = 259,
79      ESAPINTVAL = 260,
80      EUAPINTVAL = 261,
81      LOCALVAL_ID = 262,
82      GLOBALVAL_ID = 263,
83      FPVAL = 264,
84      VOID = 265,
85      INTTYPE = 266,
86      FLOAT = 267,
87      DOUBLE = 268,
88      X86_FP80 = 269,
89      FP128 = 270,
90      PPC_FP128 = 271,
91      LABEL = 272,
92      TYPE = 273,
93      LOCALVAR = 274,
94      GLOBALVAR = 275,
95      LABELSTR = 276,
96      STRINGCONSTANT = 277,
97      ATSTRINGCONSTANT = 278,
98      PCTSTRINGCONSTANT = 279,
99      ZEROINITIALIZER = 280,
100      TRUETOK = 281,
101      FALSETOK = 282,
102      BEGINTOK = 283,
103      ENDTOK = 284,
104      DECLARE = 285,
105      DEFINE = 286,
106      GLOBAL = 287,
107      CONSTANT = 288,
108      SECTION = 289,
109      ALIAS = 290,
110      VOLATILE = 291,
111      THREAD_LOCAL = 292,
112      TO = 293,
113      DOTDOTDOT = 294,
114      NULL_TOK = 295,
115      UNDEF = 296,
116      INTERNAL = 297,
117      LINKONCE = 298,
118      WEAK = 299,
119      APPENDING = 300,
120      DLLIMPORT = 301,
121      DLLEXPORT = 302,
122      EXTERN_WEAK = 303,
123      OPAQUE = 304,
124      EXTERNAL = 305,
125      TARGET = 306,
126      TRIPLE = 307,
127      ALIGN = 308,
128      DEPLIBS = 309,
129      CALL = 310,
130      TAIL = 311,
131      ASM_TOK = 312,
132      MODULE = 313,
133      SIDEEFFECT = 314,
134      CC_TOK = 315,
135      CCC_TOK = 316,
136      FASTCC_TOK = 317,
137      COLDCC_TOK = 318,
138      X86_STDCALLCC_TOK = 319,
139      X86_FASTCALLCC_TOK = 320,
140      DATALAYOUT = 321,
141      RET = 322,
142      BR = 323,
143      SWITCH = 324,
144      INVOKE = 325,
145      UNWIND = 326,
146      UNREACHABLE = 327,
147      ADD = 328,
148      SUB = 329,
149      MUL = 330,
150      UDIV = 331,
151      SDIV = 332,
152      FDIV = 333,
153      UREM = 334,
154      SREM = 335,
155      FREM = 336,
156      AND = 337,
157      OR = 338,
158      XOR = 339,
159      SHL = 340,
160      LSHR = 341,
161      ASHR = 342,
162      ICMP = 343,
163      FCMP = 344,
164      EQ = 345,
165      NE = 346,
166      SLT = 347,
167      SGT = 348,
168      SLE = 349,
169      SGE = 350,
170      ULT = 351,
171      UGT = 352,
172      ULE = 353,
173      UGE = 354,
174      OEQ = 355,
175      ONE = 356,
176      OLT = 357,
177      OGT = 358,
178      OLE = 359,
179      OGE = 360,
180      ORD = 361,
181      UNO = 362,
182      UEQ = 363,
183      UNE = 364,
184      MALLOC = 365,
185      ALLOCA = 366,
186      FREE = 367,
187      LOAD = 368,
188      STORE = 369,
189      GETELEMENTPTR = 370,
190      TRUNC = 371,
191      ZEXT = 372,
192      SEXT = 373,
193      FPTRUNC = 374,
194      FPEXT = 375,
195      BITCAST = 376,
196      UITOFP = 377,
197      SITOFP = 378,
198      FPTOUI = 379,
199      FPTOSI = 380,
200      INTTOPTR = 381,
201      PTRTOINT = 382,
202      PHI_TOK = 383,
203      SELECT = 384,
204      VAARG = 385,
205      EXTRACTELEMENT = 386,
206      INSERTELEMENT = 387,
207      SHUFFLEVECTOR = 388,
208      SIGNEXT = 389,
209      ZEROEXT = 390,
210      NORETURN = 391,
211      INREG = 392,
212      SRET = 393,
213      NOUNWIND = 394,
214      NOALIAS = 395,
215      BYVAL = 396,
216      NEST = 397,
217      READNONE = 398,
218      READONLY = 399,
219      GC = 400,
220      DEFAULT = 401,
221      HIDDEN = 402,
222      PROTECTED = 403
223    };
224 #endif
225 /* Tokens.  */
226 #define ESINT64VAL 258
227 #define EUINT64VAL 259
228 #define ESAPINTVAL 260
229 #define EUAPINTVAL 261
230 #define LOCALVAL_ID 262
231 #define GLOBALVAL_ID 263
232 #define FPVAL 264
233 #define VOID 265
234 #define INTTYPE 266
235 #define FLOAT 267
236 #define DOUBLE 268
237 #define X86_FP80 269
238 #define FP128 270
239 #define PPC_FP128 271
240 #define LABEL 272
241 #define TYPE 273
242 #define LOCALVAR 274
243 #define GLOBALVAR 275
244 #define LABELSTR 276
245 #define STRINGCONSTANT 277
246 #define ATSTRINGCONSTANT 278
247 #define PCTSTRINGCONSTANT 279
248 #define ZEROINITIALIZER 280
249 #define TRUETOK 281
250 #define FALSETOK 282
251 #define BEGINTOK 283
252 #define ENDTOK 284
253 #define DECLARE 285
254 #define DEFINE 286
255 #define GLOBAL 287
256 #define CONSTANT 288
257 #define SECTION 289
258 #define ALIAS 290
259 #define VOLATILE 291
260 #define THREAD_LOCAL 292
261 #define TO 293
262 #define DOTDOTDOT 294
263 #define NULL_TOK 295
264 #define UNDEF 296
265 #define INTERNAL 297
266 #define LINKONCE 298
267 #define WEAK 299
268 #define APPENDING 300
269 #define DLLIMPORT 301
270 #define DLLEXPORT 302
271 #define EXTERN_WEAK 303
272 #define OPAQUE 304
273 #define EXTERNAL 305
274 #define TARGET 306
275 #define TRIPLE 307
276 #define ALIGN 308
277 #define DEPLIBS 309
278 #define CALL 310
279 #define TAIL 311
280 #define ASM_TOK 312
281 #define MODULE 313
282 #define SIDEEFFECT 314
283 #define CC_TOK 315
284 #define CCC_TOK 316
285 #define FASTCC_TOK 317
286 #define COLDCC_TOK 318
287 #define X86_STDCALLCC_TOK 319
288 #define X86_FASTCALLCC_TOK 320
289 #define DATALAYOUT 321
290 #define RET 322
291 #define BR 323
292 #define SWITCH 324
293 #define INVOKE 325
294 #define UNWIND 326
295 #define UNREACHABLE 327
296 #define ADD 328
297 #define SUB 329
298 #define MUL 330
299 #define UDIV 331
300 #define SDIV 332
301 #define FDIV 333
302 #define UREM 334
303 #define SREM 335
304 #define FREM 336
305 #define AND 337
306 #define OR 338
307 #define XOR 339
308 #define SHL 340
309 #define LSHR 341
310 #define ASHR 342
311 #define ICMP 343
312 #define FCMP 344
313 #define EQ 345
314 #define NE 346
315 #define SLT 347
316 #define SGT 348
317 #define SLE 349
318 #define SGE 350
319 #define ULT 351
320 #define UGT 352
321 #define ULE 353
322 #define UGE 354
323 #define OEQ 355
324 #define ONE 356
325 #define OLT 357
326 #define OGT 358
327 #define OLE 359
328 #define OGE 360
329 #define ORD 361
330 #define UNO 362
331 #define UEQ 363
332 #define UNE 364
333 #define MALLOC 365
334 #define ALLOCA 366
335 #define FREE 367
336 #define LOAD 368
337 #define STORE 369
338 #define GETELEMENTPTR 370
339 #define TRUNC 371
340 #define ZEXT 372
341 #define SEXT 373
342 #define FPTRUNC 374
343 #define FPEXT 375
344 #define BITCAST 376
345 #define UITOFP 377
346 #define SITOFP 378
347 #define FPTOUI 379
348 #define FPTOSI 380
349 #define INTTOPTR 381
350 #define PTRTOINT 382
351 #define PHI_TOK 383
352 #define SELECT 384
353 #define VAARG 385
354 #define EXTRACTELEMENT 386
355 #define INSERTELEMENT 387
356 #define SHUFFLEVECTOR 388
357 #define SIGNEXT 389
358 #define ZEROEXT 390
359 #define NORETURN 391
360 #define INREG 392
361 #define SRET 393
362 #define NOUNWIND 394
363 #define NOALIAS 395
364 #define BYVAL 396
365 #define NEST 397
366 #define READNONE 398
367 #define READONLY 399
368 #define GC 400
369 #define DEFAULT 401
370 #define HIDDEN 402
371 #define PROTECTED 403
372
373
374
375
376 /* Copy the first part of user declarations.  */
377 #line 14 "/Users/malichus/Source/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
378
379 #include "ParserInternals.h"
380 #include "llvm/CallingConv.h"
381 #include "llvm/InlineAsm.h"
382 #include "llvm/Instructions.h"
383 #include "llvm/Module.h"
384 #include "llvm/ValueSymbolTable.h"
385 #include "llvm/AutoUpgrade.h"
386 #include "llvm/Support/GetElementPtrTypeIterator.h"
387 #include "llvm/Support/CommandLine.h"
388 #include "llvm/ADT/SmallVector.h"
389 #include "llvm/ADT/STLExtras.h"
390 #include "llvm/Support/MathExtras.h"
391 #include "llvm/Support/Streams.h"
392 #include <algorithm>
393 #include <list>
394 #include <map>
395 #include <utility>
396
397 // The following is a gross hack. In order to rid the libAsmParser library of
398 // exceptions, we have to have a way of getting the yyparse function to go into
399 // an error situation. So, whenever we want an error to occur, the GenerateError
400 // function (see bottom of file) sets TriggerError. Then, at the end of each 
401 // production in the grammer we use CHECK_FOR_ERROR which will invoke YYERROR 
402 // (a goto) to put YACC in error state. Furthermore, several calls to 
403 // GenerateError are made from inside productions and they must simulate the
404 // previous exception behavior by exiting the production immediately. We have
405 // replaced these with the GEN_ERROR macro which calls GeneratError and then
406 // immediately invokes YYERROR. This would be so much cleaner if it was a 
407 // recursive descent parser.
408 static bool TriggerError = false;
409 #define CHECK_FOR_ERROR { if (TriggerError) { TriggerError = false; YYABORT; } }
410 #define GEN_ERROR(msg) { GenerateError(msg); YYERROR; }
411
412 int yyerror(const char *ErrorMsg); // Forward declarations to prevent "implicit
413 int yylex();                       // declaration" of xxx warnings.
414 int yyparse();
415 using namespace llvm;
416
417 static Module *ParserResult;
418
419 // DEBUG_UPREFS - Define this symbol if you want to enable debugging output
420 // relating to upreferences in the input stream.
421 //
422 //#define DEBUG_UPREFS 1
423 #ifdef DEBUG_UPREFS
424 #define UR_OUT(X) cerr << X
425 #else
426 #define UR_OUT(X)
427 #endif
428
429 #define YYERROR_VERBOSE 1
430
431 static GlobalVariable *CurGV;
432
433
434 // This contains info used when building the body of a function.  It is
435 // destroyed when the function is completed.
436 //
437 typedef std::vector<Value *> ValueList;           // Numbered defs
438
439 static void 
440 ResolveDefinitions(ValueList &LateResolvers, ValueList *FutureLateResolvers=0);
441
442 static struct PerModuleInfo {
443   Module *CurrentModule;
444   ValueList Values; // Module level numbered definitions
445   ValueList LateResolveValues;
446   std::vector<PATypeHolder>    Types;
447   std::map<ValID, PATypeHolder> LateResolveTypes;
448
449   /// PlaceHolderInfo - When temporary placeholder objects are created, remember
450   /// how they were referenced and on which line of the input they came from so
451   /// that we can resolve them later and print error messages as appropriate.
452   std::map<Value*, std::pair<ValID, int> > PlaceHolderInfo;
453
454   // GlobalRefs - This maintains a mapping between <Type, ValID>'s and forward
455   // references to global values.  Global values may be referenced before they
456   // are defined, and if so, the temporary object that they represent is held
457   // here.  This is used for forward references of GlobalValues.
458   //
459   typedef std::map<std::pair<const PointerType *,
460                              ValID>, GlobalValue*> GlobalRefsType;
461   GlobalRefsType GlobalRefs;
462
463   void ModuleDone() {
464     // If we could not resolve some functions at function compilation time
465     // (calls to functions before they are defined), resolve them now...  Types
466     // are resolved when the constant pool has been completely parsed.
467     //
468     ResolveDefinitions(LateResolveValues);
469     if (TriggerError)
470       return;
471
472     // Check to make sure that all global value forward references have been
473     // resolved!
474     //
475     if (!GlobalRefs.empty()) {
476       std::string UndefinedReferences = "Unresolved global references exist:\n";
477
478       for (GlobalRefsType::iterator I = GlobalRefs.begin(), E =GlobalRefs.end();
479            I != E; ++I) {
480         UndefinedReferences += "  " + I->first.first->getDescription() + " " +
481                                I->first.second.getName() + "\n";
482       }
483       GenerateError(UndefinedReferences);
484       return;
485     }
486
487     // Look for intrinsic functions and CallInst that need to be upgraded
488     for (Module::iterator FI = CurrentModule->begin(),
489          FE = CurrentModule->end(); FI != FE; )
490       UpgradeCallsToIntrinsic(FI++); // must be post-increment, as we remove
491
492     Values.clear();         // Clear out function local definitions
493     Types.clear();
494     CurrentModule = 0;
495   }
496
497   // GetForwardRefForGlobal - Check to see if there is a forward reference
498   // for this global.  If so, remove it from the GlobalRefs map and return it.
499   // If not, just return null.
500   GlobalValue *GetForwardRefForGlobal(const PointerType *PTy, ValID ID) {
501     // Check to see if there is a forward reference to this global variable...
502     // if there is, eliminate it and patch the reference to use the new def'n.
503     GlobalRefsType::iterator I = GlobalRefs.find(std::make_pair(PTy, ID));
504     GlobalValue *Ret = 0;
505     if (I != GlobalRefs.end()) {
506       Ret = I->second;
507       GlobalRefs.erase(I);
508     }
509     return Ret;
510   }
511
512   bool TypeIsUnresolved(PATypeHolder* PATy) {
513     // If it isn't abstract, its resolved
514     const Type* Ty = PATy->get();
515     if (!Ty->isAbstract())
516       return false;
517     // Traverse the type looking for abstract types. If it isn't abstract then
518     // we don't need to traverse that leg of the type. 
519     std::vector<const Type*> WorkList, SeenList;
520     WorkList.push_back(Ty);
521     while (!WorkList.empty()) {
522       const Type* Ty = WorkList.back();
523       SeenList.push_back(Ty);
524       WorkList.pop_back();
525       if (const OpaqueType* OpTy = dyn_cast<OpaqueType>(Ty)) {
526         // Check to see if this is an unresolved type
527         std::map<ValID, PATypeHolder>::iterator I = LateResolveTypes.begin();
528         std::map<ValID, PATypeHolder>::iterator E = LateResolveTypes.end();
529         for ( ; I != E; ++I) {
530           if (I->second.get() == OpTy)
531             return true;
532         }
533       } else if (const SequentialType* SeqTy = dyn_cast<SequentialType>(Ty)) {
534         const Type* TheTy = SeqTy->getElementType();
535         if (TheTy->isAbstract() && TheTy != Ty) {
536           std::vector<const Type*>::iterator I = SeenList.begin(), 
537                                              E = SeenList.end();
538           for ( ; I != E; ++I)
539             if (*I == TheTy)
540               break;
541           if (I == E)
542             WorkList.push_back(TheTy);
543         }
544       } else if (const StructType* StrTy = dyn_cast<StructType>(Ty)) {
545         for (unsigned i = 0; i < StrTy->getNumElements(); ++i) {
546           const Type* TheTy = StrTy->getElementType(i);
547           if (TheTy->isAbstract() && TheTy != Ty) {
548             std::vector<const Type*>::iterator I = SeenList.begin(), 
549                                                E = SeenList.end();
550             for ( ; I != E; ++I)
551               if (*I == TheTy)
552                 break;
553             if (I == E)
554               WorkList.push_back(TheTy);
555           }
556         }
557       }
558     }
559     return false;
560   }
561 } CurModule;
562
563 static struct PerFunctionInfo {
564   Function *CurrentFunction;     // Pointer to current function being created
565
566   ValueList Values; // Keep track of #'d definitions
567   unsigned NextValNum;
568   ValueList LateResolveValues;
569   bool isDeclare;                   // Is this function a forward declararation?
570   GlobalValue::LinkageTypes Linkage; // Linkage for forward declaration.
571   GlobalValue::VisibilityTypes Visibility;
572
573   /// BBForwardRefs - When we see forward references to basic blocks, keep
574   /// track of them here.
575   std::map<ValID, BasicBlock*> BBForwardRefs;
576
577   inline PerFunctionInfo() {
578     CurrentFunction = 0;
579     isDeclare = false;
580     Linkage = GlobalValue::ExternalLinkage;
581     Visibility = GlobalValue::DefaultVisibility;
582   }
583
584   inline void FunctionStart(Function *M) {
585     CurrentFunction = M;
586     NextValNum = 0;
587   }
588
589   void FunctionDone() {
590     // Any forward referenced blocks left?
591     if (!BBForwardRefs.empty()) {
592       GenerateError("Undefined reference to label " +
593                      BBForwardRefs.begin()->second->getName());
594       return;
595     }
596
597     // Resolve all forward references now.
598     ResolveDefinitions(LateResolveValues, &CurModule.LateResolveValues);
599
600     Values.clear();         // Clear out function local definitions
601     BBForwardRefs.clear();
602     CurrentFunction = 0;
603     isDeclare = false;
604     Linkage = GlobalValue::ExternalLinkage;
605     Visibility = GlobalValue::DefaultVisibility;
606   }
607 } CurFun;  // Info for the current function...
608
609 static bool inFunctionScope() { return CurFun.CurrentFunction != 0; }
610
611
612 //===----------------------------------------------------------------------===//
613 //               Code to handle definitions of all the types
614 //===----------------------------------------------------------------------===//
615
616 static void InsertValue(Value *V, ValueList &ValueTab = CurFun.Values) {
617   // Things that have names or are void typed don't get slot numbers
618   if (V->hasName() || (V->getType() == Type::VoidTy))
619     return;
620
621   // In the case of function values, we have to allow for the forward reference
622   // of basic blocks, which are included in the numbering. Consequently, we keep
623   // track of the next insertion location with NextValNum. When a BB gets 
624   // inserted, it could change the size of the CurFun.Values vector.
625   if (&ValueTab == &CurFun.Values) {
626     if (ValueTab.size() <= CurFun.NextValNum)
627       ValueTab.resize(CurFun.NextValNum+1);
628     ValueTab[CurFun.NextValNum++] = V;
629     return;
630   } 
631   // For all other lists, its okay to just tack it on the back of the vector.
632   ValueTab.push_back(V);
633 }
634
635 static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) {
636   switch (D.Type) {
637   case ValID::LocalID:               // Is it a numbered definition?
638     // Module constants occupy the lowest numbered slots...
639     if (D.Num < CurModule.Types.size())
640       return CurModule.Types[D.Num];
641     break;
642   case ValID::LocalName:                 // Is it a named definition?
643     if (const Type *N = CurModule.CurrentModule->getTypeByName(D.getName())) {
644       D.destroy();  // Free old strdup'd memory...
645       return N;
646     }
647     break;
648   default:
649     GenerateError("Internal parser error: Invalid symbol type reference");
650     return 0;
651   }
652
653   // If we reached here, we referenced either a symbol that we don't know about
654   // or an id number that hasn't been read yet.  We may be referencing something
655   // forward, so just create an entry to be resolved later and get to it...
656   //
657   if (DoNotImprovise) return 0;  // Do we just want a null to be returned?
658
659
660   if (inFunctionScope()) {
661     if (D.Type == ValID::LocalName) {
662       GenerateError("Reference to an undefined type: '" + D.getName() + "'");
663       return 0;
664     } else {
665       GenerateError("Reference to an undefined type: #" + utostr(D.Num));
666       return 0;
667     }
668   }
669
670   std::map<ValID, PATypeHolder>::iterator I =CurModule.LateResolveTypes.find(D);
671   if (I != CurModule.LateResolveTypes.end())
672     return I->second;
673
674   Type *Typ = OpaqueType::get();
675   CurModule.LateResolveTypes.insert(std::make_pair(D, Typ));
676   return Typ;
677  }
678
679 // getExistingVal - Look up the value specified by the provided type and
680 // the provided ValID.  If the value exists and has already been defined, return
681 // it.  Otherwise return null.
682 //
683 static Value *getExistingVal(const Type *Ty, const ValID &D) {
684   if (isa<FunctionType>(Ty)) {
685     GenerateError("Functions are not values and "
686                    "must be referenced as pointers");
687     return 0;
688   }
689
690   switch (D.Type) {
691   case ValID::LocalID: {                 // Is it a numbered definition?
692     // Check that the number is within bounds.
693     if (D.Num >= CurFun.Values.size()) 
694       return 0;
695     Value *Result = CurFun.Values[D.Num];
696     if (Ty != Result->getType()) {
697       GenerateError("Numbered value (%" + utostr(D.Num) + ") of type '" +
698                     Result->getType()->getDescription() + "' does not match " 
699                     "expected type, '" + Ty->getDescription() + "'");
700       return 0;
701     }
702     return Result;
703   }
704   case ValID::GlobalID: {                 // Is it a numbered definition?
705     if (D.Num >= CurModule.Values.size()) 
706       return 0;
707     Value *Result = CurModule.Values[D.Num];
708     if (Ty != Result->getType()) {
709       GenerateError("Numbered value (@" + utostr(D.Num) + ") of type '" +
710                     Result->getType()->getDescription() + "' does not match " 
711                     "expected type, '" + Ty->getDescription() + "'");
712       return 0;
713     }
714     return Result;
715   }
716     
717   case ValID::LocalName: {                // Is it a named definition?
718     if (!inFunctionScope()) 
719       return 0;
720     ValueSymbolTable &SymTab = CurFun.CurrentFunction->getValueSymbolTable();
721     Value *N = SymTab.lookup(D.getName());
722     if (N == 0) 
723       return 0;
724     if (N->getType() != Ty)
725       return 0;
726     
727     D.destroy();  // Free old strdup'd memory...
728     return N;
729   }
730   case ValID::GlobalName: {                // Is it a named definition?
731     ValueSymbolTable &SymTab = CurModule.CurrentModule->getValueSymbolTable();
732     Value *N = SymTab.lookup(D.getName());
733     if (N == 0) 
734       return 0;
735     if (N->getType() != Ty)
736       return 0;
737
738     D.destroy();  // Free old strdup'd memory...
739     return N;
740   }
741
742   // Check to make sure that "Ty" is an integral type, and that our
743   // value will fit into the specified type...
744   case ValID::ConstSIntVal:    // Is it a constant pool reference??
745     if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
746       GenerateError("Signed integral constant '" +
747                      itostr(D.ConstPool64) + "' is invalid for type '" +
748                      Ty->getDescription() + "'");
749       return 0;
750     }
751     return ConstantInt::get(Ty, D.ConstPool64, true);
752
753   case ValID::ConstUIntVal:     // Is it an unsigned const pool reference?
754     if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) {
755       if (!ConstantInt::isValueValidForType(Ty, D.ConstPool64)) {
756         GenerateError("Integral constant '" + utostr(D.UConstPool64) +
757                        "' is invalid or out of range");
758         return 0;
759       } else {     // This is really a signed reference.  Transmogrify.
760         return ConstantInt::get(Ty, D.ConstPool64, true);
761       }
762     } else {
763       return ConstantInt::get(Ty, D.UConstPool64);
764     }
765
766   case ValID::ConstFPVal:        // Is it a floating point const pool reference?
767     if (!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP)) {
768       GenerateError("FP constant invalid for type");
769       return 0;
770     }
771     // Lexer has no type info, so builds all float and double  FP constants 
772     // as double.  Fix this here.  Long double does not need this.
773     if (&D.ConstPoolFP->getSemantics() == &APFloat::IEEEdouble &&
774         Ty==Type::FloatTy)
775       D.ConstPoolFP->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
776     return ConstantFP::get(Ty, *D.ConstPoolFP);
777
778   case ValID::ConstNullVal:      // Is it a null value?
779     if (!isa<PointerType>(Ty)) {
780       GenerateError("Cannot create a a non pointer null");
781       return 0;
782     }
783     return ConstantPointerNull::get(cast<PointerType>(Ty));
784
785   case ValID::ConstUndefVal:      // Is it an undef value?
786     return UndefValue::get(Ty);
787
788   case ValID::ConstZeroVal:      // Is it a zero value?
789     return Constant::getNullValue(Ty);
790     
791   case ValID::ConstantVal:       // Fully resolved constant?
792     if (D.ConstantValue->getType() != Ty) {
793       GenerateError("Constant expression type different from required type");
794       return 0;
795     }
796     return D.ConstantValue;
797
798   case ValID::InlineAsmVal: {    // Inline asm expression
799     const PointerType *PTy = dyn_cast<PointerType>(Ty);
800     const FunctionType *FTy =
801       PTy ? dyn_cast<FunctionType>(PTy->getElementType()) : 0;
802     if (!FTy || !InlineAsm::Verify(FTy, D.IAD->Constraints)) {
803       GenerateError("Invalid type for asm constraint string");
804       return 0;
805     }
806     InlineAsm *IA = InlineAsm::get(FTy, D.IAD->AsmString, D.IAD->Constraints,
807                                    D.IAD->HasSideEffects);
808     D.destroy();   // Free InlineAsmDescriptor.
809     return IA;
810   }
811   default:
812     assert(0 && "Unhandled case!");
813     return 0;
814   }   // End of switch
815
816   assert(0 && "Unhandled case!");
817   return 0;
818 }
819
820 // getVal - This function is identical to getExistingVal, except that if a
821 // value is not already defined, it "improvises" by creating a placeholder var
822 // that looks and acts just like the requested variable.  When the value is
823 // defined later, all uses of the placeholder variable are replaced with the
824 // real thing.
825 //
826 static Value *getVal(const Type *Ty, const ValID &ID) {
827   if (Ty == Type::LabelTy) {
828     GenerateError("Cannot use a basic block here");
829     return 0;
830   }
831
832   // See if the value has already been defined.
833   Value *V = getExistingVal(Ty, ID);
834   if (V) return V;
835   if (TriggerError) return 0;
836
837   if (!Ty->isFirstClassType() && !isa<OpaqueType>(Ty)) {
838     GenerateError("Invalid use of a composite type");
839     return 0;
840   }
841
842   // If we reached here, we referenced either a symbol that we don't know about
843   // or an id number that hasn't been read yet.  We may be referencing something
844   // forward, so just create an entry to be resolved later and get to it...
845   //
846   switch (ID.Type) {
847   case ValID::GlobalName:
848   case ValID::GlobalID: {
849    const PointerType *PTy = dyn_cast<PointerType>(Ty);
850    if (!PTy) {
851      GenerateError("Invalid type for reference to global" );
852      return 0;
853    }
854    const Type* ElTy = PTy->getElementType();
855    if (const FunctionType *FTy = dyn_cast<FunctionType>(ElTy))
856      V = new Function(FTy, GlobalValue::ExternalLinkage);
857    else
858      V = new GlobalVariable(ElTy, false, GlobalValue::ExternalLinkage);
859    break;
860   }
861   default:
862    V = new Argument(Ty);
863   }
864   
865   // Remember where this forward reference came from.  FIXME, shouldn't we try
866   // to recycle these things??
867   CurModule.PlaceHolderInfo.insert(std::make_pair(V, std::make_pair(ID,
868                                                               LLLgetLineNo())));
869
870   if (inFunctionScope())
871     InsertValue(V, CurFun.LateResolveValues);
872   else
873     InsertValue(V, CurModule.LateResolveValues);
874   return V;
875 }
876
877 /// defineBBVal - This is a definition of a new basic block with the specified
878 /// identifier which must be the same as CurFun.NextValNum, if its numeric.
879 static BasicBlock *defineBBVal(const ValID &ID) {
880   assert(inFunctionScope() && "Can't get basic block at global scope!");
881
882   BasicBlock *BB = 0;
883
884   // First, see if this was forward referenced
885
886   std::map<ValID, BasicBlock*>::iterator BBI = CurFun.BBForwardRefs.find(ID);
887   if (BBI != CurFun.BBForwardRefs.end()) {
888     BB = BBI->second;
889     // The forward declaration could have been inserted anywhere in the
890     // function: insert it into the correct place now.
891     CurFun.CurrentFunction->getBasicBlockList().remove(BB);
892     CurFun.CurrentFunction->getBasicBlockList().push_back(BB);
893
894     // We're about to erase the entry, save the key so we can clean it up.
895     ValID Tmp = BBI->first;
896
897     // Erase the forward ref from the map as its no longer "forward"
898     CurFun.BBForwardRefs.erase(ID);
899
900     // The key has been removed from the map but so we don't want to leave 
901     // strdup'd memory around so destroy it too.
902     Tmp.destroy();
903
904     // If its a numbered definition, bump the number and set the BB value.
905     if (ID.Type == ValID::LocalID) {
906       assert(ID.Num == CurFun.NextValNum && "Invalid new block number");
907       InsertValue(BB);
908     }
909
910     ID.destroy();
911     return BB;
912   } 
913   
914   // We haven't seen this BB before and its first mention is a definition. 
915   // Just create it and return it.
916   std::string Name (ID.Type == ValID::LocalName ? ID.getName() : "");
917   BB = new BasicBlock(Name, CurFun.CurrentFunction);
918   if (ID.Type == ValID::LocalID) {
919     assert(ID.Num == CurFun.NextValNum && "Invalid new block number");
920     InsertValue(BB);
921   }
922
923   ID.destroy(); // Free strdup'd memory
924   return BB;
925 }
926
927 /// getBBVal - get an existing BB value or create a forward reference for it.
928 /// 
929 static BasicBlock *getBBVal(const ValID &ID) {
930   assert(inFunctionScope() && "Can't get basic block at global scope!");
931
932   BasicBlock *BB =  0;
933
934   std::map<ValID, BasicBlock*>::iterator BBI = CurFun.BBForwardRefs.find(ID);
935   if (BBI != CurFun.BBForwardRefs.end()) {
936     BB = BBI->second;
937   } if (ID.Type == ValID::LocalName) {
938     std::string Name = ID.getName();
939     Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
940     if (N)
941       if (N->getType()->getTypeID() == Type::LabelTyID)
942         BB = cast<BasicBlock>(N);
943       else
944         GenerateError("Reference to label '" + Name + "' is actually of type '"+
945           N->getType()->getDescription() + "'");
946   } else if (ID.Type == ValID::LocalID) {
947     if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
948       if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)
949         BB = cast<BasicBlock>(CurFun.Values[ID.Num]);
950       else
951         GenerateError("Reference to label '%" + utostr(ID.Num) + 
952           "' is actually of type '"+ 
953           CurFun.Values[ID.Num]->getType()->getDescription() + "'");
954     }
955   } else {
956     GenerateError("Illegal label reference " + ID.getName());
957     return 0;
958   }
959
960   // If its already been defined, return it now.
961   if (BB) {
962     ID.destroy(); // Free strdup'd memory.
963     return BB;
964   }
965
966   // Otherwise, this block has not been seen before, create it.
967   std::string Name;
968   if (ID.Type == ValID::LocalName)
969     Name = ID.getName();
970   BB = new BasicBlock(Name, CurFun.CurrentFunction);
971
972   // Insert it in the forward refs map.
973   CurFun.BBForwardRefs[ID] = BB;
974
975   return BB;
976 }
977
978
979 //===----------------------------------------------------------------------===//
980 //              Code to handle forward references in instructions
981 //===----------------------------------------------------------------------===//
982 //
983 // This code handles the late binding needed with statements that reference
984 // values not defined yet... for example, a forward branch, or the PHI node for
985 // a loop body.
986 //
987 // This keeps a table (CurFun.LateResolveValues) of all such forward references
988 // and back patchs after we are done.
989 //
990
991 // ResolveDefinitions - If we could not resolve some defs at parsing
992 // time (forward branches, phi functions for loops, etc...) resolve the
993 // defs now...
994 //
995 static void 
996 ResolveDefinitions(ValueList &LateResolvers, ValueList *FutureLateResolvers) {
997   // Loop over LateResolveDefs fixing up stuff that couldn't be resolved
998   while (!LateResolvers.empty()) {
999     Value *V = LateResolvers.back();
1000     LateResolvers.pop_back();
1001
1002     std::map<Value*, std::pair<ValID, int> >::iterator PHI =
1003       CurModule.PlaceHolderInfo.find(V);
1004     assert(PHI != CurModule.PlaceHolderInfo.end() && "Placeholder error!");
1005
1006     ValID &DID = PHI->second.first;
1007
1008     Value *TheRealValue = getExistingVal(V->getType(), DID);
1009     if (TriggerError)
1010       return;
1011     if (TheRealValue) {
1012       V->replaceAllUsesWith(TheRealValue);
1013       delete V;
1014       CurModule.PlaceHolderInfo.erase(PHI);
1015     } else if (FutureLateResolvers) {
1016       // Functions have their unresolved items forwarded to the module late
1017       // resolver table
1018       InsertValue(V, *FutureLateResolvers);
1019     } else {
1020       if (DID.Type == ValID::LocalName || DID.Type == ValID::GlobalName) {
1021         GenerateError("Reference to an invalid definition: '" +DID.getName()+
1022                        "' of type '" + V->getType()->getDescription() + "'",
1023                        PHI->second.second);
1024         return;
1025       } else {
1026         GenerateError("Reference to an invalid definition: #" +
1027                        itostr(DID.Num) + " of type '" +
1028                        V->getType()->getDescription() + "'",
1029                        PHI->second.second);
1030         return;
1031       }
1032     }
1033   }
1034   LateResolvers.clear();
1035 }
1036
1037 // ResolveTypeTo - A brand new type was just declared.  This means that (if
1038 // name is not null) things referencing Name can be resolved.  Otherwise, things
1039 // refering to the number can be resolved.  Do this now.
1040 //
1041 static void ResolveTypeTo(std::string *Name, const Type *ToTy) {
1042   ValID D;
1043   if (Name)
1044     D = ValID::createLocalName(*Name);
1045   else      
1046     D = ValID::createLocalID(CurModule.Types.size());
1047
1048   std::map<ValID, PATypeHolder>::iterator I =
1049     CurModule.LateResolveTypes.find(D);
1050   if (I != CurModule.LateResolveTypes.end()) {
1051     ((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy);
1052     CurModule.LateResolveTypes.erase(I);
1053   }
1054 }
1055
1056 // setValueName - Set the specified value to the name given.  The name may be
1057 // null potentially, in which case this is a noop.  The string passed in is
1058 // assumed to be a malloc'd string buffer, and is free'd by this function.
1059 //
1060 static void setValueName(Value *V, std::string *NameStr) {
1061   if (!NameStr) return;
1062   std::string Name(*NameStr);      // Copy string
1063   delete NameStr;                  // Free old string
1064
1065   if (V->getType() == Type::VoidTy) {
1066     GenerateError("Can't assign name '" + Name+"' to value with void type");
1067     return;
1068   }
1069
1070   assert(inFunctionScope() && "Must be in function scope!");
1071   ValueSymbolTable &ST = CurFun.CurrentFunction->getValueSymbolTable();
1072   if (ST.lookup(Name)) {
1073     GenerateError("Redefinition of value '" + Name + "' of type '" +
1074                    V->getType()->getDescription() + "'");
1075     return;
1076   }
1077
1078   // Set the name.
1079   V->setName(Name);
1080 }
1081
1082 /// ParseGlobalVariable - Handle parsing of a global.  If Initializer is null,
1083 /// this is a declaration, otherwise it is a definition.
1084 static GlobalVariable *
1085 ParseGlobalVariable(std::string *NameStr,
1086                     GlobalValue::LinkageTypes Linkage,
1087                     GlobalValue::VisibilityTypes Visibility,
1088                     bool isConstantGlobal, const Type *Ty,
1089                     Constant *Initializer, bool IsThreadLocal) {
1090   if (isa<FunctionType>(Ty)) {
1091     GenerateError("Cannot declare global vars of function type");
1092     return 0;
1093   }
1094
1095   const PointerType *PTy = PointerType::get(Ty);
1096
1097   std::string Name;
1098   if (NameStr) {
1099     Name = *NameStr;      // Copy string
1100     delete NameStr;       // Free old string
1101   }
1102
1103   // See if this global value was forward referenced.  If so, recycle the
1104   // object.
1105   ValID ID;
1106   if (!Name.empty()) {
1107     ID = ValID::createGlobalName(Name);
1108   } else {
1109     ID = ValID::createGlobalID(CurModule.Values.size());
1110   }
1111
1112   if (GlobalValue *FWGV = CurModule.GetForwardRefForGlobal(PTy, ID)) {
1113     // Move the global to the end of the list, from whereever it was
1114     // previously inserted.
1115     GlobalVariable *GV = cast<GlobalVariable>(FWGV);
1116     CurModule.CurrentModule->getGlobalList().remove(GV);
1117     CurModule.CurrentModule->getGlobalList().push_back(GV);
1118     GV->setInitializer(Initializer);
1119     GV->setLinkage(Linkage);
1120     GV->setVisibility(Visibility);
1121     GV->setConstant(isConstantGlobal);
1122     GV->setThreadLocal(IsThreadLocal);
1123     InsertValue(GV, CurModule.Values);
1124     return GV;
1125   }
1126
1127   // If this global has a name
1128   if (!Name.empty()) {
1129     // if the global we're parsing has an initializer (is a definition) and
1130     // has external linkage.
1131     if (Initializer && Linkage != GlobalValue::InternalLinkage)
1132       // If there is already a global with external linkage with this name
1133       if (CurModule.CurrentModule->getGlobalVariable(Name, false)) {
1134         // If we allow this GVar to get created, it will be renamed in the
1135         // symbol table because it conflicts with an existing GVar. We can't
1136         // allow redefinition of GVars whose linking indicates that their name
1137         // must stay the same. Issue the error.
1138         GenerateError("Redefinition of global variable named '" + Name +
1139                        "' of type '" + Ty->getDescription() + "'");
1140         return 0;
1141       }
1142   }
1143
1144   // Otherwise there is no existing GV to use, create one now.
1145   GlobalVariable *GV =
1146     new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
1147                        CurModule.CurrentModule, IsThreadLocal);
1148   GV->setVisibility(Visibility);
1149   InsertValue(GV, CurModule.Values);
1150   return GV;
1151 }
1152
1153 // setTypeName - Set the specified type to the name given.  The name may be
1154 // null potentially, in which case this is a noop.  The string passed in is
1155 // assumed to be a malloc'd string buffer, and is freed by this function.
1156 //
1157 // This function returns true if the type has already been defined, but is
1158 // allowed to be redefined in the specified context.  If the name is a new name
1159 // for the type plane, it is inserted and false is returned.
1160 static bool setTypeName(const Type *T, std::string *NameStr) {
1161   assert(!inFunctionScope() && "Can't give types function-local names!");
1162   if (NameStr == 0) return false;
1163  
1164   std::string Name(*NameStr);      // Copy string
1165   delete NameStr;                  // Free old string
1166
1167   // We don't allow assigning names to void type
1168   if (T == Type::VoidTy) {
1169     GenerateError("Can't assign name '" + Name + "' to the void type");
1170     return false;
1171   }
1172
1173   // Set the type name, checking for conflicts as we do so.
1174   bool AlreadyExists = CurModule.CurrentModule->addTypeName(Name, T);
1175
1176   if (AlreadyExists) {   // Inserting a name that is already defined???
1177     const Type *Existing = CurModule.CurrentModule->getTypeByName(Name);
1178     assert(Existing && "Conflict but no matching type?!");
1179
1180     // There is only one case where this is allowed: when we are refining an
1181     // opaque type.  In this case, Existing will be an opaque type.
1182     if (const OpaqueType *OpTy = dyn_cast<OpaqueType>(Existing)) {
1183       // We ARE replacing an opaque type!
1184       const_cast<OpaqueType*>(OpTy)->refineAbstractTypeTo(T);
1185       return true;
1186     }
1187
1188     // Otherwise, this is an attempt to redefine a type. That's okay if
1189     // the redefinition is identical to the original. This will be so if
1190     // Existing and T point to the same Type object. In this one case we
1191     // allow the equivalent redefinition.
1192     if (Existing == T) return true;  // Yes, it's equal.
1193
1194     // Any other kind of (non-equivalent) redefinition is an error.
1195     GenerateError("Redefinition of type named '" + Name + "' of type '" +
1196                    T->getDescription() + "'");
1197   }
1198
1199   return false;
1200 }
1201
1202 //===----------------------------------------------------------------------===//
1203 // Code for handling upreferences in type names...
1204 //
1205
1206 // TypeContains - Returns true if Ty directly contains E in it.
1207 //
1208 static bool TypeContains(const Type *Ty, const Type *E) {
1209   return std::find(Ty->subtype_begin(), Ty->subtype_end(),
1210                    E) != Ty->subtype_end();
1211 }
1212
1213 namespace {
1214   struct UpRefRecord {
1215     // NestingLevel - The number of nesting levels that need to be popped before
1216     // this type is resolved.
1217     unsigned NestingLevel;
1218
1219     // LastContainedTy - This is the type at the current binding level for the
1220     // type.  Every time we reduce the nesting level, this gets updated.
1221     const Type *LastContainedTy;
1222
1223     // UpRefTy - This is the actual opaque type that the upreference is
1224     // represented with.
1225     OpaqueType *UpRefTy;
1226
1227     UpRefRecord(unsigned NL, OpaqueType *URTy)
1228       : NestingLevel(NL), LastContainedTy(URTy), UpRefTy(URTy) {}
1229   };
1230 }
1231
1232 // UpRefs - A list of the outstanding upreferences that need to be resolved.
1233 static std::vector<UpRefRecord> UpRefs;
1234
1235 /// HandleUpRefs - Every time we finish a new layer of types, this function is
1236 /// called.  It loops through the UpRefs vector, which is a list of the
1237 /// currently active types.  For each type, if the up reference is contained in
1238 /// the newly completed type, we decrement the level count.  When the level
1239 /// count reaches zero, the upreferenced type is the type that is passed in:
1240 /// thus we can complete the cycle.
1241 ///
1242 static PATypeHolder HandleUpRefs(const Type *ty) {
1243   // If Ty isn't abstract, or if there are no up-references in it, then there is
1244   // nothing to resolve here.
1245   if (!ty->isAbstract() || UpRefs.empty()) return ty;
1246   
1247   PATypeHolder Ty(ty);
1248   UR_OUT("Type '" << Ty->getDescription() <<
1249          "' newly formed.  Resolving upreferences.\n" <<
1250          UpRefs.size() << " upreferences active!\n");
1251
1252   // If we find any resolvable upreferences (i.e., those whose NestingLevel goes
1253   // to zero), we resolve them all together before we resolve them to Ty.  At
1254   // the end of the loop, if there is anything to resolve to Ty, it will be in
1255   // this variable.
1256   OpaqueType *TypeToResolve = 0;
1257
1258   for (unsigned i = 0; i != UpRefs.size(); ++i) {
1259     UR_OUT("  UR#" << i << " - TypeContains(" << Ty->getDescription() << ", "
1260            << UpRefs[i].second->getDescription() << ") = "
1261            << (TypeContains(Ty, UpRefs[i].second) ? "true" : "false") << "\n");
1262     if (TypeContains(Ty, UpRefs[i].LastContainedTy)) {
1263       // Decrement level of upreference
1264       unsigned Level = --UpRefs[i].NestingLevel;
1265       UpRefs[i].LastContainedTy = Ty;
1266       UR_OUT("  Uplevel Ref Level = " << Level << "\n");
1267       if (Level == 0) {                     // Upreference should be resolved!
1268         if (!TypeToResolve) {
1269           TypeToResolve = UpRefs[i].UpRefTy;
1270         } else {
1271           UR_OUT("  * Resolving upreference for "
1272                  << UpRefs[i].second->getDescription() << "\n";
1273                  std::string OldName = UpRefs[i].UpRefTy->getDescription());
1274           UpRefs[i].UpRefTy->refineAbstractTypeTo(TypeToResolve);
1275           UR_OUT("  * Type '" << OldName << "' refined upreference to: "
1276                  << (const void*)Ty << ", " << Ty->getDescription() << "\n");
1277         }
1278         UpRefs.erase(UpRefs.begin()+i);     // Remove from upreference list...
1279         --i;                                // Do not skip the next element...
1280       }
1281     }
1282   }
1283
1284   if (TypeToResolve) {
1285     UR_OUT("  * Resolving upreference for "
1286            << UpRefs[i].second->getDescription() << "\n";
1287            std::string OldName = TypeToResolve->getDescription());
1288     TypeToResolve->refineAbstractTypeTo(Ty);
1289   }
1290
1291   return Ty;
1292 }
1293
1294 //===----------------------------------------------------------------------===//
1295 //            RunVMAsmParser - Define an interface to this parser
1296 //===----------------------------------------------------------------------===//
1297 //
1298 static Module* RunParser(Module * M);
1299
1300 Module *llvm::RunVMAsmParser(llvm::MemoryBuffer *MB) {
1301   InitLLLexer(MB);
1302   Module *M = RunParser(new Module(LLLgetFilename()));
1303   FreeLexer();
1304   return M;
1305 }
1306
1307
1308
1309 /* Enabling traces.  */
1310 #ifndef YYDEBUG
1311 # define YYDEBUG 0
1312 #endif
1313
1314 /* Enabling verbose error messages.  */
1315 #ifdef YYERROR_VERBOSE
1316 # undef YYERROR_VERBOSE
1317 # define YYERROR_VERBOSE 1
1318 #else
1319 # define YYERROR_VERBOSE 0
1320 #endif
1321
1322 /* Enabling the token table.  */
1323 #ifndef YYTOKEN_TABLE
1324 # define YYTOKEN_TABLE 0
1325 #endif
1326
1327 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1328 typedef union YYSTYPE
1329 #line 945 "/Users/malichus/Source/llvm/src/llvm/lib/AsmParser/llvmAsmParser.y"
1330 {
1331   llvm::Module                           *ModuleVal;
1332   llvm::Function                         *FunctionVal;
1333   llvm::BasicBlock                       *BasicBlockVal;
1334   llvm::TerminatorInst                   *TermInstVal;
1335   llvm::Instruction                      *InstVal;
1336   llvm::Constant                         *ConstVal;
1337
1338   const llvm::Type                       *PrimType;
1339   std::list<llvm::PATypeHolder>          *TypeList;
1340   llvm::PATypeHolder                     *TypeVal;
1341   llvm::Value                            *ValueVal;
1342   std::vector<llvm::Value*>              *ValueList;
1343   llvm::ArgListType                      *ArgList;
1344   llvm::TypeWithAttrs                     TypeWithAttrs;
1345   llvm::TypeWithAttrsList                *TypeWithAttrsList;
1346   llvm::ParamList                        *ParamList;
1347
1348   // Represent the RHS of PHI node
1349   std::list<std::pair<llvm::Value*,
1350                       llvm::BasicBlock*> > *PHIList;
1351   std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
1352   std::vector<llvm::Constant*>           *ConstVector;
1353
1354   llvm::GlobalValue::LinkageTypes         Linkage;
1355   llvm::GlobalValue::VisibilityTypes      Visibility;
1356   uint16_t                          ParamAttrs;
1357   llvm::APInt                       *APIntVal;
1358   int64_t                           SInt64Val;
1359   uint64_t                          UInt64Val;
1360   int                               SIntVal;
1361   unsigned                          UIntVal;
1362   llvm::APFloat                    *FPVal;
1363   bool                              BoolVal;
1364
1365   std::string                      *StrVal;   // This memory must be deleted
1366   llvm::ValID                       ValIDVal;
1367
1368   llvm::Instruction::BinaryOps      BinaryOpVal;
1369   llvm::Instruction::TermOps        TermOpVal;
1370   llvm::Instruction::MemoryOps      MemOpVal;
1371   llvm::Instruction::CastOps        CastOpVal;
1372   llvm::Instruction::OtherOps       OtherOpVal;
1373   llvm::ICmpInst::Predicate         IPredicate;
1374   llvm::FCmpInst::Predicate         FPredicate;
1375 }
1376 /* Line 193 of yacc.c.  */
1377 #line 1378 "llvmAsmParser.tab.c"
1378         YYSTYPE;
1379 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1380 # define YYSTYPE_IS_DECLARED 1
1381 # define YYSTYPE_IS_TRIVIAL 1
1382 #endif
1383
1384
1385
1386 /* Copy the second part of user declarations.  */
1387
1388
1389 /* Line 216 of yacc.c.  */
1390 #line 1391 "llvmAsmParser.tab.c"
1391
1392 #ifdef short
1393 # undef short
1394 #endif
1395
1396 #ifdef YYTYPE_UINT8
1397 typedef YYTYPE_UINT8 yytype_uint8;
1398 #else
1399 typedef unsigned char yytype_uint8;
1400 #endif
1401
1402 #ifdef YYTYPE_INT8
1403 typedef YYTYPE_INT8 yytype_int8;
1404 #elif (defined __STDC__ || defined __C99__FUNC__ \
1405      || defined __cplusplus || defined _MSC_VER)
1406 typedef signed char yytype_int8;
1407 #else
1408 typedef short int yytype_int8;
1409 #endif
1410
1411 #ifdef YYTYPE_UINT16
1412 typedef YYTYPE_UINT16 yytype_uint16;
1413 #else
1414 typedef unsigned short int yytype_uint16;
1415 #endif
1416
1417 #ifdef YYTYPE_INT16
1418 typedef YYTYPE_INT16 yytype_int16;
1419 #else
1420 typedef short int yytype_int16;
1421 #endif
1422
1423 #ifndef YYSIZE_T
1424 # ifdef __SIZE_TYPE__
1425 #  define YYSIZE_T __SIZE_TYPE__
1426 # elif defined size_t
1427 #  define YYSIZE_T size_t
1428 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1429      || defined __cplusplus || defined _MSC_VER)
1430 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1431 #  define YYSIZE_T size_t
1432 # else
1433 #  define YYSIZE_T unsigned int
1434 # endif
1435 #endif
1436
1437 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1438
1439 #ifndef YY_
1440 # if defined YYENABLE_NLS && YYENABLE_NLS
1441 #  if ENABLE_NLS
1442 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1443 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
1444 #  endif
1445 # endif
1446 # ifndef YY_
1447 #  define YY_(msgid) msgid
1448 # endif
1449 #endif
1450
1451 /* Suppress unused-variable warnings by "using" E.  */
1452 #if ! defined lint || defined __GNUC__
1453 # define YYUSE(e) ((void) (e))
1454 #else
1455 # define YYUSE(e) /* empty */
1456 #endif
1457
1458 /* Identity function, used to suppress warnings about constant conditions.  */
1459 #ifndef lint
1460 # define YYID(n) (n)
1461 #else
1462 #if (defined __STDC__ || defined __C99__FUNC__ \
1463      || defined __cplusplus || defined _MSC_VER)
1464 static int
1465 YYID (int i)
1466 #else
1467 static int
1468 YYID (i)
1469     int i;
1470 #endif
1471 {
1472   return i;
1473 }
1474 #endif
1475
1476 #if ! defined yyoverflow || YYERROR_VERBOSE
1477
1478 /* The parser invokes alloca or malloc; define the necessary symbols.  */
1479
1480 # ifdef YYSTACK_USE_ALLOCA
1481 #  if YYSTACK_USE_ALLOCA
1482 #   ifdef __GNUC__
1483 #    define YYSTACK_ALLOC __builtin_alloca
1484 #   elif defined __BUILTIN_VA_ARG_INCR
1485 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1486 #   elif defined _AIX
1487 #    define YYSTACK_ALLOC __alloca
1488 #   elif defined _MSC_VER
1489 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1490 #    define alloca _alloca
1491 #   else
1492 #    define YYSTACK_ALLOC alloca
1493 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1494      || defined __cplusplus || defined _MSC_VER)
1495 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1496 #     ifndef _STDLIB_H
1497 #      define _STDLIB_H 1
1498 #     endif
1499 #    endif
1500 #   endif
1501 #  endif
1502 # endif
1503
1504 # ifdef YYSTACK_ALLOC
1505    /* Pacify GCC's `empty if-body' warning.  */
1506 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1507 #  ifndef YYSTACK_ALLOC_MAXIMUM
1508     /* The OS might guarantee only one guard page at the bottom of the stack,
1509        and a page size can be as small as 4096 bytes.  So we cannot safely
1510        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
1511        to allow for a few compiler-allocated temporary stack slots.  */
1512 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1513 #  endif
1514 # else
1515 #  define YYSTACK_ALLOC YYMALLOC
1516 #  define YYSTACK_FREE YYFREE
1517 #  ifndef YYSTACK_ALLOC_MAXIMUM
1518 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1519 #  endif
1520 #  if (defined __cplusplus && ! defined _STDLIB_H \
1521        && ! ((defined YYMALLOC || defined malloc) \
1522              && (defined YYFREE || defined free)))
1523 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1524 #   ifndef _STDLIB_H
1525 #    define _STDLIB_H 1
1526 #   endif
1527 #  endif
1528 #  ifndef YYMALLOC
1529 #   define YYMALLOC malloc
1530 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1531      || defined __cplusplus || defined _MSC_VER)
1532 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1533 #   endif
1534 #  endif
1535 #  ifndef YYFREE
1536 #   define YYFREE free
1537 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1538      || defined __cplusplus || defined _MSC_VER)
1539 void free (void *); /* INFRINGES ON USER NAME SPACE */
1540 #   endif
1541 #  endif
1542 # endif
1543 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1544
1545
1546 #if (! defined yyoverflow \
1547      && (! defined __cplusplus \
1548          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1549
1550 /* A type that is properly aligned for any stack member.  */
1551 union yyalloc
1552 {
1553   yytype_int16 yyss;
1554   YYSTYPE yyvs;
1555   };
1556
1557 /* The size of the maximum gap between one aligned stack and the next.  */
1558 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1559
1560 /* The size of an array large to enough to hold all stacks, each with
1561    N elements.  */
1562 # define YYSTACK_BYTES(N) \
1563      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1564       + YYSTACK_GAP_MAXIMUM)
1565
1566 /* Copy COUNT objects from FROM to TO.  The source and destination do
1567    not overlap.  */
1568 # ifndef YYCOPY
1569 #  if defined __GNUC__ && 1 < __GNUC__
1570 #   define YYCOPY(To, From, Count) \
1571       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1572 #  else
1573 #   define YYCOPY(To, From, Count)              \
1574       do                                        \
1575         {                                       \
1576           YYSIZE_T yyi;                         \
1577           for (yyi = 0; yyi < (Count); yyi++)   \
1578             (To)[yyi] = (From)[yyi];            \
1579         }                                       \
1580       while (YYID (0))
1581 #  endif
1582 # endif
1583
1584 /* Relocate STACK from its old location to the new one.  The
1585    local variables YYSIZE and YYSTACKSIZE give the old and new number of
1586    elements in the stack, and YYPTR gives the new location of the
1587    stack.  Advance YYPTR to a properly aligned location for the next
1588    stack.  */
1589 # define YYSTACK_RELOCATE(Stack)                                        \
1590     do                                                                  \
1591       {                                                                 \
1592         YYSIZE_T yynewbytes;                                            \
1593         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
1594         Stack = &yyptr->Stack;                                          \
1595         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1596         yyptr += yynewbytes / sizeof (*yyptr);                          \
1597       }                                                                 \
1598     while (YYID (0))
1599
1600 #endif
1601
1602 /* YYFINAL -- State number of the termination state.  */
1603 #define YYFINAL  43
1604 /* YYLAST -- Last index in YYTABLE.  */
1605 #define YYLAST   1820
1606
1607 /* YYNTOKENS -- Number of terminals.  */
1608 #define YYNTOKENS  163
1609 /* YYNNTS -- Number of nonterminals.  */
1610 #define YYNNTS  83
1611 /* YYNRULES -- Number of rules.  */
1612 #define YYNRULES  316
1613 /* YYNRULES -- Number of states.  */
1614 #define YYNSTATES  611
1615
1616 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
1617 #define YYUNDEFTOK  2
1618 #define YYMAXUTOK   403
1619
1620 #define YYTRANSLATE(YYX)                                                \
1621   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1622
1623 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
1624 static const yytype_uint8 yytranslate[] =
1625 {
1626        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1627        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1628        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1629        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1630      153,   154,   151,     2,   150,     2,     2,     2,     2,     2,
1631        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1632      158,   149,   159,     2,     2,     2,     2,     2,     2,     2,
1633        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1634        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1635        2,   155,   152,   157,     2,     2,     2,     2,     2,   162,
1636        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1637        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1638      156,     2,     2,   160,     2,   161,     2,     2,     2,     2,
1639        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1640        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1641        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1642        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1643        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1644        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1645        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1646        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1647        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1648        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1649        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1650        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1651        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1652        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1653       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1654       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1655       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1656       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1657       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
1658       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
1659       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
1660       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
1661       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
1662      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
1663      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
1664      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
1665      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
1666      145,   146,   147,   148
1667 };
1668
1669 #if YYDEBUG
1670 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1671    YYRHS.  */
1672 static const yytype_uint16 yyprhs[] =
1673 {
1674        0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
1675       19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
1676       39,    41,    43,    45,    47,    49,    51,    53,    55,    57,
1677       59,    61,    63,    65,    67,    69,    71,    73,    75,    77,
1678       79,    81,    83,    85,    87,    89,    91,    93,    95,    97,
1679       99,   101,   103,   105,   107,   109,   111,   113,   115,   117,
1680      119,   121,   123,   125,   127,   129,   130,   133,   134,   136,
1681      138,   140,   141,   144,   146,   148,   150,   152,   154,   156,
1682      158,   160,   161,   163,   165,   167,   168,   170,   172,   173,
1683      175,   177,   179,   181,   182,   184,   186,   187,   189,   191,
1684      193,   195,   197,   200,   202,   204,   206,   208,   210,   212,
1685      214,   216,   218,   219,   222,   224,   226,   228,   230,   232,
1686      234,   235,   238,   239,   242,   243,   246,   247,   251,   254,
1687      255,   257,   258,   262,   264,   267,   269,   271,   273,   275,
1688      277,   279,   281,   283,   285,   288,   290,   293,   299,   305,
1689      311,   317,   321,   324,   330,   335,   338,   340,   342,   344,
1690      348,   350,   354,   356,   357,   359,   363,   368,   372,   376,
1691      381,   386,   390,   397,   403,   406,   409,   412,   415,   418,
1692      421,   424,   427,   430,   433,   436,   439,   446,   452,   461,
1693      468,   475,   483,   491,   498,   507,   516,   520,   522,   524,
1694      526,   528,   529,   532,   539,   541,   542,   544,   547,   548,
1695      552,   553,   557,   561,   565,   569,   570,   578,   579,   588,
1696      589,   598,   604,   607,   611,   613,   617,   621,   625,   629,
1697      631,   632,   638,   642,   644,   648,   650,   651,   662,   664,
1698      666,   671,   673,   675,   678,   682,   683,   685,   687,   689,
1699      691,   693,   695,   697,   699,   701,   705,   707,   713,   715,
1700      717,   719,   721,   723,   725,   728,   731,   734,   738,   741,
1701      742,   744,   747,   750,   754,   764,   774,   783,   798,   800,
1702      802,   809,   815,   818,   825,   833,   838,   843,   850,   857,
1703      858,   859,   863,   866,   868,   874,   880,   887,   894,   899,
1704      906,   911,   916,   923,   930,   933,   942,   944,   946,   947,
1705      951,   958,   962,   969,   972,   978,   986
1706 };
1707
1708 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
1709 static const yytype_int16 yyrhs[] =
1710 {
1711      208,     0,    -1,    73,    -1,    74,    -1,    75,    -1,    76,
1712       -1,    77,    -1,    78,    -1,    79,    -1,    80,    -1,    81,
1713       -1,    85,    -1,    86,    -1,    87,    -1,    82,    -1,    83,
1714       -1,    84,    -1,   116,    -1,   117,    -1,   118,    -1,   119,
1715       -1,   120,    -1,   121,    -1,   122,    -1,   123,    -1,   124,
1716       -1,   125,    -1,   126,    -1,   127,    -1,    90,    -1,    91,
1717       -1,    92,    -1,    93,    -1,    94,    -1,    95,    -1,    96,
1718       -1,    97,    -1,    98,    -1,    99,    -1,   100,    -1,   101,
1719       -1,   102,    -1,   103,    -1,   104,    -1,   105,    -1,   106,
1720       -1,   107,    -1,   108,    -1,   109,    -1,    96,    -1,    97,
1721       -1,    98,    -1,    99,    -1,    26,    -1,    27,    -1,    11,
1722       -1,    12,    -1,    13,    -1,    16,    -1,    15,    -1,    14,
1723       -1,    19,    -1,    22,    -1,    24,    -1,   171,    -1,    -1,
1724      171,   149,    -1,    -1,    20,    -1,    23,    -1,   176,    -1,
1725       -1,   174,   149,    -1,    42,    -1,    44,    -1,    43,    -1,
1726       45,    -1,    47,    -1,    46,    -1,    48,    -1,    50,    -1,
1727       -1,   146,    -1,   147,    -1,   148,    -1,    -1,    46,    -1,
1728       48,    -1,    -1,    42,    -1,    43,    -1,    44,    -1,    47,
1729       -1,    -1,    44,    -1,    42,    -1,    -1,    61,    -1,    62,
1730       -1,    63,    -1,    64,    -1,    65,    -1,    60,     4,    -1,
1731      135,    -1,   117,    -1,   134,    -1,   118,    -1,   137,    -1,
1732      138,    -1,   140,    -1,   141,    -1,   142,    -1,    -1,   185,
1733      184,    -1,   136,    -1,   139,    -1,   135,    -1,   134,    -1,
1734      143,    -1,   144,    -1,    -1,   187,   186,    -1,    -1,   145,
1735       22,    -1,    -1,    53,     4,    -1,    -1,   150,    53,     4,
1736       -1,    34,    22,    -1,    -1,   191,    -1,    -1,   150,   194,
1737      193,    -1,   191,    -1,    53,     4,    -1,    11,    -1,    12,
1738       -1,    13,    -1,    16,    -1,    15,    -1,    14,    -1,    17,
1739       -1,    49,    -1,   195,    -1,   196,   151,    -1,   230,    -1,
1740      152,     4,    -1,   196,   153,   200,   154,   187,    -1,    10,
1741      153,   200,   154,   187,    -1,   155,     4,   156,   196,   157,
1742       -1,   158,     4,   156,   196,   159,    -1,   160,   201,   161,
1743       -1,   160,   161,    -1,   158,   160,   201,   161,   159,    -1,
1744      158,   160,   161,   159,    -1,   196,   185,    -1,   196,    -1,
1745       10,    -1,   197,    -1,   199,   150,   197,    -1,   199,    -1,
1746      199,   150,    39,    -1,    39,    -1,    -1,   196,    -1,   201,
1747      150,   196,    -1,   196,   155,   204,   157,    -1,   196,   155,
1748      157,    -1,   196,   162,    22,    -1,   196,   158,   204,   159,
1749       -1,   196,   160,   204,   161,    -1,   196,   160,   161,    -1,
1750      196,   158,   160,   204,   161,   159,    -1,   196,   158,   160,
1751      161,   159,    -1,   196,    40,    -1,   196,    41,    -1,   196,
1752      230,    -1,   196,   203,    -1,   196,    25,    -1,   169,     3,
1753       -1,   169,     5,    -1,   169,     4,    -1,   169,     6,    -1,
1754       11,    26,    -1,    11,    27,    -1,   170,     9,    -1,   166,
1755      153,   202,    38,   196,   154,    -1,   115,   153,   202,   241,
1756      154,    -1,   129,   153,   202,   150,   202,   150,   202,   154,
1757       -1,   164,   153,   202,   150,   202,   154,    -1,   165,   153,
1758      202,   150,   202,   154,    -1,    88,   167,   153,   202,   150,
1759      202,   154,    -1,    89,   168,   153,   202,   150,   202,   154,
1760       -1,   131,   153,   202,   150,   202,   154,    -1,   132,   153,
1761      202,   150,   202,   150,   202,   154,    -1,   133,   153,   202,
1762      150,   202,   150,   202,   154,    -1,   204,   150,   202,    -1,
1763      202,    -1,    32,    -1,    33,    -1,    37,    -1,    -1,   198,
1764      230,    -1,   121,   153,   207,    38,   196,   154,    -1,   209,
1765       -1,    -1,   210,    -1,   209,   210,    -1,    -1,    31,   211,
1766      226,    -1,    -1,    30,   212,   227,    -1,    58,    57,   216,
1767       -1,   173,    18,   196,    -1,   173,    18,    10,    -1,    -1,
1768      175,   179,   206,   205,   202,   213,   193,    -1,    -1,   175,
1769      177,   179,   206,   205,   202,   214,   193,    -1,    -1,   175,
1770      178,   179,   206,   205,   196,   215,   193,    -1,   175,   179,
1771       35,   182,   207,    -1,    51,   217,    -1,    54,   149,   218,
1772       -1,    22,    -1,    52,   149,    22,    -1,    66,   149,    22,
1773       -1,   155,   219,   157,    -1,   219,   150,    22,    -1,    22,
1774       -1,    -1,   220,   150,   196,   185,   172,    -1,   196,   185,
1775      172,    -1,   220,    -1,   220,   150,    39,    -1,    39,    -1,
1776       -1,   183,   198,   174,   153,   221,   154,   187,   192,   189,
1777      188,    -1,    28,    -1,   160,    -1,   181,   179,   222,   223,
1778       -1,    29,    -1,   161,    -1,   233,   225,    -1,   180,   179,
1779      222,    -1,    -1,    59,    -1,     3,    -1,     4,    -1,     9,
1780       -1,    26,    -1,    27,    -1,    40,    -1,    41,    -1,    25,
1781       -1,   158,   204,   159,    -1,   203,    -1,    57,   228,    22,
1782      150,    22,    -1,     7,    -1,     8,    -1,   171,    -1,   174,
1783       -1,   230,    -1,   229,    -1,   196,   231,    -1,   233,   234,
1784       -1,   224,   234,    -1,   235,   173,   236,    -1,   235,   238,
1785       -1,    -1,    21,    -1,    67,   232,    -1,    67,    10,    -1,
1786       68,    17,   231,    -1,    68,    11,   231,   150,    17,   231,
1787      150,    17,   231,    -1,    69,   169,   231,   150,    17,   231,
1788      155,   237,   157,    -1,    69,   169,   231,   150,    17,   231,
1789      155,   157,    -1,    70,   183,   198,   231,   153,   240,   154,
1790      187,    38,    17,   231,    71,    17,   231,    -1,    71,    -1,
1791       72,    -1,   237,   169,   229,   150,    17,   231,    -1,   169,
1792      229,   150,    17,   231,    -1,   173,   243,    -1,   196,   155,
1793      231,   150,   231,   157,    -1,   239,   150,   155,   231,   150,
1794      231,   157,    -1,   196,   185,   231,   185,    -1,    17,   185,
1795      231,   185,    -1,   240,   150,   196,   185,   231,   185,    -1,
1796      240,   150,    17,   185,   231,   185,    -1,    -1,    -1,   241,
1797      150,   232,    -1,    56,    55,    -1,    55,    -1,   164,   196,
1798      231,   150,   231,    -1,   165,   196,   231,   150,   231,    -1,
1799       88,   167,   196,   231,   150,   231,    -1,    89,   168,   196,
1800      231,   150,   231,    -1,   166,   232,    38,   196,    -1,   129,
1801      232,   150,   232,   150,   232,    -1,   130,   232,   150,   196,
1802       -1,   131,   232,   150,   232,    -1,   132,   232,   150,   232,
1803      150,   232,    -1,   133,   232,   150,   232,   150,   232,    -1,
1804      128,   239,    -1,   242,   183,   198,   231,   153,   240,   154,
1805      187,    -1,   245,    -1,    36,    -1,    -1,   110,   196,   190,
1806       -1,   110,   196,   150,    11,   231,   190,    -1,   111,   196,
1807      190,    -1,   111,   196,   150,    11,   231,   190,    -1,   112,
1808      232,    -1,   244,   113,   196,   231,   190,    -1,   244,   114,
1809      232,   150,   196,   231,   190,    -1,   115,   196,   231,   241,
1810       -1
1811 };
1812
1813 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
1814 static const yytype_uint16 yyrline[] =
1815 {
1816        0,  1105,  1105,  1105,  1105,  1105,  1105,  1105,  1105,  1105,
1817     1105,  1106,  1106,  1106,  1106,  1106,  1106,  1107,  1107,  1107,
1818     1107,  1107,  1107,  1108,  1108,  1108,  1108,  1108,  1108,  1111,
1819     1111,  1112,  1112,  1113,  1113,  1114,  1114,  1115,  1115,  1119,
1820     1119,  1120,  1120,  1121,  1121,  1122,  1122,  1123,  1123,  1124,
1821     1124,  1125,  1125,  1126,  1127,  1132,  1133,  1133,  1133,  1133,
1822     1133,  1135,  1135,  1135,  1136,  1136,  1140,  1144,  1149,  1149,
1823     1151,  1152,  1157,  1163,  1164,  1165,  1166,  1167,  1171,  1172,
1824     1173,  1177,  1178,  1179,  1180,  1184,  1185,  1186,  1190,  1191,
1825     1192,  1193,  1194,  1198,  1199,  1200,  1203,  1204,  1205,  1206,
1826     1207,  1208,  1209,  1216,  1217,  1218,  1219,  1220,  1221,  1222,
1827     1223,  1224,  1227,  1228,  1233,  1234,  1235,  1236,  1237,  1238,
1828     1241,  1242,  1247,  1248,  1255,  1256,  1262,  1263,  1271,  1279,
1829     1280,  1285,  1286,  1287,  1292,  1305,  1305,  1305,  1305,  1305,
1830     1305,  1305,  1308,  1312,  1316,  1323,  1328,  1336,  1366,  1391,
1831     1396,  1406,  1416,  1420,  1430,  1437,  1446,  1453,  1458,  1463,
1832     1470,  1471,  1478,  1485,  1493,  1499,  1511,  1539,  1555,  1582,
1833     1610,  1636,  1656,  1682,  1702,  1714,  1721,  1787,  1797,  1807,
1834     1813,  1823,  1829,  1839,  1844,  1849,  1862,  1874,  1896,  1904,
1835     1910,  1921,  1926,  1931,  1937,  1943,  1952,  1956,  1964,  1964,
1836     1967,  1967,  1970,  1982,  2003,  2008,  2016,  2017,  2021,  2021,
1837     2025,  2025,  2028,  2031,  2055,  2066,  2066,  2077,  2076,  2086,
1838     2085,  2096,  2136,  2139,  2145,  2155,  2159,  2164,  2166,  2171,
1839     2176,  2185,  2195,  2206,  2210,  2219,  2228,  2233,  2367,  2367,
1840     2369,  2378,  2378,  2380,  2385,  2397,  2401,  2406,  2410,  2414,
1841     2418,  2422,  2426,  2430,  2434,  2438,  2463,  2467,  2477,  2481,
1842     2485,  2490,  2497,  2497,  2503,  2512,  2516,  2525,  2534,  2543,
1843     2547,  2554,  2558,  2562,  2567,  2577,  2596,  2605,  2689,  2693,
1844     2700,  2711,  2724,  2734,  2745,  2755,  2766,  2774,  2784,  2791,
1845     2794,  2795,  2802,  2806,  2811,  2827,  2844,  2858,  2872,  2884,
1846     2892,  2899,  2905,  2911,  2917,  2932,  3023,  3028,  3032,  3039,
1847     3046,  3054,  3061,  3069,  3077,  3091,  3108
1848 };
1849 #endif
1850
1851 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1852 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1853    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1854 static const char *const yytname[] =
1855 {
1856   "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "ESAPINTVAL",
1857   "EUAPINTVAL", "LOCALVAL_ID", "GLOBALVAL_ID", "FPVAL", "VOID", "INTTYPE",
1858   "FLOAT", "DOUBLE", "X86_FP80", "FP128", "PPC_FP128", "LABEL", "TYPE",
1859   "LOCALVAR", "GLOBALVAR", "LABELSTR", "STRINGCONSTANT",
1860   "ATSTRINGCONSTANT", "PCTSTRINGCONSTANT", "ZEROINITIALIZER", "TRUETOK",
1861   "FALSETOK", "BEGINTOK", "ENDTOK", "DECLARE", "DEFINE", "GLOBAL",
1862   "CONSTANT", "SECTION", "ALIAS", "VOLATILE", "THREAD_LOCAL", "TO",
1863   "DOTDOTDOT", "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK",
1864   "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE",
1865   "EXTERNAL", "TARGET", "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL",
1866   "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK",
1867   "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1868   "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB",
1869   "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR",
1870   "XOR", "SHL", "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT",
1871   "SLE", "SGE", "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT",
1872   "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE",
1873   "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC",
1874   "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR",
1875   "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT",
1876   "INSERTELEMENT", "SHUFFLEVECTOR", "SIGNEXT", "ZEROEXT", "NORETURN",
1877   "INREG", "SRET", "NOUNWIND", "NOALIAS", "BYVAL", "NEST", "READNONE",
1878   "READONLY", "GC", "DEFAULT", "HIDDEN", "PROTECTED", "'='", "','", "'*'",
1879   "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1880   "'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps",
1881   "IPredicates", "FPredicates", "IntType", "FPType", "LocalName",
1882   "OptLocalName", "OptLocalAssign", "GlobalName", "OptGlobalAssign",
1883   "GlobalAssign", "GVInternalLinkage", "GVExternalLinkage",
1884   "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage",
1885   "AliasLinkage", "OptCallingConv", "ParamAttr", "OptParamAttrs",
1886   "FuncAttr", "OptFuncAttrs", "OptGC", "OptAlign", "OptCAlign",
1887   "SectionString", "OptSection", "GlobalVarAttributes",
1888   "GlobalVarAttribute", "PrimType", "Types", "ArgType", "ResultTypes",
1889   "ArgTypeList", "ArgTypeListI", "TypeListI", "ConstVal", "ConstExpr",
1890   "ConstVector", "GlobalType", "ThreadLocal", "AliaseeRef", "Module",
1891   "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock",
1892   "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH",
1893   "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END",
1894   "Function", "FunctionProto", "OptSideEffect", "ConstValueRef",
1895   "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList",
1896   "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst",
1897   "PHIList", "ParamList", "IndexList", "OptTailCall", "InstVal",
1898   "OptVolatile", "MemoryInst", 0
1899 };
1900 #endif
1901
1902 # ifdef YYPRINT
1903 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1904    token YYLEX-NUM.  */
1905 static const yytype_uint16 yytoknum[] =
1906 {
1907        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1908      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1909      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1910      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1911      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1912      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1913      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
1914      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
1915      335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
1916      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
1917      355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
1918      365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
1919      375,   376,   377,   378,   379,   380,   381,   382,   383,   384,
1920      385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
1921      395,   396,   397,   398,   399,   400,   401,   402,   403,    61,
1922       44,    42,    92,    40,    41,    91,   120,    93,    60,    62,
1923      123,   125,    99
1924 };
1925 # endif
1926
1927 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1928 static const yytype_uint8 yyr1[] =
1929 {
1930        0,   163,   164,   164,   164,   164,   164,   164,   164,   164,
1931      164,   165,   165,   165,   165,   165,   165,   166,   166,   166,
1932      166,   166,   166,   166,   166,   166,   166,   166,   166,   167,
1933      167,   167,   167,   167,   167,   167,   167,   167,   167,   168,
1934      168,   168,   168,   168,   168,   168,   168,   168,   168,   168,
1935      168,   168,   168,   168,   168,   169,   170,   170,   170,   170,
1936      170,   171,   171,   171,   172,   172,   173,   173,   174,   174,
1937      175,   175,   176,   177,   177,   177,   177,   177,   178,   178,
1938      178,   179,   179,   179,   179,   180,   180,   180,   181,   181,
1939      181,   181,   181,   182,   182,   182,   183,   183,   183,   183,
1940      183,   183,   183,   184,   184,   184,   184,   184,   184,   184,
1941      184,   184,   185,   185,   186,   186,   186,   186,   186,   186,
1942      187,   187,   188,   188,   189,   189,   190,   190,   191,   192,
1943      192,   193,   193,   194,   194,   195,   195,   195,   195,   195,
1944      195,   195,   196,   196,   196,   196,   196,   196,   196,   196,
1945      196,   196,   196,   196,   196,   197,   198,   198,   199,   199,
1946      200,   200,   200,   200,   201,   201,   202,   202,   202,   202,
1947      202,   202,   202,   202,   202,   202,   202,   202,   202,   202,
1948      202,   202,   202,   202,   202,   202,   203,   203,   203,   203,
1949      203,   203,   203,   203,   203,   203,   204,   204,   205,   205,
1950      206,   206,   207,   207,   208,   208,   209,   209,   211,   210,
1951      212,   210,   210,   210,   210,   213,   210,   214,   210,   215,
1952      210,   210,   210,   210,   216,   217,   217,   218,   219,   219,
1953      219,   220,   220,   221,   221,   221,   221,   222,   223,   223,
1954      224,   225,   225,   226,   227,   228,   228,   229,   229,   229,
1955      229,   229,   229,   229,   229,   229,   229,   229,   230,   230,
1956      230,   230,   231,   231,   232,   233,   233,   234,   235,   235,
1957      235,   236,   236,   236,   236,   236,   236,   236,   236,   236,
1958      237,   237,   238,   239,   239,   240,   240,   240,   240,   240,
1959      241,   241,   242,   242,   243,   243,   243,   243,   243,   243,
1960      243,   243,   243,   243,   243,   243,   243,   244,   244,   245,
1961      245,   245,   245,   245,   245,   245,   245
1962 };
1963
1964 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
1965 static const yytype_uint8 yyr2[] =
1966 {
1967        0,     2,     1,     1,     1,     1,     1,     1,     1,     1,
1968        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1969        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1970        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1971        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1972        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
1973        1,     1,     1,     1,     1,     0,     2,     0,     1,     1,
1974        1,     0,     2,     1,     1,     1,     1,     1,     1,     1,
1975        1,     0,     1,     1,     1,     0,     1,     1,     0,     1,
1976        1,     1,     1,     0,     1,     1,     0,     1,     1,     1,
1977        1,     1,     2,     1,     1,     1,     1,     1,     1,     1,
1978        1,     1,     0,     2,     1,     1,     1,     1,     1,     1,
1979        0,     2,     0,     2,     0,     2,     0,     3,     2,     0,
1980        1,     0,     3,     1,     2,     1,     1,     1,     1,     1,
1981        1,     1,     1,     1,     2,     1,     2,     5,     5,     5,
1982        5,     3,     2,     5,     4,     2,     1,     1,     1,     3,
1983        1,     3,     1,     0,     1,     3,     4,     3,     3,     4,
1984        4,     3,     6,     5,     2,     2,     2,     2,     2,     2,
1985        2,     2,     2,     2,     2,     2,     6,     5,     8,     6,
1986        6,     7,     7,     6,     8,     8,     3,     1,     1,     1,
1987        1,     0,     2,     6,     1,     0,     1,     2,     0,     3,
1988        0,     3,     3,     3,     3,     0,     7,     0,     8,     0,
1989        8,     5,     2,     3,     1,     3,     3,     3,     3,     1,
1990        0,     5,     3,     1,     3,     1,     0,    10,     1,     1,
1991        4,     1,     1,     2,     3,     0,     1,     1,     1,     1,
1992        1,     1,     1,     1,     1,     3,     1,     5,     1,     1,
1993        1,     1,     1,     1,     2,     2,     2,     3,     2,     0,
1994        1,     2,     2,     3,     9,     9,     8,    14,     1,     1,
1995        6,     5,     2,     6,     7,     4,     4,     6,     6,     0,
1996        0,     3,     2,     1,     5,     5,     6,     6,     4,     6,
1997        4,     4,     6,     6,     2,     8,     1,     1,     0,     3,
1998        6,     3,     6,     2,     5,     7,     4
1999 };
2000
2001 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2002    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
2003    means the default is an error.  */
2004 static const yytype_uint16 yydefact[] =
2005 {
2006       71,    61,    68,    62,    69,    63,   210,   208,     0,     0,
2007        0,     0,     0,     0,    81,    70,     0,    71,   206,    85,
2008       88,     0,     0,   222,     0,     0,    66,     0,    72,    73,
2009       75,    74,    76,    78,    77,    79,    80,    82,    83,    84,
2010       81,    81,   201,     1,   207,    86,    87,    81,   211,    89,
2011       90,    91,    92,    81,   269,   209,   269,     0,     0,   230,
2012      223,   224,   212,   258,   259,   214,   135,   136,   137,   140,
2013      139,   138,   141,   142,     0,     0,     0,     0,   260,   261,
2014      143,   213,   145,   201,   201,    93,   200,     0,    96,    96,
2015      270,   266,    67,   241,   242,   243,   265,   225,   226,   229,
2016        0,   163,   146,     0,     0,     0,     0,   152,   164,     0,
2017      144,   163,     0,     0,    95,    94,     0,   198,   199,     0,
2018        0,    97,    98,    99,   100,   101,     0,   244,     0,   308,
2019      268,     0,   227,   162,   112,   158,   160,     0,     0,     0,
2020        0,     0,     0,   151,     0,     0,     0,   157,     0,   156,
2021        0,   221,   135,   136,   137,   140,   139,   138,     0,     0,
2022        0,   215,   102,     0,   238,   239,   240,   307,   293,     0,
2023        0,     0,     0,    96,   278,   279,     2,     3,     4,     5,
2024        6,     7,     8,     9,    10,    14,    15,    16,    11,    12,
2025       13,     0,     0,     0,     0,     0,     0,    17,    18,    19,
2026       20,    21,    22,    23,    24,    25,    26,    27,    28,     0,
2027        0,     0,     0,     0,     0,     0,     0,     0,   267,    96,
2028      282,     0,   306,   228,   155,     0,   120,     0,     0,   154,
2029        0,   165,   120,   217,   219,     0,   202,   183,   184,   179,
2030      181,   180,   182,   185,   178,   174,   175,     0,     0,     0,
2031        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2032        0,   177,   176,   131,     0,   292,   272,     0,   271,     0,
2033        0,    55,     0,     0,    29,    30,    31,    32,    33,    34,
2034       35,    36,    37,    38,     0,    53,    54,    49,    50,    51,
2035       52,    39,    40,    41,    42,    43,    44,    45,    46,    47,
2036       48,     0,   126,   126,   313,     0,     0,   304,     0,     0,
2037        0,     0,     0,     0,     0,     0,     0,     0,     0,   104,
2038      106,   105,   103,   107,   108,   109,   110,   111,   113,   161,
2039      159,   148,   149,   150,   153,   147,   131,   131,     0,     0,
2040        0,     0,     0,     0,     0,     0,   167,   197,     0,     0,
2041        0,   171,     0,   168,     0,     0,     0,     0,   216,   236,
2042      247,   248,   249,   254,   250,   251,   252,   253,   245,     0,
2043      256,   263,   262,   264,     0,   273,     0,     0,     0,     0,
2044        0,   309,     0,   311,   290,     0,     0,     0,     0,     0,
2045        0,     0,     0,     0,     0,     0,     0,     0,   117,   116,
2046      114,   115,   118,   119,   121,   218,   220,     0,     0,     0,
2047      290,     0,     0,     0,     0,     0,   166,   152,   164,     0,
2048      169,   170,     0,     0,     0,     0,     0,   133,   131,   235,
2049      112,   233,     0,   246,     0,     0,     0,     0,     0,     0,
2050        0,     0,     0,     0,   316,     0,     0,     0,   300,   301,
2051        0,     0,     0,     0,   298,     0,   126,     0,     0,     0,
2052        0,     0,     0,     0,     0,     0,   196,   173,     0,     0,
2053        0,     0,   128,   134,   132,    65,     0,   120,     0,   255,
2054        0,     0,   289,     0,     0,   126,   127,   126,     0,     0,
2055        0,     0,     0,     0,   294,   295,   289,     0,   314,     0,
2056      203,     0,     0,   187,     0,     0,     0,     0,   172,     0,
2057        0,     0,    64,   232,   234,   112,   129,     0,     0,     0,
2058      112,   112,     0,   296,   297,   310,   312,   291,     0,     0,
2059      299,   302,   303,     0,   126,     0,     0,     0,   193,     0,
2060        0,   189,   190,   186,    65,   130,   124,   257,     0,     0,
2061        0,     0,     0,   120,   283,     0,   120,   315,   191,   192,
2062        0,     0,     0,   231,     0,   122,     0,   276,     0,     0,
2063      104,   106,   112,   112,   112,   112,     0,   284,   305,   188,
2064      194,   195,   125,     0,   237,   274,     0,   275,     0,   286,
2065      285,     0,     0,     0,   123,     0,     0,   112,   112,     0,
2066        0,     0,   288,   287,     0,   281,     0,     0,   280,     0,
2067      277
2068 };
2069
2070 /* YYDEFGOTO[NTERM-NUM].  */
2071 static const yytype_int16 yydefgoto[] =
2072 {
2073       -1,   258,   259,   260,   284,   301,   158,   159,    78,   513,
2074       12,    79,    14,    15,    40,    41,    42,    47,    53,   116,
2075      126,   328,   224,   404,   331,   584,   565,   381,   427,   546,
2076      358,   428,    80,   160,   135,   150,   136,   137,   109,   347,
2077      370,   348,   119,    87,   151,    16,    17,    18,    20,    19,
2078      263,   336,   337,    62,    23,    60,   100,   431,   432,   127,
2079      166,    54,    95,    55,    48,   434,   371,    82,   373,   268,
2080       56,    91,    92,   218,   569,   130,   307,   522,   444,   219,
2081      220,   221,   222
2082 };
2083
2084 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2085    STATE-NUM.  */
2086 #define YYPACT_NINF -541
2087 static const yytype_int16 yypact[] =
2088 {
2089      658,  -541,  -541,  -541,  -541,  -541,  -541,  -541,   -12,  -135,
2090      -38,  -125,   106,   -69,    26,  -541,    29,  1762,  -541,    14,
2091       88,    43,    49,  -541,    45,   127,  -541,  1344,  -541,  -541,
2092     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,
2093      131,   131,    73,  -541,  -541,  -541,  -541,   131,  -541,  -541,
2094     -541,  -541,  -541,   131,   201,  -541,   -11,   135,   215,   216,
2095     -541,  -541,  -541,  -541,  -541,    70,  -541,  -541,  -541,  -541,
2096     -541,  -541,  -541,  -541,   245,   247,     3,   553,  -541,  -541,
2097     -541,   -34,  -541,   219,   219,   110,  -541,    62,   171,   171,
2098     -541,  -541,   124,  -541,  -541,  -541,  -541,  -541,  -541,  -541,
2099      -66,  1092,  -541,   108,   114,   991,    70,  -541,   -34,  -109,
2100     -541,  1092,    62,    62,  -541,  -541,  1146,  -541,  -541,  1362,
2101      261,  -541,  -541,  -541,  -541,  -541,  1418,  -541,   -15,  1628,
2102     -541,   260,  -541,  -541,   -34,  -541,   119,   129,  1458,  1458,
2103      147,  -108,  1458,  -541,   134,  1362,  1458,    70,   142,   -34,
2104      118,  -541,    40,   306,   307,   308,   309,   310,   172,   311,
2105      805,  -541,  -541,   113,  -541,  -541,  -541,  -541,  -541,   266,
2106     1516,    72,   314,   171,  -541,  -541,  -541,  -541,  -541,  -541,
2107     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,
2108     -541,   313,   507,  1458,  1458,  1458,  1458,  -541,  -541,  -541,
2109     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  1458,
2110     1458,  1458,  1458,  1458,  1458,  1458,  1458,  1458,  -541,   171,
2111     -541,    52,  -541,  -541,   -36,  1186,  -541,   -94,   -30,  -541,
2112      163,   -34,  -541,  -541,   -34,  1146,  -541,  -541,  -541,  -541,
2113     -541,  -541,  -541,  -541,  -541,  -541,  -541,   313,   507,   176,
2114      178,   184,   185,   187,  1246,  1534,  1031,   302,   190,   193,
2115      198,  -541,  -541,   202,   200,  -541,    70,   645,  -541,   782,
2116      782,  -541,   782,  1418,  -541,  -541,  -541,  -541,  -541,  -541,
2117     -541,  -541,  -541,  -541,  1458,  -541,  -541,  -541,  -541,  -541,
2118     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,
2119     -541,  1458,   136,   146,  -541,   645,   104,   206,   207,   208,
2120      209,   210,   217,   645,   645,   328,  1418,  1458,  1458,  -541,
2121     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,
2122     -541,   137,  -541,  -541,  -541,   137,   202,   202,   333,   221,
2123      222,  1362,  1362,  1362,  1362,  1362,  -541,  -541,   -64,  1071,
2124     -103,  -541,  -100,  -541,  1362,  1362,  1362,     2,  -541,  1264,
2125     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,   317,  1362,
2126     -541,  -541,  -541,  -541,   227,  -541,   230,   782,   645,   645,
2127       11,  -541,    12,  -541,  -541,   782,   228,  1458,  1458,  1458,
2128     1458,  1458,   232,   234,  1458,   782,   645,   235,  -541,  -541,
2129     -541,  -541,  -541,  -541,  -541,  -541,  -541,  1458,  1362,  1362,
2130     -541,   239,   241,   243,   244,  1362,  -541,   256,   805,   -73,
2131     -541,  -541,   248,   250,   385,   404,   423,  -541,   202,  -541,
2132      -34,   278,   280,  -541,   413,   -72,   419,   420,   288,   292,
2133      293,   782,   440,   782,   296,   297,   782,   299,   -34,  -541,
2134      301,   303,   782,   782,   -34,   304,   318,  1458,   151,   319,
2135      321,   -43,  1362,  1362,  1362,  1362,  -541,  -541,   295,  1362,
2136     1362,  1458,  -541,  -541,  -541,   279,  1304,  -541,   322,  -541,
2137      782,   782,  1574,   782,   782,   318,  -541,   318,  1458,   782,
2138      323,  1458,  1458,  1458,  -541,  -541,  1574,   399,  -541,   645,
2139     -541,  1362,  1362,  -541,   324,   305,   326,   327,  -541,   325,
2140      329,   157,  -541,  -541,  -541,   -34,    81,   436,   332,   330,
2141        9,   -34,    47,  -541,  -541,  -541,  -541,  -541,   334,   782,
2142     -541,  -541,  -541,    96,   318,   336,   338,  1362,  -541,  1362,
2143     1362,  -541,  -541,  -541,   279,  -541,   407,  -541,   444,    -6,
2144      505,   505,  1614,  -541,  -541,   337,  -541,  -541,  -541,  -541,
2145      339,   342,   343,  -541,   459,   341,   782,  -541,   943,    -2,
2146      331,   348,  -541,  -541,     9,   -34,   109,  -541,   137,  -541,
2147     -541,  -541,  -541,   442,  -541,  -541,   352,  -541,   943,   -36,
2148      -36,   505,   505,   470,  -541,   486,   354,  -541,  -541,   782,
2149      782,   488,   -36,   -36,   435,  -541,   782,   490,  -541,   782,
2150     -541
2151 };
2152
2153 /* YYPGOTO[NTERM-NUM].  */
2154 static const yytype_int16 yypgoto[] =
2155 {
2156     -541,   381,   382,   387,   270,   271,  -170,  -541,     0,   -24,
2157      426,     8,  -541,  -541,  -541,  -541,    56,  -541,  -541,  -541,
2158     -161,  -541,  -393,  -541,  -217,  -541,  -541,  -292,     5,  -541,
2159     -310,  -541,  -541,   -26,   298,  -120,  -541,   411,   430,  -115,
2160     -157,  -235,    94,   130,   312,  -541,  -541,   519,  -541,  -541,
2161     -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,  -541,   448,
2162     -541,  -541,  -541,  -541,  -541,  -541,  -540,  -111,   -51,  -179,
2163     -541,   482,  -541,  -541,  -541,  -541,  -541,    46,   133,  -541,
2164     -541,  -541,  -541
2165 };
2166
2167 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
2168    positive, shift that token.  If negative, reduce the rule which
2169    number is the opposite.  If zero, do what YYDEFACT says.
2170    If YYTABLE_NINF, syntax error.  */
2171 #define YYTABLE_NINF -206
2172 static const yytype_int16 yytable[] =
2173 {
2174       11,    81,   272,   261,   161,   271,   163,   104,    13,   271,
2175       90,   383,   273,   164,    24,   335,   304,    11,    93,    25,
2176      350,   352,   441,   443,    26,    13,   405,   406,   586,    43,
2177      233,   308,   309,   310,   311,   312,   425,   475,   315,   236,
2178       21,   142,   142,   -55,   -55,   -55,   -55,   415,   596,   262,
2179      415,   108,   143,   230,    22,   426,   420,   110,   316,   111,
2180       45,   421,    46,   332,   442,   442,   237,   238,    29,    30,
2181       31,    32,    33,    34,    35,   134,    36,   415,   415,   108,
2182       28,   319,   320,   269,   131,   134,   415,   479,   468,   270,
2183      149,   132,    11,   416,   117,   118,    83,    84,   321,   322,
2184      149,   323,   324,    88,   325,   326,   327,   488,    85,    89,
2185       86,   503,   227,   228,   419,   425,   231,   110,   474,   111,
2186      234,   110,   544,   111,    27,    63,    64,   550,   551,   333,
2187       49,    50,    51,     2,   435,    52,     4,     1,     2,   397,
2188        3,     4,     5,     1,   267,   165,     3,   593,     5,    61,
2189       94,   567,   114,   377,   115,   587,   372,    97,   372,   372,
2190     -141,   372,  -141,   105,   498,   317,   318,   302,   303,   267,
2191      305,   264,    37,    38,    39,   239,   240,   241,   242,   589,
2192      590,   591,   592,   306,   267,   267,   267,   267,   267,   313,
2193      314,   267,    57,   525,   372,   526,   395,   552,    58,   134,
2194       59,   553,   372,   372,   602,   603,   145,   146,   447,   149,
2195      449,   450,   451,   112,   113,   398,   399,   400,   374,   375,
2196      401,   376,    90,   101,   402,   403,   410,   411,   412,   413,
2197      414,   120,   121,   122,   123,   124,   125,    98,    99,   422,
2198      423,   424,   557,   398,   399,   400,   552,   149,   401,   102,
2199      556,   103,   402,   403,   384,   110,    86,   111,   378,   385,
2200      516,   261,   392,   393,   138,   162,   372,   372,   372,   225,
2201      139,   398,   399,   400,   372,   379,   401,    37,    38,    39,
2202      402,   403,   223,   226,   372,   372,   380,   110,   232,   111,
2203      149,   396,   267,   459,   460,   235,   382,   110,     1,   111,
2204      466,     3,   110,     5,   111,   500,   229,   262,   110,   527,
2205      111,   543,   530,   531,   532,   -56,   -57,   -60,   -59,   -58,
2206      243,   265,   334,   418,   353,   271,   438,   439,   440,   341,
2207      372,   342,   372,   430,   445,   372,   576,   343,   344,   578,
2208      345,   372,   372,   354,   455,   456,   355,   504,   505,   506,
2209      507,   356,   357,   359,   509,   510,   386,   387,   388,   389,
2210      390,   267,   448,   267,   267,   267,   394,   391,   454,   372,
2211      372,   407,   372,   372,   408,   409,   433,   436,   372,   568,
2212      437,   458,   452,   446,   453,   457,   535,   536,   372,   462,
2213      485,   463,   487,   464,   465,   490,   319,   320,   469,   588,
2214      470,   494,   495,   274,   275,   276,   277,   278,   279,   280,
2215      281,   282,   283,   321,   322,   467,   323,   324,   372,   325,
2216      326,   327,   560,   471,   561,   562,   472,   473,   476,   518,
2217      519,   499,   523,   524,   477,   478,   480,   481,   528,   372,
2218      372,   482,   483,   484,   486,   511,   488,   489,   534,   491,
2219      515,   492,   442,   493,   508,   372,   521,   496,   547,   538,
2220      564,   566,   267,   582,   594,   267,   267,   267,   497,   501,
2221      521,   502,   517,   529,   537,   512,   539,   540,   555,   541,
2222      372,   372,   548,   542,   -18,   549,   583,   599,   372,   372,
2223      558,   554,   559,   579,   577,   372,   580,   581,   372,   572,
2224      573,   -19,   595,   600,   601,   606,   607,   609,   360,   361,
2225      215,   216,    63,    64,   362,   585,   217,   339,   129,   340,
2226      563,   545,   144,   330,     1,     2,   575,     3,     4,     5,
2227      363,   364,   365,   285,   286,   141,    44,   128,    96,     0,
2228      597,   598,   533,   461,   512,   366,   367,   338,   604,   605,
2229        0,     0,     0,     0,     0,   608,     0,     0,   610,     0,
2230       63,    64,   368,   106,    66,    67,    68,    69,    70,    71,
2231       72,     0,     1,     2,     0,     3,     4,     5,   176,   177,
2232      178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
2233      188,   189,   190,   247,   248,     0,     0,     0,     0,     0,
2234        0,     0,    73,   287,   288,   289,   290,   291,   292,   293,
2235      294,   295,   296,   297,   298,   299,   300,     0,     0,     0,
2236      249,   197,   570,   571,   200,   201,   202,   203,   204,   205,
2237      206,   207,   208,     0,   250,     0,   251,   252,   253,   321,
2238      322,     0,   323,   324,     0,   325,   326,   327,   360,   361,
2239        0,     0,    63,    64,   362,     0,     0,     0,  -205,     0,
2240        0,     0,     0,   369,     1,     2,     0,     3,     4,     5,
2241      363,   364,   365,     0,     0,     0,   -67,     1,     2,     0,
2242        3,     4,     5,     0,     0,   366,   367,     0,     6,     7,
2243        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2244        0,     0,   368,     0,     0,    74,     0,     0,    75,     8,
2245        0,    76,     9,    77,   107,     0,    10,     0,   176,   177,
2246      178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
2247      188,   189,   190,   247,   248,     0,     0,     0,     0,     0,
2248        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2249        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2250      249,   197,   198,   199,   200,   201,   202,   203,   204,   205,
2251      206,   207,   208,     0,   250,     0,   251,   252,   253,     0,
2252        0,     0,     0,     0,     0,   360,   361,     0,     0,    63,
2253       64,   362,     0,     0,     0,     0,   110,     0,   111,     0,
2254        0,     1,     2,   369,     3,     4,     5,   363,   364,   365,
2255        0,     0,    63,    64,     0,     0,     0,     0,     0,     0,
2256        0,     0,   366,   367,     1,     2,     0,     3,     4,     5,
2257      244,     0,     0,     0,     0,     0,     0,     0,     0,   368,
2258        0,     0,     0,     0,     0,   245,   246,     0,     0,     0,
2259        0,     0,     0,     0,     0,   176,   177,   178,   179,   180,
2260      181,   182,   183,   184,   185,   186,   187,   188,   189,   190,
2261      247,   248,     0,     0,     0,     0,     0,     0,   176,   177,
2262      178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
2263      188,   189,   190,   247,   248,     0,     0,   249,   197,   198,
2264      199,   200,   201,   202,   203,   204,   205,   206,   207,   208,
2265        0,   250,     0,   251,   252,   253,     0,     0,     0,     0,
2266      249,   197,   198,   199,   200,   201,   202,   203,   204,   205,
2267      206,   207,   208,     0,   250,     0,   251,   252,   253,     0,
2268      369,     0,     0,     0,     0,     0,   360,   361,     0,     0,
2269        0,     0,   362,     0,     0,     0,   110,     0,   111,     0,
2270      254,     0,     0,   255,     0,   256,     0,   257,   363,   364,
2271      365,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2272        0,     0,     0,   366,   367,     0,     0,     0,     0,     0,
2273        0,     0,     0,     0,     0,     0,     0,     0,    63,    64,
2274      368,   106,    66,    67,    68,    69,    70,    71,    72,     0,
2275        1,     2,     0,     3,     4,     5,   176,   177,   178,   179,
2276      180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
2277      190,   247,   248,     0,     0,     0,     0,     0,    63,    64,
2278       73,   106,   152,   153,   154,   155,   156,   157,    72,     0,
2279        1,     2,     0,     3,     4,     5,     0,     0,   249,   197,
2280      198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
2281      208,     0,   250,     0,   251,   252,   253,     0,    63,    64,
2282       73,   106,   152,   153,   154,   155,   156,   157,    72,     0,
2283        1,     2,     0,     3,     4,     5,     0,     0,     0,    63,
2284       64,   369,   106,    66,    67,    68,    69,    70,    71,    72,
2285        0,     1,     2,     0,     3,     4,     5,     0,     0,     0,
2286       73,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2287        0,   133,     0,     0,     0,     0,     0,     0,     0,     0,
2288        0,    73,     0,    74,     0,     0,    75,     0,     0,    76,
2289        0,    77,   140,    63,    64,     0,   147,    66,    67,    68,
2290       69,    70,    71,    72,     0,     1,     2,     0,     3,     4,
2291        5,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2292        0,     0,     0,    74,     0,     0,    75,     0,     0,    76,
2293        0,    77,   351,    63,    64,    73,   106,    66,    67,    68,
2294       69,    70,    71,    72,     0,     1,     2,     0,     3,     4,
2295        5,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2296        0,     0,     0,    74,     0,   329,    75,     0,     0,    76,
2297        0,    77,   417,     0,     0,    73,     0,     0,     0,     0,
2298        0,     0,     0,     0,    74,     0,     0,    75,     0,     0,
2299       76,     0,    77,    63,    64,     0,   106,   152,   153,   154,
2300      155,   156,   157,    72,     0,     1,     2,   148,     3,     4,
2301        5,    63,    64,     0,   106,    66,    67,    68,    69,    70,
2302       71,    72,     0,     1,     2,     0,     3,     4,     5,     0,
2303        0,     0,     0,     0,     0,    73,     0,     0,    74,     0,
2304        0,    75,     0,   429,    76,     0,    77,     0,     0,     0,
2305        0,    63,    64,    73,   106,    66,    67,    68,    69,    70,
2306       71,    72,     0,     1,     2,     0,     3,     4,     5,     0,
2307        0,     0,     0,     0,     0,     0,     0,     0,    74,     0,
2308        0,    75,     0,   514,    76,     0,    77,     0,     0,     0,
2309        0,    63,    64,    73,    65,    66,    67,    68,    69,    70,
2310       71,    72,     0,     1,     2,     0,     3,     4,     5,    63,
2311       64,     0,   106,   152,   153,   154,   155,   156,   157,    72,
2312        0,     1,     2,     0,     3,     4,     5,     0,     0,     0,
2313        0,     0,     0,    73,     0,     0,     0,     0,    74,     0,
2314        0,    75,     0,   346,    76,     0,    77,     0,     0,     0,
2315        0,    73,     0,     0,     0,     0,    74,     0,     0,    75,
2316        0,     0,    76,     0,    77,    63,    64,     0,   147,    66,
2317       67,    68,    69,    70,    71,    72,     0,     1,     2,     0,
2318        3,     4,     5,     0,     0,     0,     0,     0,     0,     0,
2319        0,     0,     0,     0,     0,     0,    74,     0,     0,    75,
2320        0,     0,    76,     0,    77,    63,    64,    73,   106,    66,
2321       67,    68,    69,    70,    71,    72,     0,     1,     2,     0,
2322        3,     4,     5,     0,     0,     0,     0,     0,     0,     0,
2323        0,     0,     0,     0,     0,     0,    74,     0,     0,    75,
2324        0,     0,    76,     0,    77,     0,     0,    73,     0,     0,
2325        0,     0,     0,     0,    74,     0,     0,    75,     0,     0,
2326       76,     0,    77,    63,    64,     0,   266,    66,    67,    68,
2327       69,    70,    71,    72,     0,     1,     2,     0,     3,     4,
2328        5,    63,    64,     0,   106,   152,   153,   154,   155,   156,
2329      157,    72,     0,     1,     2,     0,     3,     4,     5,     0,
2330        0,     0,     0,     0,     0,    73,     0,     0,     0,     0,
2331       74,     0,     0,    75,     0,     0,    76,     0,    77,     0,
2332        0,    63,    64,    73,   106,    66,    67,    68,    69,    70,
2333       71,   520,     0,     1,     2,     0,     3,     4,     5,     0,
2334        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2335       74,     0,     0,    75,     0,     0,    76,     0,    77,     0,
2336        0,    63,    64,    73,   106,    66,    67,    68,    69,    70,
2337       71,   574,     0,     1,     2,     0,     3,     4,     5,     0,
2338        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2339        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2340        0,     0,     0,    73,   167,     0,     0,     0,    74,     0,
2341        0,    75,     0,     0,    76,     0,    77,     0,     0,     0,
2342        0,     0,     0,   168,   169,     0,    74,     0,     0,    75,
2343        0,     0,    76,     0,   349,   170,   171,   172,   173,   174,
2344      175,   176,   177,   178,   179,   180,   181,   182,   183,   184,
2345      185,   186,   187,   188,   189,   190,   191,   192,     0,     0,
2346        0,     0,     0,     0,     0,     0,    74,     0,     0,    75,
2347        0,     0,    76,     0,    77,     0,     0,     0,   193,   194,
2348      195,     0,     0,   196,   197,   198,   199,   200,   201,   202,
2349      203,   204,   205,   206,   207,   208,   209,   210,   211,   212,
2350      213,   214,  -204,     0,     0,     0,    74,     0,     0,    75,
2351        0,     0,    76,     0,    77,     0,     0,     0,     0,     0,
2352      -67,     1,     2,     0,     3,     4,     5,     0,     0,     0,
2353        0,     0,     6,     7,     0,     0,     0,     0,     0,     0,
2354        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2355        0,     0,     0,     8,     0,     0,     9,     0,     0,     0,
2356       10
2357 };
2358
2359 static const yytype_int16 yycheck[] =
2360 {
2361        0,    27,   172,   160,   119,    11,   126,     4,     0,    11,
2362       21,   303,   173,    28,   149,   232,   195,    17,    29,    57,
2363      255,   256,    11,    11,   149,    17,   336,   337,   568,     0,
2364      145,   210,   211,   212,   213,   214,    34,   430,   217,   150,
2365       52,   150,   150,     3,     4,     5,     6,   150,   588,   160,
2366      150,    77,   161,   161,    66,    53,   159,   151,   219,   153,
2367       46,   161,    48,   157,    53,    53,    26,    27,    42,    43,
2368       44,    45,    46,    47,    48,   101,    50,   150,   150,   105,
2369      149,   117,   118,    11,   150,   111,   150,   159,   161,    17,
2370      116,   157,    92,   157,    32,    33,    40,    41,   134,   135,
2371      126,   137,   138,    47,   140,   141,   142,   150,    35,    53,
2372       37,   154,   138,   139,   349,    34,   142,   151,   428,   153,
2373      146,   151,   515,   153,    18,     7,     8,   520,   521,   159,
2374       42,    43,    44,    20,   369,    47,    23,    19,    20,   318,
2375       22,    23,    24,    19,   170,   160,    22,    38,    24,    22,
2376      161,   157,    42,   273,    44,   157,   267,    22,   269,   270,
2377      151,   272,   153,   160,   456,   113,   114,   193,   194,   195,
2378      196,   163,   146,   147,   148,     3,     4,     5,     6,   572,
2379      573,   574,   575,   209,   210,   211,   212,   213,   214,   215,
2380      216,   217,   149,   485,   305,   487,   316,   150,   149,   225,
2381      155,   154,   313,   314,   597,   598,   112,   113,   387,   235,
2382      389,   390,   391,    83,    84,   134,   135,   136,   269,   270,
2383      139,   272,    21,   153,   143,   144,   341,   342,   343,   344,
2384      345,    60,    61,    62,    63,    64,    65,    22,    22,   354,
2385      355,   356,   534,   134,   135,   136,   150,   273,   139,     4,
2386      154,     4,   143,   144,   305,   151,    37,   153,   284,   155,
2387      477,   418,   313,   314,   156,     4,   377,   378,   379,   150,
2388      156,   134,   135,   136,   385,   301,   139,   146,   147,   148,
2389      143,   144,    22,   154,   395,   396,   150,   151,   154,   153,
2390      316,   317,   318,   408,   409,   153,   150,   151,    19,   153,
2391      415,    22,   151,    24,   153,   154,   159,   418,   151,   488,
2392      153,   154,   491,   492,   493,     9,     9,     9,     9,     9,
2393        9,    55,   159,   349,    22,    11,   377,   378,   379,   153,
2394      441,   153,   443,   359,   385,   446,   553,   153,   153,   556,
2395      153,   452,   453,   153,   395,   396,   153,   462,   463,   464,
2396      465,   153,   150,   153,   469,   470,   150,   150,   150,   150,
2397      150,   387,   388,   389,   390,   391,    38,   150,   394,   480,
2398      481,    38,   483,   484,   153,   153,    59,   150,   489,   549,
2399      150,   407,   150,   155,   150,   150,   501,   502,   499,   150,
2400      441,   150,   443,   150,   150,   446,   117,   118,   150,   569,
2401      150,   452,   453,    90,    91,    92,    93,    94,    95,    96,
2402       97,    98,    99,   134,   135,   159,   137,   138,   529,   140,
2403      141,   142,   537,    38,   539,   540,    22,     4,   150,   480,
2404      481,   457,   483,   484,   154,    22,    17,    17,   489,   550,
2405      551,   153,   150,   150,     4,   471,   150,   150,   499,   150,
2406      476,   150,    53,   150,   159,   566,   482,   153,    22,   154,
2407       53,    17,   488,     4,    22,   491,   492,   493,   150,   150,
2408      496,   150,   150,   150,   150,   475,   150,   150,   529,   154,
2409      591,   592,   150,   154,   153,   155,   145,    17,   599,   600,
2410      154,   157,   154,   154,   157,   606,   154,   154,   609,   550,
2411      551,   153,   150,    17,   150,    17,    71,    17,     3,     4,
2412      129,   129,     7,     8,     9,   566,   129,   247,    92,   248,
2413      544,   516,   111,   225,    19,    20,   552,    22,    23,    24,
2414       25,    26,    27,    26,    27,   105,    17,    89,    56,    -1,
2415      591,   592,   496,   410,   544,    40,    41,   235,   599,   600,
2416       -1,    -1,    -1,    -1,    -1,   606,    -1,    -1,   609,    -1,
2417        7,     8,    57,    10,    11,    12,    13,    14,    15,    16,
2418       17,    -1,    19,    20,    -1,    22,    23,    24,    73,    74,
2419       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
2420       85,    86,    87,    88,    89,    -1,    -1,    -1,    -1,    -1,
2421       -1,    -1,    49,    96,    97,    98,    99,   100,   101,   102,
2422      103,   104,   105,   106,   107,   108,   109,    -1,    -1,    -1,
2423      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
2424      125,   126,   127,    -1,   129,    -1,   131,   132,   133,   134,
2425      135,    -1,   137,   138,    -1,   140,   141,   142,     3,     4,
2426       -1,    -1,     7,     8,     9,    -1,    -1,    -1,     0,    -1,
2427       -1,    -1,    -1,   158,    19,    20,    -1,    22,    23,    24,
2428       25,    26,    27,    -1,    -1,    -1,    18,    19,    20,    -1,
2429       22,    23,    24,    -1,    -1,    40,    41,    -1,    30,    31,
2430       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2431       -1,    -1,    57,    -1,    -1,   152,    -1,    -1,   155,    51,
2432       -1,   158,    54,   160,   161,    -1,    58,    -1,    73,    74,
2433       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
2434       85,    86,    87,    88,    89,    -1,    -1,    -1,    -1,    -1,
2435       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2436       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2437      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
2438      125,   126,   127,    -1,   129,    -1,   131,   132,   133,    -1,
2439       -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,
2440        8,     9,    -1,    -1,    -1,    -1,   151,    -1,   153,    -1,
2441       -1,    19,    20,   158,    22,    23,    24,    25,    26,    27,
2442       -1,    -1,     7,     8,    -1,    -1,    -1,    -1,    -1,    -1,
2443       -1,    -1,    40,    41,    19,    20,    -1,    22,    23,    24,
2444       25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    57,
2445       -1,    -1,    -1,    -1,    -1,    40,    41,    -1,    -1,    -1,
2446       -1,    -1,    -1,    -1,    -1,    73,    74,    75,    76,    77,
2447       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
2448       88,    89,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,
2449       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
2450       85,    86,    87,    88,    89,    -1,    -1,   115,   116,   117,
2451      118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
2452       -1,   129,    -1,   131,   132,   133,    -1,    -1,    -1,    -1,
2453      115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
2454      125,   126,   127,    -1,   129,    -1,   131,   132,   133,    -1,
2455      158,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
2456       -1,    -1,     9,    -1,    -1,    -1,   151,    -1,   153,    -1,
2457      155,    -1,    -1,   158,    -1,   160,    -1,   162,    25,    26,
2458       27,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2459       -1,    -1,    -1,    40,    41,    -1,    -1,    -1,    -1,    -1,
2460       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     7,     8,
2461       57,    10,    11,    12,    13,    14,    15,    16,    17,    -1,
2462       19,    20,    -1,    22,    23,    24,    73,    74,    75,    76,
2463       77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
2464       87,    88,    89,    -1,    -1,    -1,    -1,    -1,     7,     8,
2465       49,    10,    11,    12,    13,    14,    15,    16,    17,    -1,
2466       19,    20,    -1,    22,    23,    24,    -1,    -1,   115,   116,
2467      117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
2468      127,    -1,   129,    -1,   131,   132,   133,    -1,     7,     8,
2469       49,    10,    11,    12,    13,    14,    15,    16,    17,    -1,
2470       19,    20,    -1,    22,    23,    24,    -1,    -1,    -1,     7,
2471        8,   158,    10,    11,    12,    13,    14,    15,    16,    17,
2472       -1,    19,    20,    -1,    22,    23,    24,    -1,    -1,    -1,
2473       49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2474       -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2475       -1,    49,    -1,   152,    -1,    -1,   155,    -1,    -1,   158,
2476       -1,   160,   161,     7,     8,    -1,    10,    11,    12,    13,
2477       14,    15,    16,    17,    -1,    19,    20,    -1,    22,    23,
2478       24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2479       -1,    -1,    -1,   152,    -1,    -1,   155,    -1,    -1,   158,
2480       -1,   160,   161,     7,     8,    49,    10,    11,    12,    13,
2481       14,    15,    16,    17,    -1,    19,    20,    -1,    22,    23,
2482       24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2483       -1,    -1,    -1,   152,    -1,    39,   155,    -1,    -1,   158,
2484       -1,   160,   161,    -1,    -1,    49,    -1,    -1,    -1,    -1,
2485       -1,    -1,    -1,    -1,   152,    -1,    -1,   155,    -1,    -1,
2486      158,    -1,   160,     7,     8,    -1,    10,    11,    12,    13,
2487       14,    15,    16,    17,    -1,    19,    20,   121,    22,    23,
2488       24,     7,     8,    -1,    10,    11,    12,    13,    14,    15,
2489       16,    17,    -1,    19,    20,    -1,    22,    23,    24,    -1,
2490       -1,    -1,    -1,    -1,    -1,    49,    -1,    -1,   152,    -1,
2491       -1,   155,    -1,    39,   158,    -1,   160,    -1,    -1,    -1,
2492       -1,     7,     8,    49,    10,    11,    12,    13,    14,    15,
2493       16,    17,    -1,    19,    20,    -1,    22,    23,    24,    -1,
2494       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   152,    -1,
2495       -1,   155,    -1,    39,   158,    -1,   160,    -1,    -1,    -1,
2496       -1,     7,     8,    49,    10,    11,    12,    13,    14,    15,
2497       16,    17,    -1,    19,    20,    -1,    22,    23,    24,     7,
2498        8,    -1,    10,    11,    12,    13,    14,    15,    16,    17,
2499       -1,    19,    20,    -1,    22,    23,    24,    -1,    -1,    -1,
2500       -1,    -1,    -1,    49,    -1,    -1,    -1,    -1,   152,    -1,
2501       -1,   155,    -1,   157,   158,    -1,   160,    -1,    -1,    -1,
2502       -1,    49,    -1,    -1,    -1,    -1,   152,    -1,    -1,   155,
2503       -1,    -1,   158,    -1,   160,     7,     8,    -1,    10,    11,
2504       12,    13,    14,    15,    16,    17,    -1,    19,    20,    -1,
2505       22,    23,    24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2506       -1,    -1,    -1,    -1,    -1,    -1,   152,    -1,    -1,   155,
2507       -1,    -1,   158,    -1,   160,     7,     8,    49,    10,    11,
2508       12,    13,    14,    15,    16,    17,    -1,    19,    20,    -1,
2509       22,    23,    24,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2510       -1,    -1,    -1,    -1,    -1,    -1,   152,    -1,    -1,   155,
2511       -1,    -1,   158,    -1,   160,    -1,    -1,    49,    -1,    -1,
2512       -1,    -1,    -1,    -1,   152,    -1,    -1,   155,    -1,    -1,
2513      158,    -1,   160,     7,     8,    -1,    10,    11,    12,    13,
2514       14,    15,    16,    17,    -1,    19,    20,    -1,    22,    23,
2515       24,     7,     8,    -1,    10,    11,    12,    13,    14,    15,
2516       16,    17,    -1,    19,    20,    -1,    22,    23,    24,    -1,
2517       -1,    -1,    -1,    -1,    -1,    49,    -1,    -1,    -1,    -1,
2518      152,    -1,    -1,   155,    -1,    -1,   158,    -1,   160,    -1,
2519       -1,     7,     8,    49,    10,    11,    12,    13,    14,    15,
2520       16,    17,    -1,    19,    20,    -1,    22,    23,    24,    -1,
2521       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2522      152,    -1,    -1,   155,    -1,    -1,   158,    -1,   160,    -1,
2523       -1,     7,     8,    49,    10,    11,    12,    13,    14,    15,
2524       16,    17,    -1,    19,    20,    -1,    22,    23,    24,    -1,
2525       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2526       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2527       -1,    -1,    -1,    49,    36,    -1,    -1,    -1,   152,    -1,
2528       -1,   155,    -1,    -1,   158,    -1,   160,    -1,    -1,    -1,
2529       -1,    -1,    -1,    55,    56,    -1,   152,    -1,    -1,   155,
2530       -1,    -1,   158,    -1,   160,    67,    68,    69,    70,    71,
2531       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
2532       82,    83,    84,    85,    86,    87,    88,    89,    -1,    -1,
2533       -1,    -1,    -1,    -1,    -1,    -1,   152,    -1,    -1,   155,
2534       -1,    -1,   158,    -1,   160,    -1,    -1,    -1,   110,   111,
2535      112,    -1,    -1,   115,   116,   117,   118,   119,   120,   121,
2536      122,   123,   124,   125,   126,   127,   128,   129,   130,   131,
2537      132,   133,     0,    -1,    -1,    -1,   152,    -1,    -1,   155,
2538       -1,    -1,   158,    -1,   160,    -1,    -1,    -1,    -1,    -1,
2539       18,    19,    20,    -1,    22,    23,    24,    -1,    -1,    -1,
2540       -1,    -1,    30,    31,    -1,    -1,    -1,    -1,    -1,    -1,
2541       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
2542       -1,    -1,    -1,    51,    -1,    -1,    54,    -1,    -1,    -1,
2543       58
2544 };
2545
2546 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2547    symbol of state STATE-NUM.  */
2548 static const yytype_uint8 yystos[] =
2549 {
2550        0,    19,    20,    22,    23,    24,    30,    31,    51,    54,
2551       58,   171,   173,   174,   175,   176,   208,   209,   210,   212,
2552      211,    52,    66,   217,   149,    57,   149,    18,   149,    42,
2553       43,    44,    45,    46,    47,    48,    50,   146,   147,   148,
2554      177,   178,   179,     0,   210,    46,    48,   180,   227,    42,
2555       43,    44,    47,   181,   224,   226,   233,   149,   149,   155,
2556      218,    22,   216,     7,     8,    10,    11,    12,    13,    14,
2557       15,    16,    17,    49,   152,   155,   158,   160,   171,   174,
2558      195,   196,   230,   179,   179,    35,    37,   206,   179,   179,
2559       21,   234,   235,    29,   161,   225,   234,    22,    22,    22,
2560      219,   153,     4,     4,     4,   160,    10,   161,   196,   201,
2561      151,   153,   206,   206,    42,    44,   182,    32,    33,   205,
2562       60,    61,    62,    63,    64,    65,   183,   222,   222,   173,
2563      238,   150,   157,    39,   196,   197,   199,   200,   156,   156,
2564      161,   201,   150,   161,   200,   205,   205,    10,   121,   196,
2565      198,   207,    11,    12,    13,    14,    15,    16,   169,   170,
2566      196,   202,     4,   198,    28,   160,   223,    36,    55,    56,
2567       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
2568       77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
2569       87,    88,    89,   110,   111,   112,   115,   116,   117,   118,
2570      119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
2571      129,   130,   131,   132,   133,   164,   165,   166,   236,   242,
2572      243,   244,   245,    22,   185,   150,   154,   196,   196,   159,
2573      161,   196,   154,   202,   196,   153,   230,    26,    27,     3,
2574        4,     5,     6,     9,    25,    40,    41,    88,    89,   115,
2575      129,   131,   132,   133,   155,   158,   160,   162,   164,   165,
2576      166,   203,   230,   213,   174,    55,    10,   196,   232,    11,
2577       17,    11,   169,   183,    90,    91,    92,    93,    94,    95,
2578       96,    97,    98,    99,   167,    26,    27,    96,    97,    98,
2579       99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
2580      109,   168,   196,   196,   232,   196,   196,   239,   232,   232,
2581      232,   232,   232,   196,   196,   232,   183,   113,   114,   117,
2582      118,   134,   135,   137,   138,   140,   141,   142,   184,    39,
2583      197,   187,   157,   159,   159,   187,   214,   215,   207,   167,
2584      168,   153,   153,   153,   153,   153,   157,   202,   204,   160,
2585      204,   161,   204,    22,   153,   153,   153,   150,   193,   153,
2586        3,     4,     9,    25,    26,    27,    40,    41,    57,   158,
2587      203,   229,   230,   231,   231,   231,   231,   198,   196,   196,
2588      150,   190,   150,   190,   231,   155,   150,   150,   150,   150,
2589      150,   150,   231,   231,    38,   198,   196,   232,   134,   135,
2590      136,   139,   143,   144,   186,   193,   193,    38,   153,   153,
2591      202,   202,   202,   202,   202,   150,   157,   161,   196,   204,
2592      159,   161,   202,   202,   202,    34,    53,   191,   194,    39,
2593      196,   220,   221,    59,   228,   204,   150,   150,   231,   231,
2594      231,    11,    53,    11,   241,   231,   155,   232,   196,   232,
2595      232,   232,   150,   150,   196,   231,   231,   150,   196,   202,
2596      202,   241,   150,   150,   150,   150,   202,   159,   161,   150,
2597      150,    38,    22,     4,   193,   185,   150,   154,    22,   159,
2598       17,    17,   153,   150,   150,   231,     4,   231,   150,   150,
2599      231,   150,   150,   150,   231,   231,   153,   150,   190,   196,
2600      154,   150,   150,   154,   202,   202,   202,   202,   159,   202,
2601      202,   196,   171,   172,    39,   196,   187,   150,   231,   231,
2602       17,   196,   240,   231,   231,   190,   190,   232,   231,   150,
2603      232,   232,   232,   240,   231,   202,   202,   150,   154,   150,
2604      150,   154,   154,   154,   185,   191,   192,    22,   150,   155,
2605      185,   185,   150,   154,   157,   231,   154,   190,   154,   154,
2606      202,   202,   202,   172,    53,   189,    17,   157,   169,   237,
2607      117,   118,   231,   231,    17,   196,   187,   157,   187,   154,
2608      154,   154,     4,   145,   188,   231,   229,   157,   169,   185,
2609      185,   185,   185,    38,    22,   150,   229,   231,   231,    17,
2610       17,   150,   185,   185,   231,   231,    17,    71,   231,    17,
2611      231
2612 };
2613
2614 #define yyerrok         (yyerrstatus = 0)
2615 #define yyclearin       (yychar = YYEMPTY)
2616 #define YYEMPTY         (-2)
2617 #define YYEOF           0
2618
2619 #define YYACCEPT        goto yyacceptlab
2620 #define YYABORT         goto yyabortlab
2621 #define YYERROR         goto yyerrorlab
2622
2623
2624 /* Like YYERROR except do call yyerror.  This remains here temporarily
2625    to ease the transition to the new meaning of YYERROR, for GCC.
2626    Once GCC version 2 has supplanted version 1, this can go.  */
2627
2628 #define YYFAIL          goto yyerrlab
2629
2630 #define YYRECOVERING()  (!!yyerrstatus)
2631
2632 #define YYBACKUP(Token, Value)                                  \
2633 do                                                              \
2634   if (yychar == YYEMPTY && yylen == 1)                          \
2635     {                                                           \
2636       yychar = (Token);                                         \
2637       yylval = (Value);                                         \
2638       yytoken = YYTRANSLATE (yychar);                           \
2639       YYPOPSTACK (1);                                           \
2640       goto yybackup;                                            \
2641     }                                                           \
2642   else                                                          \
2643     {                                                           \
2644       yyerror (YY_("syntax error: cannot back up")); \
2645       YYERROR;                                                  \
2646     }                                                           \
2647 while (YYID (0))
2648
2649
2650 #define YYTERROR        1
2651 #define YYERRCODE       256
2652
2653
2654 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2655    If N is 0, then set CURRENT to the empty location which ends
2656    the previous symbol: RHS[0] (always defined).  */
2657
2658 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2659 #ifndef YYLLOC_DEFAULT
2660 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
2661     do                                                                  \
2662       if (YYID (N))                                                    \
2663         {                                                               \
2664           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
2665           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
2666           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
2667           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
2668         }                                                               \
2669       else                                                              \
2670         {                                                               \
2671           (Current).first_line   = (Current).last_line   =              \
2672             YYRHSLOC (Rhs, 0).last_line;                                \
2673           (Current).first_column = (Current).last_column =              \
2674             YYRHSLOC (Rhs, 0).last_column;                              \
2675         }                                                               \
2676     while (YYID (0))
2677 #endif
2678
2679
2680 /* YY_LOCATION_PRINT -- Print the location on the stream.
2681    This macro was not mandated originally: define only if we know
2682    we won't break user code: when these are the locations we know.  */
2683
2684 #ifndef YY_LOCATION_PRINT
2685 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2686 #  define YY_LOCATION_PRINT(File, Loc)                  \
2687      fprintf (File, "%d.%d-%d.%d",                      \
2688               (Loc).first_line, (Loc).first_column,     \
2689               (Loc).last_line,  (Loc).last_column)
2690 # else
2691 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2692 # endif
2693 #endif
2694
2695
2696 /* YYLEX -- calling `yylex' with the right arguments.  */
2697
2698 #ifdef YYLEX_PARAM
2699 # define YYLEX yylex (YYLEX_PARAM)
2700 #else
2701 # define YYLEX yylex ()
2702 #endif
2703
2704 /* Enable debugging if requested.  */
2705 #if YYDEBUG
2706
2707 # ifndef YYFPRINTF
2708 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2709 #  define YYFPRINTF fprintf
2710 # endif
2711
2712 # define YYDPRINTF(Args)                        \
2713 do {                                            \
2714   if (yydebug)                                  \
2715     YYFPRINTF Args;                             \
2716 } while (YYID (0))
2717
2718 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
2719 do {                                                                      \
2720   if (yydebug)                                                            \
2721     {                                                                     \
2722       YYFPRINTF (stderr, "%s ", Title);                                   \
2723       yy_symbol_print (stderr,                                            \
2724                   Type, Value); \
2725       YYFPRINTF (stderr, "\n");                                           \
2726     }                                                                     \
2727 } while (YYID (0))
2728
2729
2730 /*--------------------------------.
2731 | Print this symbol on YYOUTPUT.  |
2732 `--------------------------------*/
2733
2734 /*ARGSUSED*/
2735 #if (defined __STDC__ || defined __C99__FUNC__ \
2736      || defined __cplusplus || defined _MSC_VER)
2737 static void
2738 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2739 #else
2740 static void
2741 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
2742     FILE *yyoutput;
2743     int yytype;
2744     YYSTYPE const * const yyvaluep;
2745 #endif
2746 {
2747   if (!yyvaluep)
2748     return;
2749 # ifdef YYPRINT
2750   if (yytype < YYNTOKENS)
2751     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2752 # else
2753   YYUSE (yyoutput);
2754 # endif
2755   switch (yytype)
2756     {
2757       default:
2758         break;
2759     }
2760 }
2761
2762
2763 /*--------------------------------.
2764 | Print this symbol on YYOUTPUT.  |
2765 `--------------------------------*/
2766
2767 #if (defined __STDC__ || defined __C99__FUNC__ \
2768      || defined __cplusplus || defined _MSC_VER)
2769 static void
2770 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
2771 #else
2772 static void
2773 yy_symbol_print (yyoutput, yytype, yyvaluep)
2774     FILE *yyoutput;
2775     int yytype;
2776     YYSTYPE const * const yyvaluep;
2777 #endif
2778 {
2779   if (yytype < YYNTOKENS)
2780     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2781   else
2782     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2783
2784   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
2785   YYFPRINTF (yyoutput, ")");
2786 }
2787
2788 /*------------------------------------------------------------------.
2789 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2790 | TOP (included).                                                   |
2791 `------------------------------------------------------------------*/
2792
2793 #if (defined __STDC__ || defined __C99__FUNC__ \
2794      || defined __cplusplus || defined _MSC_VER)
2795 static void
2796 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
2797 #else
2798 static void
2799 yy_stack_print (bottom, top)
2800     yytype_int16 *bottom;
2801     yytype_int16 *top;
2802 #endif
2803 {
2804   YYFPRINTF (stderr, "Stack now");
2805   for (; bottom <= top; ++bottom)
2806     YYFPRINTF (stderr, " %d", *bottom);
2807   YYFPRINTF (stderr, "\n");
2808 }
2809
2810 # define YY_STACK_PRINT(Bottom, Top)                            \
2811 do {                                                            \
2812   if (yydebug)                                                  \
2813     yy_stack_print ((Bottom), (Top));                           \
2814 } while (YYID (0))
2815
2816
2817 /*------------------------------------------------.
2818 | Report that the YYRULE is going to be reduced.  |
2819 `------------------------------------------------*/
2820
2821 #if (defined __STDC__ || defined __C99__FUNC__ \
2822      || defined __cplusplus || defined _MSC_VER)
2823 static void
2824 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
2825 #else
2826 static void
2827 yy_reduce_print (yyvsp, yyrule)
2828     YYSTYPE *yyvsp;
2829     int yyrule;
2830 #endif
2831 {
2832   int yynrhs = yyr2[yyrule];
2833   int yyi;
2834   unsigned long int yylno = yyrline[yyrule];
2835   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
2836              yyrule - 1, yylno);
2837   /* The symbols being reduced.  */
2838   for (yyi = 0; yyi < yynrhs; yyi++)
2839     {
2840       fprintf (stderr, "   $%d = ", yyi + 1);
2841       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
2842                        &(yyvsp[(yyi + 1) - (yynrhs)])
2843                                        );
2844       fprintf (stderr, "\n");
2845     }
2846 }
2847
2848 # define YY_REDUCE_PRINT(Rule)          \
2849 do {                                    \
2850   if (yydebug)                          \
2851     yy_reduce_print (yyvsp, Rule); \
2852 } while (YYID (0))
2853
2854 /* Nonzero means print parse trace.  It is left uninitialized so that
2855    multiple parsers can coexist.  */
2856 int yydebug;
2857 #else /* !YYDEBUG */
2858 # define YYDPRINTF(Args)
2859 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2860 # define YY_STACK_PRINT(Bottom, Top)
2861 # define YY_REDUCE_PRINT(Rule)
2862 #endif /* !YYDEBUG */
2863
2864
2865 /* YYINITDEPTH -- initial size of the parser's stacks.  */
2866 #ifndef YYINITDEPTH
2867 # define YYINITDEPTH 200
2868 #endif
2869
2870 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2871    if the built-in stack extension method is used).
2872
2873    Do not make this value too large; the results are undefined if
2874    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2875    evaluated with infinite-precision integer arithmetic.  */
2876
2877 #ifndef YYMAXDEPTH
2878 # define YYMAXDEPTH 10000
2879 #endif
2880
2881 \f
2882
2883 #if YYERROR_VERBOSE
2884
2885 # ifndef yystrlen
2886 #  if defined __GLIBC__ && defined _STRING_H
2887 #   define yystrlen strlen
2888 #  else
2889 /* Return the length of YYSTR.  */
2890 #if (defined __STDC__ || defined __C99__FUNC__ \
2891      || defined __cplusplus || defined _MSC_VER)
2892 static YYSIZE_T
2893 yystrlen (const char *yystr)
2894 #else
2895 static YYSIZE_T
2896 yystrlen (yystr)
2897     const char *yystr;
2898 #endif
2899 {
2900   YYSIZE_T yylen;
2901   for (yylen = 0; yystr[yylen]; yylen++)
2902     continue;
2903   return yylen;
2904 }
2905 #  endif
2906 # endif
2907
2908 # ifndef yystpcpy
2909 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2910 #   define yystpcpy stpcpy
2911 #  else
2912 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2913    YYDEST.  */
2914 #if (defined __STDC__ || defined __C99__FUNC__ \
2915      || defined __cplusplus || defined _MSC_VER)
2916 static char *
2917 yystpcpy (char *yydest, const char *yysrc)
2918 #else
2919 static char *
2920 yystpcpy (yydest, yysrc)
2921     char *yydest;
2922     const char *yysrc;
2923 #endif
2924 {
2925   char *yyd = yydest;
2926   const char *yys = yysrc;
2927
2928   while ((*yyd++ = *yys++) != '\0')
2929     continue;
2930
2931   return yyd - 1;
2932 }
2933 #  endif
2934 # endif
2935
2936 # ifndef yytnamerr
2937 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2938    quotes and backslashes, so that it's suitable for yyerror.  The
2939    heuristic is that double-quoting is unnecessary unless the string
2940    contains an apostrophe, a comma, or backslash (other than
2941    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
2942    null, do not copy; instead, return the length of what the result
2943    would have been.  */