/* A Bison parser, made from dcParser.yxx
   by GNU bison 1.35.  */

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

#define yyparse dcyyparse
#define yylex dcyylex
#define yyerror dcyyerror
#define yylval dcyylval
#define yychar dcyychar
#define yydebug dcyydebug
#define yynerrs dcyynerrs
# define	UNSIGNED_INTEGER	257
# define	SIGNED_INTEGER	258
# define	REAL	259
# define	STRING	260
# define	HEX_STRING	261
# define	IDENTIFIER	262
# define	KW_DCLASS	263
# define	KW_STRUCT	264
# define	KW_FROM	265
# define	KW_IMPORT	266
# define	KW_TYPEDEF	267
# define	KW_SWITCH	268
# define	KW_CASE	269
# define	KW_INT8	270
# define	KW_INT16	271
# define	KW_INT32	272
# define	KW_INT64	273
# define	KW_UINT8	274
# define	KW_UINT16	275
# define	KW_UINT32	276
# define	KW_UINT64	277
# define	KW_FLOAT64	278
# define	KW_STRING	279
# define	KW_BLOB	280
# define	KW_BLOB32	281
# define	KW_INT8ARRAY	282
# define	KW_INT16ARRAY	283
# define	KW_INT32ARRAY	284
# define	KW_UINT8ARRAY	285
# define	KW_UINT16ARRAY	286
# define	KW_UINT32ARRAY	287
# define	KW_UINT32UINT8ARRAY	288
# define	KW_CHAR	289
# define	KW_REQUIRED	290
# define	KW_BROADCAST	291
# define	KW_P2P	292
# define	KW_RAM	293
# define	KW_DB	294
# define	KW_CLSEND	295
# define	KW_CLRECV	296
# define	KW_OWNSEND	297
# define	KW_AIRECV	298
# define	START_DC	299
# define	START_PARAMETER_VALUE	300
# define	START_PARAMETER_DESCRIPTION	301

#line 6 "dcParser.yxx"

#include "dcLexerDefs.h"
#include "dcParserDefs.h"
#include "dcFile.h"
#include "dcClass.h"
#include "dcSwitch.h"
#include "dcAtomicField.h"
#include "dcMolecularField.h"
#include "dcClassParameter.h"
#include "dcSwitchParameter.h"
#include "dcArrayParameter.h"
#include "dcSimpleParameter.h"
#include "dcTypedef.h"
#include "dcPacker.h"
#include "dcNumericRange.h"

// Because our token type contains objects of type string, which
// require correct copy construction (and not simply memcpying), we
// cannot use bison's built-in auto-stack-grow feature.  As an easy
// solution, we ensure here that we have enough yacc stack to start
// with, and that it doesn't ever try to grow.
#define YYINITDEPTH 1000
#define YYMAXDEPTH 1000

static DCFile *dc_file = (DCFile *)NULL;
static DCClass *current_class = (DCClass *)NULL;
static DCSwitch *current_switch = (DCSwitch *)NULL;
static DCAtomicField *current_atomic = (DCAtomicField *)NULL;
static DCMolecularField *current_molecular = (DCMolecularField *)NULL;
static DCParameter *current_parameter = (DCParameter *)NULL;
static DCPacker default_packer;
static DCPacker *current_packer;
static DCDoubleRange double_range;
static DCUnsignedIntRange uint_range;
static DCField *parameter_description = (DCField *)NULL;

////////////////////////////////////////////////////////////////////
// Defining the interface to the parser.
////////////////////////////////////////////////////////////////////

void
dc_init_parser(istream &in, const string &filename, DCFile &file) {
  dc_file = &file;
  dc_init_lexer(in, filename);
}

void
dc_init_parser_parameter_value(istream &in, const string &filename, 
                               DCPacker &packer) {
  dc_file = NULL;
  current_packer = &packer;
  dc_init_lexer(in, filename);
  dc_start_parameter_value();
}

void
dc_init_parser_parameter_description(istream &in, const string &filename,
                                     DCFile *file) {
  dc_file = file;
  dc_init_lexer(in, filename);
  parameter_description = NULL;
  dc_start_parameter_description();
}

DCField *
dc_get_parameter_description() {
  return parameter_description;
}

void
dc_cleanup_parser() {
  dc_file = (DCFile *)NULL;
}

#ifndef YYDEBUG
# define YYDEBUG 0
#endif



#define	YYFINAL		271
#define	YYFLAG		-32768
#define	YYNTBASE	63

/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 301 ? yytranslate[x] : 137)

/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const char 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,
       2,     2,     2,     2,     2,     2,     2,    59,     2,     2,
      56,    57,    51,     2,    52,    60,    50,    49,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    55,    48,
       2,    58,     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,    61,     2,    62,     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,    53,     2,    54,     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,     2,     2,     2,     2,     1,     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
};

#if YYDEBUG
static const short yyprhs[] =
{
       0,     0,     3,     6,     9,    11,    14,    17,    20,    23,
      26,    28,    32,    34,    38,    41,    42,    48,    50,    52,
      54,    58,    61,    63,    65,    66,    74,    76,    78,    81,
      83,    87,    89,    92,    95,    98,   101,   105,   108,   109,
     117,   119,   121,   124,   126,   130,   132,   135,   138,   141,
     144,   148,   151,   152,   158,   160,   162,   164,   168,   170,
     171,   175,   177,   179,   180,   185,   187,   188,   193,   195,
     197,   199,   201,   204,   207,   210,   212,   217,   221,   225,
     227,   229,   231,   233,   235,   237,   241,   244,   248,   254,
     259,   261,   263,   267,   270,   274,   280,   285,   287,   292,
     294,   298,   302,   307,   309,   311,   313,   315,   317,   319,
     321,   323,   325,   327,   329,   331,   333,   335,   337,   339,
     340,   345,   346,   351,   352,   357,   361,   365,   369,   373,
     375,   378,   380,   382,   384,   388,   390,   392,   394,   396,
     398,   400,   402,   404,   406,   408,   410,   412,   414,   416,
     418,   420,   422,   424,   426,   428,   430,   433,   436,   439,
     442,   445,   448,   451,   454,   457,   459,   460,   465,   467,
     469,   473,   475,   477,   478,   488,   490,   493,   496,   499,
     500,   505,   508,   510
};
static const short yyrhs[] =
{
      45,    64,     0,    46,   115,     0,    47,   101,     0,   136,
       0,    64,    48,     0,    64,    72,     0,    64,   130,     0,
      64,    67,     0,    64,    71,     0,     8,     0,    65,    49,
       8,     0,    65,     0,    66,    50,    65,     0,    12,    66,
       0,     0,    11,    66,    12,    68,    69,     0,    70,     0,
      51,     0,    65,     0,    70,    52,    65,     0,    13,   100,
       0,    73,     0,    80,     0,     0,     9,   129,    74,    76,
      53,    78,    54,     0,     8,     0,   136,     0,    55,    77,
       0,    75,     0,    77,    52,    75,     0,   136,     0,    78,
      48,     0,    78,    79,     0,    87,   123,     0,   125,   124,
       0,    97,   123,    48,     0,    95,   123,     0,     0,    10,
     129,    81,    83,    53,    85,    54,     0,     8,     0,   136,
       0,    55,    84,     0,    82,     0,    84,    52,    82,     0,
     136,     0,    85,    48,     0,    85,    86,     0,    87,   124,
       0,   125,   124,     0,    97,   124,    48,     0,    95,   124,
       0,     0,   129,    56,    88,    89,    57,     0,   136,     0,
      90,     0,    91,     0,    90,    52,    91,     0,   100,     0,
       0,   106,    93,   107,     0,   106,     0,    92,     0,     0,
      92,    58,    96,   115,     0,    94,     0,     0,    94,    58,
      98,   115,     0,    92,     0,    94,     0,    95,     0,    97,
       0,    87,   124,     0,    97,   124,     0,    95,   124,     0,
     122,     0,   102,    56,   104,    57,     0,   102,    49,   109,
       0,   102,    59,   113,     0,   102,     0,     8,     0,    80,
       0,   130,     0,   136,     0,   114,     0,   114,    60,   114,
       0,   114,   113,     0,   104,    52,   114,     0,   104,    52,
     114,    60,   114,     0,   104,    52,   114,   113,     0,   136,
       0,   108,     0,   108,    60,   108,     0,   108,   110,     0,
     105,    52,   108,     0,   105,    52,   108,    60,   108,     0,
     105,    52,   108,   110,     0,   103,     0,   106,    61,   105,
      62,     0,     8,     0,   107,    49,   109,     0,   107,    59,
     113,     0,   107,    61,   105,    62,     0,     6,     0,   109,
       0,     3,     0,     4,     0,     4,     0,     3,     0,   112,
       0,   111,     0,     5,     0,     6,     0,   113,     0,   111,
       0,   112,     0,     5,     0,     6,     0,     7,     0,     0,
      53,   116,   119,    54,     0,     0,    61,   117,   119,    62,
       0,     0,    56,   118,   119,    57,     0,   111,    51,   109,
       0,   112,    51,   109,     0,     5,    51,   109,     0,     7,
      51,   109,     0,   120,     0,   121,   120,     0,   136,     0,
      52,     0,   115,     0,   121,    52,   115,     0,    16,     0,
      17,     0,    18,     0,    19,     0,    20,     0,    21,     0,
      22,     0,    23,     0,    24,     0,    25,     0,    26,     0,
      27,     0,    28,     0,    29,     0,    30,     0,    31,     0,
      32,     0,    33,     0,    34,     0,    35,     0,   136,     0,
     123,    36,     0,   123,    37,     0,   123,    38,     0,   123,
      39,     0,   123,    40,     0,   123,    41,     0,   123,    42,
       0,   123,    43,     0,   123,    44,     0,   123,     0,     0,
       8,    55,   126,   128,     0,     8,     0,   127,     0,   128,
      52,   127,     0,   136,     0,     8,     0,     0,    14,   129,
      56,    99,    57,    53,   131,   132,    54,     0,   136,     0,
     132,    48,     0,   132,   133,     0,   132,   135,     0,     0,
      15,   134,   115,    55,     0,    97,    48,     0,    95,     0,
       0
};

#endif

#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
       0,   172,   174,   175,   181,   183,   184,   195,   201,   202,
     205,   207,   213,   215,   221,   226,   226,   233,   235,   241,
     246,   252,   270,   272,   275,   275,   288,   311,   313,   316,
     323,   336,   338,   339,   351,   362,   363,   371,   380,   380,
     393,   416,   418,   421,   428,   436,   438,   439,   449,   457,
     458,   462,   468,   468,   481,   483,   486,   488,   491,   500,
     500,   511,   515,   517,   517,   545,   547,   547,   575,   577,
     580,   582,   585,   590,   594,   600,   605,   614,   630,   644,
     646,   681,   697,   715,   720,   727,   734,   743,   749,   755,
     765,   770,   777,   784,   791,   797,   803,   811,   813,   823,
     829,   844,   859,   865,   875,   878,   889,   903,   907,   911,
     916,   920,   923,   933,   937,   942,   946,   950,   954,   958,
     958,   966,   966,   974,   974,   982,   988,   994,  1000,  1008,
    1010,  1013,  1015,  1018,  1020,  1023,  1028,  1032,  1036,  1040,
    1044,  1048,  1052,  1056,  1060,  1064,  1068,  1072,  1076,  1080,
    1084,  1088,  1092,  1096,  1100,  1106,  1111,  1115,  1119,  1123,
    1127,  1131,  1135,  1139,  1143,  1149,  1159,  1159,  1170,  1186,
    1193,  1206,  1211,  1214,  1214,  1228,  1230,  1231,  1232,  1244,
    1244,  1261,  1266,  1272
};
#endif


#if (YYDEBUG) || defined YYERROR_VERBOSE

/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
  "$", "error", "$undefined.", "UNSIGNED_INTEGER", "SIGNED_INTEGER", "REAL", 
  "STRING", "HEX_STRING", "IDENTIFIER", "KW_DCLASS", "KW_STRUCT", 
  "KW_FROM", "KW_IMPORT", "KW_TYPEDEF", "KW_SWITCH", "KW_CASE", "KW_INT8", 
  "KW_INT16", "KW_INT32", "KW_INT64", "KW_UINT8", "KW_UINT16", 
  "KW_UINT32", "KW_UINT64", "KW_FLOAT64", "KW_STRING", "KW_BLOB", 
  "KW_BLOB32", "KW_INT8ARRAY", "KW_INT16ARRAY", "KW_INT32ARRAY", 
  "KW_UINT8ARRAY", "KW_UINT16ARRAY", "KW_UINT32ARRAY", 
  "KW_UINT32UINT8ARRAY", "KW_CHAR", "KW_REQUIRED", "KW_BROADCAST", 
  "KW_P2P", "KW_RAM", "KW_DB", "KW_CLSEND", "KW_CLRECV", "KW_OWNSEND", 
  "KW_AIRECV", "START_DC", "START_PARAMETER_VALUE", 
  "START_PARAMETER_DESCRIPTION", "';'", "'/'", "'.'", "'*'", "','", "'{'", 
  "'}'", "':'", "'('", "')'", "'='", "'%'", "'-'", "'['", "']'", 
  "grammar", "dc", "slash_identifier", "import_identifier", "import", 
  "@1", "import_symbol_list_or_star", "import_symbol_list", 
  "typedef_decl", "dclass_or_struct", "dclass", "@2", "dclass_name", 
  "dclass_derivation", "dclass_base_list", "dclass_fields", 
  "dclass_field", "struct", "@3", "struct_name", "struct_derivation", 
  "struct_base_list", "struct_fields", "struct_field", "atomic_field", 
  "@4", "parameter_list", "nonempty_parameter_list", "atomic_element", 
  "named_parameter", "@5", "unnamed_parameter", 
  "named_parameter_with_default", "@6", "unnamed_parameter_with_default", 
  "@7", "parameter", "parameter_with_default", "parameter_description", 
  "simple_type_name", "type_name", "double_range", "uint_range", 
  "type_definition", "parameter_definition", "char_or_uint", 
  "small_unsigned_integer", "small_negative_integer", "signed_integer", 
  "unsigned_integer", "number", "char_or_number", "parameter_value", "@8", 
  "@9", "@10", "array", "maybe_comma", "array_def", "type_token", 
  "server_flags", "no_server_flags", "molecular_field", "@11", 
  "atomic_name", "molecular_atom_list", "optional_name", "switch", "@12", 
  "switch_fields", "switch_case", "@13", "switch_field", "empty", 0
};
#endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
       0,    63,    63,    63,    64,    64,    64,    64,    64,    64,
      65,    65,    66,    66,    67,    68,    67,    69,    69,    70,
      70,    71,    72,    72,    74,    73,    75,    76,    76,    77,
      77,    78,    78,    78,    79,    79,    79,    79,    81,    80,
      82,    83,    83,    84,    84,    85,    85,    85,    86,    86,
      86,    86,    88,    87,    89,    89,    90,    90,    91,    93,
      92,    94,    95,    96,    95,    97,    98,    97,    99,    99,
     100,   100,   101,   101,   101,   102,   102,   102,   102,   103,
     103,   103,   103,   104,   104,   104,   104,   104,   104,   104,
     105,   105,   105,   105,   105,   105,   105,   106,   106,   107,
     107,   107,   107,   108,   108,   109,   110,   111,   112,   113,
     113,   113,   114,   114,   115,   115,   115,   115,   115,   116,
     115,   117,   115,   118,   115,   115,   115,   115,   115,   119,
     119,   120,   120,   121,   121,   122,   122,   122,   122,   122,
     122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
     122,   122,   122,   122,   122,   123,   123,   123,   123,   123,
     123,   123,   123,   123,   123,   124,   126,   125,   127,   128,
     128,   129,   129,   131,   130,   132,   132,   132,   132,   134,
     133,   135,   135,   136
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
       0,     2,     2,     2,     1,     2,     2,     2,     2,     2,
       1,     3,     1,     3,     2,     0,     5,     1,     1,     1,
       3,     2,     1,     1,     0,     7,     1,     1,     2,     1,
       3,     1,     2,     2,     2,     2,     3,     2,     0,     7,
       1,     1,     2,     1,     3,     1,     2,     2,     2,     2,
       3,     2,     0,     5,     1,     1,     1,     3,     1,     0,
       3,     1,     1,     0,     4,     1,     0,     4,     1,     1,
       1,     1,     2,     2,     2,     1,     4,     3,     3,     1,
       1,     1,     1,     1,     1,     3,     2,     3,     5,     4,
       1,     1,     3,     2,     3,     5,     4,     1,     4,     1,
       3,     3,     4,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
       4,     0,     4,     0,     4,     3,     3,     3,     3,     1,
       2,     1,     1,     1,     3,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     1,     0,     4,     1,     1,
       3,     1,     1,     0,     9,     1,     2,     2,     2,     0,
       4,     2,     1,     0
};

/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
   doesn't specify something else to do.  Zero means the default is an
   error. */
static const short yydefact[] =
{
       0,   183,     0,   183,     1,     4,   108,   107,   116,   117,
     118,   119,   123,   121,   114,   115,     2,    80,   183,   183,
     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
      81,   183,    62,    65,   183,   183,     3,    79,    97,    61,
      75,     0,    82,   171,   183,     0,     0,     0,     5,     8,
       9,     6,    22,    23,     7,     0,     0,   183,   183,   183,
       0,     0,   172,    38,     0,   165,    72,   155,    63,    66,
      74,    73,     0,   183,     0,   183,     0,    52,    24,    10,
      12,     0,    14,    80,    70,    71,    21,   105,   127,   128,
     132,   133,     0,   129,   183,   131,     0,     0,   125,   126,
     183,     0,   156,   157,   158,   159,   160,   161,   162,   163,
     164,     0,     0,    77,   111,   112,     0,   110,   109,   113,
      84,    83,    78,   103,     0,    91,   104,    90,    99,    60,
     183,   183,     0,    15,     0,   120,   132,   130,   124,   122,
       0,     0,    41,    68,    69,     0,    64,    67,     0,    76,
       0,    86,     0,    98,   106,     0,    93,     0,     0,   183,
       0,    55,    56,    58,    54,     0,     0,    27,    11,     0,
      13,   134,    40,    43,    42,   183,     0,    87,    85,    94,
      92,   100,   101,     0,    53,     0,    26,    29,    28,   183,
      18,    19,    16,    17,     0,   183,    45,   173,     0,    89,
       0,    96,   102,    57,     0,   183,    31,     0,    44,    80,
      46,    39,    47,   183,   183,   183,   183,   183,    88,    95,
      30,    32,    25,    33,   183,   183,   183,   183,    20,   166,
      48,    51,     0,    49,     0,   175,    34,    37,     0,    35,
       0,    50,   179,   176,   174,   182,     0,   177,   178,    36,
     168,   169,   167,     0,   181,     0,     0,   170,   180,     0,
       0,     0
};

static const short yydefgoto[] =
{
     269,     4,    90,    91,    59,   179,   202,   203,    60,    61,
      62,   141,   197,   176,   198,   215,   233,    40,   110,   183,
     151,   184,   205,   222,    41,   140,   170,   171,   172,    42,
      86,    43,    94,   121,    95,   122,   155,   173,    46,    47,
      48,   126,   134,    49,   139,   135,   136,   166,    14,    15,
     129,   130,   101,    67,    69,    68,   102,   103,   104,    50,
      75,    76,   226,   250,   261,   262,    51,    52,   227,   244,
     257,   263,   258,    77
};

static const short yypact[] =
{
      62,-32768,    65,   365,   129,-32768,-32768,-32768,   -17,-32768,
     -13,-32768,-32768,-32768,   -10,    11,-32768,     9,    55,    55,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,    47,    72,-32768,-32768,-32768,   -19,-32768,     5,
  -32768,    76,-32768,-32768,    55,   125,   125,   393,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,   131,   131,    45,    45,    45,
     131,   131,-32768,-32768,    79,   126,-32768,-32768,-32768,-32768,
  -32768,-32768,   131,   119,   109,    29,   137,-32768,-32768,-32768,
      88,    43,    96,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,   104,-32768,   107,-32768,   103,   110,-32768,-32768,
     116,   393,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,    65,    65,-32768,-32768,-32768,    37,-32768,-32768,-32768,
      13,-32768,-32768,-32768,    -6,    20,-32768,-32768,-32768,   -16,
     393,   118,   166,-32768,   125,-32768,    65,-32768,-32768,-32768,
     167,   127,-32768,-32768,-32768,   121,-32768,-32768,   119,-32768,
     119,-32768,    29,-32768,-32768,    29,-32768,   131,   109,    29,
     122,   130,-32768,-32768,-32768,   173,   134,-32768,-32768,    28,
      88,-32768,-32768,-32768,   136,-32768,   138,    18,-32768,    24,
  -32768,-32768,-32768,     2,-32768,   393,-32768,-32768,   141,-32768,
  -32768,    88,-32768,   142,   167,   287,-32768,-32768,   119,-32768,
      29,-32768,-32768,-32768,   173,   326,-32768,   125,-32768,    44,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    88,-32768,
  -32768,-32768,   147,-32768,   248,-32768,   126,   126,   113,-32768,
     181,-32768,-32768,-32768,-32768,-32768,   148,-32768,-32768,-32768,
  -32768,-32768,   146,    65,-32768,   181,   135,-32768,-32768,   199,
     200,-32768
};

static const short yypgoto[] =
{
  -32768,-32768,  -135,   145,-32768,-32768,-32768,-32768,-32768,-32768,
  -32768,-32768,   -12,-32768,-32768,-32768,-32768,   203,-32768,     4,
  -32768,-32768,-32768,-32768,  -148,-32768,-32768,-32768,     8,    98,
  -32768,    99,    -1,-32768,     0,-32768,-32768,   154,-32768,-32768,
  -32768,-32768,    48,-32768,-32768,  -123,   -51,    27,   -77,   -72,
     -83,  -131,    -2,-32768,-32768,-32768,    34,   114,-32768,-32768,
    -107,   -40,     6,-32768,   -52,-32768,    41,   215,-32768,-32768,
  -32768,-32768,-32768,     7
};


#define	YYLAST		428


static const short yytable[] =
{
      16,   132,    44,    45,    80,    81,   127,   127,     5,   180,
      53,   128,   128,   -59,    98,    99,     6,     7,   124,   108,
     109,     6,     7,   124,   164,    53,    53,   187,   164,   188,
      82,   123,    97,   167,    65,   133,    89,    83,    66,   189,
      84,    70,   190,   168,   201,   169,   162,   161,     6,     7,
       8,     9,    10,   127,   162,   143,   163,   223,   128,    73,
      74,    53,    71,    72,   212,  -172,    85,   234,     6,     7,
       8,     9,    10,   160,   105,   105,   105,   228,   208,   200,
     165,   127,   238,   127,   210,   192,   128,   229,   128,   158,
     131,   127,   137,   144,   159,    88,   128,   100,    11,   239,
    -172,    12,   106,   107,   209,    78,    13,     1,     2,     3,
     127,   105,     6,     7,   124,   128,   191,   152,    11,   156,
     157,    12,     6,     7,   124,   125,    13,   246,   247,   248,
      79,   127,    87,    89,    97,   111,   128,   142,    54,    18,
      55,    56,    57,    19,   181,   138,   144,   174,   177,   112,
     113,   114,   115,   116,   117,   118,   119,   120,   145,   146,
     148,   259,   112,   113,   114,   115,   116,   117,   118,   119,
     120,   150,   149,   175,   178,   182,   137,    58,   186,   194,
     185,   196,   195,   240,   241,   242,   243,   199,   204,   260,
     268,   207,   206,   214,   217,   251,   264,   249,   265,   270,
     271,    92,   230,   213,   224,   225,   216,    63,   218,   153,
     154,    96,    53,   267,   235,   236,   211,   193,   147,    64,
       0,   237,    53,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   245,     0,     0,     0,     0,     0,
       0,     0,     0,   255,   256,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    93,     0,    18,     0,
       0,   266,    19,   252,    20,    21,    22,    23,    24,    25,
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   219,   253,    18,     0,     0,
       0,    19,   254,    20,    21,    22,    23,    24,    25,    26,
      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
      37,    38,    39,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   219,   220,    18,     0,     0,     0,
      19,   221,    20,    21,    22,    23,    24,    25,    26,    27,
      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
      38,    39,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    17,   231,    18,     0,     0,     0,    19,
     232,    20,    21,    22,    23,    24,    25,    26,    27,    28,
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    93,     0,    18,     0,     0,     0,    19,     0,    20,
      21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
      31,    32,    33,    34,    35,    36,    37,    38,    39
};

static const short yycheck[] =
{
       2,    84,     3,     3,    44,    45,    83,    84,     1,   144,
       3,    83,    84,     8,    65,    66,     3,     4,     5,    70,
      71,     3,     4,     5,     4,    18,    19,   158,     4,   160,
      49,    82,     3,    49,    51,     6,     8,    56,    51,   162,
      59,    51,   165,    59,   179,    61,    52,   130,     3,     4,
       5,     6,     7,   130,    52,    12,    62,   205,   130,    18,
      19,    54,    51,     8,    62,    56,    61,   215,     3,     4,
       5,     6,     7,    60,    67,    68,    69,   208,    60,    51,
      60,   158,   217,   160,    60,   168,   158,   210,   160,    52,
      83,   168,    85,    50,    57,    54,   168,    52,    53,    55,
      56,    56,    68,    69,   187,    58,    61,    45,    46,    47,
     187,   104,     3,     4,     5,   187,   167,   110,    53,   121,
     122,    56,     3,     4,     5,     6,    61,   234,   235,   236,
      58,   208,    56,     8,     3,    56,   208,    49,     9,    10,
      11,    12,    13,    14,   146,     8,    50,   140,   141,    36,
      37,    38,    39,    40,    41,    42,    43,    44,    54,    52,
      57,    48,    36,    37,    38,    39,    40,    41,    42,    43,
      44,    55,    62,    55,     8,     8,   169,    48,    57,    57,
      53,     8,    52,   223,   224,   225,   226,    53,    52,     8,
      55,    53,   185,    52,    52,    48,    48,   237,    52,     0,
       0,    56,   214,   195,   205,   205,   199,     4,   204,   111,
     111,    57,   205,   265,   215,   215,   189,   169,   104,     4,
      -1,   215,   215,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,   227,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,   244,   244,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,     8,    -1,    10,    -1,
      -1,   263,    14,    15,    16,    17,    18,    19,    20,    21,
      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
      32,    33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,     8,    48,    10,    -1,    -1,
      -1,    14,    54,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
      33,    34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,     8,    48,    10,    -1,    -1,    -1,
      14,    54,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    29,    30,    31,    32,    33,
      34,    35,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,     8,    48,    10,    -1,    -1,    -1,    14,
      54,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,     8,    -1,    10,    -1,    -1,    -1,    14,    -1,    16,
      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
      27,    28,    29,    30,    31,    32,    33,    34,    35
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/share/bison/bison.simple"

/* Skeleton output parser for bison,

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
   Foundation, Inc.

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

   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.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* This is the parser code that is written into each bison parser when
   the %semantic_parser declaration is not specified in the grammar.
   It was written by Richard Stallman by simplifying the hairy parser
   used when %semantic_parser is specified.  */

/* 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.  */

#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)

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

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
# if YYLSP_NEEDED
  YYLTYPE yyls;
# endif
};

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

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# if YYLSP_NEEDED
#  define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
      + 2 * YYSTACK_GAP_MAX)
# else
#  define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAX)
# endif

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  register YYSIZE_T yyi;		\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (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.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (0)

#endif


#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	goto yyacceptlab
#define YYABORT 	goto yyabortlab
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { 								\
      yyerror ("syntax error: cannot back up");			\
      YYERROR;							\
    }								\
while (0)

#define YYTERROR	1
#define YYERRCODE	256


/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).

   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
   first token.  By default, to implement support for ranges, extend
   its range to the last symbol.  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)       	\
   Current.last_line   = Rhs[N].last_line;	\
   Current.last_column = Rhs[N].last_column;
#endif


/* YYLEX -- calling `yylex' with the right arguments.  */

#if YYPURE
# if YYLSP_NEEDED
#  ifdef YYLEX_PARAM
#   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
#  else
#   define YYLEX		yylex (&yylval, &yylloc)
#  endif
# else /* !YYLSP_NEEDED */
#  ifdef YYLEX_PARAM
#   define YYLEX		yylex (&yylval, YYLEX_PARAM)
#  else
#   define YYLEX		yylex (&yylval)
#  endif
# endif /* !YYLSP_NEEDED */
#else /* !YYPURE */
# define YYLEX			yylex ()
#endif /* !YYPURE */


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)
/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */

/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif

#ifdef YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif
#endif

#line 315 "/usr/share/bison/bison.simple"


/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#  define YYPARSE_PARAM_DECL
# else
#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif

/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
   variables are global, or local to YYPARSE.  */

#define YY_DECL_NON_LSP_VARIABLES			\
/* The lookahead symbol.  */				\
int yychar;						\
							\
/* The semantic value of the lookahead symbol. */	\
YYSTYPE yylval;						\
							\
/* Number of parse errors so far.  */			\
int yynerrs;

#if YYLSP_NEEDED
# define YY_DECL_VARIABLES			\
YY_DECL_NON_LSP_VARIABLES			\
						\
/* Location data for the lookahead symbol.  */	\
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES			\
YY_DECL_NON_LSP_VARIABLES
#endif


/* If nonreentrant, generate the variables here. */

#if !YYPURE
YY_DECL_VARIABLES
#endif  /* !YYPURE */

int
yyparse (YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  /* If reentrant, generate the variables here. */
#if YYPURE
  YY_DECL_VARIABLES
#endif  /* !YYPURE */

  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yychar1 = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack. */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;

#if YYLSP_NEEDED
  /* The location stack.  */
  YYLTYPE yylsa[YYINITDEPTH];
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;
#endif

#if YYLSP_NEEDED
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  YYSIZE_T yystacksize = YYINITDEPTH;


  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;
#if YYLSP_NEEDED
  YYLTYPE yyloc;
#endif

  /* When reducing, the number of symbols on the RHS of the reduced
     rule. */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;
#if YYLSP_NEEDED
  yylsp = yyls;
#endif
  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack. Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	short *yyss1 = yyss;

	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  */
# if YYLSP_NEEDED
	YYLTYPE *yyls1 = yyls;
	/* This used to be a conditional around just the two extra args,
	   but that might be undefined if yyoverflow is a macro.  */
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),
		    &yyls1, yysize * sizeof (*yylsp),
		    &yystacksize);
	yyls = yyls1;
# else
	yyoverflow ("parser stack overflow",
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),
		    &yystacksize);
# endif
	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	goto yyoverflowlab;
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
	YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
      yylsp = yyls + yysize - 1;
#endif

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;


/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yychar1 = YYTRANSLATE (yychar);

#if YYDEBUG
     /* We have to keep this `#if YYDEBUG', since we use variables
	which are defined only if `YYDEBUG' is set.  */
      if (yydebug)
	{
	  YYFPRINTF (stderr, "Next token is %d (%s",
		     yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise
	     meaning of a token, for further debugging info.  */
# ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
# endif
	  YYFPRINTF (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
	      yychar, yytname[yychar1]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to the semantic value of
     the lookahead token.  This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];

#if YYLSP_NEEDED
  /* Similarly for the default location.  Let the user run additional
     commands if for instance locations are ranges.  */
  yyloc = yylsp[1-yylen];
  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif

#if YYDEBUG
  /* We have to keep this `#if YYDEBUG', since we use variables which
     are defined only if `YYDEBUG' is set.  */
  if (yydebug)
    {
      int yyi;

      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
		 yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif

  switch (yyn) {

case 3:
#line 176 "dcParser.yxx"
{
  parameter_description = yyvsp[0].u.field;
}
    break;
case 6:
#line 185 "dcParser.yxx"
{
  if (!dc_file->add_class(yyvsp[0].u.dclass)) {
    DCClass *old_class = dc_file->get_class_by_name(yyvsp[0].u.dclass->get_name());
    if (old_class != (DCClass *)NULL && old_class->is_bogus_class()) {
      yyerror("Base class defined after its first reference: " + yyvsp[0].u.dclass->get_name());
    } else {
      yyerror("Duplicate class name: " + yyvsp[0].u.dclass->get_name());
    }
  }
}
    break;
case 7:
#line 196 "dcParser.yxx"
{
  if (!dc_file->add_switch(yyvsp[0].u.dswitch)) {
    yyerror("Duplicate class name: " + yyvsp[0].u.dswitch->get_name());
  }
}
    break;
case 11:
#line 208 "dcParser.yxx"
{
  yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str;
}
    break;
case 13:
#line 216 "dcParser.yxx"
{
  yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str;
}
    break;
case 14:
#line 223 "dcParser.yxx"
{
  dc_file->add_import_module(yyvsp[0].str);
}
    break;
case 15:
#line 227 "dcParser.yxx"
{
  dc_file->add_import_module(yyvsp[-1].str);
}
    break;
case 18:
#line 236 "dcParser.yxx"
{
  dc_file->add_import_symbol("*");
}
    break;
case 19:
#line 243 "dcParser.yxx"
{
  dc_file->add_import_symbol(yyvsp[0].str);
}
    break;
case 20:
#line 247 "dcParser.yxx"
{
  dc_file->add_import_symbol(yyvsp[0].str);
}
    break;
case 21:
#line 254 "dcParser.yxx"
{
  if (yyvsp[0].u.parameter != (DCParameter *)NULL) {
    DCTypedef *dtypedef = new DCTypedef(yyvsp[0].u.parameter);
    
    if (!dc_file->add_typedef(dtypedef)) {
      DCTypedef *old_typedef = dc_file->get_typedef_by_name(dtypedef->get_name());
      if (old_typedef->is_bogus_typedef()) {
        yyerror("typedef defined after its first reference: " + dtypedef->get_name());
      } else {
        yyerror("Duplicate typedef name: " + dtypedef->get_name());
      }
    }
  }
}
    break;
case 24:
#line 277 "dcParser.yxx"
{
  yyval.u.dclass = current_class;
  current_class = new DCClass(dc_file, yyvsp[0].str, false, false);
}
    break;
case 25:
#line 282 "dcParser.yxx"
{
  yyval.u.dclass = current_class;
  current_class = yyvsp[-4].u.dclass;
}
    break;
case 26:
#line 290 "dcParser.yxx"
{
  if (dc_file == (DCFile *)NULL) {
    yyerror("No DCFile available, so no class names are predefined.");
    yyval.u.dclass = NULL;

  } else {
    DCClass *dclass = dc_file->get_class_by_name(yyvsp[0].str);
    if (dclass == (DCClass *)NULL) {
      // Create a bogus class as a forward reference.
      dclass = new DCClass(dc_file, yyvsp[0].str, false, true);
      dc_file->add_class(dclass);
    }
    if (dclass->is_struct()) {
      yyerror("struct name not allowed");
    }
  
    yyval.u.dclass = dclass;
  }
}
    break;
case 29:
#line 318 "dcParser.yxx"
{
  if (yyvsp[0].u.dclass != (DCClass *)NULL) {
    current_class->add_parent(yyvsp[0].u.dclass);
  }
}
    break;
case 30:
#line 324 "dcParser.yxx"
{
  if (!dc_multiple_inheritance) {
    yyerror("Multiple inheritance is not supported without \"dc-multiple-inheritance 1\" in your Config.prc file.");

  } else {
    if (yyvsp[0].u.dclass != (DCClass *)NULL) {
      current_class->add_parent(yyvsp[0].u.dclass);
    }
  }
}
    break;
case 33:
#line 340 "dcParser.yxx"
{
  if (yyvsp[0].u.field == (DCField *)NULL) {
    // Pass this error up.
  } else if (!current_class->add_field(yyvsp[0].u.field)) {
    yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name());
  } else if (yyvsp[0].u.field->get_number() < 0) {
    yyerror("A non-network field cannot be stored on a dclass");
  }
}
    break;
case 34:
#line 353 "dcParser.yxx"
{
  if (yyvsp[-1].u.field != (DCField *)NULL) {
    if (yyvsp[-1].u.field->get_name().empty()) {
      yyerror("Field name required.");
    }
    yyvsp[-1].u.field->set_flags(yyvsp[0].u.s_int);
  }
  yyval.u.field = yyvsp[-1].u.field;
}
    break;
case 36:
#line 364 "dcParser.yxx"
{
  yyerror("Unnamed parameters are not allowed on a dclass");
  if (yyvsp[-2].u.parameter != (DCField *)NULL) {
    yyvsp[-2].u.parameter->set_flags(yyvsp[-1].u.s_int);
  }
  yyval.u.field = yyvsp[-2].u.parameter;
}
    break;
case 37:
#line 372 "dcParser.yxx"
{
  if (yyvsp[-1].u.parameter != (DCField *)NULL) {
    yyvsp[-1].u.parameter->set_flags(yyvsp[0].u.s_int);
  }
  yyval.u.field = yyvsp[-1].u.parameter;
}
    break;
case 38:
#line 382 "dcParser.yxx"
{
  yyval.u.dclass = current_class;
  current_class = new DCClass(dc_file, yyvsp[0].str, true, false);
}
    break;
case 39:
#line 387 "dcParser.yxx"
{
  yyval.u.dclass = current_class;
  current_class = yyvsp[-4].u.dclass;
}
    break;
case 40:
#line 395 "dcParser.yxx"
{
  if (dc_file == (DCFile *)NULL) {
    yyerror("No DCFile available, so no struct names are predefined.");
    yyval.u.dclass = NULL;

  } else {
    DCClass *dstruct = dc_file->get_class_by_name(yyvsp[0].str);
    if (dstruct == (DCClass *)NULL) {
      // Create a bogus class as a forward reference.
      dstruct = new DCClass(dc_file, yyvsp[0].str, false, true);
      dc_file->add_class(dstruct);
    }
    if (!dstruct->is_struct()) {
      yyerror("struct name required");
    }
  
    yyval.u.dclass = dstruct;
  }
}
    break;
case 43:
#line 423 "dcParser.yxx"
{
  if (yyvsp[0].u.dclass != (DCClass *)NULL) {
    current_class->add_parent(yyvsp[0].u.dclass);
  }
}
    break;
case 44:
#line 429 "dcParser.yxx"
{
  if (yyvsp[0].u.dclass != (DCClass *)NULL) {
    current_class->add_parent(yyvsp[0].u.dclass);
  }
}
    break;
case 47:
#line 440 "dcParser.yxx"
{
  if (yyvsp[0].u.field == (DCField *)NULL) {
    // Pass this error up.
  } else if (!current_class->add_field(yyvsp[0].u.field)) {
    yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name());
  }
}
    break;
case 48:
#line 451 "dcParser.yxx"
{
  if (yyvsp[-1].u.field->get_name().empty()) {
    yyerror("Field name required.");
  }
  yyval.u.field = yyvsp[-1].u.field;
}
    break;
case 50:
#line 459 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-2].u.parameter;
}
    break;
case 51:
#line 463 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-1].u.parameter;
}
    break;
case 52:
#line 470 "dcParser.yxx"
{
  yyval.u.field = current_atomic;
  current_atomic = new DCAtomicField(yyvsp[-1].str, current_class);
}
    break;
case 53:
#line 475 "dcParser.yxx"
{
  yyval.u.field = current_atomic;
  current_atomic = yyvsp[-2].u.atomic;
}
    break;
case 58:
#line 493 "dcParser.yxx"
{
  if (yyvsp[0].u.parameter != (DCParameter *)NULL) {
    current_atomic->add_element(yyvsp[0].u.parameter);
  }
}
    break;
case 59:
#line 502 "dcParser.yxx"
{
  current_parameter = yyvsp[0].u.parameter;
}
    break;
case 60:
#line 506 "dcParser.yxx"
{
  yyval.u.parameter = yyvsp[0].u.parameter;
}
    break;
case 63:
#line 518 "dcParser.yxx"
{
  current_packer = &default_packer;
  current_packer->clear_data();
  if (yyvsp[-1].u.parameter != (DCField *)NULL) {
    current_packer->begin_pack(yyvsp[-1].u.parameter);
  }
}
    break;
case 64:
#line 526 "dcParser.yxx"
{
  bool is_valid = false;
  if (yyvsp[-3].u.parameter != (DCField *)NULL) {
    is_valid = yyvsp[-3].u.parameter->is_valid();
  }
  if (current_packer->end_pack()) {
    yyvsp[-3].u.parameter->set_default_value(current_packer->get_string());

  } else {
    if (is_valid) {
      yyerror("Invalid default value for type");
    }
    // If the current parameter isn't valid, we don't mind a pack
    // error (there's no way for us to validate the syntax).  So we'll
    // just ignore the default value in this case.
  }
}
    break;
case 66:
#line 548 "dcParser.yxx"
{
  current_packer = &default_packer;
  current_packer->clear_data();
  if (yyvsp[-1].u.parameter != (DCField *)NULL) {
    current_packer->begin_pack(yyvsp[-1].u.parameter);
  }
}
    break;
case 67:
#line 556 "dcParser.yxx"
{
  bool is_valid = false;
  if (yyvsp[-3].u.parameter != (DCField *)NULL) {
    is_valid = yyvsp[-3].u.parameter->is_valid();
  }
  if (current_packer->end_pack()) {
    yyvsp[-3].u.parameter->set_default_value(current_packer->get_string());

  } else {
    if (is_valid) {
      yyerror("Invalid default value for type");
    }
    // If the current parameter isn't valid, we don't mind a pack
    // error (there's no way for us to validate the syntax).  So we'll
    // just ignore the default value in this case.
  }
}
    break;
case 72:
#line 587 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-1].u.field;
}
    break;
case 73:
#line 591 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-1].u.parameter;
}
    break;
case 74:
#line 595 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-1].u.parameter;
}
    break;
case 75:
#line 602 "dcParser.yxx"
{
  yyval.u.parameter = new DCSimpleParameter(yyvsp[0].u.subatomic);
}
    break;
case 76:
#line 606 "dcParser.yxx"
{
  DCSimpleParameter *simple_param = yyvsp[-3].u.parameter->as_simple_parameter();
  nassertr(simple_param != (DCSimpleParameter *)NULL, 0);
  if (!simple_param->set_range(double_range)) {
    yyerror("Inappropriate range for type");
  }
  yyval.u.parameter = simple_param;
}
    break;
case 77:
#line 615 "dcParser.yxx"
{
  DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter();
  nassertr(simple_param != (DCSimpleParameter *)NULL, 0);
  if (!simple_param->is_numeric_type()) {
    yyerror("A divisor is only valid on a numeric type.");

  } else if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) {
    yyerror("Invalid divisor.");

  } else if (simple_param->has_modulus() && !simple_param->set_modulus(simple_param->get_modulus())) {
    // Changing the divisor may change the valid range for the modulus.
    yyerror("Invalid modulus.");
  }
  yyval.u.parameter = simple_param;
}
    break;
case 78:
#line 631 "dcParser.yxx"
{ 
  DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter();
  nassertr(simple_param != (DCSimpleParameter *)NULL, 0);
  if (!simple_param->is_numeric_type()) {
    yyerror("A divisor is only valid on a numeric type.");

  } else if (!simple_param->set_modulus(yyvsp[0].u.real)) {
    yyerror("Invalid modulus.");
  }
  yyval.u.parameter = simple_param;
}
    break;
case 80:
#line 647 "dcParser.yxx"
{
  if (dc_file == (DCFile *)NULL) {
    yyerror("Invalid type.");
    yyval.u.parameter = NULL;

  } else {
    DCTypedef *dtypedef = dc_file->get_typedef_by_name(yyvsp[0].str);
    if (dtypedef == (DCTypedef *)NULL) {
      // Maybe it's a class name.
      DCClass *dclass = dc_file->get_class_by_name(yyvsp[0].str);
      if (dclass != (DCClass *)NULL) {
        if (!dclass->is_struct()) {
          yyerror("cannot embed a dclass object within a message; use a struct");
        }
        // Create an implicit typedef for this.
        dtypedef = new DCTypedef(new DCClassParameter(dclass), true);
      } else {
        // Maybe it's a switch name.
        DCSwitch *dswitch = dc_file->get_switch_by_name(yyvsp[0].str);
        if (dswitch != (DCSwitch *)NULL) {
          // This also gets an implicit typedef.
          dtypedef = new DCTypedef(new DCSwitchParameter(dswitch), true);
        } else {
          // It's an undefined typedef.  Create a bogus forward reference.
          dtypedef = new DCTypedef(yyvsp[0].str);
        }
      }
      
      dc_file->add_typedef(dtypedef);
    }
    
    yyval.u.parameter = dtypedef->make_new_parameter();
  }
}
    break;
case 81:
#line 682 "dcParser.yxx"
{
  // This is an inline struct definition.
  if (yyvsp[0].u.dclass == (DCClass *)NULL) {
    yyval.u.parameter = NULL;
  } else {
    if (dc_file != (DCFile *)NULL) {
      dc_file->add_thing_to_delete(yyvsp[0].u.dclass);
    } else {
      // This is a memory leak--this happens when we put an anonymous
      // struct reference within the string passed to
      // DCPackerInterface::check_match().  Maybe it doesn't really matter.
    }
    yyval.u.parameter = new DCClassParameter(yyvsp[0].u.dclass);
  }
}
    break;
case 82:
#line 698 "dcParser.yxx"
{
  // This is an inline switch definition.
  if (yyvsp[0].u.dswitch == (DCSwitch *)NULL) {
    yyval.u.parameter = NULL;
  } else {
    if (dc_file != (DCFile *)NULL) {
      dc_file->add_thing_to_delete(yyvsp[0].u.dswitch);
    } else {
      // This is a memory leak--this happens when we put an anonymous
      // switch reference within the string passed to
      // DCPackerInterface::check_match().  Maybe it doesn't really matter.
    }
    yyval.u.parameter = new DCSwitchParameter(yyvsp[0].u.dswitch);
  }
}
    break;
case 83:
#line 717 "dcParser.yxx"
{
  double_range.clear();
}
    break;
case 84:
#line 721 "dcParser.yxx"
{
  double_range.clear();
  if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 85:
#line 728 "dcParser.yxx"
{
  double_range.clear();
  if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 86:
#line 735 "dcParser.yxx"
{
  double_range.clear();
  if (yyvsp[0].u.real >= 0) {
    yyerror("Syntax error");
  } else if (!double_range.add_range(yyvsp[-1].u.real, -yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 87:
#line 744 "dcParser.yxx"
{
  if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 88:
#line 750 "dcParser.yxx"
{
  if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 89:
#line 756 "dcParser.yxx"
{
  if (yyvsp[0].u.real >= 0) {
    yyerror("Syntax error");
  } else if (!double_range.add_range(yyvsp[-1].u.real, -yyvsp[0].u.real)) {
    yyerror("Overlapping range");
  }
}
    break;
case 90:
#line 767 "dcParser.yxx"
{
  uint_range.clear();
}
    break;
case 91:
#line 771 "dcParser.yxx"
{
  uint_range.clear();
  if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 92:
#line 778 "dcParser.yxx"
{
  uint_range.clear();
  if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 93:
#line 785 "dcParser.yxx"
{
  uint_range.clear();
  if (!uint_range.add_range(yyvsp[-1].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 94:
#line 792 "dcParser.yxx"
{
  if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 95:
#line 798 "dcParser.yxx"
{
  if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 96:
#line 804 "dcParser.yxx"
{
  if (!uint_range.add_range(yyvsp[-1].u.s_uint, yyvsp[0].u.s_uint)) {
    yyerror("Overlapping range");
  }
}
    break;
case 98:
#line 814 "dcParser.yxx"
{
  if (yyvsp[-3].u.parameter == (DCParameter *)NULL) {
    yyval.u.parameter = NULL;
  } else {
    yyval.u.parameter = yyvsp[-3].u.parameter->append_array_specification(uint_range);
  }
}
    break;
case 99:
#line 825 "dcParser.yxx"
{
  current_parameter->set_name(yyvsp[0].str);
  yyval.u.parameter = current_parameter;
}
    break;
case 100:
#line 830 "dcParser.yxx"
{
  DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter();
  if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) {
    yyerror("A divisor is only allowed on a primitive type.");

  } else if (!simple_param->is_numeric_type()) {
      yyerror("A divisor is only valid on a numeric type.");

  } else {
    if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) {
      yyerror("Invalid divisor.");
    }
  }
}
    break;
case 101:
#line 845 "dcParser.yxx"
{
  DCSimpleParameter *simple_param = yyvsp[-2].u.parameter->as_simple_parameter();
  if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) {
    yyerror("A modulus is only allowed on a primitive type.");

  } else if (!simple_param->is_numeric_type()) {
      yyerror("A modulus is only valid on a numeric type.");

  } else {
    if (!simple_param->set_modulus(yyvsp[0].u.real)) {
      yyerror("Invalid modulus.");
    }
  }
}
    break;
case 102:
#line 860 "dcParser.yxx"
{
  yyval.u.parameter = yyvsp[-3].u.parameter->append_array_specification(uint_range);
}
    break;
case 103:
#line 867 "dcParser.yxx"
{
  if (yyvsp[0].str.length() != 1) {
    yyerror("Single character required.");
    yyval.u.s_uint = 0;
  } else {
    yyval.u.s_uint = (unsigned char)yyvsp[0].str[0];
  }
}
    break;
case 105:
#line 880 "dcParser.yxx"
{
  yyval.u.s_uint = (unsigned int)yyvsp[0].u.uint64;
  if (yyval.u.s_uint != yyvsp[0].u.uint64) {
    yyerror("Number out of range.");
    yyval.u.s_uint = 1;
  }
}
    break;
case 106:
#line 891 "dcParser.yxx"
{
  yyval.u.s_uint = (unsigned int)-yyvsp[0].u.int64;
  if (yyvsp[0].u.int64 >= 0) {
    yyerror("Syntax error.");

  } else if (yyval.u.s_uint != -yyvsp[0].u.int64) {
    yyerror("Number out of range.");
    yyval.u.s_uint = 1;
  }
}
    break;
case 109:
#line 913 "dcParser.yxx"
{
  yyval.u.real = (double)yyvsp[0].u.uint64;
}
    break;
case 110:
#line 917 "dcParser.yxx"
{
  yyval.u.real = (double)yyvsp[0].u.int64;
}
    break;
case 112:
#line 925 "dcParser.yxx"
{
  if (yyvsp[0].str.length() != 1) {
    yyerror("Single character required.");
    yyval.u.real = 0;
  } else {
    yyval.u.real = (double)(unsigned char)yyvsp[0].str[0];
  }
}
    break;
case 114:
#line 939 "dcParser.yxx"
{
  current_packer->pack_int64(yyvsp[0].u.int64);
}
    break;
case 115:
#line 943 "dcParser.yxx"
{
  current_packer->pack_uint64(yyvsp[0].u.uint64);
}
    break;
case 116:
#line 947 "dcParser.yxx"
{
  current_packer->pack_double(yyvsp[0].u.real);
}
    break;
case 117:
#line 951 "dcParser.yxx"
{
  current_packer->pack_string(yyvsp[0].str);
}
    break;
case 118:
#line 955 "dcParser.yxx"
{
  current_packer->pack_literal_value(yyvsp[0].str);
}
    break;
case 119:
#line 959 "dcParser.yxx"
{
  current_packer->push();
}
    break;
case 120:
#line 963 "dcParser.yxx"
{
  current_packer->pop();
}
    break;
case 121:
#line 967 "dcParser.yxx"
{
  current_packer->push();
}
    break;
case 122:
#line 971 "dcParser.yxx"
{
  current_packer->pop();
}
    break;
case 123:
#line 975 "dcParser.yxx"
{
  current_packer->push();
}
    break;
case 124:
#line 979 "dcParser.yxx"
{
  current_packer->pop();
}
    break;
case 125:
#line 983 "dcParser.yxx"
{
  for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
    current_packer->pack_int64(yyvsp[-2].u.int64);
  }
}
    break;
case 126:
#line 989 "dcParser.yxx"
{
  for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
    current_packer->pack_uint64(yyvsp[-2].u.uint64);
  }
}
    break;
case 127:
#line 995 "dcParser.yxx"
{
  for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
    current_packer->pack_double(yyvsp[-2].u.real);
  }
}
    break;
case 128:
#line 1001 "dcParser.yxx"
{
  for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
    current_packer->pack_literal_value(yyvsp[-2].str);
  }
}
    break;
case 135:
#line 1025 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int8;
}
    break;
case 136:
#line 1029 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int16;
}
    break;
case 137:
#line 1033 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int32;
}
    break;
case 138:
#line 1037 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int64;
}
    break;
case 139:
#line 1041 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint8;
}
    break;
case 140:
#line 1045 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint16;
}
    break;
case 141:
#line 1049 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint32;
}
    break;
case 142:
#line 1053 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint64;
}
    break;
case 143:
#line 1057 "dcParser.yxx"
{
  yyval.u.subatomic = ST_float64;
}
    break;
case 144:
#line 1061 "dcParser.yxx"
{
  yyval.u.subatomic = ST_string;
}
    break;
case 145:
#line 1065 "dcParser.yxx"
{
  yyval.u.subatomic = ST_blob;
}
    break;
case 146:
#line 1069 "dcParser.yxx"
{
  yyval.u.subatomic = ST_blob32;
}
    break;
case 147:
#line 1073 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int8array;
}
    break;
case 148:
#line 1077 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int16array;
}
    break;
case 149:
#line 1081 "dcParser.yxx"
{
  yyval.u.subatomic = ST_int32array;
}
    break;
case 150:
#line 1085 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint8array;
}
    break;
case 151:
#line 1089 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint16array;
}
    break;
case 152:
#line 1093 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint32array;
}
    break;
case 153:
#line 1097 "dcParser.yxx"
{
  yyval.u.subatomic = ST_uint32uint8array;
}
    break;
case 154:
#line 1101 "dcParser.yxx"
{
  yyval.u.subatomic = ST_char;
}
    break;
case 155:
#line 1108 "dcParser.yxx"
{
  yyval.u.s_int = 0;
}
    break;
case 156:
#line 1112 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_required;
}
    break;
case 157:
#line 1116 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_broadcast;
}
    break;
case 158:
#line 1120 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_p2p;
}
    break;
case 159:
#line 1124 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ram;
}
    break;
case 160:
#line 1128 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_db;
}
    break;
case 161:
#line 1132 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clsend;
}
    break;
case 162:
#line 1136 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clrecv;
}
    break;
case 163:
#line 1140 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ownsend;
}
    break;
case 164:
#line 1144 "dcParser.yxx"
{
  yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_airecv;
}
    break;
case 165:
#line 1151 "dcParser.yxx"
{
  if (yyvsp[0].u.s_int != 0) {
    yyerror("Server flags are not allowed here.");
  }
  yyval.u.s_int = yyvsp[0].u.s_int;
}
    break;
case 166:
#line 1161 "dcParser.yxx"
{
  current_molecular = new DCMolecularField(yyvsp[-1].str, current_class);
}
    break;
case 167:
#line 1165 "dcParser.yxx"
{
  yyval.u.field = current_molecular;
}
    break;
case 168:
#line 1172 "dcParser.yxx"
{
  DCField *field = current_class->get_field_by_name(yyvsp[0].str);
  yyval.u.atomic = (DCAtomicField *)NULL;
  if (field == (DCField *)NULL) {
    yyerror("Unknown field: " + yyvsp[0].str);
  } else {
    yyval.u.atomic = field->as_atomic_field();
    if (yyval.u.atomic == (DCAtomicField *)NULL) {
      yyerror("Not an atomic field: " + yyvsp[0].str);
    }
  }
}
    break;
case 169:
#line 1188 "dcParser.yxx"
{
  if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
    current_molecular->add_atomic(yyvsp[0].u.atomic);
  }
}
    break;
case 170:
#line 1194 "dcParser.yxx"
{
  if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
    current_molecular->add_atomic(yyvsp[0].u.atomic);
    if (!current_molecular->compare_flags(*yyvsp[0].u.atomic)) {
      yyerror("Mismatched flags in molecule between " + 
              current_molecular->get_atomic(0)->get_name() + " and " +
              yyvsp[0].u.atomic->get_name());
    }
  }
}
    break;
case 171:
#line 1208 "dcParser.yxx"
{
  yyval.str = "";
}
    break;
case 173:
#line 1216 "dcParser.yxx"
{
  yyval.u.dswitch = current_switch;
  current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.parameter);
}
    break;
case 174:
#line 1221 "dcParser.yxx"
{
  yyval.u.dswitch = current_switch;
  current_switch = (DCSwitch *)yyvsp[-2].u.parameter;
}
    break;
case 178:
#line 1233 "dcParser.yxx"
{
  if (current_switch->get_num_cases() == 0) {
    yyerror("case declaration required before first element");
  } else if (yyvsp[0].u.field != (DCField *)NULL) {
    if (!current_switch->add_field(yyvsp[0].u.field)) {
      yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name());
    }
  }
}
    break;
case 179:
#line 1246 "dcParser.yxx"
{
  current_packer = &default_packer;
  current_packer->clear_data();
  current_packer->begin_pack(current_switch->get_key_parameter());
}
    break;
case 180:
#line 1252 "dcParser.yxx"
{
  if (!current_packer->end_pack()) {
    yyerror("Invalid value for switch parameter");
  } else {
    current_switch->add_case(current_packer->get_string());
  }
}
    break;
case 181:
#line 1263 "dcParser.yxx"
{
  yyval.u.field = yyvsp[-1].u.parameter;
}
    break;
case 182:
#line 1267 "dcParser.yxx"
{
  yyval.u.field = yyvsp[0].u.parameter;
}
    break;
}

#line 705 "/usr/share/bison/bison.simple"


  yyvsp -= yylen;
  yyssp -= yylen;
#if YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "state stack now");
      while (yyssp1 != yyssp)
	YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;
#if YYLSP_NEEDED
  *++yylsp = yyloc;
#endif

  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  char *yymsg;
	  int yyx, yycount;

	  yycount = 0;
	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  for (yyx = yyn < 0 ? -yyn : 0;
	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
	    if (yycheck[yyx + yyn] == yyx)
	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
	  yysize += yystrlen ("parse error, unexpected ") + 1;
	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);

	      if (yycount < 5)
		{
		  yycount = 0;
		  for (yyx = yyn < 0 ? -yyn : 0;
		       yyx < (int) (sizeof (yytname) / sizeof (char *));
		       yyx++)
		    if (yycheck[yyx + yyn] == yyx)
		      {
			const char *yyq = ! yycount ? ", expecting " : " or ";
			yyp = yystpcpy (yyp, yyq);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yycount++;
		      }
		}
	      yyerror (yymsg);
	      YYSTACK_FREE (yymsg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exhausted");
	}
      else
#endif /* defined (YYERROR_VERBOSE) */
	yyerror ("parse error");
    }
  goto yyerrlab1;


/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
	 error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
		  yychar, yytname[yychar1]));
      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;


/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token.                                                       |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */

  /* If its default is to accept any token, ok.  Otherwise pop it.  */
  yyn = yydefact[yystate];
  if (yyn)
    goto yydefault;
#endif


/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token                                                    |
`---------------------------------------------------------------*/
yyerrpop:
  if (yyssp == yyss)
    YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#if YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG
  if (yydebug)
    {
      short *yyssp1 = yyss - 1;
      YYFPRINTF (stderr, "Error: state stack now");
      while (yyssp1 != yyssp)
	YYFPRINTF (stderr, " %d", *++yyssp1);
      YYFPRINTF (stderr, "\n");
    }
#endif

/*--------------.
| yyerrhandle.  |
`--------------*/
yyerrhandle:
  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;
#if YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here.  |
`---------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}
#line 1275 "dcParser.yxx"
