vtkParse.tab.c 195 KB
Newer Older
1

2
/* A Bison parser, made by GNU Bison 2.4.1.  */
3

4
/* Skeleton implementation for Bison's Yacc-like parsers in C
5

6
      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7
   Free Software Foundation, Inc.
8

9
   This program is free software: you can redistribute it and/or modify
10
   it under the terms of the GNU General Public License as published by
11 12
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
13

14 15 16 17
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
18

19
   You should have received a copy of the GNU General Public License
20
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21 22 23 24 25 26 27 28 29 30

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.
31

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Bison version.  */
49
#define YYBISON_VERSION "2.4.1"
50 51 52 53 54 55 56

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

57 58
/* Push parsers.  */
#define YYPUSH 0
59

60 61
/* Pull parsers.  */
#define YYPULL 1
62

63 64
/* Using locations.  */
#define YYLSP_NEEDED 0
65 66 67 68



/* Copy the first part of user declarations.  */
69 70

/* Line 189 of yacc.c  */
71 72
#line 15 "vtkParse.y"

73 74 75 76 77 78 79 80 81 82 83

/*

This file must be translated to C and modified to build everywhere.

Run yacc like this:

  yacc -b vtkParse vtkParse.y

Modify vtkParse.tab.c:
  - remove TABs
84
  - remove yyerrorlab stuff in range ["goto yyerrlab1;", "yyerrstatus = 3;")
85 86

*/
87

Ken Martin's avatar
Ken Martin committed
88 89
#include <stdio.h>
#include <stdlib.h>
Ken Martin's avatar
Ken Martin committed
90
#include <string.h>
Ken Martin's avatar
Ken Martin committed
91 92 93
#define yyerror(a) fprintf(stderr,"%s\n",a)
#define yywrap() 1

94 95 96 97 98 99
/* Make sure yacc-generated code knows we have included stdlib.h.  */
#ifndef _STDLIB_H
# define _STDLIB_H
#endif
#define YYINCLUDED_STDLIB_H

100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
/* Borland and MSVC do not define __STDC__ properly. */
#if !defined(__STDC__)
# if (defined(_MSC_VER) && _MSC_VER >= 1200) || defined(__BORLANDC__)
#  define __STDC__ 1
# endif
#endif

/* Disable warnings in generated code. */
#if defined(_MSC_VER)
# pragma warning (disable: 4127) /* conditional expression is constant */
# pragma warning (disable: 4244) /* conversion to smaller integer type */
#endif
#if defined(__BORLANDC__)
# pragma warn -8004 /* assigned a value that is never used */
# pragma warn -8008 /* conditional is always true */
# pragma warn -8066 /* unreachable code */
#endif

118
/* Map from the type enumeration in vtkType.h to the VTK wrapping type
119 120
   system number for the type. */

121 122
#include "vtkParse.h"
#include "vtkType.h"
123

124 125
static int vtkParseTypeMap[] =
  {
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
  VTK_PARSE_VOID,               /* VTK_VOID                0 */
  0,                            /* VTK_BIT                 1 */
  VTK_PARSE_CHAR,               /* VTK_CHAR                2 */
  VTK_PARSE_UNSIGNED_CHAR,      /* VTK_UNSIGNED_CHAR       3 */
  VTK_PARSE_SHORT,              /* VTK_SHORT               4 */
  VTK_PARSE_UNSIGNED_SHORT,     /* VTK_UNSIGNED_SHORT      5 */
  VTK_PARSE_INT,                /* VTK_INT                 6 */
  VTK_PARSE_UNSIGNED_INT,       /* VTK_UNSIGNED_INT        7 */
  VTK_PARSE_LONG,               /* VTK_LONG                8 */
  VTK_PARSE_UNSIGNED_LONG,      /* VTK_UNSIGNED_LONG       9 */
  VTK_PARSE_FLOAT,              /* VTK_FLOAT              10 */
  VTK_PARSE_DOUBLE,             /* VTK_DOUBLE             11 */
  VTK_PARSE_ID_TYPE,            /* VTK_ID_TYPE            12 */
  VTK_PARSE_STRING,             /* VTK_STRING             13 */
  0,                            /* VTK_OPAQUE             14 */
  VTK_PARSE_SIGNED_CHAR,        /* VTK_SIGNED_CHAR        15 */
  VTK_PARSE_LONG_LONG,          /* VTK_LONG_LONG          16 */
  VTK_PARSE_UNSIGNED_LONG_LONG, /* VTK_UNSIGNED_LONG_LONG 17 */
  VTK_PARSE___INT64,            /* VTK___INT64            18 */
  VTK_PARSE_UNSIGNED___INT64,   /* VTK_UNSIGNED___INT64   19 */
  0,                            /* VTK_VARIANT            20 */
  0,                            /* VTK_OBJECT             21 */
  VTK_PARSE_UNICODE_STRING      /* VTK_UNICODE_STRING     22 */
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
  };

/* Define some constants to simplify references to the table lookup in
   the type_primitive production rule code.  */
#define VTK_PARSE_INT8 vtkParseTypeMap[VTK_TYPE_INT8]
#define VTK_PARSE_UINT8 vtkParseTypeMap[VTK_TYPE_UINT8]
#define VTK_PARSE_INT16 vtkParseTypeMap[VTK_TYPE_INT16]
#define VTK_PARSE_UINT16 vtkParseTypeMap[VTK_TYPE_UINT16]
#define VTK_PARSE_INT32 vtkParseTypeMap[VTK_TYPE_INT32]
#define VTK_PARSE_UINT32 vtkParseTypeMap[VTK_TYPE_UINT32]
#define VTK_PARSE_INT64 vtkParseTypeMap[VTK_TYPE_INT64]
#define VTK_PARSE_UINT64 vtkParseTypeMap[VTK_TYPE_UINT64]
#define VTK_PARSE_FLOAT32 vtkParseTypeMap[VTK_TYPE_FLOAT32]
#define VTK_PARSE_FLOAT64 vtkParseTypeMap[VTK_TYPE_FLOAT64]

164 165 166
/* Define the division between type and array count */
#define VTK_PARSE_COUNT_START 0x10000

167
static void vtkParseDebug(const char* s1, const char* s2);
168

169 170
/* the tokenizer */
int yylex(void);
Brad King's avatar
Brad King committed
171

172 173 174 175 176
/* global variables */
FileInfo data;
FunctionInfo throwAwayFunction;
FunctionInfo *currentFunction;

177
char *hintFileName;
178 179 180 181 182 183 184 185
FILE *fhint;
char temps[2048];
int  in_public;
int  in_protected;
int  HaveComment;
char CommentText[50000];
int CommentState;
int sigClosed;
Keith Fieldhouse's avatar
Keith Fieldhouse committed
186 187
size_t sigMark[10];
size_t sigMarkDepth = 0;
188 189 190
unsigned int sigAllocatedLength;
int mainClass;
char *currentId = 0;
Brad King's avatar
Brad King committed
191

192
void start_class(const char *classname);
193
void output_function(void);
194
void reject_function(void);
195

196 197 198 199 200 201
void outputSetVectorMacro(
  const char *var, int argType, const char *typeText, int n);
void outputGetVectorMacro(
  const char *var, int argType, const char *typeText, int n);

/* duplicate a string */
Berk Geveci's avatar
Berk Geveci committed
202 203
char *vtkstrdup(const char *in)
{
204 205 206 207 208 209
  char *res = NULL;
  if (in)
    {
    res = (char *)malloc(strlen(in)+1);
    strcpy(res,in);
    }
Berk Geveci's avatar
Berk Geveci committed
210 211 212
  return res;
}

213 214 215 216 217 218 219 220 221 222 223
/* reallocate Signature if "arg" cannot be appended */
void checkSigSize(const char *arg)
{
  if (strlen(currentFunction->Signature) + strlen(arg) + 5 >
      sigAllocatedLength)
    {
    currentFunction->Signature = (char *)
      realloc(currentFunction->Signature, sigAllocatedLength*2);
    sigAllocatedLength = sigAllocatedLength*2;
    }
}
224

225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
/* close the signature, i.e. allow no more additions to it */
void closeSig()
{
  sigClosed = 1;
}

/* re-open the signature */
void openSig()
{
  sigClosed = 0;
}

/* insert text at the beginning of the signature */
void preSig(const char *arg)
{
  if (!currentFunction->Signature)
Ken Martin's avatar
Ken Martin committed
241
    {
242 243 244
    currentFunction->Signature = (char*)malloc(2048);
    sigAllocatedLength = 2048;
    strcpy(currentFunction->Signature, arg);
245
    }
246
  else if (!sigClosed)
Ken Martin's avatar
Ken Martin committed
247
    {
Keith Fieldhouse's avatar
Keith Fieldhouse committed
248
    size_t m, n;
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
    char *cp;
    checkSigSize(arg);
    cp = currentFunction->Signature;
    m = strlen(cp);
    n = strlen(arg);
    memmove(&cp[n], cp, m+1);
    strncpy(cp, arg, n);
    }
}

/* append text to the end of the signature */
void postSig(const char *arg)
{
  if (!currentFunction->Signature)
    {
    currentFunction->Signature = (char*)malloc(2048);
    sigAllocatedLength = 2048;
    strcpy(currentFunction->Signature, arg);
Ken Martin's avatar
Ken Martin committed
267
    }
268
  else if (!sigClosed)
Ken Martin's avatar
Ken Martin committed
269
    {
Keith Fieldhouse's avatar
Keith Fieldhouse committed
270
    size_t m, n;
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
    char *cp;
    checkSigSize(arg);
    cp = currentFunction->Signature;
    m = strlen(cp);
    n = strlen(arg);
    strncpy(&cp[m], arg, n+1);
    }
}

/* prepend a scope:: to the ID at the end of the signature */
void preScopeSig(const char *arg)
{
  if (!currentFunction->Signature)
    {
    currentFunction->Signature = (char*)malloc(2048);
    sigAllocatedLength = 2048;
    strcpy(currentFunction->Signature, arg);
    }
  else if (!sigClosed)
    {
Keith Fieldhouse's avatar
Keith Fieldhouse committed
291
    size_t i, m, n, depth;
292 293 294 295 296 297 298 299 300 301 302 303
    char *cp;
    checkSigSize(arg);
    cp = currentFunction->Signature;
    m = strlen(cp);
    n = strlen(arg);
    i = m;
    while (i > 0 &&
           ((cp[i-1] >= 'a' && cp[i-1] <= 'z') ||
            (cp[i-1] >= 'A' && cp[i-1] <= 'Z') ||
            (cp[i-1] >= '0' && cp[i-1] <= '9') ||
            cp[i-1] == '_' || cp[i-1] == ':' ||
            cp[i-1] == '>'))
Ken Martin's avatar
Ken Martin committed
304
      {
305 306
      i--;
      if (cp[i] == '>')
Ken Martin's avatar
Ken Martin committed
307
        {
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
        depth = 1;
        while (i > 0)
          {
          i--;
          if (cp[i] == '<')
            {
            if (--depth == 0)
              {
              break;
              }
            }
          if (cp[i] == '>')
            {
            depth++;
            }
          }
Ken Martin's avatar
Ken Martin committed
324
        }
325
      }
326 327 328 329

    memmove(&cp[i+n+2], &cp[i], m+1);
    strncpy(&cp[i], arg, n);
    strncpy(&cp[i+n], "::", 2);
330
    }
331 332 333 334 335 336 337
}

/* set a mark in the signature for later operations */
void markSig()
{
  sigMark[sigMarkDepth] = 0;
  if (currentFunction->Signature)
338
    {
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
    sigMark[sigMarkDepth] = strlen(currentFunction->Signature);
    }
  sigMarkDepth++;
}

/* get the contents of the sig from the mark, and clear the mark */
const char *copySig()
{
  const char *cp = NULL;
  if (sigMarkDepth > 0)
    {
    sigMarkDepth--;
    }
  if (currentFunction->Signature)
    {
    cp = &currentFunction->Signature[sigMark[sigMarkDepth]];
    }
  return cp;
}

/* swap the signature text using the mark as the radix */
void swapSig()
{
  if (sigMarkDepth > 0)
    {
    sigMarkDepth--;
    }
  if (currentFunction->Signature && sigMark[sigMarkDepth] > 0)
    {
Keith Fieldhouse's avatar
Keith Fieldhouse committed
368
    size_t i, m, n, nn;
369 370 371 372 373 374 375
    char c;
    char *cp;
    cp = currentFunction->Signature;
    n = strlen(cp);
    m = sigMark[sigMarkDepth];
    nn = m/2;
    for (i = 0; i < nn; i++)
376
      {
377
      c = cp[i]; cp[i] = cp[m-i-1]; cp[m-i-1] = c;
378
      }
379 380
    nn = (n-m)/2;
    for (i = 0; i < nn; i++)
381
      {
382 383 384 385 386 387
      c = cp[i+m]; cp[i+m] = cp[n-i-1]; cp[n-i-1] = c;
      }
    nn = n/2;
    for (i = 0; i < nn; i++)
      {
      c = cp[i]; cp[i] = cp[n-i-1]; cp[n-i-1] = c;
Ken Martin's avatar
Ken Martin committed
388 389
      }
    }
390 391 392 393 394 395
}

/* chop the last char from the signature */
void chopSig(void)
{
  if (currentFunction->Signature)
396
    {
Keith Fieldhouse's avatar
Keith Fieldhouse committed
397
    size_t n = strlen(currentFunction->Signature);
398
    if (n > 0)
399
      {
400
      currentFunction->Signature[n-1] = '\0';
401 402
      }
    }
403 404 405 406 407 408
}

/* delete the signature */
void delSig(void)
{
  if (currentFunction->Signature)
409
    {
410 411
    free(currentFunction->Signature);
    currentFunction->Signature = NULL;
412
    }
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
}

/* mark this signature as legacy */
void legacySig(void)
{
  currentFunction->IsLegacy = 1;
}

/* clear the current Id */
void clearTypeId(void)
{
  currentId = NULL;
}

/* set the current Id, it is sticky until cleared */
void setTypeId(const char *text)
{
  static char static_text[2048];
  if (currentId == NULL)
    {
    currentId = static_text;
    strcpy(static_text, text);
    }
}

/* set the signature and type together */
void typeSig(const char *text)
{
  postSig(text);
  postSig(" ");

  if (currentId == 0)
    {
    setTypeId(text);
    }
  else if (currentId[0] == 'u' && !strcmp(currentId, "unsigned"))
    {
    currentId[8] = ' ';
    strcpy(&currentId[9], text);
    }
}

/* return the current Id and clear it */
const char *getTypeId()
{
  return currentId;
}

461 462


463
/* Line 189 of yacc.c  */
464
#line 465 "vtkParse.tab.c"
465

466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif

484 485 486 487 488 489 490 491 492 493 494 495

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     CLASS = 258,
     PUBLIC = 259,
     PRIVATE = 260,
     PROTECTED = 261,
     VIRTUAL = 262,
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520
     ID = 263,
     STRING_LITERAL = 264,
     INT_LITERAL = 265,
     HEX_LITERAL = 266,
     FLOAT_LITERAL = 267,
     CHAR_LITERAL = 268,
     INT = 269,
     FLOAT = 270,
     SHORT = 271,
     LONG = 272,
     LONG_LONG = 273,
     INT64__ = 274,
     DOUBLE = 275,
     VOID = 276,
     CHAR = 277,
     SIGNED_CHAR = 278,
     BOOL = 279,
     OSTREAM = 280,
     ISTREAM = 281,
     ENUM = 282,
     UNION = 283,
     CLASS_REF = 284,
     OTHER = 285,
     CONST = 286,
     CONST_PTR = 287,
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602
     CONST_EQUAL = 288,
     OPERATOR = 289,
     UNSIGNED = 290,
     FRIEND = 291,
     INLINE = 292,
     MUTABLE = 293,
     TEMPLATE = 294,
     TYPENAME = 295,
     TYPEDEF = 296,
     NAMESPACE = 297,
     USING = 298,
     VTK_ID = 299,
     STATIC = 300,
     VAR_FUNCTION = 301,
     ARRAY_NUM = 302,
     VTK_LEGACY = 303,
     NEW = 304,
     DELETE = 305,
     LPAREN_POINTER = 306,
     LPAREN_AMPERSAND = 307,
     OP_LSHIFT_EQ = 308,
     OP_RSHIFT_EQ = 309,
     OP_LSHIFT = 310,
     OP_RSHIFT = 311,
     OP_ARROW_POINTER = 312,
     OP_ARROW = 313,
     OP_INCR = 314,
     OP_DECR = 315,
     OP_PLUS_EQ = 316,
     OP_MINUS_EQ = 317,
     OP_TIMES_EQ = 318,
     OP_DIVIDE_EQ = 319,
     OP_REMAINDER_EQ = 320,
     OP_AND_EQ = 321,
     OP_OR_EQ = 322,
     OP_XOR_EQ = 323,
     OP_LOGIC_AND_EQ = 324,
     OP_LOGIC_OR_EQ = 325,
     OP_LOGIC_AND = 326,
     OP_LOGIC_OR = 327,
     OP_LOGIC_EQ = 328,
     OP_LOGIC_NEQ = 329,
     OP_LOGIC_LEQ = 330,
     OP_LOGIC_GEQ = 331,
     ELLIPSIS = 332,
     DOUBLE_COLON = 333,
     IdType = 334,
     StdString = 335,
     UnicodeString = 336,
     TypeInt8 = 337,
     TypeUInt8 = 338,
     TypeInt16 = 339,
     TypeUInt16 = 340,
     TypeInt32 = 341,
     TypeUInt32 = 342,
     TypeInt64 = 343,
     TypeUInt64 = 344,
     TypeFloat32 = 345,
     TypeFloat64 = 346,
     SetMacro = 347,
     GetMacro = 348,
     SetStringMacro = 349,
     GetStringMacro = 350,
     SetClampMacro = 351,
     SetObjectMacro = 352,
     GetObjectMacro = 353,
     BooleanMacro = 354,
     SetVector2Macro = 355,
     SetVector3Macro = 356,
     SetVector4Macro = 357,
     SetVector6Macro = 358,
     GetVector2Macro = 359,
     GetVector3Macro = 360,
     GetVector4Macro = 361,
     GetVector6Macro = 362,
     SetVectorMacro = 363,
     GetVectorMacro = 364,
     ViewportCoordinateMacro = 365,
     WorldCoordinateMacro = 366,
     TypeMacro = 367,
     VTK_CONSTANT_DEF = 368,
     VTK_BYTE_SWAP_DECL = 369
603 604 605 606 607
   };
#endif



608

609 610 611
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
612 613

/* Line 214 of yacc.c  */
614
#line 406 "vtkParse.y"
615

Ken Martin's avatar
Ken Martin committed
616 617
  char *str;
  int   integer;
618 619 620 621



/* Line 214 of yacc.c  */
622
#line 736 "vtkParse.tab.c"
623 624
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
625 626 627 628 629 630 631 632
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif


/* Copy the second part of user declarations.  */


633
/* Line 264 of yacc.c  */
634
#line 748 "vtkParse.tab.c"
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708

#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
# if YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif

/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
709
YYID (int yyi)
710 711
#else
static int
712 713
YYID (yyi)
    int yyi;
714 715
#endif
{
716
  return yyi;
717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765
}
#endif

#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#     ifndef _STDLIB_H
#      define _STDLIB_H 1
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined _STDLIB_H \
       && ! ((defined YYMALLOC || defined malloc) \
766
             && (defined YYFREE || defined free)))
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef _STDLIB_H
#    define _STDLIB_H 1
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
792
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
793 794 795 796

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
797 798 799
  yytype_int16 yyss_alloc;
  YYSTYPE yyvs_alloc;
};
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
817 818 819 820 821 822 823
#   define YYCOPY(To, From, Count)                \
      do                                        \
        {                                        \
          YYSIZE_T yyi;                                \
          for (yyi = 0; yyi < (Count); yyi++)        \
            (To)[yyi] = (From)[yyi];                \
        }                                        \
824 825 826 827 828 829 830 831 832
      while (YYID (0))
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
833 834 835 836 837 838 839 840 841
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                                \
    do                                                                        \
      {                                                                        \
        YYSIZE_T yynewbytes;                                                \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                        \
        Stack = &yyptr->Stack_alloc;                                        \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                                \
      }                                                                        \
842 843 844 845 846
    while (YYID (0))

#endif

/* YYFINAL -- State number of the termination state.  */
847
#define YYFINAL  132
848
/* YYLAST -- Last index in YYTABLE.  */
849
#define YYLAST   2270
850 851

/* YYNTOKENS -- Number of terminals.  */
852
#define YYNTOKENS  138
853
/* YYNNTS -- Number of nonterminals.  */
854
#define YYNNTS  152
855
/* YYNRULES -- Number of rules.  */
856
#define YYNRULES  441
857
/* YYNRULES -- Number of states.  */
858
#define YYNSTATES  797
859 860 861

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
862
#define YYMAXUTOK   369
863

864
#define YYTRANSLATE(YYX)                                                \
865 866 867 868 869 870 871 872
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
873 874 875 876
       2,     2,     2,   136,     2,     2,     2,   130,   131,     2,
     120,   121,   128,   126,   123,   125,   137,   129,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,   119,   122,
     117,   124,   118,     2,     2,     2,     2,     2,     2,     2,
877 878
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
879
       2,   134,     2,   135,   133,     2,     2,     2,     2,     2,
880 881
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
882
       2,     2,     2,   115,   132,   116,   127,     2,     2,     2,
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
902 903 904 905
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
906
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114
907 908 909 910 911 912 913
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
914
       0,     0,     3,     6,     7,    11,    14,    18,    21,    23,
915 916 917 918 919 920 921 922 923 924
      24,    32,    33,    44,    45,    46,    50,    53,    55,    58,
      60,    62,    64,    66,    68,    70,    72,    75,    77,    79,
      82,    86,    90,    93,    97,   100,   104,   108,   111,   115,
     118,   124,   127,   129,   137,   144,   145,   147,   151,   153,
     157,   159,   161,   163,   165,   167,   169,   171,   173,   176,
     180,   184,   186,   188,   190,   192,   194,   196,   198,   200,
     202,   204,   206,   214,   221,   225,   228,   232,   234,   239,
     243,   248,   257,   265,   275,   285,   288,   291,   294,   297,
     301,   304,   307,   311,   312,   318,   320,   321,   326,   329,
     332,   334,   336,   338,   343,   346,   350,   352,   355,   359,
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958
     361,   364,   368,   369,   370,   379,   380,   384,   387,   388,
     389,   397,   398,   402,   405,   408,   411,   412,   414,   415,
     421,   422,   423,   433,   434,   438,   439,   445,   446,   450,
     451,   455,   460,   462,   463,   469,   471,   473,   476,   478,
     480,   482,   487,   491,   492,   494,   496,   500,   501,   502,
     505,   507,   509,   510,   515,   518,   519,   524,   526,   527,
     533,   534,   535,   545,   546,   548,   549,   551,   554,   559,
     565,   570,   576,   581,   587,   591,   594,   598,   604,   610,
     617,   626,   635,   637,   641,   643,   647,   650,   655,   658,
     661,   662,   664,   665,   669,   674,   676,   679,   681,   684,
     686,   689,   692,   694,   696,   698,   699,   703,   704,   710,
     711,   717,   719,   720,   725,   727,   729,   731,   733,   737,
     741,   745,   747,   749,   751,   754,   757,   760,   763,   766,
     767,   772,   773,   778,   779,   784,   786,   788,   790,   792,
     794,   796,   798,   800,   802,   804,   806,   808,   810,   812,
     814,   816,   818,   820,   822,   824,   826,   828,   829,   833,
     835,   837,   839,   841,   843,   845,   847,   849,   850,   853,
     856,   857,   863,   864,   866,   868,   870,   872,   875,   878,
     880,   884,   886,   888,   890,   892,   894,   896,   897,   905,
     906,   907,   908,   918,   919,   925,   926,   932,   933,   934,
     945,   946,   954,   955,   956,   957,   967,   974,   975,   983,
     984,   992,   993,  1001,  1002,  1010,  1011,  1019,  1020,  1028,
    1029,  1037,  1038,  1046,  1047,  1057,  1058,  1068,  1073,  1078,
    1085,  1093,  1096,  1099,  1103,  1107,  1109,  1111,  1113,  1115,
    1117,  1119,  1121,  1123,  1125,  1127,  1129,  1131,  1133,  1135,
    1137,  1139,  1141,  1143,  1145,  1147,  1149,  1151,  1153,  1155,
    1157,  1159,  1161,  1163,  1165,  1167,  1169,  1171,  1173,  1175,
    1177,  1179,  1181,  1183,  1185,  1187,  1189,  1191,  1192,  1195,
    1196,  1199,  1200,  1203,  1205,  1207,  1209,  1211,  1213,  1215,
    1217,  1219,  1221,  1223,  1225,  1227,  1229,  1231,  1233,  1235,
    1237,  1239,  1241,  1243,  1245,  1247,  1249,  1251,  1253,  1255,
    1257,  1259,  1261,  1263,  1265,  1267,  1269,  1271,  1273,  1275,
    1277,  1279,  1281,  1283,  1287,  1291,  1295,  1299,  1303,  1307,
    1308,  1311
959
};
960 961 962 963

/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int16 yyrhs[] =
{
964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095
     139,     0,    -1,   279,   140,    -1,    -1,   141,   279,   140,
      -1,   166,   243,    -1,   166,    37,   243,    -1,   166,   142,
      -1,   142,    -1,    -1,     3,   203,   143,   247,   115,   145,
     116,    -1,    -1,     3,   203,   117,   235,   118,   144,   247,
     115,   145,   116,    -1,    -1,    -1,   146,   147,   145,    -1,
     250,   119,    -1,   219,    -1,    38,   219,    -1,   149,    -1,
     148,    -1,   158,    -1,   157,    -1,   159,    -1,   163,    -1,
     161,    -1,    36,   161,    -1,   160,    -1,    29,    -1,   174,
     204,    -1,    36,   174,   204,    -1,    37,   174,   204,    -1,
     165,   204,    -1,    37,   165,   204,    -1,   173,   204,    -1,
      36,   173,   204,    -1,    37,   173,   204,    -1,   164,   204,
      -1,    37,   164,   204,    -1,   172,   204,    -1,   114,   120,
     279,   121,   122,    -1,   253,   122,    -1,   253,    -1,    27,
     203,   115,   150,   116,   280,   122,    -1,    27,   115,   150,
     116,   280,   122,    -1,    -1,   151,    -1,   151,   123,   150,
      -1,   203,    -1,   203,   124,   154,    -1,   153,    -1,   203,
      -1,   238,    -1,   232,    -1,    10,    -1,    11,    -1,    13,
      -1,   152,    -1,   155,   154,    -1,   152,   156,   154,    -1,
     120,   154,   121,    -1,   125,    -1,   126,    -1,   127,    -1,
     125,    -1,   126,    -1,   128,    -1,   129,    -1,   130,    -1,
     131,    -1,   132,    -1,   133,    -1,    28,   203,   115,   279,
     116,   280,   122,    -1,    28,   115,   279,   116,   280,   122,
      -1,    43,   280,   122,    -1,   166,   161,    -1,     3,   203,
     162,    -1,   122,    -1,   115,   279,   116,   122,    -1,   119,
     280,   122,    -1,    41,   227,   223,   122,    -1,    41,     3,
     203,   115,   279,   116,   203,   122,    -1,    41,     3,   115,
     279,   116,   203,   122,    -1,    41,   227,    51,   203,   121,
     120,   280,   121,   122,    -1,    41,   227,    52,   203,   121,
     120,   280,   121,   122,    -1,    41,   149,    -1,    41,   148,
      -1,    41,   158,    -1,    41,   157,    -1,    41,    46,   122,
      -1,   166,   173,    -1,   166,   174,    -1,    39,   117,   118,
      -1,    -1,    39,   117,   167,   168,   118,    -1,   170,    -1,
      -1,   170,   123,   169,   168,    -1,   171,   216,    -1,   166,
     216,    -1,    40,    -1,     3,    -1,    14,    -1,    48,   120,
     173,   121,    -1,   127,   198,    -1,     7,   127,   198,    -1,
     191,    -1,   227,   183,    -1,     7,   227,   183,    -1,   175,
      -1,   227,   178,    -1,     7,   227,   178,    -1,    -1,    -1,
      34,   227,   120,   176,   207,   121,   177,   186,    -1,    -1,
     180,   179,   186,    -1,   180,   185,    -1,    -1,    -1,    34,
     276,   181,   120,   182,   207,   121,    -1,    -1,   187,   184,
     186,    -1,   187,   185,    -1,   124,    10,    -1,    33,    10,
      -1,    -1,    31,    -1,    -1,   203,   120,   188,   207,   121,
      -1,    -1,    -1,   203,   117,   189,   235,   118,   120,   190,
     207,   121,    -1,    -1,   193,   192,   195,    -1,    -1,   203,
     120,   194,   207,   121,    -1,    -1,   119,   197,   196,    -1,
      -1,   123,   197,   196,    -1,   203,   120,   279,   121,    -1,
     199,    -1,    -1,   203,   120,   200,   207,   121,    -1,    31,
      -1,    45,    -1,    45,    37,    -1,    44,    -1,     8,    -1,
     122,    -1,   115,   279,   116,   122,    -1,   115,   279,   116,
      -1,    -1,   206,    -1,   211,    -1,   211,   123,   206,    -1,
      -1,    -1,   208,   209,    -1,    77,    -1,   211,    -1,    -1,
     211,   123,   210,   209,    -1,   227,   224,    -1,    -1,   227,
     223,   212,   217,    -1,    46,    -1,    -1,   227,    52,   213,
     216,   121,    -1,    -1,    -1,   227,    51,   214,   216,   121,
     120,   215,   205,   121,    -1,    -1,   203,    -1,    -1,   218,
      -1,   124,   251,    -1,     3,   203,   220,   122,    -1,     3,
     203,   239,   220,   122,    -1,    27,   203,   220,   122,    -1,
      27,   203,   239,   220,   122,    -1,    28,   203,   220,   122,
      -1,    28,   203,   239,   220,   122,    -1,   227,   220,   122,
      -1,    46,   122,    -1,    45,    46,   122,    -1,   227,    52,
     203,   121,   122,    -1,   227,    51,   203,   121,   122,    -1,
     227,    51,   203,   121,    47,   122,    -1,   227,    51,   203,
     121,   134,   279,   135,   122,    -1,   227,    51,   203,   121,
     120,   205,   121,   122,    -1,   222,    -1,   222,   123,   221,
      -1,   222,    -1,   222,   123,   221,    -1,   239,   222,    -1,
     239,   222,   123,   221,    -1,   223,   217,    -1,   203,   224,
      -1,    -1,   225,    -1,    -1,    47,   226,   224,    -1,   134,
     280,   135,   224,    -1,   228,    -1,   202,   228,    -1,   229,
      -1,   229,   239,    -1,   230,    -1,   201,   230,    -1,   230,
     201,    -1,   243,    -1,   232,    -1,   238,    -1,    -1,    40,
     231,   238,    -1,    -1,    44,   117,   233,   235,   118,    -1,
      -1,     8,   117,   234,   235,   118,    -1,   228,    -1,    -1,
     228,   123,   236,   235,    -1,     8,    -1,    44,    -1,   232,
      -1,   238,    -1,     8,    78,   237,    -1,    44,    78,   237,
      -1,   232,    78,   237,    -1,   131,    -1,   128,    -1,    32,
      -1,   128,   131,    -1,   128,   128,    -1,    32,   131,    -1,
      32,   128,    -1,    32,    32,    -1,    -1,   128,   128,   240,
     239,    -1,    -1,    32,   128,   241,   239,    -1,    -1,    32,
      32,   242,   239,    -1,   244,    -1,    80,    -1,    81,    -1,
      25,    -1,    26,    -1,     8,    -1,    44,    -1,    21,    -1,
      15,    -1,    20,    -1,    24,    -1,    23,    -1,    82,    -1,
      83,    -1,    84,    -1,    85,    -1,    86,    -1,    87,    -1,
      88,    -1,    89,    -1,    90,    -1,    91,    -1,    -1,    35,
     245,   246,    -1,   246,    -1,    22,    -1,    14,    -1,    16,
      -1,    17,    -1,    79,    -1,    18,    -1,    19,    -1,    -1,
     119,   248,    -1,   250,   237,    -1,    -1,   250,   237,   249,
     123,   248,    -1,    -1,     4,    -1,     5,    -1,     6,    -1,
     252,    -1,   126,   252,    -1,   125,   252,    -1,     9,    -1,
     120,   251,   121,    -1,    10,    -1,    11,    -1,    12,    -1,
      13,    -1,     8,    -1,    44,    -1,    -1,    92,   120,   203,
     123,   254,   228,   121,    -1,    -1,    -1,    -1,    93,   120,
     255,   203,   123,   256,   228,   257,   121,    -1,    -1,    94,
     120,   258,   203,   121,    -1,    -1,    95,   120,   259,   203,
     121,    -1,    -1,    -1,    96,   120,   203,   123,   260,   243,
     261,   123,   280,   121,    -1,    -1,    97,   120,   203,   123,
     262,   243,   121,    -1,    -1,    -1,    -1,    98,   120,   263,
     203,   123,   264,   243,   265,   121,    -1,    99,   120,   203,
     123,   243,   121,    -1,    -1,   100,   120,   203,   123,   266,
     243,   121,    -1,    -1,   104,   120,   203,   123,   267,   243,
     121,    -1,    -1,   101,   120,   203,   123,   268,   243,   121,
      -1,    -1,   105,   120,   203,   123,   269,   243,   121,    -1,
      -1,   102,   120,   203,   123,   270,   243,   121,    -1,    -1,
     106,   120,   203,   123,   271,   243,   121,    -1,    -1,   103,
     120,   203,   123,   272,   243,   121,    -1,    -1,   107,   120,
     203,   123,   273,   243,   121,    -1,    -1,   108,   120,   203,
     123,   274,   243,   123,    10,   121,    -1,    -1,   109,   120,
     203,   123,   275,   243,   123,    10,   121,    -1,   110,   120,
     203,   121,    -1,   111,   120,   203,   121,    -1,   112,   120,
     203,   123,   203,   121,    -1,   112,   120,   203,   123,   203,
     123,   121,    -1,   120,   121,    -1,   134,   135,    -1,    49,
     134,   135,    -1,    50,   134,   135,    -1,   277,    -1,   124,
      -1,   128,    -1,   129,    -1,   125,    -1,   126,    -1,   136,
      -1,   127,    -1,   123,    -1,   117,    -1,   118,    -1,   131,
      -1,   132,    -1,   133,    -1,   130,    -1,    49,    -1,    50,
      -1,    53,    -1,    54,    -1,    55,    -1,    56,    -1,    57,
      -1,    58,    -1,    61,    -1,    62,    -1,    63,    -1,    64,
      -1,    65,    -1,    59,    -1,    60,    -1,    66,    -1,    67,
      -1,    68,    -1,    69,    -1,    70,    -1,    71,    -1,    72,
      -1,    73,    -1,    74,    -1,    75,    -1,    76,    -1,   113,
      -1,    -1,   283,   279,    -1,    -1,   284,   280,    -1,    -1,
     282,   281,    -1,     3,    -1,    39,    -1,   283,    -1,   122,
      -1,   284,    -1,   288,    -1,    30,    -1,   285,    -1,   286,
      -1,   287,    -1,   277,    -1,   119,    -1,   137,    -1,   243,
      -1,    78,    -1,    10,    -1,    11,    -1,    12,    -1,    13,
      -1,     9,    -1,    29,    -1,    31,    -1,    32,    -1,    33,
      -1,    34,    -1,    45,    -1,    37,    -1,     7,    -1,    27,
      -1,    28,    -1,    40,    -1,    47,    -1,    46,    -1,    77,
      -1,     4,    -1,     6,    -1,     5,    -1,    42,    -1,    43,
      -1,   278,    -1,   115,   281,   116,    -1,   120,   279,   121,
      -1,    51,   279,   121,    -1,    52,   279,   121,    -1,   134,
     279,   135,    -1,    41,   289,   122,    -1,    -1,     3,   289,
      -1,   284,   289,    -1
1096
};
1097 1098 1099 1100

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145
       0,   534,   534,   536,   536,   538,   538,   539,   539,   541,
     541,   543,   543,   546,   546,   546,   548,   549,   550,   551,
     552,   553,   554,   555,   556,   557,   558,   559,   560,   561,
     562,   563,   564,   565,   566,   567,   568,   569,   570,   571,
     572,   573,   574,   582,   584,   586,   586,   586,   588,   588,
     592,   592,   592,   592,   594,   594,   594,   596,   597,   602,
     608,   614,   614,   615,   617,   617,   618,   618,   619,   619,
     620,   620,   622,   624,   626,   628,   630,   632,   633,   634,
     636,   637,   638,   639,   640,   641,   642,   643,   644,   645,
     647,   649,   651,   652,   652,   655,   656,   656,   658,   658,
     660,   661,   662,   664,   666,   667,   668,   669,   673,   682,
     686,   690,   700,   704,   699,   719,   719,   730,   747,   748,
     747,   755,   755,   766,   783,   784,   786,   786,   789,   788,
     793,   794,   793,   803,   803,   815,   815,   817,   817,   819,
     819,   821,   823,   837,   837,   839,   841,   842,   844,   844,
     846,   847,   848,   850,   850,   852,   852,   854,   854,   854,
     856,   857,   860,   859,   863,   873,   872,   881,   889,   889,
     897,   898,   897,   907,   907,   909,   909,   911,   913,   914,
     915,   916,   917,   918,   919,   920,   921,   922,   923,   924,
     925,   926,   928,   929,   931,   932,   933,   934,   937,   939,
     947,   947,   950,   950,   956,   961,   962,   964,   965,   967,
     968,   969,   971,   972,   974,   976,   976,   980,   980,   982,
     982,   985,   985,   985,   987,   988,   989,   990,   992,   998,
    1004,  1022,  1023,  1024,  1025,  1026,  1027,  1029,  1031,  1033,
    1033,  1035,  1035,  1037,  1037,  1040,  1041,  1042,  1044,  1046,
    1047,  1048,  1051,  1052,  1053,  1054,  1055,  1056,  1057,  1058,
    1059,  1060,  1061,  1062,  1063,  1064,  1065,  1066,  1066,  1068,
    1071,  1072,  1073,  1074,  1075,  1076,  1077,  1079,  1079,  1081,
    1090,  1089,  1098,  1099,  1100,  1101,  1103,  1104,  1105,  1107,
    1108,  1110,  1111,  1112,  1113,  1114,  1115,  1118,  1118,  1133,
    1134,  1134,  1133,  1147,  1147,  1162,  1162,  1176,  1176,  1176,
    1223,  1222,  1238,  1239,  1239,  1238,  1252,  1278,  1278,  1283,
    1283,  1288,  1288,  1293,  1293,  1298,  1298,  1303,  1303,  1308,
    1308,  1313,  1313,  1318,  1318,  1339,  1339,  1360,  1426,  1496,
    1563,  1637,  1638,  1639,  1640,  1641,  1643,  1644,  1644,  1645,
    1645,  1646,  1646,  1647,  1647,  1648,  1648,  1649,  1649,  1650,
    1651,  1652,  1653,  1654,  1655,  1656,  1657,  1658,  1659,  1660,
    1661,  1662,  1663,  1664,  1665,  1666,  1667,  1668,  1669,  1670,
    1671,  1672,  1673,  1674,  1675,  1676,  1682,  1687,  1687,  1688,
    1688,  1689,  1689,  1691,  1691,  1691,  1693,  1693,  1693,  1695,
    1695,  1695,  1695,  1696,  1696,  1696,  1696,  1696,  1697,  1697,
    1697,  1697,  1698,  1698,  1698,  1698,  1698,  1699,  1699,  1699,
    1699,  1699,  1699,  1699,  1700,  1700,  1700,  1700,  1700,  1700,
    1701,  1701,  1701,  1703,  1704,  1705,  1706,  1707,  1708,  1710,
    1710,  1711
1146
};
1147 1148 1149 1150 1151 1152 1153 1154
#endif

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "CLASS", "PUBLIC", "PRIVATE",
1155 1156
  "PROTECTED", "VIRTUAL", "ID", "STRING_LITERAL", "INT_LITERAL",
  "HEX_LITERAL", "FLOAT_LITERAL", "CHAR_LITERAL", "INT", "FLOAT", "SHORT",
1157
  "LONG", "LONG_LONG", "INT64__", "DOUBLE", "VOID", "CHAR", "SIGNED_CHAR",
1158
  "BOOL", "OSTREAM", "ISTREAM", "ENUM", "UNION", "CLASS_REF", "OTHER",
1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175
  "CONST", "CONST_PTR", "CONST_EQUAL", "OPERATOR", "UNSIGNED", "FRIEND",
  "INLINE", "MUTABLE", "TEMPLATE", "TYPENAME", "TYPEDEF", "NAMESPACE",
  "USING", "VTK_ID", "STATIC", "VAR_FUNCTION", "ARRAY_NUM", "VTK_LEGACY",
  "NEW", "DELETE", "LPAREN_POINTER", "LPAREN_AMPERSAND", "OP_LSHIFT_EQ",
  "OP_RSHIFT_EQ", "OP_LSHIFT", "OP_RSHIFT", "OP_ARROW_POINTER", "OP_ARROW",
  "OP_INCR", "OP_DECR", "OP_PLUS_EQ", "OP_MINUS_EQ", "OP_TIMES_EQ",
  "OP_DIVIDE_EQ", "OP_REMAINDER_EQ", "OP_AND_EQ", "OP_OR_EQ", "OP_XOR_EQ",
  "OP_LOGIC_AND_EQ", "OP_LOGIC_OR_EQ", "OP_LOGIC_AND", "OP_LOGIC_OR",
  "OP_LOGIC_EQ", "OP_LOGIC_NEQ", "OP_LOGIC_LEQ", "OP_LOGIC_GEQ",
  "ELLIPSIS", "DOUBLE_COLON", "IdType", "StdString", "UnicodeString",
  "TypeInt8", "TypeUInt8", "TypeInt16", "TypeUInt16", "TypeInt32",
  "TypeUInt32", "TypeInt64", "TypeUInt64", "TypeFloat32", "TypeFloat64",
  "SetMacro", "GetMacro", "SetStringMacro", "GetStringMacro",
  "SetClampMacro", "SetObjectMacro", "GetObjectMacro", "BooleanMacro",
  "SetVector2Macro", "SetVector3Macro", "SetVector4Macro",
  "SetVector6Macro", "GetVector2Macro", "GetVector3Macro",
  "GetVector4Macro", "GetVector6Macro", "SetVectorMacro", "GetVectorMacro",
1176 1177 1178 1179 1180
  "ViewportCoordinateMacro", "WorldCoordinateMacro", "TypeMacro",
  "VTK_CONSTANT_DEF", "VTK_BYTE_SWAP_DECL", "'{'", "'}'", "'<'", "'>'",
  "':'", "'('", "')'", "';'", "','", "'='", "'-'", "'+'", "'~'", "'*'",
  "'/'", "'%'", "'&'", "'|'", "'^'", "'['", "']'", "'!'", "'.'", "$accept",
  "strt", "maybe_classes", "maybe_template_class_def", "class_def", "$@1",
1181
  "$@2", "class_def_body", "$@3", "class_def_item", "named_enum", "enum",
1182 1183 1184
  "enum_list", "enum_item", "enum_value", "enum_literal", "enum_math",
  "math_unary_op", "math_binary_op", "named_union", "union", "using",
  "template_internal_class", "internal_class", "internal_class_body",
1185 1186 1187 1188 1189 1190 1191 1192 1193 1194
  "typedef", "template_function", "template_operator", "template", "$@4",
  "template_args", "$@5", "template_arg", "template_type",
  "legacy_function", "function", "operator", "typecast_op_func", "$@6",
  "$@7", "op_func", "$@8", "op_sig", "$@9", "$@10", "func", "$@11",
  "pure_virtual", "maybe_const", "func_sig", "$@12", "$@13", "@14",
  "constructor", "$@15", "constructor_sig", "$@16", "maybe_initializers",
  "more_initializers", "initializer", "destructor", "destructor_sig",
  "$@17", "const_mod", "static_mod", "any_id", "func_body",
  "ignore_args_list", "ignore_more_args", "args_list", "$@18", "more_args",
  "$@19", "arg", "$@20", "$@21", "$@22", "$@23", "maybe_id",
1195 1196
  "maybe_var_assign", "var_assign", "var", "var_ids",
  "maybe_indirect_var_ids", "var_id_maybe_assign", "var_id",
1197 1198 1199 1200 1201 1202 1203 1204 1205
  "maybe_var_array", "var_array", "$@24", "type", "type_red1",
  "type_red11", "type_red12", "$@25", "templated_id", "$@26", "$@27",
  "types", "$@28", "maybe_scoped_id", "scoped_id", "type_indirection",
  "$@29", "$@30", "$@31", "type_red2", "type_primitive", "$@32",
  "type_integer", "optional_scope", "scope_list", "$@33", "scope_type",
  "literal", "literal2", "macro", "$@34", "$@35", "$@36", "$@37", "$@38",
  "$@39", "$@40", "$@41", "$@42", "$@43", "$@44", "$@45", "$@46", "$@47",
  "$@48", "$@49", "$@50", "$@51", "$@52", "$@53", "$@54", "$@55",
  "op_token", "op_token_no_delim", "vtk_constant_def", "maybe_other",
1206 1207 1208
  "maybe_other_no_semi", "maybe_other_class", "other_stuff_or_class",
  "other_stuff", "other_stuff_no_semi", "braces", "parens", "brackets",
  "typedef_ignore", "typedef_ignore_body", 0
1209
};
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1223 1224 1225 1226 1227
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
1228 1229 1230
     365,   366,   367,   368,   369,   123,   125,    60,    62,    58,
      40,    41,    59,    44,    61,    45,    43,   126,    42,    47,
      37,    38,   124,    94,    91,    93,    33,    46
1231
};
1232 1233 1234
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1235
static const yytype_uint16 yyr1[] =
1236
{
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252