panda3d/direct/src/dcparser/dcParser.cxx.prebuilt
2004-06-30 03:51:58 +00:00

2304 lines
65 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 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
#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 DCAtomicField::ElementType atomic_element(new DCSimpleParameter(ST_invalid));
static DCParameter *current_parameter = (DCParameter *)NULL;
static DCPacker default_packer;
static DCPacker *current_packer;
static DCDoubleRange double_range;
static DCUnsignedIntRange uint_range;
////////////////////////////////////////////////////////////////////
// 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_cleanup_parser() {
dc_file = (DCFile *)NULL;
}
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#define YYFINAL 223
#define YYFLAG -32768
#define YYNTBASE 61
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 300 ? yytranslate[x] : 120)
/* 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, 2, 2, 2,
55, 56, 52, 2, 53, 58, 51, 50, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 54, 47,
2, 57, 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, 60, 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, 48, 2, 49, 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
};
#if YYDEBUG
static const short yyprhs[] =
{
0, 0, 3, 6, 8, 11, 14, 17, 20, 23,
24, 32, 34, 36, 38, 40, 44, 46, 50, 53,
54, 60, 62, 64, 66, 70, 73, 75, 78, 80,
84, 86, 89, 92, 94, 96, 100, 103, 104, 111,
113, 115, 117, 121, 123, 124, 129, 130, 134, 136,
138, 140, 142, 147, 151, 158, 165, 167, 169, 171,
173, 175, 179, 182, 186, 192, 197, 199, 201, 205,
209, 215, 217, 222, 224, 228, 233, 235, 237, 239,
241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
261, 263, 264, 269, 270, 275, 276, 281, 285, 289,
293, 297, 299, 302, 304, 306, 308, 312, 314, 316,
318, 320, 322, 324, 326, 328, 330, 332, 334, 336,
338, 340, 342, 344, 346, 348, 350, 352, 354, 357,
360, 363, 366, 369, 372, 375, 378, 381, 382, 387,
389, 391, 395, 397, 399, 400, 410, 412, 415, 418,
421, 422, 427, 430, 432
};
static const short yyrhs[] =
{
45, 62, 0, 46, 99, 0, 119, 0, 62, 47,
0, 62, 63, 0, 62, 113, 0, 62, 69, 0,
62, 73, 0, 0, 65, 112, 64, 74, 48, 76,
49, 0, 10, 0, 9, 0, 8, 0, 8, 0,
67, 50, 8, 0, 67, 0, 68, 51, 67, 0,
12, 68, 0, 0, 11, 68, 12, 70, 71, 0,
72, 0, 52, 0, 67, 0, 72, 53, 67, 0,
13, 87, 0, 119, 0, 54, 75, 0, 66, 0,
75, 53, 66, 0, 119, 0, 76, 47, 0, 76,
77, 0, 78, 0, 108, 0, 86, 107, 47, 0,
84, 107, 0, 0, 8, 55, 79, 80, 56, 107,
0, 119, 0, 81, 0, 82, 0, 81, 53, 82,
0, 87, 0, 0, 87, 57, 83, 99, 0, 0,
91, 85, 92, 0, 91, 0, 84, 0, 86, 0,
106, 0, 106, 55, 89, 56, 0, 106, 50, 94,
0, 106, 50, 94, 55, 89, 56, 0, 106, 55,
89, 56, 50, 94, 0, 8, 0, 63, 0, 113,
0, 119, 0, 98, 0, 98, 58, 98, 0, 98,
97, 0, 89, 53, 98, 0, 89, 53, 98, 58,
98, 0, 89, 53, 98, 97, 0, 119, 0, 93,
0, 93, 58, 93, 0, 90, 53, 93, 0, 90,
53, 93, 58, 93, 0, 88, 0, 91, 59, 90,
60, 0, 8, 0, 92, 50, 94, 0, 92, 59,
90, 60, 0, 6, 0, 94, 0, 3, 0, 4,
0, 3, 0, 96, 0, 95, 0, 5, 0, 6,
0, 97, 0, 95, 0, 96, 0, 5, 0, 6,
0, 7, 0, 0, 48, 100, 103, 49, 0, 0,
59, 101, 103, 60, 0, 0, 55, 102, 103, 56,
0, 95, 52, 94, 0, 96, 52, 94, 0, 5,
52, 94, 0, 7, 52, 94, 0, 104, 0, 105,
104, 0, 119, 0, 53, 0, 99, 0, 105, 53,
99, 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, 119, 0, 107, 36, 0, 107, 37, 0,
107, 38, 0, 107, 39, 0, 107, 40, 0, 107,
41, 0, 107, 42, 0, 107, 43, 0, 107, 44,
0, 0, 8, 54, 109, 111, 0, 8, 0, 110,
0, 111, 53, 110, 0, 119, 0, 8, 0, 0,
14, 112, 55, 87, 56, 48, 114, 115, 49, 0,
119, 0, 115, 47, 0, 115, 116, 0, 115, 118,
0, 0, 15, 117, 99, 54, 0, 86, 47, 0,
84, 0, 0
};
#endif
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 147, 149, 152, 154, 155, 166, 172, 173, 176,
176, 189, 194, 200, 213, 215, 221, 223, 229, 234,
234, 241, 243, 249, 254, 260, 276, 278, 281, 288,
296, 298, 299, 307, 309, 310, 315, 322, 322, 336,
338, 341, 343, 346, 352, 352, 377, 377, 388, 392,
394, 397, 402, 410, 421, 435, 449, 475, 479, 485,
490, 497, 504, 513, 519, 525, 535, 540, 547, 554,
560, 568, 570, 576, 582, 596, 602, 612, 615, 626,
630, 634, 639, 643, 646, 656, 660, 665, 669, 673,
677, 681, 681, 689, 689, 697, 697, 705, 711, 717,
723, 731, 733, 736, 738, 741, 743, 746, 751, 755,
759, 763, 767, 771, 775, 779, 783, 787, 791, 795,
799, 803, 807, 811, 815, 819, 823, 829, 834, 838,
842, 846, 850, 854, 858, 862, 866, 872, 872, 883,
899, 906, 919, 924, 927, 927, 941, 943, 944, 945,
955, 955, 972, 977, 983
};
#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", "';'", "'{'", "'}'",
"'/'", "'.'", "'*'", "','", "':'", "'('", "')'", "'='", "'-'", "'['",
"']'", "grammar", "dc", "dclass", "@1", "kw_struct_or_kw_dclass",
"dclass_name", "slash_identifier", "import_identifier", "import", "@2",
"import_symbol_list_or_star", "import_symbol_list", "typedef_decl",
"dclass_derivation", "base_list", "dclass_fields", "dclass_field",
"atomic_field", "@3", "parameter_list", "nonempty_parameter_list",
"atomic_element", "@4", "named_parameter", "@5", "unnamed_parameter",
"parameter", "type_name", "double_range", "uint_range",
"type_definition", "parameter_definition", "char_or_uint",
"small_unsigned_integer", "signed_integer", "unsigned_integer",
"number", "char_or_number", "parameter_value", "@6", "@7", "@8",
"array", "maybe_comma", "array_def", "type_token", "server_flags",
"molecular_field", "@9", "atomic_name", "molecular_atom_list",
"optional_name", "switch", "@10", "switch_fields", "switch_case", "@11",
"switch_field", "empty", 0
};
#endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
0, 61, 61, 62, 62, 62, 62, 62, 62, 64,
63, 65, 65, 66, 67, 67, 68, 68, 69, 70,
69, 71, 71, 72, 72, 73, 74, 74, 75, 75,
76, 76, 76, 77, 77, 77, 77, 79, 78, 80,
80, 81, 81, 82, 83, 82, 85, 84, 86, 87,
87, 88, 88, 88, 88, 88, 88, 88, 88, 89,
89, 89, 89, 89, 89, 89, 90, 90, 90, 90,
90, 91, 91, 92, 92, 92, 93, 93, 94, 95,
96, 97, 97, 97, 98, 98, 99, 99, 99, 99,
99, 100, 99, 101, 99, 102, 99, 99, 99, 99,
99, 103, 103, 104, 104, 105, 105, 106, 106, 106,
106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
106, 106, 106, 106, 106, 106, 106, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 109, 108, 110,
111, 111, 112, 112, 114, 113, 115, 115, 115, 115,
117, 116, 118, 118, 119
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
0, 2, 2, 1, 2, 2, 2, 2, 2, 0,
7, 1, 1, 1, 1, 3, 1, 3, 2, 0,
5, 1, 1, 1, 3, 2, 1, 2, 1, 3,
1, 2, 2, 1, 1, 3, 2, 0, 6, 1,
1, 1, 3, 1, 0, 4, 0, 3, 1, 1,
1, 1, 4, 3, 6, 6, 1, 1, 1, 1,
1, 3, 2, 3, 5, 4, 1, 1, 3, 3,
5, 1, 4, 1, 3, 4, 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, 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, 154, 0, 1, 3, 80, 79, 88, 89, 90,
91, 95, 93, 86, 87, 2, 12, 11, 0, 0,
0, 154, 4, 5, 154, 7, 8, 6, 0, 0,
154, 154, 154, 0, 0, 14, 16, 0, 18, 56,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
57, 49, 50, 25, 71, 48, 51, 58, 143, 0,
142, 9, 78, 99, 100, 104, 105, 0, 101, 154,
103, 0, 0, 97, 98, 0, 19, 0, 154, 0,
0, 154, 0, 154, 92, 104, 102, 96, 94, 15,
0, 17, 76, 0, 67, 77, 66, 73, 47, 53,
83, 84, 0, 82, 81, 85, 60, 59, 0, 0,
0, 26, 106, 22, 23, 20, 21, 0, 72, 0,
0, 154, 154, 0, 52, 0, 62, 0, 13, 28,
27, 154, 0, 69, 68, 74, 0, 0, 63, 0,
61, 144, 0, 0, 30, 24, 0, 75, 54, 0,
65, 55, 154, 29, 56, 31, 10, 32, 33, 154,
154, 34, 70, 64, 0, 146, 137, 37, 36, 127,
0, 150, 147, 145, 153, 0, 148, 149, 0, 154,
128, 129, 130, 131, 132, 133, 134, 135, 136, 35,
0, 152, 139, 140, 138, 0, 40, 41, 43, 39,
0, 0, 154, 0, 44, 151, 141, 38, 42, 0,
45, 0, 0, 0
};
static const short yydefgoto[] =
{
221, 3, 60, 93, 24, 139, 36, 37, 25, 100,
125, 126, 26, 120, 140, 153, 167, 168, 189, 205,
206, 207, 219, 61, 89, 62, 208, 64, 112, 103,
65, 108, 104, 105, 13, 14, 115, 116, 76, 30,
32, 31, 77, 78, 79, 66, 178, 171, 188, 203,
204, 69, 67, 162, 174, 186, 200, 187, 80
};
static const short yypact[] =
{
57,-32768, 36, 87,-32768,-32768,-32768, -15,-32768, -7,
-32768,-32768,-32768, 17, 19,-32768,-32768,-32768, 75, 75,
240, 82,-32768,-32768, 82,-32768,-32768,-32768, 74, 74,
9, 9, 9, 74, 74,-32768, 54, 8, 72,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, -3, 25,-32768,-32768, 73,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 80,-32768, 77,
-32768, 83, 71,-32768,-32768, 130,-32768, 75, 30, 132,
74, 115, 240, 110,-32768, 36,-32768,-32768,-32768,-32768,
24, 54,-32768, -30, 107,-32768,-32768,-32768, -21, 111,
-32768,-32768, 32,-32768,-32768,-32768, 14,-32768, 112, 159,
121,-32768,-32768,-32768, 54,-32768, 119, 30,-32768, 30,
74, 30, 115, 115, 123, 115,-32768, 138,-32768,-32768,
122,-32768, 75, 129,-32768,-32768, 26, 69, 23, 74,
-32768,-32768, 159, 127,-32768, 54, 30,-32768,-32768, 115,
-32768,-32768,-32768,-32768, 61,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 206,-32768,-32768,-32768, 141,-32768,
70,-32768,-32768,-32768,-32768, 142,-32768,-32768, 180, 240,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
36,-32768,-32768,-32768, 139, 135, 140,-32768, 137,-32768,
143, 180,-32768, 240,-32768,-32768,-32768, 141,-32768, 36,
-32768, 195, 196,-32768
};
static const short yypgoto[] =
{
-32768,-32768, 197,-32768,-32768, 47, -76, 182,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, -11,-32768, -119,-32768, -92, -19,-32768, 76, 78,
-32768,-32768, -69, -25, -85, -81, -95, -89, -2,-32768,
-32768,-32768, 95, 124,-32768,-32768, -163,-32768,-32768, -6,
-32768, 183, 201,-32768,-32768,-32768,-32768,-32768, 1
};
#define YYLAST 275
static const short yytable[] =
{
15, 63, 4, 73, 74, -46, 113, 180, 83, 84,
114, 101, 5, 6, 7, 8, 9, 5, 6, 110,
86, 136, 70, 127, 124, 70, 5, 6, 110, 130,
128, 113, 35, 72, 169, 114, 102, 28, 131, 5,
6, 7, 8, 9, 148, 29, 150, 113, 113, 217,
113, 114, 114, 160, 114, 184, 88, 10, 143, 87,
144, 170, 75, 113, 11, 109, 155, 114, 12, 33,
173, 34, 135, 118, 113, 90, 123, 72, 114, 127,
91, 159, 185, 35, 10, 133, 157, 172, 134, 106,
68, 11, 117, 122, 121, 12, 16, 17, 18, 19,
20, 21, 1, 2, 85, 145, 190, 191, 192, 193,
194, 195, 196, 197, 198, 176, 177, 199, 5, 6,
110, 111, 133, 87, 161, 158, 81, 82, 92, 94,
95, 98, 106, 117, 22, 164, 16, 17, 99, 97,
107, 21, 154, 40, 41, 42, 43, 44, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 175, 119, 129, 132, 138, 137, 141,
179, 179, 142, 149, 165, 152, 166, 190, 191, 192,
193, 194, 195, 196, 197, 198, 151, 156, 202, 201,
209, 212, 211, 213, 214, 222, 223, 215, 210, 163,
23, 38, 218, 96, 27, 216, 0, 71, 147, 146,
0, 0, 0, 179, 39, 16, 17, 220, 0, 0,
21, 181, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 0, 0, 0, 0, 0, 0, 39, 16,
17, 0, 0, 182, 21, 183, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 58, 59
};
static const short yycheck[] =
{
2, 20, 1, 28, 29, 8, 91, 170, 33, 34,
91, 87, 3, 4, 5, 6, 7, 3, 4, 5,
12, 116, 21, 53, 100, 24, 3, 4, 5, 50,
60, 116, 8, 3, 153, 116, 6, 52, 59, 3,
4, 5, 6, 7, 133, 52, 135, 132, 133, 212,
135, 132, 133, 148, 135, 174, 59, 48, 127, 51,
129, 153, 53, 148, 55, 90, 142, 148, 59, 52,
159, 52, 58, 92, 159, 50, 52, 3, 159, 53,
55, 58, 174, 8, 48, 53, 60, 156, 56, 88,
8, 55, 91, 95, 93, 59, 9, 10, 11, 12,
13, 14, 45, 46, 50, 130, 36, 37, 38, 39,
40, 41, 42, 43, 44, 54, 55, 47, 3, 4,
5, 6, 53, 51, 149, 56, 31, 32, 55, 49,
53, 60, 131, 132, 47, 8, 9, 10, 8, 56,
8, 14, 141, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 162, 54, 58, 55, 8, 56, 48,
169, 170, 53, 50, 47, 53, 49, 36, 37, 38,
39, 40, 41, 42, 43, 44, 48, 58, 8, 47,
189, 56, 53, 53, 57, 0, 0, 54, 200, 152,
3, 19, 213, 79, 3, 211, -1, 24, 132, 131,
-1, -1, -1, 212, 8, 9, 10, 219, -1, -1,
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, 8, 9,
10, -1, -1, 47, 14, 49, 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 5:
#line 156 "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 6:
#line 167 "dcParser.yxx"
{
if (!dc_file->add_switch(yyvsp[0].u.dswitch)) {
yyerror("Duplicate class name: " + yyvsp[0].u.dswitch->get_name());
}
}
break;
case 9:
#line 178 "dcParser.yxx"
{
yyval.u.dclass = current_class;
current_class = new DCClass(yyvsp[0].str, yyvsp[-1].u.flag, false);
}
break;
case 10:
#line 183 "dcParser.yxx"
{
yyval.u.dclass = current_class;
current_class = yyvsp[-4].u.dclass;
}
break;
case 11:
#line 191 "dcParser.yxx"
{
yyval.u.flag = true;
}
break;
case 12:
#line 195 "dcParser.yxx"
{
yyval.u.flag = false;
}
break;
case 13:
#line 202 "dcParser.yxx"
{
DCClass *dclass = dc_file->get_class_by_name(yyvsp[0].str);
if (dclass == (DCClass *)NULL) {
dclass = new DCClass(yyvsp[0].str, false, true);
dc_file->add_class(dclass);
}
yyval.u.dclass = dclass;
}
break;
case 15:
#line 216 "dcParser.yxx"
{
yyval.str = yyvsp[-2].str + string("/") + yyvsp[0].str;
}
break;
case 17:
#line 224 "dcParser.yxx"
{
yyval.str = yyvsp[-2].str + string(".") + yyvsp[0].str;
}
break;
case 18:
#line 231 "dcParser.yxx"
{
dc_file->add_import_module(yyvsp[0].str);
}
break;
case 19:
#line 235 "dcParser.yxx"
{
dc_file->add_import_module(yyvsp[-1].str);
}
break;
case 22:
#line 244 "dcParser.yxx"
{
dc_file->add_import_symbol("*");
}
break;
case 23:
#line 251 "dcParser.yxx"
{
dc_file->add_import_symbol(yyvsp[0].str);
}
break;
case 24:
#line 255 "dcParser.yxx"
{
dc_file->add_import_symbol(yyvsp[0].str);
}
break;
case 25:
#line 262 "dcParser.yxx"
{
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 28:
#line 283 "dcParser.yxx"
{
if (yyvsp[0].u.dclass != (DCClass *)NULL) {
current_class->add_parent(yyvsp[0].u.dclass);
}
}
break;
case 29:
#line 289 "dcParser.yxx"
{
if (yyvsp[0].u.dclass != (DCClass *)NULL) {
current_class->add_parent(yyvsp[0].u.dclass);
}
}
break;
case 32:
#line 300 "dcParser.yxx"
{
if (!current_class->add_field(yyvsp[0].u.field)) {
yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name());
}
}
break;
case 35:
#line 311 "dcParser.yxx"
{
yyval.u.field = yyvsp[-2].u.parameter;
yyval.u.field->set_flags(yyvsp[-1].u.s_int);
}
break;
case 36:
#line 316 "dcParser.yxx"
{
yyval.u.field = yyvsp[-1].u.parameter;
yyval.u.field->set_flags(yyvsp[0].u.s_int);
}
break;
case 37:
#line 324 "dcParser.yxx"
{
yyval.u.field = current_atomic;
current_atomic = new DCAtomicField(yyvsp[-1].str);
}
break;
case 38:
#line 329 "dcParser.yxx"
{
yyval.u.field = current_atomic;
current_atomic = yyvsp[-3].u.atomic;
yyval.u.field->set_flags(yyvsp[0].u.s_int);
}
break;
case 43:
#line 348 "dcParser.yxx"
{
atomic_element = DCAtomicField::ElementType(yyvsp[0].u.parameter);
current_atomic->add_element(atomic_element);
}
break;
case 44:
#line 353 "dcParser.yxx"
{
current_packer = &default_packer;
current_packer->clear_data();
current_packer->begin_pack(yyvsp[-1].u.parameter);
}
break;
case 45:
#line 359 "dcParser.yxx"
{
bool is_valid = yyvsp[-3].u.parameter->is_valid();
atomic_element = DCAtomicField::ElementType(yyvsp[-3].u.parameter);
if (current_packer->end_pack()) {
atomic_element.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.
}
current_atomic->add_element(atomic_element);
}
break;
case 46:
#line 379 "dcParser.yxx"
{
current_parameter = yyvsp[0].u.parameter;
}
break;
case 47:
#line 383 "dcParser.yxx"
{
yyval.u.parameter = yyvsp[0].u.parameter;
}
break;
case 51:
#line 399 "dcParser.yxx"
{
yyval.u.parameter = new DCSimpleParameter(yyvsp[0].u.subatomic);
}
break;
case 52:
#line 403 "dcParser.yxx"
{
DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-3].u.subatomic);
if (!simple_param->set_range(double_range)) {
yyerror("Inappropriate range for type");
}
yyval.u.parameter = simple_param;
}
break;
case 53:
#line 411 "dcParser.yxx"
{
DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-2].u.subatomic);
if (yyvsp[0].u.s_uint == 0) {
yyerror("Invalid divisor.");
} else if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) {
yyerror("A divisor is only valid on a numeric type.");
}
yyval.u.parameter = simple_param;
}
break;
case 54:
#line 422 "dcParser.yxx"
{
DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic);
if (yyvsp[-3].u.s_uint == 0) {
yyerror("Invalid divisor.");
} else if (!simple_param->set_divisor(yyvsp[-3].u.s_uint)) {
yyerror("A divisor is only valid on a numeric type.");
}
if (!simple_param->set_range(double_range)) {
yyerror("Inappropriate range for type");
}
yyval.u.parameter = simple_param;
}
break;
case 55:
#line 436 "dcParser.yxx"
{
DCSimpleParameter *simple_param = new DCSimpleParameter(yyvsp[-5].u.subatomic);
if (yyvsp[0].u.s_uint == 0) {
yyerror("Invalid divisor.");
} else if (!simple_param->set_divisor(yyvsp[0].u.s_uint)) {
yyerror("A divisor is only valid on a numeric type.");
}
if (!simple_param->set_range(double_range)) {
yyerror("Inappropriate range for type");
}
yyval.u.parameter = simple_param;
}
break;
case 56:
#line 450 "dcParser.yxx"
{
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) {
// 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 57:
#line 476 "dcParser.yxx"
{
yyval.u.parameter = new DCClassParameter(yyvsp[0].u.dclass);
}
break;
case 58:
#line 480 "dcParser.yxx"
{
yyval.u.parameter = new DCSwitchParameter(yyvsp[0].u.dswitch);
}
break;
case 59:
#line 487 "dcParser.yxx"
{
double_range.clear();
}
break;
case 60:
#line 491 "dcParser.yxx"
{
double_range.clear();
if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) {
yyerror("Overlapping range");
}
}
break;
case 61:
#line 498 "dcParser.yxx"
{
double_range.clear();
if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) {
yyerror("Overlapping range");
}
}
break;
case 62:
#line 505 "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 63:
#line 514 "dcParser.yxx"
{
if (!double_range.add_range(yyvsp[0].u.real, yyvsp[0].u.real)) {
yyerror("Overlapping range");
}
}
break;
case 64:
#line 520 "dcParser.yxx"
{
if (!double_range.add_range(yyvsp[-2].u.real, yyvsp[0].u.real)) {
yyerror("Overlapping range");
}
}
break;
case 65:
#line 526 "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 66:
#line 537 "dcParser.yxx"
{
uint_range.clear();
}
break;
case 67:
#line 541 "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 68:
#line 548 "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 69:
#line 555 "dcParser.yxx"
{
if (!uint_range.add_range(yyvsp[0].u.s_uint, yyvsp[0].u.s_uint)) {
yyerror("Overlapping range");
}
}
break;
case 70:
#line 561 "dcParser.yxx"
{
if (!uint_range.add_range(yyvsp[-2].u.s_uint, yyvsp[0].u.s_uint)) {
yyerror("Overlapping range");
}
}
break;
case 72:
#line 571 "dcParser.yxx"
{
yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range);
}
break;
case 73:
#line 578 "dcParser.yxx"
{
current_parameter->set_name(yyvsp[0].str);
yyval.u.parameter = current_parameter;
}
break;
case 74:
#line 583 "dcParser.yxx"
{
if (yyvsp[0].u.s_uint == 0) {
yyerror("Invalid divisor.");
} else if (yyvsp[-2].u.parameter->as_simple_parameter() == NULL || yyvsp[-2].u.parameter->get_typedef() != (DCTypedef *)NULL) {
yyerror("A divisor is only allowed on a primitive type.");
} else {
if (!yyvsp[-2].u.parameter->as_simple_parameter()->set_divisor(yyvsp[0].u.s_uint)) {
yyerror("A divisor is only valid on a numeric type.");
}
}
}
break;
case 75:
#line 597 "dcParser.yxx"
{
yyval.u.parameter = new DCArrayParameter(yyvsp[-3].u.parameter, uint_range);
}
break;
case 76:
#line 604 "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 78:
#line 617 "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 81:
#line 636 "dcParser.yxx"
{
yyval.u.real = (double)yyvsp[0].u.uint64;
}
break;
case 82:
#line 640 "dcParser.yxx"
{
yyval.u.real = (double)yyvsp[0].u.int64;
}
break;
case 84:
#line 648 "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 86:
#line 662 "dcParser.yxx"
{
current_packer->pack_int64(yyvsp[0].u.int64);
}
break;
case 87:
#line 666 "dcParser.yxx"
{
current_packer->pack_uint64(yyvsp[0].u.uint64);
}
break;
case 88:
#line 670 "dcParser.yxx"
{
current_packer->pack_double(yyvsp[0].u.real);
}
break;
case 89:
#line 674 "dcParser.yxx"
{
current_packer->pack_string(yyvsp[0].str);
}
break;
case 90:
#line 678 "dcParser.yxx"
{
current_packer->pack_literal_value(yyvsp[0].str);
}
break;
case 91:
#line 682 "dcParser.yxx"
{
current_packer->push();
}
break;
case 92:
#line 686 "dcParser.yxx"
{
current_packer->pop();
}
break;
case 93:
#line 690 "dcParser.yxx"
{
current_packer->push();
}
break;
case 94:
#line 694 "dcParser.yxx"
{
current_packer->pop();
}
break;
case 95:
#line 698 "dcParser.yxx"
{
current_packer->push();
}
break;
case 96:
#line 702 "dcParser.yxx"
{
current_packer->pop();
}
break;
case 97:
#line 706 "dcParser.yxx"
{
for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
current_packer->pack_int64(yyvsp[-2].u.int64);
}
}
break;
case 98:
#line 712 "dcParser.yxx"
{
for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
current_packer->pack_uint64(yyvsp[-2].u.uint64);
}
}
break;
case 99:
#line 718 "dcParser.yxx"
{
for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
current_packer->pack_double(yyvsp[-2].u.real);
}
}
break;
case 100:
#line 724 "dcParser.yxx"
{
for (unsigned int i = 0; i < yyvsp[0].u.s_uint; i++) {
current_packer->pack_literal_value(yyvsp[-2].str);
}
}
break;
case 107:
#line 748 "dcParser.yxx"
{
yyval.u.subatomic = ST_int8;
}
break;
case 108:
#line 752 "dcParser.yxx"
{
yyval.u.subatomic = ST_int16;
}
break;
case 109:
#line 756 "dcParser.yxx"
{
yyval.u.subatomic = ST_int32;
}
break;
case 110:
#line 760 "dcParser.yxx"
{
yyval.u.subatomic = ST_int64;
}
break;
case 111:
#line 764 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint8;
}
break;
case 112:
#line 768 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint16;
}
break;
case 113:
#line 772 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint32;
}
break;
case 114:
#line 776 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint64;
}
break;
case 115:
#line 780 "dcParser.yxx"
{
yyval.u.subatomic = ST_float64;
}
break;
case 116:
#line 784 "dcParser.yxx"
{
yyval.u.subatomic = ST_string;
}
break;
case 117:
#line 788 "dcParser.yxx"
{
yyval.u.subatomic = ST_blob;
}
break;
case 118:
#line 792 "dcParser.yxx"
{
yyval.u.subatomic = ST_blob32;
}
break;
case 119:
#line 796 "dcParser.yxx"
{
yyval.u.subatomic = ST_int8array;
}
break;
case 120:
#line 800 "dcParser.yxx"
{
yyval.u.subatomic = ST_int16array;
}
break;
case 121:
#line 804 "dcParser.yxx"
{
yyval.u.subatomic = ST_int32array;
}
break;
case 122:
#line 808 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint8array;
}
break;
case 123:
#line 812 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint16array;
}
break;
case 124:
#line 816 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint32array;
}
break;
case 125:
#line 820 "dcParser.yxx"
{
yyval.u.subatomic = ST_uint32uint8array;
}
break;
case 126:
#line 824 "dcParser.yxx"
{
yyval.u.subatomic = ST_char;
}
break;
case 127:
#line 831 "dcParser.yxx"
{
yyval.u.s_int = 0;
}
break;
case 128:
#line 835 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_required;
}
break;
case 129:
#line 839 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_broadcast;
}
break;
case 130:
#line 843 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_p2p;
}
break;
case 131:
#line 847 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ram;
}
break;
case 132:
#line 851 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_db;
}
break;
case 133:
#line 855 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clsend;
}
break;
case 134:
#line 859 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_clrecv;
}
break;
case 135:
#line 863 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_ownsend;
}
break;
case 136:
#line 867 "dcParser.yxx"
{
yyval.u.s_int = yyvsp[-1].u.s_int | DCAtomicField::F_airecv;
}
break;
case 137:
#line 874 "dcParser.yxx"
{
current_molecular = new DCMolecularField(yyvsp[-1].str);
}
break;
case 138:
#line 878 "dcParser.yxx"
{
yyval.u.field = current_molecular;
}
break;
case 139:
#line 885 "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 140:
#line 901 "dcParser.yxx"
{
if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
current_molecular->add_atomic(yyvsp[0].u.atomic);
}
}
break;
case 141:
#line 907 "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 142:
#line 921 "dcParser.yxx"
{
yyval.str = "";
}
break;
case 144:
#line 929 "dcParser.yxx"
{
yyval.u.dswitch = current_switch;
current_switch = new DCSwitch(yyvsp[-4].str, yyvsp[-2].u.parameter);
}
break;
case 145:
#line 934 "dcParser.yxx"
{
yyval.u.dswitch = current_switch;
current_switch = (DCSwitch *)yyvsp[-2].u.parameter;
}
break;
case 149:
#line 946 "dcParser.yxx"
{
if (current_switch->get_num_cases() == 0) {
yyerror("case declaration required before first element");
} else if (!current_switch->add_field(yyvsp[0].u.field)) {
yyerror("Duplicate field name: " + yyvsp[0].u.field->get_name());
}
}
break;
case 150:
#line 957 "dcParser.yxx"
{
current_packer = &default_packer;
current_packer->clear_data();
current_packer->begin_pack(current_switch->get_key_parameter());
}
break;
case 151:
#line 963 "dcParser.yxx"
{
if (!current_packer->end_pack()) {
yyerror("Invalid value for switch parameter");
} else {
current_switch->add_case(current_packer->get_string());
}
}
break;
case 152:
#line 974 "dcParser.yxx"
{
yyval.u.field = yyvsp[-1].u.parameter;
}
break;
case 153:
#line 978 "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 986 "dcParser.yxx"