home *** CD-ROM | disk | FTP | other *** search
- # define name_tok 257
- # define number_tok 258
- # define abstract_tok 259
- # define class_tok 260
- # define definite_tok 261
- # define enum_tok 262
- # define extern_tok 263
- # define friend_tok 264
- # define local_tok 265
- # define operator_tok 266
- # define private_tok 267
- # define protected_tok 268
- # define public_tok 269
- # define schema_tok 270
- # define set_tok 271
- # define static_tok 272
- # define typedef_tok 273
- # define union_tok 274
- # define with_tok 275
- # define l_abr_tok 276
- # define r_abr_tok 277
- # define l_br_tok 278
- # define r_br_tok 279
- # define l_brc_tok 280
- # define r_brc_tok 281
- # define l_par_tok 282
- # define r_par_tok 283
- # define ampersand_tok 284
- # define ampersand_assign_tok 285
- # define and_tok 286
- # define assign_tok 287
- # define bar_tok 288
- # define bar_assign_tok 289
- # define circumflex_tok 290
- # define circumflex_assign_tok 291
- # define colon_tok 292
- # define comma_tok 293
- # define equal_tok 294
- # define exclam_tok 295
- # define greater_equal_tok 296
- # define less_equal_tok 297
- # define minus_tok 298
- # define minus_assign_tok 299
- # define not_equal_tok 300
- # define or_tok 301
- # define percent_tok 302
- # define percent_assign_tok 303
- # define plus_tok 304
- # define plus_assign_tok 305
- # define rshift_assign_tok 306
- # define lshift_assign_tok 307
- # define slash_tok 308
- # define slash_assign_tok 309
- # define star_tok 310
- # define star_assign_tok 311
- # define semicolon_tok 312
-
- # line 113 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
-
- #include <libc.h>
-
- #include "sys.h"
- #include "smg.h"
- #include "cfe_err.h"
- #include "mta_sos.h"
- #include "cfe.h"
- #include "cfe_yacc.h"
-
- typedef union {
- sos_Bool b;
- sos_Int i;
- sos_Cstring s;
- sos_Imports imp;
- sos_String str;
- sos_String_List str_l;
- sos_Schema_type_List td_l;
- sos_Enum_type etd;
- sos_Class_type ctd;
- sos_Gen_param gp;
- sos_Gen_param_List gp_l;
- sos_Param par;
- sos_Param_List par_l;
- sos_Method_kind mk;
- sos_Method_List md_l;
- sos_Method md;
- sos_Union_type utd;
- sos_Typedef_type ttd;
- sos_Extern_type xtd;
- sos_Type_name tn;
- sos_Type_name_List tn_l;
- sos_Expr exp;
- sos_Int_expr ie;
- sos_Identifier id;
- sos_Expr_List exp_l;
- } YYSTYPE;
-
- static sos_Type_name cfe_fct_or_comp_type;
- static sos_Class_type cfe_ct;
- static sos_Bool cfe_is_full_type;
- static sos_Bool cfe_is_operator;
- static sos_Bool cfe_method_is_abstract,
- cfe_method_is_definite,
- cfe_method_is_local,
- cfe_method_is_static,
- cfe_method_is_value;
- static sos_Method_kind cfe_method_kind, cfe_set_method_kind;
- static sos_Int cfe_component_offset;
- static sos_Type_name_List cfe_gen_insts;
-
-
- #include "cfe_lex.h"
-
- #define yyclearin yychar = -1
- #define yyerrok yyerrflag = 0
- extern int yychar;
- extern int yyerrflag;
- #ifndef YYMAXDEPTH
- #define YYMAXDEPTH 150
- #endif
- YYSTYPE yylval, yyval;
-
- # line 172 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
-
- #include <malloc.h>
-
- # define YYERRCODE 256
-
- # line 824 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
-
-
- void yyerror (err_msg s) {cfe_error (err_USE, s);}
-
- void yyecho () {if (cfe_echo_flag) ECHO;}
- int yyexca[] ={
- -1, 0,
- 270, 1,
- 275, 1,
- -2, 0,
- -1, 1,
- 0, -1,
- -2, 0,
- -1, 24,
- 260, 13,
- 262, 13,
- 263, 13,
- 273, 13,
- 274, 13,
- 281, 13,
- -2, 0,
- -1, 127,
- 257, 57,
- 271, 57,
- -2, 0,
- -1, 153,
- 282, 138,
- -2, 135,
- };
- # define YYNPROD 141
- # define YYLAST 318
- int yyact[]={
-
- 170, 169, 192, 205, 197, 18, 191, 50, 175, 187,
- 178, 180, 177, 188, 176, 186, 41, 40, 171, 162,
- 174, 173, 168, 182, 172, 179, 166, 185, 167, 181,
- 189, 190, 165, 184, 164, 183, 17, 19, 161, 144,
- 134, 83, 195, 140, 97, 141, 86, 69, 136, 144,
- 67, 137, 138, 139, 98, 18, 142, 84, 68, 70,
- 125, 110, 203, 96, 85, 108, 68, 12, 201, 145,
- 100, 36, 12, 35, 38, 124, 76, 82, 111, 145,
- 57, 13, 126, 109, 34, 37, 13, 65, 53, 24,
- 199, 202, 27, 200, 64, 52, 22, 108, 88, 6,
- 12, 12, 117, 12, 12, 206, 137, 138, 139, 154,
- 9, 7, 9, 158, 13, 13, 66, 13, 13, 26,
- 3, 133, 44, 152, 45, 107, 81, 11, 143, 10,
- 113, 90, 59, 16, 103, 15, 73, 60, 58, 5,
- 23, 55, 149, 135, 194, 156, 132, 147, 131, 130,
- 127, 123, 116, 118, 101, 87, 21, 71, 54, 28,
- 14, 39, 25, 15, 15, 15, 15, 43, 20, 2,
- 1, 15, 42, 99, 114, 115, 121, 120, 89, 80,
- 163, 15, 151, 148, 146, 102, 72, 63, 46, 47,
- 48, 49, 15, 56, 33, 32, 51, 31, 15, 95,
- 30, 77, 29, 78, 75, 61, 62, 8, 4, 0,
- 0, 0, 15, 0, 0, 91, 0, 74, 93, 0,
- 94, 92, 0, 79, 0, 0, 0, 15, 0, 104,
- 105, 91, 112, 0, 0, 0, 15, 74, 0, 15,
- 0, 0, 122, 104, 0, 119, 0, 0, 0, 0,
- 0, 0, 106, 15, 155, 0, 128, 0, 0, 153,
- 129, 0, 0, 0, 0, 0, 0, 0, 157, 0,
- 159, 0, 0, 0, 0, 160, 0, 0, 0, 0,
- 0, 193, 0, 196, 150, 155, 198, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 204 };
- int yypact[]={
-
- -136, -1000, -176, -1000, -159, -1000, -153, -154, -257, -275,
- -1000, -1000, -1000, -1000, -1000, -1000, -179, -154, -1000, -1000,
- -191, -1000, -151, -1000, -137, -189, -1000, -307, -1000, -1000,
- -1000, -1000, -295, -296, -154, -154, -154, -154, -154, -1000,
- -1000, -1000, -305, -154, -181, -1000, -192, -1000, -1000, -202,
- -1000, -1000, -154, -154, -182, -193, -1000, -142, -227, -1000,
- -1000, -234, -1000, -1000, -154, -154, -207, -1000, -154, -307,
- -154, -205, -236, -1000, -228, -235, -1000, -1000, -1000, -1000,
- -1000, -1000, -185, -1000, -154, -154, -307, -229, -1000, -239,
- -1000, -214, -1000, -1000, -1000, -1000, -154, -1000, -154, -190,
- -1000, -197, -232, -1000, -204, -1000, -222, -1000, -156, -1000,
- -154, -156, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -208, -233, -1000, -199, -1000, -156, -307, -216, -1000, -1000,
- -1000, -157, -1000, -1000, -1000, -154, -147, -1000, -1000, -1000,
- -1000, -226, -1000, -1000, -1000, -1000, -1000, -1000, -205, -274,
- -1000, -1000, -1000, -1000, -276, -222, -251, -1000, -154, -1000,
- -308, -1000, -154, -1000, -1000, -1000, -1000, -1000, -1000, -187,
- -183, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -215, -188, -1000, -230, -161, -309, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -166, -1000, -1000 };
- int yypgo[]={
-
- 0, 208, 207, 127, 152, 122, 205, 202, 200, 199,
- 197, 195, 194, 193, 187, 186, 136, 185, 134, 121,
- 184, 183, 182, 180, 179, 126, 178, 131, 125, 132,
- 124, 138, 130, 177, 176, 175, 174, 137, 173, 170,
- 169, 168, 162, 133, 139, 159, 158, 157, 155, 154,
- 153, 151, 150, 149, 148, 147, 146, 145, 144, 143,
- 128, 142, 123, 141 };
- int yyr1[]={
-
- 0, 40, 41, 39, 39, 1, 1, 2, 2, 44,
- 44, 43, 43, 42, 42, 42, 45, 45, 45, 45,
- 45, 45, 7, 46, 47, 48, 49, 50, 8, 14,
- 14, 15, 15, 16, 16, 24, 24, 9, 9, 17,
- 17, 18, 18, 51, 52, 51, 53, 53, 53, 57,
- 53, 53, 54, 59, 59, 59, 59, 60, 60, 60,
- 19, 19, 19, 58, 58, 20, 21, 21, 22, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 25, 25, 26, 26, 27, 27, 38, 38, 28, 28,
- 55, 61, 61, 62, 56, 63, 10, 11, 12, 13,
- 13, 29, 30, 30, 33, 33, 34, 34, 32, 32,
- 36, 35, 37, 31, 31, 5, 6, 6, 4, 3,
- 3 };
- int yyr2[]={
-
- 0, 1, 1, 19, 2, 3, 9, 3, 7, 1,
- 7, 0, 2, 0, 4, 2, 2, 2, 2, 4,
- 4, 6, 13, 1, 1, 1, 1, 1, 29, 1,
- 7, 3, 7, 3, 7, 1, 2, 1, 5, 3,
- 7, 2, 9, 1, 1, 6, 4, 4, 2, 1,
- 8, 2, 5, 3, 5, 3, 2, 0, 3, 3,
- 3, 3, 3, 1, 7, 7, 3, 3, 5, 3,
- 3, 3, 3, 3, 5, 5, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 5, 5,
- 5, 7, 3, 7, 9, 7, 1, 3, 1, 5,
- 4, 2, 6, 5, 9, 1, 15, 7, 7, 1,
- 7, 3, 3, 3, 1, 2, 3, 7, 3, 3,
- 3, 3, 9, 3, 7, 3, 3, 7, 3, 2,
- 3 };
- int yychk[]={
-
- -1000, -39, -40, 256, -1, -44, 275, 270, -2, 263,
- -5, -3, 257, 271, -4, -3, -43, 293, 312, 312,
- -41, -44, 275, -5, 280, -42, 256, 281, -45, -7,
- -8, -10, -11, -12, 273, 262, 260, 274, 263, -43,
- 312, 312, -37, -29, -5, -30, -4, -4, -4, -4,
- 312, -4, 276, 280, -46, -63, -13, 282, -31, -29,
- -37, -6, -4, -14, 276, 280, 258, 277, 293, 281,
- 293, -47, -15, -16, -4, -31, 283, -29, -43, -4,
- -24, -25, 282, 277, 293, 292, 281, -48, 283, -26,
- -27, -29, -16, -29, -43, -9, 292, 283, 293, -38,
- 284, -49, -17, -18, -29, -27, -4, -28, 287, 280,
- 293, 282, -28, -32, -36, -35, -4, 258, -50, -18,
- -33, -34, -32, -51, 283, 293, 281, -52, -32, -43,
- -53, -54, -56, -19, 256, -59, 264, 267, 268, 269,
- 259, 261, 272, -60, 265, 295, -20, -55, -21, -61,
- -4, -22, -62, -3, 266, -5, -57, -29, 260, -60,
- -25, 312, 293, -23, 310, 308, 302, 304, 298, 277,
- 276, 294, 300, 297, 296, 284, 290, 288, 286, 301,
- 287, 305, 299, 311, 309, 303, 291, 285, 289, 306,
- 307, 282, 278, -28, -58, 293, -30, 312, -62, 277,
- 276, 283, 279, 292, -19, 312, 271 };
- int yydef[]={
-
- -2, -2, 9, 4, 0, 5, 0, 0, 11, 0,
- 7, 135, 139, 140, 2, 138, 9, 0, 12, 10,
- 0, 6, 0, 8, -2, 0, 15, 11, 14, 16,
- 17, 18, 0, 0, 0, 0, 0, 0, 0, 3,
- 19, 20, 123, 0, 122, 121, 0, 23, 115, 119,
- 21, 117, 0, 0, 29, 0, 118, 0, 0, 133,
- 123, 0, 136, 24, 0, 0, 0, 132, 0, 11,
- 0, 35, 0, 31, 33, 0, 120, 134, 22, 137,
- 25, 36, 0, 30, 0, 0, 11, 37, 100, 0,
- 102, 106, 32, 34, 116, 26, 0, 101, 0, 108,
- 107, 0, 38, 39, 41, 103, 108, 105, 0, 27,
- 0, 124, 104, 109, 128, 129, 130, 131, 43, 40,
- 0, 125, 126, 44, 42, 0, 11, -2, 127, 28,
- 45, 0, 48, 49, 51, 0, 0, 60, 61, 62,
- 53, 57, 55, 56, 58, 59, 46, 47, 0, 0,
- 66, 67, 111, -2, 0, 108, 63, 52, 0, 54,
- 0, 110, 0, 68, 69, 70, 71, 72, 73, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 0, 0, 113, 0, 0, 0, 65, 112, 74,
- 75, 98, 99, 50, 0, 114, 64 };
- typedef struct { char *t_name; int t_val; } yytoktype;
- #ifndef YYDEBUG
- # define YYDEBUG 0 /* don't allow debugging */
- #endif
-
- #if YYDEBUG
-
- yytoktype yytoks[] =
- {
- "name_tok", 257,
- "number_tok", 258,
- "abstract_tok", 259,
- "class_tok", 260,
- "definite_tok", 261,
- "enum_tok", 262,
- "extern_tok", 263,
- "friend_tok", 264,
- "local_tok", 265,
- "operator_tok", 266,
- "private_tok", 267,
- "protected_tok", 268,
- "public_tok", 269,
- "schema_tok", 270,
- "set_tok", 271,
- "static_tok", 272,
- "typedef_tok", 273,
- "union_tok", 274,
- "with_tok", 275,
- "l_abr_tok", 276,
- "r_abr_tok", 277,
- "l_br_tok", 278,
- "r_br_tok", 279,
- "l_brc_tok", 280,
- "r_brc_tok", 281,
- "l_par_tok", 282,
- "r_par_tok", 283,
- "ampersand_tok", 284,
- "ampersand_assign_tok", 285,
- "and_tok", 286,
- "assign_tok", 287,
- "bar_tok", 288,
- "bar_assign_tok", 289,
- "circumflex_tok", 290,
- "circumflex_assign_tok", 291,
- "colon_tok", 292,
- "comma_tok", 293,
- "equal_tok", 294,
- "exclam_tok", 295,
- "greater_equal_tok", 296,
- "less_equal_tok", 297,
- "minus_tok", 298,
- "minus_assign_tok", 299,
- "not_equal_tok", 300,
- "or_tok", 301,
- "percent_tok", 302,
- "percent_assign_tok", 303,
- "plus_tok", 304,
- "plus_assign_tok", 305,
- "rshift_assign_tok", 306,
- "lshift_assign_tok", 307,
- "slash_tok", 308,
- "slash_assign_tok", 309,
- "star_tok", 310,
- "star_assign_tok", 311,
- "semicolon_tok", 312,
- "-unknown-", -1 /* ends search */
- };
-
- char * yyreds[] =
- {
- "-no such reduction-",
- "schema_module : /* empty */",
- "schema_module : imports schema_tok name",
- "schema_module : imports schema_tok name l_brc_tok type_declarations r_brc_tok opt_semicolon",
- "schema_module : error",
- "imports : extern_import",
- "imports : with_tok import_names opt_semicolon extern_import",
- "import_names : name1",
- "import_names : import_names comma_tok name1",
- "extern_import : /* empty */",
- "extern_import : with_tok extern_tok semicolon_tok",
- "opt_semicolon : /* empty */",
- "opt_semicolon : semicolon_tok",
- "type_declarations : /* empty */",
- "type_declarations : type_declarations type_declaration",
- "type_declarations : error",
- "type_declaration : enumeration_declaration",
- "type_declaration : class_declaration",
- "type_declaration : union_declaration",
- "type_declaration : typedef_declaration semicolon_tok",
- "type_declaration : extern_declaration semicolon_tok",
- "type_declaration : typedef_tok generic_instantiation semicolon_tok",
- "enumeration_declaration : enum_tok name l_brc_tok names r_brc_tok opt_semicolon",
- "class_declaration : class_tok name",
- "class_declaration : class_tok name gen_params",
- "class_declaration : class_tok name gen_params opt_parameters",
- "class_declaration : class_tok name gen_params opt_parameters super_classes",
- "class_declaration : class_tok name gen_params opt_parameters super_classes l_brc_tok",
- "class_declaration : class_tok name gen_params opt_parameters super_classes l_brc_tok method_declarations r_brc_tok opt_semicolon",
- "gen_params : /* empty */",
- "gen_params : l_abr_tok gen_params_1 r_abr_tok",
- "gen_params_1 : gen_param",
- "gen_params_1 : gen_params_1 comma_tok gen_param",
- "gen_param : name",
- "gen_param : name colon_tok type_name",
- "opt_parameters : /* empty */",
- "opt_parameters : parameters",
- "super_classes : /* empty */",
- "super_classes : colon_tok type_names_with_params",
- "type_names_with_params : type_name_with_params",
- "type_names_with_params : type_names_with_params comma_tok type_name_with_params",
- "type_name_with_params : type_name",
- "type_name_with_params : type_name l_par_tok exprs r_par_tok",
- "method_declarations : /* empty */",
- "method_declarations : method_declarations",
- "method_declarations : method_declarations method_declaration",
- "method_declaration : fct_or_comp_type function_method",
- "method_declaration : fct_or_comp_type comp_methods",
- "method_declaration : friend",
- "method_declaration : method_kind_spec",
- "method_declaration : method_kind_spec set_method_kind_spec colon_tok",
- "method_declaration : error",
- "fct_or_comp_type : fct_or_comp_kind type_name",
- "fct_or_comp_kind : abstract_tok",
- "fct_or_comp_kind : definite_tok local_or_value_spec",
- "fct_or_comp_kind : static_tok",
- "fct_or_comp_kind : local_or_value_spec",
- "local_or_value_spec : /* empty */",
- "local_or_value_spec : local_tok",
- "local_or_value_spec : exclam_tok",
- "method_kind_spec : private_tok",
- "method_kind_spec : protected_tok",
- "method_kind_spec : public_tok",
- "set_method_kind_spec : /* empty */",
- "set_method_kind_spec : comma_tok method_kind_spec set_tok",
- "function_method : function_name parameters semicolon_tok",
- "function_name : name",
- "function_name : operator",
- "operator : operator_tok operator_string",
- "operator_string : star_tok",
- "operator_string : slash_tok",
- "operator_string : percent_tok",
- "operator_string : plus_tok",
- "operator_string : minus_tok",
- "operator_string : r_abr_tok r_abr_tok",
- "operator_string : l_abr_tok l_abr_tok",
- "operator_string : r_abr_tok",
- "operator_string : l_abr_tok",
- "operator_string : equal_tok",
- "operator_string : not_equal_tok",
- "operator_string : less_equal_tok",
- "operator_string : greater_equal_tok",
- "operator_string : ampersand_tok",
- "operator_string : circumflex_tok",
- "operator_string : bar_tok",
- "operator_string : and_tok",
- "operator_string : or_tok",
- "operator_string : assign_tok",
- "operator_string : plus_assign_tok",
- "operator_string : minus_assign_tok",
- "operator_string : star_assign_tok",
- "operator_string : slash_assign_tok",
- "operator_string : percent_assign_tok",
- "operator_string : circumflex_assign_tok",
- "operator_string : ampersand_assign_tok",
- "operator_string : bar_assign_tok",
- "operator_string : rshift_assign_tok",
- "operator_string : lshift_assign_tok",
- "operator_string : l_par_tok r_par_tok",
- "operator_string : l_br_tok r_br_tok",
- "parameters : l_par_tok r_par_tok",
- "parameters : l_par_tok parameters_1 r_par_tok",
- "parameters_1 : parameter",
- "parameters_1 : parameters_1 comma_tok parameter",
- "parameter : type_name reference name default_expr",
- "parameter : type_name reference default_expr",
- "reference : /* empty */",
- "reference : ampersand_tok",
- "default_expr : /* empty */",
- "default_expr : assign_tok expr",
- "comp_methods : comp_names semicolon_tok",
- "comp_names : comp_name",
- "comp_names : comp_names comma_tok comp_name",
- "comp_name : name1 default_expr",
- "friend : friend_tok class_tok type_name1 semicolon_tok",
- "union_declaration : union_tok name",
- "union_declaration : union_tok name l_brc_tok type_names r_brc_tok opt_semicolon",
- "typedef_declaration : typedef_tok type_name name",
- "extern_declaration : extern_tok name extern_size",
- "extern_size : /* empty */",
- "extern_size : l_par_tok number_tok r_par_tok",
- "type_name : type_name1",
- "type_name1 : name1",
- "type_name1 : generic_instantiation",
- "exprs : /* empty */",
- "exprs : exprs1",
- "exprs1 : expr",
- "exprs1 : exprs1 comma_tok expr",
- "expr : identifier",
- "expr : number",
- "identifier : name",
- "number : number_tok",
- "generic_instantiation : name1 l_abr_tok type_names r_abr_tok",
- "type_names : type_name",
- "type_names : type_names comma_tok type_name",
- "name1 : name_tok_or_keyword",
- "names : name",
- "names : names comma_tok name",
- "name : name_tok_or_keyword",
- "name_tok_or_keyword : name_tok",
- "name_tok_or_keyword : set_tok",
- };
- #endif /* YYDEBUG */
- #line 1 "/usr/lib/yaccpar"
- /* @(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10 */
-
- /*
- ** Skeleton parser driver for yacc output
- */
-
- /*
- ** yacc user known macros and defines
- */
- #define YYERROR goto yyerrlab
- #define YYACCEPT { free(yys); free(yyv); return(0); }
- #define YYABORT { free(yys); free(yyv); return(1); }
- #define YYBACKUP( newtoken, newvalue )\
- {\
- if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
- {\
- yyerror( "syntax error - cannot backup" );\
- goto yyerrlab;\
- }\
- yychar = newtoken;\
- yystate = *yyps;\
- yylval = newvalue;\
- goto yynewstate;\
- }
- #define YYRECOVERING() (!!yyerrflag)
- #ifndef YYDEBUG
- # define YYDEBUG 1 /* make debugging available */
- #endif
-
- /*
- ** user known globals
- */
- int yydebug; /* set to 1 to get debugging */
-
- /*
- ** driver internal defines
- */
- #define YYFLAG (-1000)
-
- /*
- ** static variables used by the parser
- */
- static YYSTYPE *yyv; /* value stack */
- static int *yys; /* state stack */
-
- static YYSTYPE *yypv; /* top of value stack */
- static int *yyps; /* top of state stack */
-
- static int yystate; /* current state */
- static int yytmp; /* extra var (lasts between blocks) */
-
- int yynerrs; /* number of errors */
-
- int yyerrflag; /* error recovery flag */
- int yychar; /* current input token number */
-
-
- /*
- ** yyparse - return 0 if worked, 1 if syntax error not recovered from
- */
- int
- yyparse()
- {
- register YYSTYPE *yypvt; /* top of value stack for $vars */
- unsigned yymaxdepth = YYMAXDEPTH;
-
- /*
- ** Initialize externals - yyparse may be called more than once
- */
- yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
- yys = (int*)malloc(yymaxdepth*sizeof(int));
- if (!yyv || !yys)
- {
- yyerror( "out of memory" );
- return(1);
- }
- yypv = &yyv[-1];
- yyps = &yys[-1];
- yystate = 0;
- yytmp = 0;
- yynerrs = 0;
- yyerrflag = 0;
- yychar = -1;
-
- goto yystack;
- {
- register YYSTYPE *yy_pv; /* top of value stack */
- register int *yy_ps; /* top of state stack */
- register int yy_state; /* current state */
- register int yy_n; /* internal state number info */
-
- /*
- ** get globals into registers.
- ** branch to here only if YYBACKUP was called.
- */
- yynewstate:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- goto yy_newstate;
-
- /*
- ** get globals into registers.
- ** either we just started, or we just finished a reduction
- */
- yystack:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
-
- /*
- ** top of for (;;) loop while no reductions done
- */
- yy_stack:
- /*
- ** put a state and value onto the stacks
- */
- #if YYDEBUG
- /*
- ** if debugging, look up token value in list of value vs.
- ** name pairs. 0 and negative (-1) are special values.
- ** Note: linear search is used since time is not a real
- ** consideration while debugging.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- (void)printf( "State %d, token ", yy_state );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
- {
- /*
- ** reallocate and recover. Note that pointers
- ** have to be reset, or bad things will happen
- */
- int yyps_index = (yy_ps - yys);
- int yypv_index = (yy_pv - yyv);
- int yypvt_index = (yypvt - yyv);
- yymaxdepth += YYMAXDEPTH;
- yyv = (YYSTYPE*)realloc((char*)yyv,
- yymaxdepth * sizeof(YYSTYPE));
- yys = (int*)realloc((char*)yys,
- yymaxdepth * sizeof(int));
- if (!yyv || !yys)
- {
- yyerror( "yacc stack overflow" );
- return(1);
- }
- yy_ps = yys + yyps_index;
- yy_pv = yyv + yypv_index;
- yypvt = yyv + yypvt_index;
- }
- *yy_ps = yy_state;
- *++yy_pv = yyval;
-
- /*
- ** we have a new state - find out what to do
- */
- yy_newstate:
- if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
- goto yydefault; /* simple state */
- #if YYDEBUG
- /*
- ** if debugging, need to mark whether new token grabbed
- */
- yytmp = yychar < 0;
- #endif
- if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
- yychar = 0; /* reached EOF */
- #if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- (void)printf( "Received token " );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
- goto yydefault;
- if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
- {
- yychar = -1;
- yyval = yylval;
- yy_state = yy_n;
- if ( yyerrflag > 0 )
- yyerrflag--;
- goto yy_stack;
- }
-
- yydefault:
- if ( ( yy_n = yydef[ yy_state ] ) == -2 )
- {
- #if YYDEBUG
- yytmp = yychar < 0;
- #endif
- if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
- yychar = 0; /* reached EOF */
- #if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- (void)printf( "Received token " );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- /*
- ** look through exception table
- */
- {
- register int *yyxi = yyexca;
-
- while ( ( *yyxi != -1 ) ||
- ( yyxi[1] != yy_state ) )
- {
- yyxi += 2;
- }
- while ( ( *(yyxi += 2) >= 0 ) &&
- ( *yyxi != yychar ) )
- ;
- if ( ( yy_n = yyxi[1] ) < 0 )
- YYACCEPT;
- }
- }
-
- /*
- ** check for syntax error
- */
- if ( yy_n == 0 ) /* have an error */
- {
- /* no worry about speed here! */
- switch ( yyerrflag )
- {
- case 0: /* new error */
- yyerror( "syntax error" );
- goto skip_init;
- yyerrlab:
- /*
- ** get globals into registers.
- ** we have a user generated syntax type error
- */
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- yynerrs++;
- skip_init:
- case 1:
- case 2: /* incompletely recovered error */
- /* try again... */
- yyerrflag = 3;
- /*
- ** find state where "error" is a legal
- ** shift action
- */
- while ( yy_ps >= yys )
- {
- yy_n = yypact[ *yy_ps ] + YYERRCODE;
- if ( yy_n >= 0 && yy_n < YYLAST &&
- yychk[yyact[yy_n]] == YYERRCODE) {
- /*
- ** simulate shift of "error"
- */
- yy_state = yyact[ yy_n ];
- goto yy_stack;
- }
- /*
- ** current state has no shift on
- ** "error", pop stack
- */
- #if YYDEBUG
- # define _POP_ "Error recovery pops state %d, uncovers state %d\n"
- if ( yydebug )
- (void)printf( _POP_, *yy_ps,
- yy_ps[-1] );
- # undef _POP_
- #endif
- yy_ps--;
- yy_pv--;
- }
- /*
- ** there is no state on stack with "error" as
- ** a valid shift. give up.
- */
- YYABORT;
- case 3: /* no shift yet; eat a token */
- #if YYDEBUG
- /*
- ** if debugging, look up token in list of
- ** pairs. 0 and negative shouldn't occur,
- ** but since timing doesn't matter when
- ** debugging, it doesn't hurt to leave the
- ** tests here.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- (void)printf( "Error recovery discards " );
- if ( yychar == 0 )
- (void)printf( "token end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "token -none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- (void)printf( "token %s\n",
- yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( yychar == 0 ) /* reached EOF. quit */
- YYABORT;
- yychar = -1;
- goto yy_newstate;
- }
- }/* end if ( yy_n == 0 ) */
- /*
- ** reduction by production yy_n
- ** put stack tops, etc. so things right after switch
- */
- #if YYDEBUG
- /*
- ** if debugging, print the string that is the user's
- ** specification of the reduction which is just about
- ** to be done.
- */
- if ( yydebug )
- (void)printf( "Reduce by (%d) \"%s\"\n",
- yy_n, yyreds[ yy_n ] );
- #endif
- yytmp = yy_n; /* value to switch over */
- yypvt = yy_pv; /* $vars top of value stack */
- /*
- ** Look in goto table for next state
- ** Sorry about using yy_state here as temporary
- ** register variable, but why not, if it works...
- ** If yyr2[ yy_n ] doesn't have the low order bit
- ** set, then there is no action to be done for
- ** this reduction. So, no saving & unsaving of
- ** registers done. The only difference between the
- ** code just after the if and the body of the if is
- ** the goto yy_stack in the body. This way the test
- ** can be made before the choice of what to do is needed.
- */
- {
- /* length of production doubled with extra bit */
- register int yy_len = yyr2[ yy_n ];
-
- if ( !( yy_len & 01 ) )
- {
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state =
- yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- goto yy_stack;
- }
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- }
- /* save until reenter driver code */
- yystate = yy_state;
- yyps = yy_ps;
- yypv = yy_pv;
- }
- /*
- ** code supplied by user is placed in this switch
- */
- switch( yytmp )
- {
-
- case 1:
- # line 178 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_cnt = sos_Container::create ();
- cfe_ct = sos_Class_type::make (NO_OBJECT);
- cfe_schema = sos_Schema_module::create (cfe_cnt);
- cfe_gen_insts = sos_Type_name_List::create (TEMP_CONTAINER);
- } break;
- case 2:
- # line 186 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_schema.set_imports (yypvt[-2].imp);
- cfe_schema.set_name (yypvt[-0].str);
- cfe_init(yypvt[-0].str, yypvt[-2].imp);
- } break;
- case 3:
- # line 194 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_check_schema ();
- cfe_check_generic_instantiations (cfe_gen_insts);
- cfe_finalize();
- } break;
- case 5:
- # line 202 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.imp = sos_Imports::create (cfe_cnt); } break;
- case 6:
- # line 207 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.imp = yypvt[-2].imp; } break;
- case 7:
- # line 212 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.imp = sos_Imports::create (cfe_cnt);
- cfe_import_module (yyval.imp, yypvt[-0].str);
- } break;
- case 8:
- # line 218 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.imp = yypvt[-2].imp;
- cfe_import_module (yyval.imp, yypvt[-0].str);
- } break;
- case 9:
- # line 223 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_schema.set_has_external_import (FALSE); } break;
- case 10:
- # line 227 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_schema.set_has_external_import (TRUE); } break;
- case 22:
- # line 260 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_check_type (yypvt[-4].str);
- yyval.etd = sos_Enum_type::create (cfe_cnt);
- yyval.etd.set_name(yypvt[-4].str);
- yyval.etd.set_object_size (cfe_enum_size (yypvt[-2].str_l.card()));
- yyval.etd.set_literals(yypvt[-2].str_l);
-
- cfe_type_tab.insert (yypvt[-4].str, yyval.etd);
- cfe_types.append (yyval.etd);
- } break;
- case 23:
- # line 274 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct = sos_Class_type::create (cfe_cnt);
- cfe_ct.set_name (yypvt[-0].str);
- cfe_make_class_type (yypvt[-0].str, cfe_ct);
- cfe_type_tab.insert (yypvt[-0].str, cfe_ct);
- } break;
- case 24:
- # line 280 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct.set_gen_params(yypvt[-0].gp_l); } break;
- case 25:
- # line 282 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct.set_create_params(yypvt[-0].par_l); } break;
- case 26:
- # line 284 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct.set_super_classes(yypvt[-0].tn_l);
- cfe_set_super_closure (cfe_ct);
- } break;
- case 27:
- # line 288 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct.set_friends
- (sos_Type_name_List::create (cfe_cnt, FALSE));
- cfe_init_methods (cfe_ct);
- cfe_component_offset = 0;
- } break;
- case 28:
- # line 296 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.ctd = cfe_ct;
- cfe_set_offsets_and_size (cfe_ct, cfe_component_offset);
- cfe_set_inherited_methods (cfe_ct);
- cfe_complete_methods (cfe_ct);
- yyval.ctd.set_generated_from
- (sos_Generic_instantiation::make(NO_OBJECT));
- cfe_set_root_name (cfe_ct);
- cfe_types.append (yyval.ctd);
- cfe_ct = sos_Class_type::make (NO_OBJECT);
- } break;
- case 29:
- # line 308 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.gp_l = sos_Gen_param_List::make (NO_OBJECT); } break;
- case 30:
- # line 312 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { if (cfe_is_full_type)
- cfe_error (err_USE, err_CFE_FULL_GENERIC);
- yyval.gp_l = yypvt[-1].gp_l;
- } break;
- case 31:
- # line 319 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.gp_l = sos_Gen_param_List::create (cfe_cnt, FALSE);
- yyval.gp_l.append (yypvt[-0].gp);
- } break;
- case 32:
- # line 325 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { if (cfe_lookup_gen_params (yypvt[-0].gp.get_name(), yypvt[-2].gp_l) != NO_OBJECT)
- cfe_error (err_USE, err_CFE_AMBIGUOUS_GEN_PARAMS);
- yypvt[-2].gp_l.append (yypvt[-0].gp);
- yyval.gp_l = yypvt[-2].gp_l;
- } break;
- case 33:
- # line 333 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.gp = sos_Gen_param::create (cfe_cnt);
- yyval.gp.set_name (yypvt[-0].str);
- yyval.gp.set_super_class (sos_Type_name::make(NO_OBJECT));
- } break;
- case 34:
- # line 340 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.gp = sos_Gen_param::create (cfe_cnt);
- yyval.gp.set_name (yypvt[-2].str);
- yyval.gp.set_super_class (yypvt[-0].tn);
- } break;
- case 35:
- # line 347 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par_l = sos_Param_List::make (NO_OBJECT);
- } break;
- case 37:
- # line 353 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn_l = sos_Type_name_List::create (cfe_cnt, FALSE);
- #ifdef ATT
- if (cfe_ct.operator!=(cfe_get_object_type()))
- #else
- if (cfe_ct != cfe_get_object_type())
- #endif
- yyval.tn_l.append (cfe_get_object_type());
- } break;
- case 38:
- # line 363 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_check_super_classes (cfe_ct, yypvt[-0].tn_l);
- yyval.tn_l = yypvt[-0].tn_l;
- } break;
- case 39:
- # line 369 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn_l = sos_Type_name_List::create (cfe_cnt, FALSE);
- yyval.tn_l.append (yypvt[-0].tn);
- } break;
- case 40:
- # line 375 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yypvt[-2].tn_l.append (yypvt[-0].tn);
- yyval.tn_l = yypvt[-2].tn_l;
- } break;
- case 42:
- # line 386 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { sos_Type_with_params twp = sos_Type_with_params::create (cfe_cnt);
- twp.set_type_name (yypvt[-3].tn);
- twp.set_params (yypvt[-1].exp_l);
- yyval.tn = twp;
- } break;
- case 43:
- # line 394 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_kind = sos_PRIVATE;
- cfe_set_method_kind = sos_PRIVATE;
- } break;
- case 44:
- # line 398 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_abstract = FALSE;
- cfe_method_is_definite = FALSE;
- cfe_method_is_local = FALSE;
- cfe_method_is_static = FALSE;
- cfe_method_is_value = FALSE;
- } break;
- case 49:
- # line 412 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_kind = yypvt[-0].mk; } break;
- case 52:
- # line 420 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_fct_or_comp_type = yypvt[-0].tn; } break;
- case 53:
- # line 425 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_abstract = TRUE; } break;
- case 54:
- # line 428 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_definite = TRUE; } break;
- case 55:
- # line 430 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_static = TRUE; } break;
- case 58:
- # line 437 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_local = TRUE; } break;
- case 59:
- # line 439 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_method_is_value = TRUE; } break;
- case 60:
- # line 444 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.mk = sos_PRIVATE; } break;
- case 61:
- # line 446 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.mk = sos_PROTECTED; } break;
- case 62:
- # line 448 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.mk = sos_PUBLIC; } break;
- case 63:
- # line 452 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_set_method_kind = cfe_method_kind; } break;
- case 64:
- # line 456 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_set_method_kind = yypvt[-1].mk; } break;
- case 65:
- # line 463 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { if (cfe_method_is_definite)
- cfe_error(err_WNG, err_CFE_NO_DEFINITE_FUNCS);
- if (cfe_method_is_local)
- cfe_error(err_USE, err_CFE_NO_LOCAL_FUNCS);
- if (cfe_method_is_value)
- cfe_error(err_USE, err_CFE_NO_VALUE_FUNCS);
-
- yyval.md = sos_Method::create (cfe_cnt);
- yyval.md.set_name (yypvt[-2].str);
- yyval.md.set_is_abstract (cfe_method_is_abstract);
- if (cfe_method_is_abstract)
- cfe_ct.set_is_abstract (TRUE);
- yyval.md.set_is_static (cfe_method_is_static);
- yyval.md.set_is_operator (cfe_is_operator);
- yyval.md.set_is_predefined (FALSE);
- yyval.md.set_params (yypvt[-1].par_l);
- yyval.md.set_result_type (cfe_fct_or_comp_type);
- yyval.md.set_kind (cfe_method_kind);
- yyval.md.set_defined_in (cfe_ct);
- yyval.md.set_generated_from (sos_Method::make(NO_OBJECT));
- yyval.md.set_impls (sos_Method_impl_List::make (NO_OBJECT));
- cfe_append_method (cfe_ct, yyval.md);
- } break;
- case 66:
- # line 489 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = yypvt[-0].str;
- cfe_is_operator = FALSE;
- } break;
- case 67:
- # line 493 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = yypvt[-0].str;
- cfe_is_operator = TRUE;
- } break;
- case 68:
- # line 500 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = yypvt[-0].str; } break;
- case 69:
- # line 505 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("*").make_String (cfe_cnt); } break;
- case 70:
- # line 507 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("/").make_String (cfe_cnt); } break;
- case 71:
- # line 509 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("%").make_String (cfe_cnt); } break;
- case 72:
- # line 511 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("+").make_String (cfe_cnt); } break;
- case 73:
- # line 513 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("-").make_String (cfe_cnt); } break;
- case 74:
- # line 515 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (">>").make_String (cfe_cnt); } break;
- case 75:
- # line 517 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("<<").make_String (cfe_cnt); } break;
- case 76:
- # line 519 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (">").make_String (cfe_cnt); } break;
- case 77:
- # line 521 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("<").make_String (cfe_cnt); } break;
- case 78:
- # line 523 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("==").make_String (cfe_cnt); } break;
- case 79:
- # line 525 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("!=").make_String (cfe_cnt); } break;
- case 80:
- # line 527 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("<=").make_String (cfe_cnt); } break;
- case 81:
- # line 529 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (">=").make_String (cfe_cnt); } break;
- case 82:
- # line 531 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("&").make_String (cfe_cnt); } break;
- case 83:
- # line 533 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("^").make_String (cfe_cnt); } break;
- case 84:
- # line 535 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("|").make_String (cfe_cnt); } break;
- case 85:
- # line 537 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("&&").make_String (cfe_cnt); } break;
- case 86:
- # line 539 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("||").make_String (cfe_cnt); } break;
- case 87:
- # line 541 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("=").make_String (cfe_cnt); } break;
- case 88:
- # line 543 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("+=").make_String (cfe_cnt); } break;
- case 89:
- # line 545 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("-=").make_String (cfe_cnt); } break;
- case 90:
- # line 547 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("*=").make_String (cfe_cnt); } break;
- case 91:
- # line 549 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("/=").make_String (cfe_cnt); } break;
- case 92:
- # line 551 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("%=").make_String (cfe_cnt); } break;
- case 93:
- # line 553 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("^=").make_String (cfe_cnt); } break;
- case 94:
- # line 555 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("&=").make_String (cfe_cnt); } break;
- case 95:
- # line 557 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("|=").make_String (cfe_cnt); } break;
- case 96:
- # line 559 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (">>=").make_String (cfe_cnt); } break;
- case 97:
- # line 561 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("<<=").make_String (cfe_cnt); } break;
- case 98:
- # line 563 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("()").make_String (cfe_cnt); } break;
- case 99:
- # line 565 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String ("[]").make_String (cfe_cnt); } break;
- case 100:
- # line 571 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par_l = sos_Param_List::create (cfe_cnt, FALSE); } break;
- case 101:
- # line 575 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par_l = yypvt[-1].par_l; } break;
- case 102:
- # line 580 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par_l = sos_Param_List::create (cfe_cnt, FALSE);
- yyval.par_l.append (yypvt[-0].par);
- } break;
- case 103:
- # line 586 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yypvt[-2].par_l.append (yypvt[-0].par);
- yyval.par_l = yypvt[-2].par_l;
- } break;
- case 104:
- # line 596 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par = sos_Param::create (cfe_cnt);
- yyval.par.set_name (yypvt[-1].str);
- yyval.par.set_type_name (yypvt[-3].tn);
- yyval.par.set_default_expr (yypvt[-0].exp);
- yyval.par.set_is_ref (yypvt[-2].b);
- } break;
- case 105:
- # line 605 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.par = sos_Param::create (cfe_cnt);
- yyval.par.set_name (sos_String::make (NO_OBJECT));
- yyval.par.set_type_name (yypvt[-2].tn);
- yyval.par.set_default_expr (yypvt[-0].exp);
- yyval.par.set_is_ref (yypvt[-1].b);
- } break;
- case 106:
- # line 614 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.b = FALSE; } break;
- case 107:
- # line 616 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.b = TRUE; } break;
- case 108:
- # line 621 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp = sos_Expr::make (NO_OBJECT); } break;
- case 109:
- # line 624 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp = yypvt[-0].exp; } break;
- case 113:
- # line 640 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { if (cfe_method_is_definite)
- cfe_error(err_WNG, err_CFE_NO_DEFINITE_COMPS);
- if (cfe_method_is_static)
- cfe_error(err_USE, err_CFE_NO_STATIC_COMPS);
- if (cfe_method_is_value)
- cfe_error(err_USE, err_CFE_NO_VALUE_COMPS);
-
- cfe_append_comp_methods
- (cfe_ct, cfe_fct_or_comp_type, yypvt[-1].str, yypvt[-0].exp,
- cfe_method_kind, cfe_set_method_kind,
- cfe_method_is_value, cfe_method_is_local,
- cfe_component_offset);
- if (yypvt[-0].exp != NO_OBJECT)
- cfe_ct.set_has_init_comps (TRUE);
- } break;
- case 114:
- # line 661 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_ct.get_friends().append (yypvt[-1].tn);
- } break;
- case 115:
- # line 668 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_check_type (yypvt[-0].str); } break;
- case 116:
- # line 673 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.utd = sos_Union_type::create (cfe_cnt);
- yyval.utd.set_name (yypvt[-5].str);
- yyval.utd.set_uniteds (yypvt[-2].tn_l);
-
- cfe_type_tab.insert (yypvt[-5].str, yyval.utd);
- cfe_types.append (yyval.utd);
- } break;
- case 117:
- # line 686 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.ttd = sos_Typedef_type::create (cfe_cnt);
- yyval.ttd.set_name (yypvt[-0].str);
- yyval.ttd.set_type_name (yypvt[-1].tn);
- if (yypvt[-1].tn.make_base_type().has_type (sos_Class_type_type))
- { sos_Class_type ct = sos_Class_type::make (yypvt[-1].tn.make_base_type());
- cfe_make_class_type (yypvt[-0].str, ct);
- }
- else
- cfe_check_type (yypvt[-0].str);
-
- cfe_type_tab.insert (yypvt[-0].str, yyval.ttd);
- cfe_types.append (yyval.ttd);
- } break;
- case 118:
- # line 705 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { cfe_check_type (yypvt[-1].str);
- yyval.xtd = sos_Extern_type::create (cfe_cnt);
- yyval.xtd.set_name (yypvt[-1].str);
- yyval.xtd.set_object_size (yypvt[-0].i);
- cfe_schema.set_has_external_types (TRUE);
-
- cfe_type_tab.insert (yypvt[-1].str, yyval.xtd);
- cfe_types.append (yyval.xtd);
- } break;
- case 119:
- # line 716 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.i = 4; } break;
- case 120:
- # line 720 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.i = yypvt[-1].i;
- if (yypvt[-1].i > SOS_ID_SIZE)
- { cfe_error (err_USE, err_CFE_INVALID_EXT_SIZE); }
- } break;
- case 121:
- # line 727 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn = yypvt[-0].tn;
- cfe_check_no_generic (yypvt[-0].tn);
- } break;
- case 122:
- # line 733 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn = cfe_lookup_type_name (cfe_ct, yypvt[-0].str); } break;
- case 123:
- # line 735 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn = yypvt[-0].tn; } break;
- case 124:
- # line 738 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp_l = sos_Expr_List::create (cfe_cnt, FALSE); } break;
- case 126:
- # line 743 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp_l = sos_Expr_List::create (cfe_cnt, FALSE);
- yyval.exp_l.append (yypvt[-0].exp);
- } break;
- case 127:
- # line 749 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yypvt[-2].exp_l.append (yypvt[-0].exp);
- yyval.exp_l = yypvt[-2].exp_l;
- } break;
- case 128:
- # line 755 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp = yypvt[-0].id; } break;
- case 129:
- # line 757 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.exp = yypvt[-0].ie; } break;
- case 130:
- # line 761 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.id = sos_Identifier::create (cfe_cnt);
- yyval.id.set_id(yypvt[-0].str);
- } break;
- case 131:
- # line 767 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.ie = sos_Int_expr::create (cfe_cnt);
- yyval.ie.set_value(yypvt[-0].i);
- } break;
- case 132:
- # line 777 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn = cfe_lookup_generic_instantiation (yypvt[-3].str, yypvt[-1].tn_l, cfe_types);
- cfe_gen_insts.append (yyval.tn);
- } break;
- case 133:
- # line 784 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.tn_l = sos_Type_name_List::create (cfe_cnt, FALSE);
- yyval.tn_l.append (yypvt[-0].tn);
- } break;
- case 134:
- # line 790 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yypvt[-2].tn_l.append (yypvt[-0].tn);
- yyval.tn_l = yypvt[-2].tn_l;
- } break;
- case 135:
- # line 796 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (yypvt[-0].s).make_String (TEMP_CONTAINER);
- delete yypvt[-0].s;
- } break;
- case 136:
- # line 802 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str_l = sos_String_List::create (cfe_cnt, FALSE);
- yyval.str_l.append (yypvt[-0].str);
- } break;
- case 137:
- # line 808 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yypvt[-2].str_l.append (yypvt[-0].str);
- yyval.str_l = yypvt[-2].str_l;
- } break;
- case 138:
- # line 814 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.str = smg_String (yypvt[-0].s).make_String (cfe_cnt);
- delete yypvt[-0].s;
- } break;
- case 140:
- # line 821 "/fzi/prost/stone/SOS3-2/src/cfe/cfe.y"
- { yyval.s = strdup ("set"); } break;
- }
- goto yystack; /* reset registers in driver code */
- }
-