#ifndef lint static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; #endif #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define YYPATCH 20140101 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) #define yyerrok (yyerrflag = 0) #define YYRECOVERING() (yyerrflag != 0) #define YYPREFIX "yy" #define YYPURE 0 #line 52 "soapcpp2_yacc.y" #include "soapcpp2.h" #ifdef WIN32 #ifndef __STDC__ #define __STDC__ #endif #define YYINCLUDED_STDLIB_H #ifdef WIN32_WITHOUT_SOLARIS_FLEX extern int soapcpp2lex(); #else extern int yylex(); #endif #else extern int yylex(); #endif extern int is_XML(Tnode*); #define MAXNEST 16 /* max. nesting depth of scopes */ struct Scope { Table *table; Entry *entry; Node node; LONG64 val; int offset; Bool grow; /* true if offset grows with declarations */ Bool mask; /* true if enum is mask */ } stack[MAXNEST], /* stack of tables and offsets */ *sp; /* current scope stack pointer */ Table *classtable = (Table*)0, *enumtable = (Table*)0, *typetable = (Table*)0, *booltable = (Table*)0, *templatetable = (Table*)0; char *namespaceid = NULL; int transient = 0; int permission = 0; int custom_header = 1; int custom_fault = 1; Pragma *pragmas = NULL; Tnode *qname = NULL; Tnode *xml = NULL; /* function prototypes for support routine section */ static Entry *undefined(Symbol*); static Tnode *mgtype(Tnode*, Tnode*); static Node op(const char*, Node, Node), iop(const char*, Node, Node), relop(const char*, Node, Node); static void mkscope(Table*, int), enterscope(Table*, int), exitscope(); static int integer(Tnode*), real(Tnode*), numeric(Tnode*); static void add_soap(), add_XML(), add_qname(), add_header(Table*), add_fault(Table*), add_response(Entry*, Entry*), add_result(Tnode*); extern char *c_storage(Storage), *c_type(Tnode*), *c_ident(Tnode*); extern int is_primitive_or_string(Tnode*), is_stdstr(Tnode*), is_binary(Tnode*), is_external(Tnode*), is_mutable(Tnode*); /* Temporaries used in semantic rules */ int i; char *s, *s1, *s2; Symbol *sym; Entry *p, *q; Tnode *t; Node tmp, c; Pragma **pp; #line 124 "soapcpp2_yacc.y" #ifdef YYSTYPE #undef YYSTYPE_IS_DECLARED #define YYSTYPE_IS_DECLARED 1 #endif #ifndef YYSTYPE_IS_DECLARED #define YYSTYPE_IS_DECLARED 1 typedef union { Symbol *sym; LONG64 i; double r; char c; char *s; Tnode *typ; Storage sto; Node rec; Entry *e; } YYSTYPE; #endif /* !YYSTYPE_IS_DECLARED */ #line 105 "soapcpp2_yacc.c" /* compatibility with bison */ #ifdef YYPARSE_PARAM /* compatibility with FreeBSD */ # ifdef YYPARSE_PARAM_TYPE # define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM) # else # define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM) # endif #else # define YYPARSE_DECL() yyparse(void) #endif /* Parameters sent to lex. */ #ifdef YYLEX_PARAM # define YYLEX_DECL() yylex(void *YYLEX_PARAM) # define YYLEX yylex(YYLEX_PARAM) #else # define YYLEX_DECL() yylex(void) # define YYLEX yylex() #endif /* Parameters sent to yyerror. */ #ifndef YYERROR_DECL #define YYERROR_DECL() yyerror(const char *s) #endif #ifndef YYERROR_CALL #define YYERROR_CALL(msg) yyerror(msg) #endif extern int YYPARSE_DECL(); #define PRAGMA 257 #define AUTO 258 #define DOUBLE 259 #define INT 260 #define STRUCT 261 #define BREAK 262 #define ELSE 263 #define LONG 264 #define SWITCH 265 #define CASE 266 #define ENUM 267 #define REGISTER 268 #define TYPEDEF 269 #define CHAR 270 #define EXTERN 271 #define RETURN 272 #define UNION 273 #define CONST 274 #define FLOAT 275 #define SHORT 276 #define UNSIGNED 277 #define CONTINUE 278 #define FOR 279 #define SIGNED 280 #define VOID 281 #define DEFAULT 282 #define GOTO 283 #define SIZEOF 284 #define VOLATILE 285 #define DO 286 #define IF 287 #define STATIC 288 #define WHILE 289 #define CLASS 290 #define PRIVATE 291 #define PROTECTED 292 #define PUBLIC 293 #define VIRTUAL 294 #define INLINE 295 #define OPERATOR 296 #define LLONG 297 #define BOOL 298 #define CFALSE 299 #define CTRUE 300 #define WCHAR 301 #define TIME 302 #define USING 303 #define NAMESPACE 304 #define ULLONG 305 #define MUSTUNDERSTAND 306 #define SIZE 307 #define FRIEND 308 #define TEMPLATE 309 #define EXPLICIT 310 #define TYPENAME 311 #define RESTRICT 312 #define null 313 #define UCHAR 314 #define USHORT 315 #define UINT 316 #define ULONG 317 #define NONE 318 #define ID 319 #define TAG 320 #define LAB 321 #define TYPE 322 #define LNG 323 #define DBL 324 #define CHR 325 #define STR 326 #define PA 327 #define NA 328 #define TA 329 #define DA 330 #define MA 331 #define AA 332 #define XA 333 #define OA 334 #define LA 335 #define RA 336 #define OR 337 #define AN 338 #define EQ 339 #define NE 340 #define LE 341 #define GE 342 #define LS 343 #define RS 344 #define AR 345 #define PP 346 #define NN 347 #define YYERRCODE 256 static const short yylhs[] = { -1, 0, 35, 36, 36, 37, 37, 38, 38, 38, 38, 38, 40, 43, 43, 43, 43, 43, 43, 43, 41, 42, 44, 45, 46, 39, 39, 39, 39, 39, 39, 39, 47, 48, 11, 11, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 50, 51, 49, 6, 53, 53, 54, 54, 55, 13, 13, 32, 32, 27, 27, 27, 28, 28, 28, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 10, 56, 56, 9, 9, 9, 9, 9, 57, 58, 60, 59, 59, 52, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 5, 5, 3, 3, 29, 29, 29, 30, 30, 30, 31, 26, 26, 12, 12, 34, 34, 34, 34, 34, 15, 15, 16, 16, 16, 17, 17, 18, 18, 33, 19, 19, 20, 21, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, }; static const short yylen[] = { 2, 2, 0, 5, 1, 0, 2, 2, 1, 2, 1, 1, 1, 0, 3, 4, 4, 4, 4, 2, 1, 1, 0, 0, 0, 1, 2, 3, 2, 2, 3, 4, 6, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 1, 3, 7, 0, 0, 1, 1, 3, 6, 0, 1, 3, 4, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5, 5, 7, 1, 3, 5, 5, 2, 2, 5, 6, 2, 2, 6, 6, 8, 2, 2, 1, 4, 3, 3, 3, 3, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 2, 0, 4, 3, 1, 0, 2, 0, 1, 1, 2, 3, 4, 3, 0, 1, 1, 2, 2, 3, 1, 5, 1, 1, 3, 1, 1, 3, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 2, 2, 2, 2, 2, 4, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, }; static const short yydefred[] = { 2, 0, 0, 0, 1, 0, 0, 0, 12, 154, 105, 99, 0, 100, 0, 155, 159, 96, 158, 165, 0, 161, 104, 98, 107, 106, 94, 168, 156, 0, 0, 163, 101, 95, 97, 112, 102, 164, 103, 162, 0, 157, 108, 109, 110, 111, 0, 20, 21, 166, 167, 0, 0, 0, 0, 0, 0, 0, 6, 0, 8, 10, 11, 77, 77, 5, 9, 0, 0, 0, 148, 138, 0, 0, 0, 0, 148, 140, 0, 0, 0, 149, 0, 0, 34, 35, 148, 139, 0, 0, 160, 0, 89, 88, 0, 148, 0, 148, 148, 0, 26, 77, 175, 7, 0, 28, 29, 0, 135, 0, 137, 0, 0, 136, 0, 149, 134, 0, 141, 142, 0, 0, 0, 175, 0, 75, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 177, 176, 33, 27, 30, 77, 153, 3, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 93, 92, 0, 133, 0, 147, 144, 143, 145, 148, 0, 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 70, 68, 69, 0, 37, 38, 0, 73, 0, 181, 0, 31, 0, 19, 22, 23, 24, 0, 0, 119, 0, 0, 0, 123, 0, 114, 0, 0, 85, 120, 0, 115, 0, 71, 72, 0, 239, 240, 235, 233, 234, 236, 237, 238, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 231, 185, 0, 175, 0, 79, 0, 0, 0, 0, 14, 0, 0, 127, 124, 0, 86, 0, 128, 0, 229, 227, 226, 228, 180, 224, 225, 0, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 15, 16, 17, 18, 0, 113, 116, 0, 0, 232, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 221, 222, 193, 0, 0, 0, 0, 0, 32, 84, 0, 170, 0, 81, 129, 230, 196, 0, 190, 194, 195, 0, 183, 0, 0, 76, 198, 189, 0, 172, 82, }; static const short yydgoto[] = { 1, 51, 52, 53, 354, 367, 104, 54, 55, 132, 56, 71, 260, 352, 139, 308, 348, 285, 286, 252, 253, 254, 255, 256, 257, 258, 350, 57, 123, 99, 208, 209, 124, 325, 309, 2, 4, 5, 58, 149, 60, 150, 62, 151, 265, 266, 267, 141, 142, 105, 63, 64, 211, 262, 263, 264, 120, 109, 114, 221, 219, }; static const short yysindex[] = { 0, 0, -277, -288, 0, 2283, -76, 13, 0, 0, 0, 0, -81, 0, 321, 0, 0, 0, 0, 0, -34, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 2348, 2348, -40, -23, -39, -13, 0, 0, -24, 0, 0, 0, 0, 0, 0, 0, -10, 0, 0, 0, 0, -6, 0, 0, -253, 0, 0, 15, 0, 0, 0, 48, 24, 0, 0, 0, 0, -273, 2348, 0, 31, 0, 0, -199, 0, 295, 0, 0, 136, 0, 0, 0, 0, 133, 0, 0, 2146, 0, 2216, 0, 69, 2414, 0, 2216, 0, 0, 2216, 0, 0, -253, 2348, 2348, 0, 139, 0, 2216, -114, 295, 295, 295, 0, 85, 2216, 2414, 71, 115, 0, 0, 0, 0, 0, 0, 0, 0, 155, 151, 163, 169, 26, 2216, 106, 0, 188, 117, 2216, 125, 173, 0, 0, 112, 0, 126, 0, 0, 0, 0, 0, 127, 188, 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, 0, 0, 147, 0, 0, 205, 0, 788, 0, -66, 0, 2348, 0, 0, 0, 0, 2216, 162, 0, 2414, 0, 131, 0, 159, 0, 3, 115, 0, 0, 2216, 0, 194, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 756, 756, 756, 756, 115, 756, 756, 756, 228, 0, -58, 0, -12, 83, 0, 0, 0, -1, 0, 283, 0, 290, 2216, 2216, 2216, 0, 2216, 188, 0, 0, -253, 0, 224, 0, 2348, 0, 0, 0, 0, 0, 0, 0, 58, 0, 115, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 0, -9, 289, -14, 79, 2348, 0, 0, 0, 0, 229, 0, 0, 316, 756, 0, 0, 318, 306, 0, 83, 99, 110, 121, 142, 142, -31, -31, -31, -31, 202, 202, 206, 206, 0, 0, 0, 0, -43, 51, 59, 313, 756, 0, 0, 115, 0, 323, 0, 0, 0, 0, 756, 0, 0, 0, -43, 0, -1, 66, 0, 0, 0, 289, 0, 0, }; static const short yyrindex[] = { 0, 0, 1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1953, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2056, 0, 0, 0, 0, 1060, 1060, 0, 0, 1882, 0, 1413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 928, 1003, 0, 0, 0, 1116, 1304, 0, 0, 0, 0, 1405, 1593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1890, 0, 803, 0, 0, 138, 0, 803, 0, 0, 803, 0, 0, 0, 175, 825, 0, 0, 0, 803, 0, 0, 0, 0, 0, 1767, 803, 138, 0, 1441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 895, 0, 0, 266, 0, 803, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 266, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167, 0, 353, 0, 0, 0, 0, -29, 0, 0, 138, 245, 0, 0, 0, 0, 0, 21, 0, 0, 803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 966, 0, 0, 0, 0, 798, 0, 667, 0, 698, 0, 0, 0, 887, 0, 0, 0, 354, -29, -29, -29, 0, -29, 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 966, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 672, -19, 10, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 0, 700, 796, 625, -37, 661, 604, 613, 511, 534, 562, 571, 466, 474, 429, 437, 0, 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 32, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 935, 0, 37, 0, 0, 0, 0, 150, 0, 0, }; static const short yygindex[] = { 0, 860, 894, 0, 0, 0, 0, 0, 0, 70, 0, 308, 0, 0, 0, 0, -207, -247, -163, 0, 0, 108, 0, 1253, 299, 0, 49, 7, -89, -94, -57, 68, -117, 0, 56, 0, 0, 364, 0, 5, 0, -2, 218, 1837, 0, 0, 0, 379, 380, 87, 0, 0, 0, 0, 134, 0, 0, 584, 330, -146, 0, }; #define YYTABLESIZE 2736 static const short yytable[] = { 346, 5, 347, 61, 208, 288, 306, 208, 4, 87, 59, 304, 302, 87, 303, 87, 305, 118, 206, 96, 102, 208, 208, 231, 137, 182, 208, 3, 138, 160, 87, 6, 158, 159, 346, 103, 347, 5, 119, 5, 182, 324, 70, 5, 251, 5, 87, 65, 171, 345, 87, 83, 87, 83, 83, 83, 208, 208, 92, 93, 5, 178, 178, 171, 13, 5, 84, 87, 83, 85, 102, 83, 66, 178, 358, 178, 178, 178, 191, 88, 191, 191, 191, 178, 97, 216, 94, 208, 208, 81, 178, 89, 5, 178, 5, 191, 13, 173, 191, 322, 95, 83, 321, 227, 203, 61, 182, 50, 198, 185, 98, 205, 59, 196, 194, 108, 195, 153, 197, 110, 306, 293, 261, 125, 317, 304, 302, 5, 303, 171, 305, 188, 170, 190, 173, 49, 306, 293, 360, 169, 113, 304, 302, 296, 303, 298, 305, 306, 293, 116, 137, 106, 304, 302, 138, 303, 369, 305, 306, 296, 320, 298, 202, 304, 302, 184, 303, 310, 305, 274, 296, 115, 298, 143, 137, 67, 87, 292, 138, 306, 87, 296, 87, 298, 304, 302, 364, 303, 140, 305, 282, 182, 152, 292, 182, 183, 368, 204, 164, 165, 166, 161, 296, 207, 298, 163, 207, 291, 167, 213, 184, 184, 184, 91, 212, 91, 91, 91, 91, 91, 91, 214, 78, 261, 270, 184, 184, 215, 184, 210, 323, 218, 220, 91, 86, 225, 91, 91, 68, 306, 232, 69, 222, 306, 304, 302, 233, 303, 304, 305, 224, 228, 230, 305, 259, 48, 271, 5, 5, 5, 5, 5, 5, 87, 173, 5, 91, 87, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 289, 344, 5, 5, 175, 272, 79, 5, 175, 80, 5, 87, 5, 184, 273, 277, 5, 5, 5, 5, 5, 208, 208, 5, 5, 87, 351, 5, 5, 5, 5, 5, 5, 300, 301, 344, 5, 5, 5, 5, 276, 5, 287, 77, 5, 311, 307, 290, 87, 82, 9, 10, 11, 12, 83, 312, 13, 83, 87, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 319, 349, 25, 26, 353, 356, 178, 27, 357, 178, 28, 191, 29, 321, 75, 359, 90, 31, 83, 32, 33, 152, 363, 34, 35, 361, 169, 36, 37, 38, 39, 40, 41, 362, 111, 366, 42, 43, 44, 45, 371, 169, 151, 169, 91, 78, 80, 200, 326, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 186, 187, 189, 191, 192, 193, 199, 200, 201, 372, 365, 370, 294, 295, 297, 299, 300, 301, 157, 107, 84, 226, 135, 85, 87, 269, 100, 101, 294, 295, 297, 299, 300, 301, 76, 155, 355, 0, 0, 294, 295, 297, 299, 300, 301, 136, 169, 87, 0, 0, 294, 295, 297, 299, 300, 301, 0, 218, 0, 0, 218, 0, 218, 218, 218, 219, 0, 0, 219, 0, 219, 219, 219, 297, 299, 300, 301, 218, 218, 218, 184, 218, 218, 184, 91, 219, 219, 219, 91, 219, 219, 91, 0, 0, 216, 0, 0, 216, 0, 0, 216, 0, 217, 0, 0, 217, 0, 0, 217, 0, 0, 0, 218, 218, 216, 216, 216, 0, 216, 216, 219, 219, 217, 217, 217, 0, 217, 217, 0, 0, 0, 175, 278, 279, 280, 281, 0, 283, 284, 212, 0, 0, 212, 218, 218, 212, 127, 0, 0, 216, 216, 219, 219, 0, 175, 0, 0, 217, 217, 212, 212, 212, 213, 212, 212, 213, 0, 72, 213, 0, 0, 318, 0, 0, 0, 0, 128, 129, 130, 0, 216, 216, 213, 213, 213, 0, 213, 213, 217, 217, 214, 0, 0, 214, 212, 212, 214, 0, 0, 215, 0, 0, 215, 0, 0, 215, 0, 131, 0, 0, 214, 214, 214, 0, 214, 214, 0, 213, 213, 215, 215, 215, 0, 215, 215, 212, 212, 0, 0, 0, 73, 0, 210, 74, 0, 210, 0, 0, 210, 0, 0, 211, 0, 0, 211, 214, 214, 211, 213, 213, 112, 0, 210, 210, 215, 215, 207, 210, 0, 207, 117, 211, 211, 0, 0, 0, 211, 0, 0, 126, 0, 133, 134, 207, 207, 0, 214, 214, 207, 0, 0, 0, 0, 0, 0, 215, 215, 210, 210, 209, 0, 0, 209, 0, 0, 209, 211, 211, 202, 0, 0, 202, 0, 186, 0, 0, 186, 0, 207, 209, 209, 0, 0, 0, 209, 202, 202, 0, 210, 210, 202, 186, 0, 186, 0, 0, 0, 211, 211, 205, 0, 201, 205, 0, 201, 0, 0, 0, 0, 207, 207, 229, 0, 0, 209, 209, 205, 205, 201, 201, 202, 205, 0, 201, 0, 0, 218, 218, 218, 218, 218, 218, 218, 218, 219, 219, 219, 219, 219, 219, 219, 219, 0, 0, 0, 209, 209, 0, 0, 248, 0, 205, 202, 201, 243, 0, 250, 186, 246, 244, 0, 245, 0, 216, 216, 216, 216, 216, 216, 216, 216, 217, 217, 217, 217, 217, 217, 217, 217, 0, 0, 248, 0, 205, 0, 201, 243, 0, 250, 0, 246, 244, 0, 245, 0, 0, 0, 204, 0, 199, 204, 87, 199, 0, 0, 87, 0, 87, 212, 212, 212, 212, 212, 212, 204, 204, 199, 199, 0, 204, 0, 203, 87, 90, 0, 90, 90, 90, 90, 90, 90, 213, 213, 213, 213, 213, 213, 187, 0, 0, 187, 247, 249, 90, 0, 0, 90, 90, 0, 204, 0, 199, 0, 0, 0, 187, 0, 187, 0, 214, 214, 214, 214, 214, 214, 0, 0, 0, 215, 215, 215, 215, 215, 215, 249, 0, 90, 0, 0, 0, 0, 204, 0, 199, 0, 0, 0, 0, 13, 173, 191, 191, 191, 87, 0, 0, 0, 87, 0, 87, 0, 210, 210, 210, 210, 191, 191, 0, 191, 121, 211, 211, 211, 211, 87, 0, 0, 0, 0, 0, 0, 187, 207, 207, 121, 0, 121, 0, 121, 121, 121, 121, 121, 121, 0, 0, 188, 0, 0, 188, 0, 121, 121, 122, 0, 0, 121, 121, 13, 121, 121, 0, 121, 0, 188, 121, 188, 0, 209, 209, 0, 0, 0, 0, 202, 206, 178, 178, 0, 178, 178, 178, 191, 0, 0, 122, 122, 0, 0, 121, 0, 173, 0, 0, 178, 178, 0, 178, 178, 122, 0, 0, 0, 0, 0, 205, 205, 201, 206, 122, 234, 122, 0, 122, 122, 122, 122, 122, 122, 0, 0, 34, 0, 121, 0, 235, 236, 0, 0, 0, 188, 122, 122, 0, 122, 122, 0, 122, 0, 237, 0, 121, 234, 0, 0, 238, 0, 0, 0, 239, 240, 241, 242, 0, 0, 0, 0, 235, 236, 0, 0, 178, 0, 0, 122, 0, 0, 0, 87, 87, 0, 237, 87, 0, 87, 122, 0, 238, 0, 0, 0, 239, 240, 241, 242, 0, 0, 0, 0, 87, 0, 0, 87, 0, 0, 0, 35, 0, 122, 0, 0, 0, 0, 204, 204, 203, 0, 121, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 90, 0, 0, 90, 130, 0, 130, 0, 130, 130, 130, 130, 130, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 121, 0, 130, 130, 0, 130, 130, 0, 130, 0, 0, 0, 0, 87, 121, 121, 121, 121, 0, 87, 121, 0, 0, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, 130, 121, 121, 191, 0, 0, 121, 87, 0, 121, 0, 121, 0, 0, 0, 121, 121, 121, 121, 121, 0, 0, 121, 121, 0, 0, 121, 121, 121, 121, 121, 121, 34, 0, 130, 121, 121, 121, 121, 0, 121, 0, 0, 121, 121, 0, 0, 121, 0, 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 122, 0, 0, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 0, 0, 122, 122, 0, 178, 0, 122, 178, 0, 122, 178, 122, 0, 0, 0, 122, 122, 122, 122, 122, 0, 0, 122, 122, 0, 0, 122, 122, 122, 122, 122, 122, 0, 0, 0, 122, 122, 122, 122, 0, 122, 0, 0, 122, 122, 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 0, 131, 0, 131, 131, 131, 131, 131, 131, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 131, 131, 0, 131, 131, 0, 131, 0, 0, 0, 0, 0, 130, 130, 130, 130, 0, 87, 130, 0, 0, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 0, 131, 130, 130, 0, 0, 0, 130, 0, 0, 130, 0, 130, 0, 0, 0, 130, 130, 130, 130, 130, 0, 0, 130, 130, 0, 0, 130, 130, 130, 130, 130, 130, 35, 0, 131, 130, 130, 130, 130, 0, 130, 0, 0, 130, 130, 0, 125, 130, 125, 0, 125, 125, 125, 125, 125, 125, 175, 0, 0, 0, 175, 0, 25, 0, 0, 0, 0, 0, 125, 125, 0, 125, 125, 0, 125, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 178, 178, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, 0, 178, 178, 0, 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 132, 0, 132, 132, 132, 132, 132, 132, 0, 0, 0, 0, 34, 0, 125, 0, 0, 0, 0, 0, 132, 132, 25, 132, 132, 0, 132, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 0, 0, 131, 131, 131, 131, 178, 0, 131, 132, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 0, 131, 131, 0, 0, 0, 131, 0, 0, 131, 0, 131, 0, 0, 0, 131, 131, 131, 131, 131, 132, 0, 131, 131, 0, 0, 131, 131, 131, 131, 131, 131, 0, 0, 0, 131, 131, 131, 131, 0, 131, 0, 0, 131, 131, 0, 126, 131, 126, 0, 126, 126, 126, 126, 126, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 126, 0, 126, 126, 0, 126, 0, 0, 0, 0, 0, 125, 125, 125, 125, 0, 0, 125, 0, 0, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 0, 126, 125, 125, 0, 0, 0, 125, 0, 0, 125, 0, 125, 0, 0, 0, 125, 125, 125, 125, 125, 0, 0, 125, 125, 0, 175, 125, 125, 125, 125, 125, 125, 35, 0, 126, 125, 125, 125, 125, 0, 125, 0, 0, 125, 125, 0, 0, 125, 175, 0, 0, 0, 132, 132, 132, 132, 0, 0, 132, 0, 0, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 0, 0, 132, 132, 0, 178, 0, 132, 178, 0, 132, 178, 132, 0, 0, 0, 132, 132, 132, 132, 132, 0, 0, 132, 132, 0, 0, 132, 132, 132, 132, 132, 132, 0, 0, 0, 132, 132, 132, 132, 0, 132, 0, 0, 132, 132, 0, 118, 132, 118, 0, 118, 118, 118, 118, 118, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 118, 118, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 126, 126, 126, 0, 0, 126, 118, 0, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 0, 0, 126, 126, 0, 0, 0, 126, 0, 0, 126, 0, 126, 0, 0, 0, 126, 126, 126, 126, 126, 118, 0, 126, 126, 0, 0, 126, 126, 126, 126, 126, 126, 0, 0, 0, 126, 126, 126, 126, 0, 126, 0, 0, 126, 126, 0, 117, 126, 117, 0, 117, 117, 117, 117, 117, 117, 87, 0, 0, 0, 87, 0, 87, 0, 0, 0, 0, 0, 0, 117, 0, 117, 117, 0, 117, 0, 0, 87, 0, 154, 0, 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 0, 168, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 0, 160, 0, 160, 223, 0, 0, 160, 0, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 0, 160, 0, 0, 0, 173, 160, 0, 0, 0, 0, 0, 0, 0, 118, 118, 118, 118, 0, 0, 118, 0, 0, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 0, 0, 118, 118, 0, 0, 0, 118, 268, 0, 118, 0, 118, 0, 0, 0, 118, 118, 118, 118, 118, 275, 0, 118, 118, 0, 0, 118, 118, 118, 118, 118, 118, 160, 174, 0, 118, 118, 118, 118, 0, 118, 0, 0, 118, 118, 0, 132, 118, 132, 0, 74, 0, 132, 0, 132, 0, 313, 314, 315, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 117, 117, 117, 0, 0, 117, 0, 0, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 0, 0, 117, 117, 0, 0, 0, 117, 0, 0, 117, 0, 117, 0, 0, 0, 117, 117, 117, 117, 117, 132, 50, 117, 117, 0, 87, 117, 117, 117, 117, 117, 117, 0, 0, 0, 117, 117, 117, 117, 0, 117, 0, 0, 117, 117, 0, 0, 117, 87, 49, 160, 160, 160, 160, 0, 0, 160, 0, 0, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 0, 0, 160, 160, 0, 0, 47, 160, 48, 0, 160, 0, 160, 0, 0, 0, 160, 160, 160, 160, 160, 50, 0, 160, 160, 0, 0, 160, 160, 160, 160, 160, 160, 0, 0, 0, 160, 160, 160, 160, 144, 160, 0, 0, 160, 0, 0, 0, 0, 49, 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, 47, 0, 0, 0, 0, 0, 0, 132, 132, 132, 132, 0, 50, 132, 0, 0, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 0, 0, 132, 132, 0, 0, 0, 132, 0, 0, 132, 0, 132, 49, 0, 0, 132, 132, 132, 132, 132, 0, 0, 132, 132, 0, 0, 132, 132, 132, 132, 132, 132, 0, 0, 0, 132, 132, 132, 132, 47, 132, 48, 0, 132, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 0, 0, 13, 0, 49, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 25, 26, 0, 0, 0, 27, 0, 0, 28, 0, 29, 0, 0, 0, 30, 31, 0, 32, 33, 0, 0, 34, 35, 0, 50, 36, 37, 38, 39, 40, 41, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 46, 0, 0, 0, 145, 0, 9, 10, 11, 12, 49, 0, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 25, 26, 0, 0, 0, 27, 0, 0, 28, 0, 29, 146, 147, 148, 30, 31, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 46, 7, 8, 9, 10, 11, 12, 0, 0, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 25, 26, 0, 0, 0, 27, 0, 0, 28, 0, 29, 0, 0, 0, 30, 31, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 46, 9, 10, 11, 12, 0, 0, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 25, 26, 0, 0, 0, 27, 0, 0, 28, 0, 29, 0, 0, 0, 90, 31, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 91, 0, 9, 10, 11, 12, 0, 0, 13, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 0, 25, 26, 0, 0, 0, 27, 0, 0, 28, 0, 29, 0, 0, 0, 30, 31, 0, 32, 33, 0, 0, 34, 35, 0, 0, 36, 37, 38, 39, 40, 41, 0, 0, 0, 42, 43, 44, 45, 0, 0, 0, 0, 46, }; static const short yycheck[] = { 43, 0, 45, 5, 41, 63, 37, 44, 0, 38, 5, 42, 43, 42, 45, 44, 47, 290, 135, 58, 44, 58, 59, 169, 38, 44, 63, 304, 42, 123, 59, 319, 121, 122, 43, 59, 45, 36, 311, 38, 59, 288, 123, 42, 207, 44, 38, 123, 44, 58, 42, 41, 44, 43, 44, 45, 93, 94, 51, 52, 59, 40, 41, 59, 93, 64, 319, 59, 58, 322, 44, 61, 59, 41, 321, 43, 44, 45, 41, 60, 43, 44, 45, 62, 123, 59, 126, 124, 125, 123, 58, 60, 91, 61, 93, 58, 125, 126, 61, 41, 123, 91, 44, 160, 33, 107, 125, 36, 37, 38, 123, 40, 107, 42, 43, 125, 45, 112, 47, 125, 37, 38, 211, 322, 270, 42, 43, 126, 45, 125, 47, 60, 61, 62, 126, 64, 37, 38, 345, 134, 125, 42, 43, 60, 45, 62, 47, 37, 38, 125, 38, 64, 42, 43, 42, 45, 363, 47, 37, 60, 277, 62, 91, 42, 43, 94, 45, 261, 47, 226, 60, 123, 62, 40, 38, 256, 38, 94, 42, 37, 42, 60, 44, 62, 42, 43, 349, 45, 101, 47, 247, 41, 123, 94, 44, 124, 359, 126, 128, 129, 130, 62, 60, 91, 62, 319, 91, 124, 123, 58, 43, 44, 45, 38, 59, 40, 41, 42, 43, 44, 45, 58, 256, 312, 219, 58, 59, 58, 61, 142, 287, 125, 44, 58, 123, 62, 61, 62, 319, 37, 93, 322, 125, 37, 42, 43, 41, 45, 42, 47, 125, 125, 125, 47, 320, 93, 125, 256, 257, 258, 259, 260, 261, 125, 126, 264, 91, 296, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 337, 323, 280, 281, 38, 125, 319, 285, 42, 322, 288, 319, 290, 125, 290, 40, 294, 295, 296, 297, 298, 337, 338, 301, 302, 296, 319, 305, 306, 307, 308, 309, 310, 343, 344, 323, 314, 315, 316, 317, 125, 319, 93, 14, 322, 41, 326, 338, 319, 20, 258, 259, 260, 261, 323, 44, 264, 326, 29, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 125, 61, 280, 281, 274, 125, 323, 285, 41, 326, 288, 323, 290, 44, 42, 58, 294, 295, 256, 297, 298, 125, 58, 301, 302, 323, 44, 305, 306, 307, 308, 309, 310, 323, 75, 61, 314, 315, 316, 317, 323, 59, 125, 61, 322, 41, 41, 58, 289, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 370, 352, 365, 339, 340, 341, 342, 343, 344, 120, 65, 319, 319, 296, 322, 296, 217, 57, 57, 339, 340, 341, 342, 343, 344, 123, 115, 312, -1, -1, 339, 340, 341, 342, 343, 344, 319, 125, 319, -1, -1, 339, 340, 341, 342, 343, 344, -1, 38, -1, -1, 41, -1, 43, 44, 45, 38, -1, -1, 41, -1, 43, 44, 45, 341, 342, 343, 344, 58, 59, 60, 323, 62, 63, 326, 319, 58, 59, 60, 323, 62, 63, 326, -1, -1, 38, -1, -1, 41, -1, -1, 44, -1, 38, -1, -1, 41, -1, -1, 44, -1, -1, -1, 93, 94, 58, 59, 60, -1, 62, 63, 93, 94, 58, 59, 60, -1, 62, 63, -1, -1, -1, 296, 243, 244, 245, 246, -1, 248, 249, 38, -1, -1, 41, 124, 125, 44, 261, -1, -1, 93, 94, 124, 125, -1, 319, -1, -1, 93, 94, 58, 59, 60, 38, 62, 63, 41, -1, 256, 44, -1, -1, 273, -1, -1, -1, -1, 291, 292, 293, -1, 124, 125, 58, 59, 60, -1, 62, 63, 124, 125, 38, -1, -1, 41, 93, 94, 44, -1, -1, 38, -1, -1, 41, -1, -1, 44, -1, 322, -1, -1, 58, 59, 60, -1, 62, 63, -1, 93, 94, 58, 59, 60, -1, 62, 63, 124, 125, -1, -1, -1, 319, -1, 38, 322, -1, 41, -1, -1, 44, -1, -1, 38, -1, -1, 41, 93, 94, 44, 124, 125, 76, -1, 58, 59, 93, 94, 41, 63, -1, 44, 86, 58, 59, -1, -1, -1, 63, -1, -1, 95, -1, 97, 98, 58, 59, -1, 124, 125, 63, -1, -1, -1, -1, -1, -1, 124, 125, 93, 94, 38, -1, -1, 41, -1, -1, 44, 93, 94, 41, -1, -1, 44, -1, 41, -1, -1, 44, -1, 93, 58, 59, -1, -1, -1, 63, 58, 59, -1, 124, 125, 63, 59, -1, 61, -1, -1, -1, 124, 125, 41, -1, 41, 44, -1, 44, -1, -1, -1, -1, 124, 125, 167, -1, -1, 93, 94, 58, 59, 58, 59, 93, 63, -1, 63, -1, -1, 337, 338, 339, 340, 341, 342, 343, 344, 337, 338, 339, 340, 341, 342, 343, 344, -1, -1, -1, 124, 125, -1, -1, 33, -1, 93, 125, 93, 38, -1, 40, 125, 42, 43, -1, 45, -1, 337, 338, 339, 340, 341, 342, 343, 344, 337, 338, 339, 340, 341, 342, 343, 344, -1, -1, 33, -1, 125, -1, 125, 38, -1, 40, -1, 42, 43, -1, 45, -1, -1, -1, 41, -1, 41, 44, 38, 44, -1, -1, 42, -1, 44, 337, 338, 339, 340, 341, 342, 58, 59, 58, 59, -1, 63, -1, 63, 59, 38, -1, 40, 41, 42, 43, 44, 45, 337, 338, 339, 340, 341, 342, 41, -1, -1, 44, 93, 126, 58, -1, -1, 61, 62, -1, 93, -1, 93, -1, -1, -1, 59, -1, 61, -1, 337, 338, 339, 340, 341, 342, -1, -1, -1, 337, 338, 339, 340, 341, 342, 126, -1, 91, -1, -1, -1, -1, 125, -1, 125, -1, -1, -1, -1, 125, 126, 43, 44, 45, 38, -1, -1, -1, 42, -1, 44, -1, 337, 338, 339, 340, 58, 59, -1, 61, 89, 337, 338, 339, 340, 59, -1, -1, -1, -1, -1, -1, 125, 337, 338, 36, -1, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, 41, -1, -1, 44, -1, 121, 122, 89, -1, -1, 58, 59, 93, 61, 62, -1, 64, -1, 59, 135, 61, -1, 337, 338, -1, -1, -1, -1, 337, 338, 40, 41, -1, 43, 44, 45, 125, -1, -1, 121, 122, -1, -1, 91, -1, 126, -1, -1, 58, 59, -1, 61, 62, 135, -1, -1, -1, -1, -1, 337, 338, 337, 338, 36, 284, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, 123, -1, 125, -1, 299, 300, -1, -1, -1, 125, 58, 59, -1, 61, 62, -1, 64, -1, 313, -1, 211, 284, -1, -1, 319, -1, -1, -1, 323, 324, 325, 326, -1, -1, -1, -1, 299, 300, -1, -1, 125, -1, -1, 91, -1, -1, -1, 38, 296, -1, 313, 42, -1, 44, 211, -1, 319, -1, -1, -1, 323, 324, 325, 326, -1, -1, -1, -1, 59, -1, -1, 319, -1, -1, -1, 123, -1, 125, -1, -1, -1, -1, 337, 338, 337, -1, 277, -1, -1, -1, -1, -1, -1, 319, -1, -1, -1, 323, -1, -1, 326, 36, -1, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, 277, 312, -1, 58, 59, -1, 61, 62, -1, 64, -1, -1, -1, -1, 125, 258, 259, 260, 261, -1, 296, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 312, 91, 280, 281, 323, -1, -1, 285, 319, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 123, -1, 125, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, -1, 326, -1, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, 320, -1, 285, 323, -1, 288, 326, 290, -1, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, -1, 326, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, 296, -1, -1, -1, -1, -1, 58, 59, -1, 61, 62, -1, 64, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, 319, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, 91, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 123, -1, 125, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, 36, 326, 38, -1, 40, 41, 42, 43, 44, 45, 38, -1, -1, -1, 42, -1, 44, -1, -1, -1, -1, -1, 58, 59, -1, 61, 62, -1, 64, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, 40, -1, -1, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, 58, 59, -1, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, 123, -1, 125, -1, -1, -1, -1, -1, 58, 59, 125, 61, 62, -1, 64, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, -1, -1, 258, 259, 260, 261, 125, -1, 264, 91, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, 125, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, 36, 326, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, 62, -1, 64, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, 91, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, 296, 305, 306, 307, 308, 309, 310, 123, -1, 125, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, -1, 326, 319, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, 320, -1, 285, 323, -1, 288, 326, 290, -1, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, 36, 326, 38, -1, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, 59, -1, 61, 62, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, 91, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, 125, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, 36, 326, 38, -1, 40, 41, 42, 43, 44, 45, 38, -1, -1, -1, 42, -1, 44, -1, -1, -1, -1, -1, -1, 59, -1, 61, 62, -1, 64, -1, -1, 59, -1, 114, -1, -1, 117, -1, -1, -1, -1, -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, 133, -1, -1, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, 36, -1, 38, 155, -1, -1, 42, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, 59, -1, -1, -1, 126, 64, -1, -1, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, 216, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, 229, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, 125, 126, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, 36, 326, 38, -1, 40, -1, 42, -1, 44, -1, 265, 266, 267, -1, 269, -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, 125, 36, 301, 302, -1, 296, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, 319, -1, -1, 322, 323, -1, -1, 326, 319, 64, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, 91, 285, 93, -1, 288, -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, 36, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, 125, 319, -1, -1, 322, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, -1, 258, 259, 260, 261, -1, 36, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, 64, -1, -1, 294, 295, 296, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, 91, 319, 93, -1, 322, -1, -1, -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 256, 257, 258, 259, 260, 261, -1, -1, 264, -1, 64, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, -1, 297, 298, -1, -1, 301, 302, -1, 36, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, -1, -1, -1, 322, -1, -1, -1, 256, -1, 258, 259, 260, 261, 64, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, 291, 292, 293, 294, 295, -1, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, -1, -1, -1, 322, 256, 257, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, -1, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, -1, -1, -1, 322, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, -1, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, -1, -1, -1, 322, -1, 258, 259, 260, 261, -1, -1, 264, -1, -1, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, -1, -1, 280, 281, -1, -1, -1, 285, -1, -1, 288, -1, 290, -1, -1, -1, 294, 295, -1, 297, 298, -1, -1, 301, 302, -1, -1, 305, 306, 307, 308, 309, 310, -1, -1, -1, 314, 315, 316, 317, -1, -1, -1, -1, 322, }; #define YYFINAL 1 #ifndef YYDEBUG #define YYDEBUG 0 #endif #define YYMAXTOKEN 347 #define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { "end-of-file",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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"PRAGMA", "AUTO","DOUBLE","INT","STRUCT","BREAK","ELSE","LONG","SWITCH","CASE","ENUM", "REGISTER","TYPEDEF","CHAR","EXTERN","RETURN","UNION","CONST","FLOAT","SHORT", "UNSIGNED","CONTINUE","FOR","SIGNED","VOID","DEFAULT","GOTO","SIZEOF", "VOLATILE","DO","IF","STATIC","WHILE","CLASS","PRIVATE","PROTECTED","PUBLIC", "VIRTUAL","INLINE","OPERATOR","LLONG","BOOL","CFALSE","CTRUE","WCHAR","TIME", "USING","NAMESPACE","ULLONG","MUSTUNDERSTAND","SIZE","FRIEND","TEMPLATE", "EXPLICIT","TYPENAME","RESTRICT","null","UCHAR","USHORT","UINT","ULONG","NONE", "ID","TAG","LAB","TYPE","LNG","DBL","CHR","STR","PA","NA","TA","DA","MA","AA", "XA","OA","LA","RA","OR","AN","EQ","NE","LE","GE","LS","RS","AR","PP","NN", "illegal-symbol", }; static const char *yyrule[] = { "$accept : prog", "prog : s1 exts", "s1 :", "exts : NAMESPACE ID '{' exts1 '}'", "exts : exts1", "exts1 :", "exts1 : exts1 ext", "ext : dclrs ';'", "ext : pragma", "ext : error ';'", "ext : t1", "ext : t2", "pragma : PRAGMA", "decls :", "decls : dclrs ';' decls", "decls : PRIVATE ':' t3 decls", "decls : PROTECTED ':' t4 decls", "decls : PUBLIC ':' t5 decls", "decls : t1 decls t2 decls", "decls : error ';'", "t1 : '['", "t2 : ']'", "t3 :", "t4 :", "t5 :", "dclrs : spec", "dclrs : spec dclr", "dclrs : spec fdclr func", "dclrs : constr func", "dclrs : destr func", "dclrs : dclrs ',' dclr", "dclrs : dclrs ',' fdclr func", "dclr : ptrs ID arrayck tag occurs init", "fdclr : ptrs name", "id : ID", "id : TYPE", "name : ID", "name : OPERATOR '!'", "name : OPERATOR '~'", "name : OPERATOR '='", "name : OPERATOR PA", "name : OPERATOR NA", "name : OPERATOR TA", "name : OPERATOR DA", "name : OPERATOR MA", "name : OPERATOR AA", "name : OPERATOR XA", "name : OPERATOR OA", "name : OPERATOR LA", "name : OPERATOR RA", "name : OPERATOR OR", "name : OPERATOR AN", "name : OPERATOR '|'", "name : OPERATOR '^'", "name : OPERATOR '&'", "name : OPERATOR EQ", "name : OPERATOR NE", "name : OPERATOR '<'", "name : OPERATOR LE", "name : OPERATOR '>'", "name : OPERATOR GE", "name : OPERATOR LS", "name : OPERATOR RS", "name : OPERATOR '+'", "name : OPERATOR '-'", "name : OPERATOR '*'", "name : OPERATOR '/'", "name : OPERATOR '%'", "name : OPERATOR PP", "name : OPERATOR NN", "name : OPERATOR AR", "name : OPERATOR '[' ']'", "name : OPERATOR '(' ')'", "name : OPERATOR texp", "constr : TYPE", "destr : virtual '~' TYPE", "func : fname '(' s6 fargso ')' constobj abstract", "fname :", "fargso :", "fargso : fargs", "fargs : farg", "fargs : farg ',' fargs", "farg : tspec ptrs arg arrayck occurs init", "arg :", "arg : ID", "texp : tspec ptrs array", "texp : tspec ptrs ID array", "spec :", "spec : store spec", "spec : type spec", "tspec : store", "tspec : type", "tspec : store tspec", "tspec : type tspec", "type : VOID", "type : BOOL", "type : CHAR", "type : WCHAR", "type : SHORT", "type : INT", "type : LONG", "type : LLONG", "type : ULLONG", "type : SIZE", "type : FLOAT", "type : DOUBLE", "type : SIGNED", "type : UNSIGNED", "type : UCHAR", "type : USHORT", "type : UINT", "type : ULONG", "type : TIME", "type : TEMPLATE '<' tname id '>' CLASS id", "type : CLASS '{' s2 decls '}'", "type : class '{' s2 decls '}'", "type : class ':' base '{' s2 decls '}'", "type : class", "type : class ':' base", "type : STRUCT '{' s2 decls '}'", "type : struct '{' s2 decls '}'", "type : STRUCT ID", "type : STRUCT TYPE", "type : UNION '{' s3 decls '}'", "type : UNION id '{' s3 decls '}'", "type : UNION ID", "type : UNION TYPE", "type : ENUM '{' s2 dclrs s5 '}'", "type : enum '{' s2 dclrs s5 '}'", "type : ENUM '*' id '{' s4 dclrs s5 '}'", "type : ENUM ID", "type : ENUM TYPE", "type : TYPE", "type : TYPE '<' texp '>'", "type : CLASS error '}'", "type : STRUCT error '}'", "type : UNION error '}'", "type : ENUM error '}'", "struct : STRUCT id", "class : CLASS id", "enum : ENUM id", "tname : CLASS", "tname : TYPENAME", "base : PROTECTED base", "base : PRIVATE base", "base : PUBLIC base", "base : TYPE", "base : STRUCT ID", "s2 :", "s3 :", "s4 :", "s5 :", "s5 : ','", "s6 :", "store : AUTO", "store : REGISTER", "store : STATIC", "store : EXPLICIT", "store : EXTERN", "store : TYPEDEF", "store : VIRTUAL", "store : CONST", "store : FRIEND", "store : INLINE", "store : MUSTUNDERSTAND", "store : RETURN", "store : '@'", "store : '$'", "store : VOLATILE", "constobj :", "constobj : CONST", "abstract :", "abstract : '=' LNG", "virtual :", "virtual : VIRTUAL", "ptrs :", "ptrs : ptrs '*'", "ptrs : ptrs '&'", "array :", "array : '[' cexp ']' array", "array : '[' ']' array", "arrayck : array", "init :", "init : '=' cexp", "tag :", "tag : TAG", "occurs : patt", "occurs : patt cint", "occurs : patt cint ':'", "occurs : patt cint ':' cint", "occurs : patt ':' cint", "patt :", "patt : STR", "cint : LNG", "cint : '+' LNG", "cint : '-' LNG", "expr : expr ',' expr", "expr : cexp", "cexp : obex '?' qexp ':' cexp", "cexp : oexp", "qexp : expr", "oexp : obex OR aexp", "oexp : aexp", "obex : oexp", "aexp : abex AN rexp", "aexp : rexp", "abex : aexp", "rexp : rexp '|' rexp", "rexp : rexp '^' rexp", "rexp : rexp '&' rexp", "rexp : rexp EQ rexp", "rexp : rexp NE rexp", "rexp : rexp '<' rexp", "rexp : rexp LE rexp", "rexp : rexp '>' rexp", "rexp : rexp GE rexp", "rexp : rexp LS rexp", "rexp : rexp RS rexp", "rexp : rexp '+' rexp", "rexp : rexp '-' rexp", "rexp : rexp '*' rexp", "rexp : rexp '/' rexp", "rexp : rexp '%' rexp", "rexp : lexp", "lexp : '!' lexp", "lexp : '~' lexp", "lexp : '-' lexp", "lexp : '+' lexp", "lexp : '*' lexp", "lexp : '&' lexp", "lexp : SIZEOF '(' texp ')'", "lexp : pexp", "pexp : '(' expr ')'", "pexp : ID", "pexp : LNG", "pexp : null", "pexp : DBL", "pexp : CHR", "pexp : STR", "pexp : CFALSE", "pexp : CTRUE", }; #endif int yydebug; int yynerrs; int yyerrflag; int yychar; YYSTYPE yyval; YYSTYPE yylval; /* define the initial stack-sizes */ #ifdef YYSTACKSIZE #undef YYMAXDEPTH #define YYMAXDEPTH YYSTACKSIZE #else #ifdef YYMAXDEPTH #define YYSTACKSIZE YYMAXDEPTH #else #define YYSTACKSIZE 10000 #define YYMAXDEPTH 10000 #endif #endif #define YYINITSTACKSIZE 200 typedef struct { unsigned stacksize; short *s_base; short *s_mark; short *s_last; YYSTYPE *l_base; YYSTYPE *l_mark; } YYSTACKDATA; /* variables for the parser stack */ static YYSTACKDATA yystack; #line 1546 "soapcpp2_yacc.y" /* * ??? */ int yywrap() { return 1; } /******************************************************************************\ Support routines \******************************************************************************/ static Node op(const char *op, Node p, Node q) { Node r; Tnode *typ; r.typ = p.typ; r.sto = Snone; if (p.hasval && q.hasval) { if (integer(p.typ) && integer(q.typ)) switch (op[0]) { case '|': r.val.i = p.val.i | q.val.i; break; case '^': r.val.i = p.val.i ^ q.val.i; break; case '&': r.val.i = p.val.i & q.val.i; break; case '<': r.val.i = p.val.i << q.val.i; break; case '>': r.val.i = p.val.i >> q.val.i; break; case '+': r.val.i = p.val.i + q.val.i; break; case '-': r.val.i = p.val.i - q.val.i; break; case '*': r.val.i = p.val.i * q.val.i; break; case '/': r.val.i = p.val.i / q.val.i; break; case '%': r.val.i = p.val.i % q.val.i; break; default: typerror(op); } else if (real(p.typ) && real(q.typ)) switch (op[0]) { case '+': r.val.r = p.val.r + q.val.r; break; case '-': r.val.r = p.val.r - q.val.r; break; case '*': r.val.r = p.val.r * q.val.r; break; case '/': r.val.r = p.val.r / q.val.r; break; default: typerror(op); } else semerror("illegal constant operation"); r.hasval = True; } else { typ = mgtype(p.typ, q.typ); r.hasval = False; } return r; } static Node iop(const char *iop, Node p, Node q) { if (integer(p.typ) && integer(q.typ)) return op(iop, p, q); typerror("integer operands only"); return p; } static Node relop(const char *op, Node p, Node q) { Node r; Tnode *typ; r.typ = mkint(); r.sto = Snone; r.hasval = False; if (p.typ->type != Tpointer || p.typ != q.typ) typ = mgtype(p.typ, q.typ); return r; } /******************************************************************************\ Scope management \******************************************************************************/ /* mkscope - initialize scope stack with a new table and offset */ static void mkscope(Table *table, int offset) { sp = stack-1; enterscope(table, offset); } /* enterscope - enter a new scope by pushing a new table and offset on the stack */ static void enterscope(Table *table, int offset) { if (++sp == stack+MAXNEST) execerror("maximum scope depth exceeded"); sp->table = table; sp->val = 0; sp->offset = offset; sp->grow = True; /* by default, offset grows */ sp->mask = False; } /* exitscope - exit a scope by popping the table and offset from the stack */ static void exitscope() { check(sp-- != stack, "exitscope() has no matching enterscope()"); } /******************************************************************************\ Undefined symbol \******************************************************************************/ static Entry* undefined(Symbol *sym) { Entry *p; sprintf(errbuf, "undefined identifier '%s'", sym->name); semwarn(errbuf); p = enter(sp->table, sym); p->level = GLOBAL; p->info.typ = mkint(); p->info.sto = Sextern; p->info.hasval = False; return p; } /* mgtype - return most general type among two numerical types */ Tnode* mgtype(Tnode *typ1, Tnode *typ2) { if (numeric(typ1) && numeric(typ2)) { if (typ1->type < typ2->type) return typ2; } else typerror("non-numeric type"); return typ1; } /******************************************************************************\ Type checks \******************************************************************************/ static int integer(Tnode *typ) { switch (typ->type) { case Tchar: case Tshort: case Tint: case Tlong: return True; default: break; } return False; } static int real(Tnode *typ) { switch (typ->type) { case Tfloat: case Tdouble: case Tldouble: return True; default: break; } return False; } static int numeric(Tnode *typ) { return integer(typ) || real(typ); } static void add_fault(Table *gt) { Table *t; Entry *p1, *p2, *p3, *p4; Symbol *s1, *s2, *s3, *s4; imported = NULL; s1 = lookup("SOAP_ENV__Code"); p1 = entry(classtable, s1); if (!p1 || !p1->info.typ->ref) { t = mktable((Table*)0); if (!p1) { p1 = enter(classtable, s1); p1->info.typ = mkstruct(t, 3*4); p1->info.typ->id = s1; } else p1->info.typ->ref = t; p2 = enter(t, lookup("SOAP_ENV__Value")); p2->info.typ = qname; p2->info.minOccurs = 0; p2 = enter(t, lookup("SOAP_ENV__Subcode")); p2->info.typ = mkpointer(p1->info.typ); p2->info.minOccurs = 0; } s2 = lookup("SOAP_ENV__Detail"); p2 = entry(classtable, s2); if (!p2 || !p2->info.typ->ref) { t = mktable((Table*)0); if (!p2) { p2 = enter(classtable, s2); p2->info.typ = mkstruct(t, 3*4); p2->info.typ->id = s2; } else p2->info.typ->ref = t; p3 = enter(t, lookup("__any")); p3->info.typ = xml; p3->info.minOccurs = 0; p3 = enter(t, lookup("__type")); p3->info.typ = mkint(); p3->info.minOccurs = 0; p3 = enter(t, lookup("fault")); p3->info.typ = mkpointer(mkvoid()); p3->info.minOccurs = 0; custom_fault = 0; } s4 = lookup("SOAP_ENV__Reason"); p4 = entry(classtable, s4); if (!p4 || !p4->info.typ->ref) { t = mktable((Table*)0); if (!p4) { p4 = enter(classtable, s4); p4->info.typ = mkstruct(t, 4); p4->info.typ->id = s4; } else p4->info.typ->ref = t; p3 = enter(t, lookup("SOAP_ENV__Text")); p3->info.typ = mkstring(); p3->info.minOccurs = 0; } s3 = lookup("SOAP_ENV__Fault"); p3 = entry(classtable, s3); if (!p3 || !p3->info.typ->ref) { t = mktable(NULL); if (!p3) { p3 = enter(classtable, s3); p3->info.typ = mkstruct(t, 9*4); p3->info.typ->id = s3; } else p3->info.typ->ref = t; p3 = enter(t, lookup("faultcode")); p3->info.typ = qname; p3->info.minOccurs = 0; p3 = enter(t, lookup("faultstring")); p3->info.typ = mkstring(); p3->info.minOccurs = 0; p3 = enter(t, lookup("faultactor")); p3->info.typ = mkstring(); p3->info.minOccurs = 0; p3 = enter(t, lookup("detail")); p3->info.typ = mkpointer(p2->info.typ); p3->info.minOccurs = 0; p3 = enter(t, s1); p3->info.typ = mkpointer(p1->info.typ); p3->info.minOccurs = 0; p3 = enter(t, s4); p3->info.typ = mkpointer(p4->info.typ); p3->info.minOccurs = 0; p3 = enter(t, lookup("SOAP_ENV__Node")); p3->info.typ = mkstring(); p3->info.minOccurs = 0; p3 = enter(t, lookup("SOAP_ENV__Role")); p3->info.typ = mkstring(); p3->info.minOccurs = 0; p3 = enter(t, lookup("SOAP_ENV__Detail")); p3->info.typ = mkpointer(p2->info.typ); p3->info.minOccurs = 0; } } static void add_soap() { Symbol *s = lookup("soap"); p = enter(classtable, s); p->info.typ = mkstruct(NULL, 0); p->info.typ->transient = -2; p->info.typ->id = s; } static void add_XML() { Symbol *s = lookup("_XML"); p = enter(typetable, s); xml = p->info.typ = mksymtype(mkstring(), s); p->info.sto = Stypedef; } static void add_qname() { Symbol *s = lookup("_QName"); p = enter(typetable, s); qname = p->info.typ = mksymtype(mkstring(), s); p->info.sto = Stypedef; } static void add_header(Table *gt) { Table *t; Entry *p; Symbol *s = lookup("SOAP_ENV__Header"); imported = NULL; p = entry(classtable, s); if (!p || !p->info.typ->ref) { t = mktable((Table*)0); if (!p) p = enter(classtable, s); p->info.typ = mkstruct(t, 0); p->info.typ->id = s; custom_header = 0; } } static void add_response(Entry *fun, Entry *ret) { Table *t; Entry *p, *q; Symbol *s; size_t n = strlen(fun->sym->name); char *r = (char*)emalloc(n+9); strcpy(r, fun->sym->name); strcat(r, "Response"); if (!(s = lookup(r))) s = install(r, ID); free(r); t = mktable((Table*)0); q = enter(t, ret->sym); q->info = ret->info; if (q->info.typ->type == Treference) q->info.typ = (Tnode*)q->info.typ->ref; p = enter(classtable, s); p->info.typ = mkstruct(t, 4); p->info.typ->id = s; fun->info.typ->response = p; } static void add_result(Tnode *typ) { Entry *p; if (!typ->ref || !((Tnode*)typ->ref)->ref) { semwarn("response struct/class must be declared before used in function prototype"); return; } for (p = ((Table*)((Tnode*)typ->ref)->ref)->list; p; p = p->next) if (p->info.sto & Sreturn) return; for (p = ((Table*)((Tnode*)typ->ref)->ref)->list; p; p = p->next) { if (p->info.typ->type != Tfun && !(p->info.sto & Sattribute) && !is_transient(p->info.typ) && !(p->info.sto & (Sprivate|Sprotected))) p->info.sto = (Storage)((int)p->info.sto | (int)Sreturn); return; } } #line 1636 "soapcpp2_yacc.c" #if YYDEBUG #include /* needed for printf */ #endif #include /* needed for malloc, etc */ #include /* needed for memset */ /* allocate initial stack or double stack size, up to YYMAXDEPTH */ static int yygrowstack(YYSTACKDATA *data) { int i; unsigned newsize; short *newss; YYSTYPE *newvs; if ((newsize = data->stacksize) == 0) newsize = YYINITSTACKSIZE; else if (newsize >= YYMAXDEPTH) return -1; else if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH; i = (int) (data->s_mark - data->s_base); newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); if (newss == 0) return -1; data->s_base = newss; data->s_mark = newss + i; newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs)); if (newvs == 0) return -1; data->l_base = newvs; data->l_mark = newvs + i; data->stacksize = newsize; data->s_last = data->s_base + newsize - 1; return 0; } #if YYPURE || defined(YY_NO_LEAKS) static void yyfreestack(YYSTACKDATA *data) { free(data->s_base); free(data->l_base); memset(data, 0, sizeof(*data)); } #else #define yyfreestack(data) /* nothing */ #endif #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int YYPARSE_DECL() { int yym, yyn, yystate; #if YYDEBUG const char *yys; if ((yys = getenv("YYDEBUG")) != 0) { yyn = *yys; if (yyn >= '0' && yyn <= '9') yydebug = yyn - '0'; } #endif yynerrs = 0; yyerrflag = 0; yychar = YYEMPTY; yystate = 0; #if YYPURE memset(&yystack, 0, sizeof(yystack)); #endif if (yystack.s_base == NULL && yygrowstack(&yystack)) goto yyoverflow; yystack.s_mark = yystack.s_base; yystack.l_mark = yystack.l_base; yystate = 0; *yystack.s_mark = 0; yyloop: if ((yyn = yydefred[yystate]) != 0) goto yyreduce; if (yychar < 0) { if ((yychar = YYLEX) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif } if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, shifting to state %d\n", YYPREFIX, yystate, yytable[yyn]); #endif if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack)) { goto yyoverflow; } yystate = yytable[yyn]; *++yystack.s_mark = yytable[yyn]; *++yystack.l_mark = yylval; yychar = YYEMPTY; if (yyerrflag > 0) --yyerrflag; goto yyloop; } if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { yyn = yytable[yyn]; goto yyreduce; } if (yyerrflag) goto yyinrecovery; yyerror("syntax error"); goto yyerrlab; yyerrlab: ++yynerrs; yyinrecovery: if (yyerrflag < 3) { yyerrflag = 3; for (;;) { if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) { #if YYDEBUG if (yydebug) printf("%sdebug: state %d, error recovery shifting\ to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]); #endif if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack)) { goto yyoverflow; } yystate = yytable[yyn]; *++yystack.s_mark = yytable[yyn]; *++yystack.l_mark = yylval; goto yyloop; } else { #if YYDEBUG if (yydebug) printf("%sdebug: error recovery discarding state %d\n", YYPREFIX, *yystack.s_mark); #endif if (yystack.s_mark <= yystack.s_base) goto yyabort; --yystack.s_mark; --yystack.l_mark; } } } else { if (yychar == 0) goto yyabort; #if YYDEBUG if (yydebug) { yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } #endif yychar = YYEMPTY; goto yyloop; } yyreduce: #if YYDEBUG if (yydebug) printf("%sdebug: state %d, reducing by rule %d (%s)\n", YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; if (yym) yyval = yystack.l_mark[1-yym]; else memset(&yyval, 0, sizeof yyval); switch (yyn) { case 1: #line 199 "soapcpp2_yacc.y" { if (lflag) { custom_header = 0; custom_fault = 0; } else { add_header(sp->table); add_fault(sp->table); } compile(sp->table); freetable(classtable); freetable(enumtable); freetable(typetable); freetable(booltable); freetable(templatetable); } break; case 2: #line 215 "soapcpp2_yacc.y" { classtable = mktable((Table*)0); enumtable = mktable((Table*)0); typetable = mktable((Table*)0); booltable = mktable((Table*)0); templatetable = mktable((Table*)0); p = enter(booltable, lookup("false")); p->info.typ = mkint(); p->info.val.i = 0; p = enter(booltable, lookup("true")); p->info.typ = mkint(); p->info.val.i = 1; mkscope(mktable(mktable((Table*)0)), 0); } break; case 3: #line 230 "soapcpp2_yacc.y" { namespaceid = yystack.l_mark[-3].sym->name; } break; case 4: #line 231 "soapcpp2_yacc.y" { } break; case 5: #line 233 "soapcpp2_yacc.y" { add_soap(); if (!lflag) { add_qname(); add_XML(); } } break; case 6: #line 239 "soapcpp2_yacc.y" { } break; case 7: #line 241 "soapcpp2_yacc.y" { } break; case 8: #line 242 "soapcpp2_yacc.y" { } break; case 9: #line 243 "soapcpp2_yacc.y" { synerror("input before ; skipped"); while (sp > stack) { freetable(sp->table); exitscope(); } yyerrok; } break; case 10: #line 250 "soapcpp2_yacc.y" { } break; case 11: #line 251 "soapcpp2_yacc.y" { } break; case 12: #line 253 "soapcpp2_yacc.y" { if (yystack.l_mark[0].s[1] >= 'a' && yystack.l_mark[0].s[1] <= 'z') { for (pp = &pragmas; *pp; pp = &(*pp)->next) ; *pp = (Pragma*)emalloc(sizeof(Pragma)); (*pp)->pragma = (char*)emalloc(strlen(yystack.l_mark[0].s)+1); strcpy((*pp)->pragma, yystack.l_mark[0].s); (*pp)->next = NULL; } else if ((i = atoi(yystack.l_mark[0].s+2)) > 0) yylineno = i; else { sprintf(errbuf, "directive '%s' ignored (use #import to import files and/or use option -i)", yystack.l_mark[0].s); semwarn(errbuf); } } break; case 13: #line 276 "soapcpp2_yacc.y" { transient &= ~6; permission = 0; } break; case 14: #line 280 "soapcpp2_yacc.y" { } break; case 15: #line 282 "soapcpp2_yacc.y" { } break; case 16: #line 284 "soapcpp2_yacc.y" { } break; case 17: #line 286 "soapcpp2_yacc.y" { } break; case 18: #line 288 "soapcpp2_yacc.y" { } break; case 19: #line 289 "soapcpp2_yacc.y" { synerror("declaration expected"); yyerrok; } break; case 20: #line 291 "soapcpp2_yacc.y" { transient |= 1; } break; case 21: #line 294 "soapcpp2_yacc.y" { transient &= ~1; } break; case 22: #line 297 "soapcpp2_yacc.y" { permission = Sprivate; } break; case 23: #line 300 "soapcpp2_yacc.y" { permission = Sprotected; } break; case 24: #line 303 "soapcpp2_yacc.y" { permission = 0; } break; case 25: #line 306 "soapcpp2_yacc.y" { } break; case 26: #line 307 "soapcpp2_yacc.y" { } break; case 27: #line 309 "soapcpp2_yacc.y" { } break; case 28: #line 310 "soapcpp2_yacc.y" { } break; case 29: #line 311 "soapcpp2_yacc.y" { } break; case 30: #line 312 "soapcpp2_yacc.y" { } break; case 31: #line 314 "soapcpp2_yacc.y" { } break; case 32: #line 317 "soapcpp2_yacc.y" { if ((yystack.l_mark[-3].rec.sto & Stypedef) && sp->table->level == GLOBAL) { if ((yystack.l_mark[-3].rec.typ->type != Tstruct && yystack.l_mark[-3].rec.typ->type != Tunion && yystack.l_mark[-3].rec.typ->type != Tenum) || strcmp(yystack.l_mark[-4].sym->name, yystack.l_mark[-3].rec.typ->id->name)) { p = enter(typetable, yystack.l_mark[-4].sym); p->info.typ = mksymtype(yystack.l_mark[-3].rec.typ, yystack.l_mark[-4].sym); if (yystack.l_mark[-3].rec.sto & Sextern) p->info.typ->transient = -1; else p->info.typ->transient = yystack.l_mark[-3].rec.typ->transient; p->info.sto = yystack.l_mark[-3].rec.sto; p->info.typ->pattern = yystack.l_mark[-1].rec.pattern; if (yystack.l_mark[-1].rec.minOccurs != -1) { p->info.typ->minLength = yystack.l_mark[-1].rec.minOccurs; } if (yystack.l_mark[-1].rec.maxOccurs > 1) p->info.typ->maxLength = yystack.l_mark[-1].rec.maxOccurs; } yystack.l_mark[-4].sym->token = TYPE; } else { p = enter(sp->table, yystack.l_mark[-4].sym); p->tag = yystack.l_mark[-2].sym; p->info.typ = yystack.l_mark[-3].rec.typ; p->info.sto = (yystack.l_mark[-3].rec.sto | permission); if (yystack.l_mark[0].rec.hasval) { p->info.hasval = True; switch (yystack.l_mark[-3].rec.typ->type) { case Tchar: case Tuchar: case Tshort: case Tushort: case Tint: case Tuint: case Tlong: case Tulong: case Tllong: case Tullong: case Tenum: case Ttime: if (yystack.l_mark[0].rec.typ->type == Tint || yystack.l_mark[0].rec.typ->type == Tchar || yystack.l_mark[0].rec.typ->type == Tenum) sp->val = p->info.val.i = yystack.l_mark[0].rec.val.i; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; case Tfloat: case Tdouble: case Tldouble: if (yystack.l_mark[0].rec.typ->type == Tfloat || yystack.l_mark[0].rec.typ->type == Tdouble || yystack.l_mark[0].rec.typ->type == Tldouble) p->info.val.r = yystack.l_mark[0].rec.val.r; else if (yystack.l_mark[0].rec.typ->type == Tint) p->info.val.r = (double)yystack.l_mark[0].rec.val.i; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; default: if (yystack.l_mark[-3].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[-3].rec.typ->ref)->type == Tchar && yystack.l_mark[0].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[0].rec.typ->ref)->type == Tchar) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (bflag && yystack.l_mark[-3].rec.typ->type == Tarray && ((Tnode*)yystack.l_mark[-3].rec.typ->ref)->type == Tchar && yystack.l_mark[0].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[0].rec.typ->ref)->type == Tchar) { if (yystack.l_mark[-3].rec.typ->width / ((Tnode*)yystack.l_mark[-3].rec.typ->ref)->width - 1 < strlen(yystack.l_mark[0].rec.val.s)) { semerror("char[] initialization constant too long"); p->info.val.s = ""; } else p->info.val.s = yystack.l_mark[0].rec.val.s; } else if (yystack.l_mark[-3].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[-3].rec.typ->ref)->id == lookup("std::string")) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (yystack.l_mark[-3].rec.typ->id == lookup("std::string")) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (yystack.l_mark[-3].rec.typ->type == Tpointer && yystack.l_mark[0].rec.typ->type == Tint && yystack.l_mark[0].rec.val.i == 0) p->info.val.i = 0; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; } } else p->info.val.i = sp->val; if (yystack.l_mark[-1].rec.minOccurs < 0) { if ((yystack.l_mark[-3].rec.sto & Sattribute) || yystack.l_mark[-3].rec.typ->type == Tpointer || yystack.l_mark[-3].rec.typ->type == Ttemplate || !strncmp(yystack.l_mark[-4].sym->name, "__size", 6)) p->info.minOccurs = 0; else p->info.minOccurs = 1; } else p->info.minOccurs = yystack.l_mark[-1].rec.minOccurs; p->info.maxOccurs = yystack.l_mark[-1].rec.maxOccurs; if (sp->mask) sp->val <<= 1; else sp->val++; p->info.offset = sp->offset; if (yystack.l_mark[-3].rec.sto & Sextern) p->level = GLOBAL; else if (yystack.l_mark[-3].rec.sto & Stypedef) ; else if (sp->grow) sp->offset += p->info.typ->width; else if (p->info.typ->width > sp->offset) sp->offset = p->info.typ->width; } sp->entry = p; } break; case 33: #line 437 "soapcpp2_yacc.y" { if (yystack.l_mark[-1].rec.sto & Stypedef) { sprintf(errbuf, "invalid typedef qualifier for '%s'", yystack.l_mark[0].sym->name); semwarn(errbuf); } p = enter(sp->table, yystack.l_mark[0].sym); p->info.typ = yystack.l_mark[-1].rec.typ; p->info.sto = yystack.l_mark[-1].rec.sto; p->info.hasval = False; p->info.offset = sp->offset; if (sp->grow) sp->offset += p->info.typ->width; else if (p->info.typ->width > sp->offset) sp->offset = p->info.typ->width; sp->entry = p; } break; case 34: #line 453 "soapcpp2_yacc.y" { yyval.sym = yystack.l_mark[0].sym; } break; case 35: #line 454 "soapcpp2_yacc.y" { yyval.sym = yystack.l_mark[0].sym; } break; case 36: #line 456 "soapcpp2_yacc.y" { yyval.sym = yystack.l_mark[0].sym; } break; case 37: #line 457 "soapcpp2_yacc.y" { yyval.sym = lookup("operator!"); } break; case 38: #line 458 "soapcpp2_yacc.y" { yyval.sym = lookup("operator~"); } break; case 39: #line 459 "soapcpp2_yacc.y" { yyval.sym = lookup("operator="); } break; case 40: #line 460 "soapcpp2_yacc.y" { yyval.sym = lookup("operator+="); } break; case 41: #line 461 "soapcpp2_yacc.y" { yyval.sym = lookup("operator-="); } break; case 42: #line 462 "soapcpp2_yacc.y" { yyval.sym = lookup("operator*="); } break; case 43: #line 463 "soapcpp2_yacc.y" { yyval.sym = lookup("operator/="); } break; case 44: #line 464 "soapcpp2_yacc.y" { yyval.sym = lookup("operator%="); } break; case 45: #line 465 "soapcpp2_yacc.y" { yyval.sym = lookup("operator&="); } break; case 46: #line 466 "soapcpp2_yacc.y" { yyval.sym = lookup("operator^="); } break; case 47: #line 467 "soapcpp2_yacc.y" { yyval.sym = lookup("operator|="); } break; case 48: #line 468 "soapcpp2_yacc.y" { yyval.sym = lookup("operator<<="); } break; case 49: #line 469 "soapcpp2_yacc.y" { yyval.sym = lookup("operator>>="); } break; case 50: #line 470 "soapcpp2_yacc.y" { yyval.sym = lookup("operator||"); } break; case 51: #line 471 "soapcpp2_yacc.y" { yyval.sym = lookup("operator&&"); } break; case 52: #line 472 "soapcpp2_yacc.y" { yyval.sym = lookup("operator|"); } break; case 53: #line 473 "soapcpp2_yacc.y" { yyval.sym = lookup("operator^"); } break; case 54: #line 474 "soapcpp2_yacc.y" { yyval.sym = lookup("operator&"); } break; case 55: #line 475 "soapcpp2_yacc.y" { yyval.sym = lookup("operator=="); } break; case 56: #line 476 "soapcpp2_yacc.y" { yyval.sym = lookup("operator!="); } break; case 57: #line 477 "soapcpp2_yacc.y" { yyval.sym = lookup("operator<"); } break; case 58: #line 478 "soapcpp2_yacc.y" { yyval.sym = lookup("operator<="); } break; case 59: #line 479 "soapcpp2_yacc.y" { yyval.sym = lookup("operator>"); } break; case 60: #line 480 "soapcpp2_yacc.y" { yyval.sym = lookup("operator>="); } break; case 61: #line 481 "soapcpp2_yacc.y" { yyval.sym = lookup("operator<<"); } break; case 62: #line 482 "soapcpp2_yacc.y" { yyval.sym = lookup("operator>>"); } break; case 63: #line 483 "soapcpp2_yacc.y" { yyval.sym = lookup("operator+"); } break; case 64: #line 484 "soapcpp2_yacc.y" { yyval.sym = lookup("operator-"); } break; case 65: #line 485 "soapcpp2_yacc.y" { yyval.sym = lookup("operator*"); } break; case 66: #line 486 "soapcpp2_yacc.y" { yyval.sym = lookup("operator/"); } break; case 67: #line 487 "soapcpp2_yacc.y" { yyval.sym = lookup("operator%"); } break; case 68: #line 488 "soapcpp2_yacc.y" { yyval.sym = lookup("operator++"); } break; case 69: #line 489 "soapcpp2_yacc.y" { yyval.sym = lookup("operator--"); } break; case 70: #line 490 "soapcpp2_yacc.y" { yyval.sym = lookup("operator->"); } break; case 71: #line 491 "soapcpp2_yacc.y" { yyval.sym = lookup("operator[]"); } break; case 72: #line 492 "soapcpp2_yacc.y" { yyval.sym = lookup("operator()"); } break; case 73: #line 493 "soapcpp2_yacc.y" { s1 = c_storage(yystack.l_mark[0].rec.sto); s2 = c_type(yystack.l_mark[0].rec.typ); s = (char*)emalloc(strlen(s1) + strlen(s2) + 10); strcpy(s, "operator "); strcat(s, s1); strcat(s, s2); yyval.sym = lookup(s); if (!yyval.sym) yyval.sym = install(s, ID); } break; case 74: #line 504 "soapcpp2_yacc.y" { if (!(p = entry(classtable, yystack.l_mark[0].sym))) semerror("invalid constructor"); sp->entry = enter(sp->table, yystack.l_mark[0].sym); sp->entry->info.typ = mknone(); sp->entry->info.sto = Snone; sp->entry->info.offset = sp->offset; sp->node.typ = mkvoid(); sp->node.sto = Snone; } break; case 75: #line 515 "soapcpp2_yacc.y" { if (!(p = entry(classtable, yystack.l_mark[0].sym))) semerror("invalid destructor"); s = (char*)emalloc(strlen(yystack.l_mark[0].sym->name) + 2); strcpy(s, "~"); strcat(s, yystack.l_mark[0].sym->name); sym = lookup(s); if (!sym) sym = install(s, ID); sp->entry = enter(sp->table, sym); sp->entry->info.typ = mknone(); sp->entry->info.sto = yystack.l_mark[-2].sto; sp->entry->info.offset = sp->offset; sp->node.typ = mkvoid(); sp->node.sto = Snone; } break; case 76: #line 532 "soapcpp2_yacc.y" { if (yystack.l_mark[-6].e->level == GLOBAL) { if (!(yystack.l_mark[-6].e->info.sto & Sextern) && sp->entry && sp->entry->info.typ->type == Tpointer && ((Tnode*)sp->entry->info.typ->ref)->type == Tchar) { sprintf(errbuf, "last output parameter of remote method function prototype '%s' is a pointer to a char which will only return one byte: use char** instead to return a string", yystack.l_mark[-6].e->sym->name); semwarn(errbuf); } if (yystack.l_mark[-6].e->info.sto & Sextern) yystack.l_mark[-6].e->info.typ = mkmethod(yystack.l_mark[-6].e->info.typ, sp->table); else if (sp->entry && (sp->entry->info.typ->type == Tpointer || sp->entry->info.typ->type == Treference || sp->entry->info.typ->type == Tarray || is_transient(sp->entry->info.typ))) { if (yystack.l_mark[-6].e->info.typ->type == Tint) { sp->entry->info.sto = (Storage)((int)sp->entry->info.sto | (int)Sreturn); yystack.l_mark[-6].e->info.typ = mkfun(sp->entry); yystack.l_mark[-6].e->info.typ->id = yystack.l_mark[-6].e->sym; if (!is_transient(sp->entry->info.typ)) { if (!is_response(sp->entry->info.typ)) { if (!is_XML(sp->entry->info.typ)) add_response(yystack.l_mark[-6].e, sp->entry); } else add_result(sp->entry->info.typ); } } else { sprintf(errbuf, "return type of remote method function prototype '%s' must be integer", yystack.l_mark[-6].e->sym->name); semerror(errbuf); } } else { sprintf(errbuf, "last output parameter of remote method function prototype '%s' is a return parameter and must be a pointer or reference, or use %s(void) for no return parameter", yystack.l_mark[-6].e->sym->name, yystack.l_mark[-6].e->sym->name); semerror(errbuf); } if (!(yystack.l_mark[-6].e->info.sto & Sextern)) { unlinklast(sp->table); if ((p = entry(classtable, yystack.l_mark[-6].e->sym))) { if (p->info.typ->ref) { sprintf(errbuf, "remote method name clash: struct/class '%s' already declared at line %d", yystack.l_mark[-6].e->sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; } } else { p = enter(classtable, yystack.l_mark[-6].e->sym); p->info.typ = mkstruct(sp->table, sp->offset); p->info.typ->id = yystack.l_mark[-6].e->sym; } } } else if (yystack.l_mark[-6].e->level == INTERNAL) { yystack.l_mark[-6].e->info.typ = mkmethod(yystack.l_mark[-6].e->info.typ, sp->table); yystack.l_mark[-6].e->info.sto = (Storage)((int)yystack.l_mark[-6].e->info.sto | (int)yystack.l_mark[-1].sto | (int)yystack.l_mark[0].sto); transient &= ~1; } exitscope(); } break; case 77: #line 589 "soapcpp2_yacc.y" { yyval.e = sp->entry; } break; case 78: #line 591 "soapcpp2_yacc.y" { } break; case 79: #line 592 "soapcpp2_yacc.y" { } break; case 80: #line 594 "soapcpp2_yacc.y" { } break; case 81: #line 595 "soapcpp2_yacc.y" { } break; case 82: #line 598 "soapcpp2_yacc.y" { if (yystack.l_mark[-2].rec.sto & Stypedef) semwarn("typedef in function argument"); p = enter(sp->table, yystack.l_mark[-3].sym); p->info.typ = yystack.l_mark[-2].rec.typ; p->info.sto = yystack.l_mark[-2].rec.sto; if (yystack.l_mark[-1].rec.minOccurs < 0) { if ((yystack.l_mark[-2].rec.sto & Sattribute) || yystack.l_mark[-2].rec.typ->type == Tpointer) p->info.minOccurs = 0; else p->info.minOccurs = 1; } else p->info.minOccurs = yystack.l_mark[-1].rec.minOccurs; p->info.maxOccurs = yystack.l_mark[-1].rec.maxOccurs; if (yystack.l_mark[0].rec.hasval) { p->info.hasval = True; switch (yystack.l_mark[-2].rec.typ->type) { case Tchar: case Tuchar: case Tshort: case Tushort: case Tint: case Tuint: case Tlong: case Tulong: case Tenum: case Ttime: if (yystack.l_mark[0].rec.typ->type == Tint || yystack.l_mark[0].rec.typ->type == Tchar || yystack.l_mark[0].rec.typ->type == Tenum) sp->val = p->info.val.i = yystack.l_mark[0].rec.val.i; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; case Tfloat: case Tdouble: case Tldouble: if (yystack.l_mark[0].rec.typ->type == Tfloat || yystack.l_mark[0].rec.typ->type == Tdouble || yystack.l_mark[0].rec.typ->type == Tldouble) p->info.val.r = yystack.l_mark[0].rec.val.r; else if (yystack.l_mark[0].rec.typ->type == Tint) p->info.val.r = (double)yystack.l_mark[0].rec.val.i; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; default: if (yystack.l_mark[-2].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[-2].rec.typ->ref)->type == Tchar && yystack.l_mark[0].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[0].rec.typ->ref)->type == Tchar) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (yystack.l_mark[-2].rec.typ->type == Tpointer && ((Tnode*)yystack.l_mark[-2].rec.typ->ref)->id == lookup("std::string")) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (yystack.l_mark[-2].rec.typ->id == lookup("std::string")) p->info.val.s = yystack.l_mark[0].rec.val.s; else if (yystack.l_mark[-2].rec.typ->type == Tpointer && yystack.l_mark[0].rec.typ->type == Tint && yystack.l_mark[0].rec.val.i == 0) p->info.val.i = 0; else { semerror("type error in initialization constant"); p->info.hasval = False; } break; } } p->info.offset = sp->offset; if (yystack.l_mark[-2].rec.sto & Sextern) p->level = GLOBAL; else if (sp->grow) sp->offset += p->info.typ->width; else if (p->info.typ->width > sp->offset) sp->offset = p->info.typ->width; sp->entry = p; } break; case 83: #line 676 "soapcpp2_yacc.y" { if (sp->table->level != PARAM) yyval.sym = gensymidx("param", (int)++sp->val); else if (eflag) yyval.sym = gensymidx("_param", (int)++sp->val); else yyval.sym = gensym("_param"); } break; case 84: #line 683 "soapcpp2_yacc.y" { if (vflag != 1 && *yystack.l_mark[0].sym->name == '_' && sp->table->level == GLOBAL) { sprintf(errbuf, "SOAP 1.2 does not support anonymous parameters '%s'", yystack.l_mark[0].sym->name); semwarn(errbuf); } yyval.sym = yystack.l_mark[0].sym; } break; case 85: #line 699 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 86: #line 701 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 87: #line 703 "soapcpp2_yacc.y" { yyval.rec.typ = mkint(); yyval.rec.sto = Snone; sp->node = yyval.rec; } break; case 88: #line 707 "soapcpp2_yacc.y" { yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.sto = (Storage)((int)yystack.l_mark[-1].sto | (int)yystack.l_mark[0].rec.sto); if ((yyval.rec.sto & Sattribute) && !is_primitive_or_string(yystack.l_mark[0].rec.typ) && !is_stdstr(yystack.l_mark[0].rec.typ) && !is_binary(yystack.l_mark[0].rec.typ) && !is_external(yystack.l_mark[0].rec.typ)) { semwarn("invalid attribute type"); yyval.rec.sto &= ~Sattribute; } sp->node = yyval.rec; if (yystack.l_mark[-1].sto & Sextern) transient = 0; } break; case 89: #line 717 "soapcpp2_yacc.y" { if (yystack.l_mark[-1].typ->type == Tint) switch (yystack.l_mark[0].rec.typ->type) { case Tchar: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tshort: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tllong: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; default: semwarn("illegal use of 'signed'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tuint) switch (yystack.l_mark[0].rec.typ->type) { case Tchar: yyval.rec.typ = mkuchar(); break; case Tshort: yyval.rec.typ = mkushort(); break; case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkulong(); break; case Tllong: yyval.rec.typ = mkullong(); break; default: semwarn("illegal use of 'unsigned'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tlong) switch (yystack.l_mark[0].rec.typ->type) { case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkllong(); break; case Tuint: yyval.rec.typ = mkulong(); break; case Tulong: yyval.rec.typ = mkullong(); break; case Tdouble: yyval.rec.typ = mkldouble(); break; default: semwarn("illegal use of 'long'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tulong) switch (yystack.l_mark[0].rec.typ->type) { case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkullong(); break; case Tuint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tulong: yyval.rec.typ = mkullong(); break; default: semwarn("illegal use of 'long'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[0].rec.typ->type == Tint) yyval.rec.typ = yystack.l_mark[-1].typ; else semwarn("invalid type (missing ';' or type name used as non-type identifier?)"); yyval.rec.sto = yystack.l_mark[0].rec.sto; sp->node = yyval.rec; } break; case 90: #line 764 "soapcpp2_yacc.y" { yyval.rec.typ = mkint(); yyval.rec.sto = yystack.l_mark[0].sto; sp->node = yyval.rec; if (yystack.l_mark[0].sto & Sextern) transient = 0; } break; case 91: #line 770 "soapcpp2_yacc.y" { yyval.rec.typ = yystack.l_mark[0].typ; yyval.rec.sto = Snone; sp->node = yyval.rec; } break; case 92: #line 774 "soapcpp2_yacc.y" { yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.sto = (Storage)((int)yystack.l_mark[-1].sto | (int)yystack.l_mark[0].rec.sto); if ((yyval.rec.sto & Sattribute) && !is_primitive_or_string(yystack.l_mark[0].rec.typ) && !is_stdstr(yystack.l_mark[0].rec.typ) && !is_binary(yystack.l_mark[0].rec.typ) && !is_external(yystack.l_mark[0].rec.typ)) { semwarn("invalid attribute type"); yyval.rec.sto &= ~Sattribute; } sp->node = yyval.rec; if (yystack.l_mark[-1].sto & Sextern) transient = 0; } break; case 93: #line 784 "soapcpp2_yacc.y" { if (yystack.l_mark[-1].typ->type == Tint) switch (yystack.l_mark[0].rec.typ->type) { case Tchar: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tshort: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; case Tllong: yyval.rec.typ = yystack.l_mark[0].rec.typ; break; default: semwarn("illegal use of 'signed'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tuint) switch (yystack.l_mark[0].rec.typ->type) { case Tchar: yyval.rec.typ = mkuchar(); break; case Tshort: yyval.rec.typ = mkushort(); break; case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkulong(); break; case Tllong: yyval.rec.typ = mkullong(); break; default: semwarn("illegal use of 'unsigned'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tlong) switch (yystack.l_mark[0].rec.typ->type) { case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkllong(); break; case Tuint: yyval.rec.typ = mkulong(); break; case Tulong: yyval.rec.typ = mkullong(); break; case Tdouble: yyval.rec.typ = mkldouble(); break; default: semwarn("illegal use of 'long'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[-1].typ->type == Tulong) switch (yystack.l_mark[0].rec.typ->type) { case Tint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tlong: yyval.rec.typ = mkullong(); break; case Tuint: yyval.rec.typ = yystack.l_mark[-1].typ; break; case Tulong: yyval.rec.typ = mkullong(); break; default: semwarn("illegal use of 'long'"); yyval.rec.typ = yystack.l_mark[0].rec.typ; } else if (yystack.l_mark[0].rec.typ->type == Tint) yyval.rec.typ = yystack.l_mark[-1].typ; else semwarn("invalid type"); yyval.rec.sto = yystack.l_mark[0].rec.sto; sp->node = yyval.rec; } break; case 94: #line 831 "soapcpp2_yacc.y" { yyval.typ = mkvoid(); } break; case 95: #line 832 "soapcpp2_yacc.y" { yyval.typ = mkbool(); } break; case 96: #line 833 "soapcpp2_yacc.y" { yyval.typ = mkchar(); } break; case 97: #line 834 "soapcpp2_yacc.y" { yyval.typ = mkwchart(); } break; case 98: #line 835 "soapcpp2_yacc.y" { yyval.typ = mkshort(); } break; case 99: #line 836 "soapcpp2_yacc.y" { yyval.typ = mkint(); } break; case 100: #line 837 "soapcpp2_yacc.y" { yyval.typ = mklong(); } break; case 101: #line 838 "soapcpp2_yacc.y" { yyval.typ = mkllong(); } break; case 102: #line 839 "soapcpp2_yacc.y" { yyval.typ = mkullong(); } break; case 103: #line 840 "soapcpp2_yacc.y" { yyval.typ = mkulong(); } break; case 104: #line 841 "soapcpp2_yacc.y" { yyval.typ = mkfloat(); } break; case 105: #line 842 "soapcpp2_yacc.y" { yyval.typ = mkdouble(); } break; case 106: #line 843 "soapcpp2_yacc.y" { yyval.typ = mkint(); } break; case 107: #line 844 "soapcpp2_yacc.y" { yyval.typ = mkuint(); } break; case 108: #line 845 "soapcpp2_yacc.y" { yyval.typ = mkuchar(); } break; case 109: #line 846 "soapcpp2_yacc.y" { yyval.typ = mkushort(); } break; case 110: #line 847 "soapcpp2_yacc.y" { yyval.typ = mkuint(); } break; case 111: #line 848 "soapcpp2_yacc.y" { yyval.typ = mkulong(); } break; case 112: #line 849 "soapcpp2_yacc.y" { yyval.typ = mktimet(); } break; case 113: #line 851 "soapcpp2_yacc.y" { if (!(p = entry(templatetable, yystack.l_mark[0].sym))) { p = enter(templatetable, yystack.l_mark[0].sym); p->info.typ = mktemplate(NULL, yystack.l_mark[0].sym); yystack.l_mark[0].sym->token = TYPE; } yyval.typ = p->info.typ; } break; case 114: #line 859 "soapcpp2_yacc.y" { sym = gensym("_Struct"); sprintf(errbuf, "anonymous class will be named '%s'", sym->name); semwarn(errbuf); if ((p = entry(classtable, sym))) { if (p->info.typ->ref || p->info.typ->type != Tclass) { sprintf(errbuf, "class '%s' already declared at line %d", sym->name, p->lineno); semerror(errbuf); } } else { p = enter(classtable, sym); p->info.typ = mkclass((Table*)0, 0); } sym->token = TYPE; sp->table->sym = sym; p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; p->info.typ->id = sym; yyval.typ = p->info.typ; exitscope(); } break; case 115: #line 881 "soapcpp2_yacc.y" { p = reenter(classtable, yystack.l_mark[-4].e->sym); sp->table->sym = p->sym; p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; p->info.typ->id = p->sym; if (p->info.typ->base) sp->table->prev = (Table*)entry(classtable, p->info.typ->base)->info.typ->ref; yyval.typ = p->info.typ; exitscope(); } break; case 116: #line 892 "soapcpp2_yacc.y" { p = reenter(classtable, yystack.l_mark[-6].e->sym); sp->table->sym = p->sym; if (!yystack.l_mark[-4].e) semerror("invalid base class"); else { sp->table->prev = (Table*)yystack.l_mark[-4].e->info.typ->ref; if (!sp->table->prev && !yystack.l_mark[-4].e->info.typ->transient) { sprintf(errbuf, "class '%s' has incomplete type", yystack.l_mark[-4].e->sym->name); semerror(errbuf); } p->info.typ->base = yystack.l_mark[-4].e->info.typ->id; } p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; p->info.typ->id = p->sym; yyval.typ = p->info.typ; exitscope(); } break; case 117: #line 910 "soapcpp2_yacc.y" { yystack.l_mark[0].e->info.typ->id = yystack.l_mark[0].e->sym; yyval.typ = yystack.l_mark[0].e->info.typ; } break; case 118: #line 914 "soapcpp2_yacc.y" { if (!yystack.l_mark[0].e) semerror("invalid base class"); else { if (!yystack.l_mark[0].e->info.typ->ref && !yystack.l_mark[0].e->info.typ->transient) { sprintf(errbuf, "class '%s' has incomplete type", yystack.l_mark[0].e->sym->name); semerror(errbuf); } yystack.l_mark[-2].e->info.typ->base = yystack.l_mark[0].e->info.typ->id; } yystack.l_mark[-2].e->info.typ->id = yystack.l_mark[-2].e->sym; yyval.typ = yystack.l_mark[-2].e->info.typ; } break; case 119: #line 927 "soapcpp2_yacc.y" { sym = gensym("_Struct"); sprintf(errbuf, "anonymous struct will be named '%s'", sym->name); semwarn(errbuf); if ((p = entry(classtable, sym))) { if (p->info.typ->ref || p->info.typ->type != Tstruct) { sprintf(errbuf, "struct '%s' already declared at line %d", sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; } } else { p = enter(classtable, sym); p->info.typ = mkstruct(sp->table, sp->offset); } p->info.typ->id = sym; yyval.typ = p->info.typ; exitscope(); } break; case 120: #line 949 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[-4].e->sym)) && p->info.typ->ref) { if (is_mutable(p->info.typ)) { if (merge((Table*)p->info.typ->ref, sp->table)) { sprintf(errbuf, "member name clash in struct '%s' declared at line %d", yystack.l_mark[-4].e->sym->name, p->lineno); semerror(errbuf); } p->info.typ->width += sp->offset; } } else { p = reenter(classtable, yystack.l_mark[-4].e->sym); p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; p->info.typ->id = p->sym; } yyval.typ = p->info.typ; exitscope(); } break; case 121: #line 967 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->type == Tstruct) yyval.typ = p->info.typ; else { sprintf(errbuf, "'struct %s' redeclaration (line %d)", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); yyval.typ = mkint(); } } else { p = enter(classtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkstruct((Table*)0, 0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 122: #line 982 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->type == Tstruct) yyval.typ = p->info.typ; else { sprintf(errbuf, "'struct %s' redeclaration (line %d)", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); yyval.typ = mkint(); } } else { p = enter(classtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkstruct((Table*)0, 0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 123: #line 998 "soapcpp2_yacc.y" { sym = gensym("_Union"); sprintf(errbuf, "anonymous union will be named '%s'", sym->name); semwarn(errbuf); yyval.typ = mkunion(sp->table, sp->offset); if ((p = entry(classtable, sym))) { if (p->info.typ->ref) { sprintf(errbuf, "union or struct '%s' already declared at line %d", sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; } } else { p = enter(classtable, sym); p->info.typ = mkunion(sp->table, sp->offset); } p->info.typ->id = sym; yyval.typ = p->info.typ; exitscope(); } break; case 124: #line 1021 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[-4].sym))) { if (p->info.typ->ref || p->info.typ->type != Tunion) { sprintf(errbuf, "union '%s' already declared at line %d", yystack.l_mark[-4].sym->name, p->lineno); semerror(errbuf); } else { p = reenter(classtable, yystack.l_mark[-4].sym); p->info.typ->ref = sp->table; p->info.typ->width = sp->offset; } } else { p = enter(classtable, yystack.l_mark[-4].sym); p->info.typ = mkunion(sp->table, sp->offset); } p->info.typ->id = yystack.l_mark[-4].sym; yyval.typ = p->info.typ; exitscope(); } break; case 125: #line 1040 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->type == Tunion) yyval.typ = p->info.typ; else { sprintf(errbuf, "'union %s' redeclaration (line %d)", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); yyval.typ = mkint(); } } else { p = enter(classtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkunion((Table*) 0, 0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 126: #line 1055 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->type == Tunion) yyval.typ = p->info.typ; else { sprintf(errbuf, "'union %s' redeclaration (line %d)", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); yyval.typ = mkint(); } } else { p = enter(classtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkunion((Table*) 0, 0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 127: #line 1071 "soapcpp2_yacc.y" { sym = gensym("_Enum"); sprintf(errbuf, "anonymous enum will be named '%s'", sym->name); semwarn(errbuf); if ((p = entry(enumtable, sym))) { if (p->info.typ->ref) { sprintf(errbuf, "enum '%s' already declared at line %d", sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = 4; /* 4 = enum */ } } else { p = enter(enumtable, sym); p->info.typ = mkenum(sp->table); } p->info.typ->id = sym; yyval.typ = p->info.typ; exitscope(); } break; case 128: #line 1093 "soapcpp2_yacc.y" { if ((p = entry(enumtable, yystack.l_mark[-5].e->sym))) { if (p->info.typ->ref) { sprintf(errbuf, "enum '%s' already declared at line %d", yystack.l_mark[-5].e->sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = 4; /* 4 = enum */ } } else { p = enter(enumtable, yystack.l_mark[-5].e->sym); p->info.typ = mkenum(sp->table); } p->info.typ->id = yystack.l_mark[-5].e->sym; yyval.typ = p->info.typ; exitscope(); } break; case 129: #line 1112 "soapcpp2_yacc.y" { if ((p = entry(enumtable, yystack.l_mark[-5].sym))) { if (p->info.typ->ref) { sprintf(errbuf, "enum '%s' already declared at line %d", yystack.l_mark[-5].sym->name, p->lineno); semerror(errbuf); } else { p->info.typ->ref = sp->table; p->info.typ->width = 8; /* 8 = mask */ } } else { p = enter(enumtable, yystack.l_mark[-5].sym); p->info.typ = mkmask(sp->table); } p->info.typ->id = yystack.l_mark[-5].sym; yyval.typ = p->info.typ; exitscope(); } break; case 130: #line 1130 "soapcpp2_yacc.y" { if ((p = entry(enumtable, yystack.l_mark[0].sym))) yyval.typ = p->info.typ; else { p = enter(enumtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkenum((Table*)0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 131: #line 1138 "soapcpp2_yacc.y" { if ((p = entry(enumtable, yystack.l_mark[0].sym))) yyval.typ = p->info.typ; else { p = enter(enumtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkenum((Table*)0); p->info.typ->id = yystack.l_mark[0].sym; } } break; case 132: #line 1146 "soapcpp2_yacc.y" { if ((p = entry(typetable, yystack.l_mark[0].sym))) yyval.typ = p->info.typ; else if ((p = entry(classtable, yystack.l_mark[0].sym))) yyval.typ = p->info.typ; else if ((p = entry(enumtable, yystack.l_mark[0].sym))) yyval.typ = p->info.typ; else if (yystack.l_mark[0].sym == lookup("std::string") || yystack.l_mark[0].sym == lookup("std::wstring")) { p = enter(classtable, yystack.l_mark[0].sym); yyval.typ = p->info.typ = mkclass((Table*)0, 0); p->info.typ->id = yystack.l_mark[0].sym; p->info.typ->transient = -2; } else { sprintf(errbuf, "unknown type '%s'", yystack.l_mark[0].sym->name); semerror(errbuf); yyval.typ = mkint(); } } break; case 133: #line 1165 "soapcpp2_yacc.y" { if ((p = entry(templatetable, yystack.l_mark[-3].sym))) yyval.typ = mktemplate(yystack.l_mark[-1].rec.typ, yystack.l_mark[-3].sym); else { sprintf(errbuf, "invalid template '%s'", yystack.l_mark[-3].sym->name); semerror(errbuf); yyval.typ = mkint(); } } break; case 134: #line 1174 "soapcpp2_yacc.y" { synerror("malformed class definition (use spacing around ':' to separate derived : base)"); yyerrok; yyval.typ = mkint(); } break; case 135: #line 1179 "soapcpp2_yacc.y" { synerror("malformed struct definition"); yyerrok; yyval.typ = mkint(); } break; case 136: #line 1184 "soapcpp2_yacc.y" { synerror("malformed union definition"); yyerrok; yyval.typ = mkint(); } break; case 137: #line 1189 "soapcpp2_yacc.y" { synerror("malformed enum definition"); yyerrok; yyval.typ = mkint(); } break; case 138: #line 1194 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->ref) { if (!is_mutable(p->info.typ)) { sprintf(errbuf, "struct '%s' already declared at line %d", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); } } else p = reenter(classtable, yystack.l_mark[0].sym); } else { p = enter(classtable, yystack.l_mark[0].sym); p->info.typ = mkstruct((Table*)0, 0); } yyval.e = p; } break; case 139: #line 1211 "soapcpp2_yacc.y" { if ((p = entry(classtable, yystack.l_mark[0].sym))) { if (p->info.typ->ref) { if (!is_mutable(p->info.typ)) { sprintf(errbuf, "class '%s' already declared at line %d", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); } } else p = reenter(classtable, yystack.l_mark[0].sym); } else { p = enter(classtable, yystack.l_mark[0].sym); p->info.typ = mkclass((Table*)0, 0); p->info.typ->id = p->sym; } yystack.l_mark[0].sym->token = TYPE; yyval.e = p; } break; case 140: #line 1230 "soapcpp2_yacc.y" { if ((p = entry(enumtable, yystack.l_mark[0].sym))) { if (p->info.typ->ref) { sprintf(errbuf, "enum '%s' already declared at line %d", yystack.l_mark[0].sym->name, p->lineno); semerror(errbuf); } /* else p = reenter(classtable, $2); */ } else { p = enter(enumtable, yystack.l_mark[0].sym); p->info.typ = mkenum(0); } yyval.e = p; } break; case 141: #line 1247 "soapcpp2_yacc.y" { } break; case 142: #line 1248 "soapcpp2_yacc.y" { } break; case 143: #line 1250 "soapcpp2_yacc.y" { yyval.e = yystack.l_mark[0].e; } break; case 144: #line 1251 "soapcpp2_yacc.y" { yyval.e = yystack.l_mark[0].e; } break; case 145: #line 1252 "soapcpp2_yacc.y" { yyval.e = yystack.l_mark[0].e; } break; case 146: #line 1253 "soapcpp2_yacc.y" { yyval.e = entry(classtable, yystack.l_mark[0].sym); if (!yyval.e) { p = entry(typetable, yystack.l_mark[0].sym); if (p && (p->info.typ->type == Tclass || p->info.typ->type == Tstruct)) yyval.e = p; } } break; case 147: #line 1260 "soapcpp2_yacc.y" { yyval.e = entry(classtable, yystack.l_mark[0].sym); } break; case 148: #line 1262 "soapcpp2_yacc.y" { if (transient == -2) transient = 0; permission = 0; enterscope(mktable(NULL), 0); sp->entry = NULL; } break; case 149: #line 1269 "soapcpp2_yacc.y" { if (transient == -2) transient = 0; permission = 0; enterscope(mktable(NULL), 0); sp->entry = NULL; sp->grow = False; } break; case 150: #line 1277 "soapcpp2_yacc.y" { enterscope(mktable(NULL), 0); sp->entry = NULL; sp->mask = True; sp->val = 1; } break; case 151: #line 1283 "soapcpp2_yacc.y" { } break; case 152: #line 1284 "soapcpp2_yacc.y" { } break; case 153: #line 1286 "soapcpp2_yacc.y" { if (sp->table->level == INTERNAL) transient |= 1; permission = 0; enterscope(mktable(NULL), 0); sp->entry = NULL; sp->table->level = PARAM; } break; case 154: #line 1294 "soapcpp2_yacc.y" { yyval.sto = Sauto; } break; case 155: #line 1295 "soapcpp2_yacc.y" { yyval.sto = Sregister; } break; case 156: #line 1296 "soapcpp2_yacc.y" { yyval.sto = Sstatic; } break; case 157: #line 1297 "soapcpp2_yacc.y" { yyval.sto = Sexplicit; } break; case 158: #line 1298 "soapcpp2_yacc.y" { yyval.sto = Sextern; transient = 1; } break; case 159: #line 1299 "soapcpp2_yacc.y" { yyval.sto = Stypedef; } break; case 160: #line 1300 "soapcpp2_yacc.y" { yyval.sto = Svirtual; } break; case 161: #line 1301 "soapcpp2_yacc.y" { yyval.sto = Sconst; } break; case 162: #line 1302 "soapcpp2_yacc.y" { yyval.sto = Sfriend; } break; case 163: #line 1303 "soapcpp2_yacc.y" { yyval.sto = Sinline; } break; case 164: #line 1304 "soapcpp2_yacc.y" { yyval.sto = SmustUnderstand; } break; case 165: #line 1305 "soapcpp2_yacc.y" { yyval.sto = Sreturn; } break; case 166: #line 1306 "soapcpp2_yacc.y" { yyval.sto = Sattribute; if (eflag) semwarn("SOAP RPC encoding does not support XML attributes"); } break; case 167: #line 1310 "soapcpp2_yacc.y" { yyval.sto = Sspecial; } break; case 168: #line 1311 "soapcpp2_yacc.y" { yyval.sto = Sextern; transient = -2; } break; case 169: #line 1313 "soapcpp2_yacc.y" { yyval.sto = Snone; } break; case 170: #line 1314 "soapcpp2_yacc.y" { yyval.sto = Sconstobj; } break; case 171: #line 1316 "soapcpp2_yacc.y" { yyval.sto = Snone; } break; case 172: #line 1317 "soapcpp2_yacc.y" { yyval.sto = Sabstract; } break; case 173: #line 1319 "soapcpp2_yacc.y" { yyval.sto = Snone; } break; case 174: #line 1320 "soapcpp2_yacc.y" { yyval.sto = Svirtual; } break; case 175: #line 1322 "soapcpp2_yacc.y" { yyval.rec = tmp = sp->node; } break; case 176: #line 1323 "soapcpp2_yacc.y" { /* handle const pointers, such as const char* */ if (/*tmp.typ->type == Tchar &&*/ (tmp.sto & Sconst)) tmp.sto = (tmp.sto & ~Sconst) | Sconstptr; tmp.typ = mkpointer(tmp.typ); tmp.typ->transient = transient; yyval.rec = tmp; } break; case 177: #line 1330 "soapcpp2_yacc.y" { tmp.typ = mkreference(tmp.typ); tmp.typ->transient = transient; yyval.rec = tmp; } break; case 178: #line 1335 "soapcpp2_yacc.y" { yyval.rec = tmp; /* tmp is inherited */ } break; case 179: #line 1338 "soapcpp2_yacc.y" { if (!bflag && yystack.l_mark[0].rec.typ->type == Tchar) { sprintf(errbuf, "char["SOAP_LONG_FORMAT"] will be serialized as an array of "SOAP_LONG_FORMAT" bytes: use soapcpp2 option -b to enable char[] string serialization or use char* for strings", yystack.l_mark[-2].rec.val.i, yystack.l_mark[-2].rec.val.i); semwarn(errbuf); } if (yystack.l_mark[-2].rec.hasval && yystack.l_mark[-2].rec.typ->type == Tint && yystack.l_mark[-2].rec.val.i > 0 && yystack.l_mark[0].rec.typ->width > 0) yyval.rec.typ = mkarray(yystack.l_mark[0].rec.typ, (int) yystack.l_mark[-2].rec.val.i * yystack.l_mark[0].rec.typ->width); else { yyval.rec.typ = mkarray(yystack.l_mark[0].rec.typ, 0); semerror("undetermined array size"); } yyval.rec.sto = yystack.l_mark[0].rec.sto; } break; case 180: #line 1350 "soapcpp2_yacc.y" { yyval.rec.typ = mkpointer(yystack.l_mark[0].rec.typ); /* zero size array = pointer */ yyval.rec.sto = yystack.l_mark[0].rec.sto; } break; case 181: #line 1354 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.typ->type == Tstruct || yystack.l_mark[0].rec.typ->type == Tclass) if (!yystack.l_mark[0].rec.typ->ref && !yystack.l_mark[0].rec.typ->transient && !(yystack.l_mark[0].rec.sto & Stypedef)) { sprintf(errbuf, "struct/class '%s' has incomplete type", yystack.l_mark[0].rec.typ->id->name); semerror(errbuf); } yyval.rec = yystack.l_mark[0].rec; } break; case 182: #line 1362 "soapcpp2_yacc.y" { yyval.rec.hasval = False; } break; case 183: #line 1363 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.hasval) { yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.hasval = True; yyval.rec.val = yystack.l_mark[0].rec.val; } else { yyval.rec.hasval = False; semerror("initialization expression not constant"); } } break; case 184: #line 1374 "soapcpp2_yacc.y" { yyval.sym = NULL; } break; case 185: #line 1375 "soapcpp2_yacc.y" { yyval.sym = yystack.l_mark[0].sym; } break; case 186: #line 1378 "soapcpp2_yacc.y" { yyval.rec.minOccurs = -1; yyval.rec.maxOccurs = 1; yyval.rec.pattern = yystack.l_mark[0].s; } break; case 187: #line 1383 "soapcpp2_yacc.y" { yyval.rec.minOccurs = (long)yystack.l_mark[0].i; yyval.rec.maxOccurs = 1; yyval.rec.pattern = yystack.l_mark[-1].s; } break; case 188: #line 1388 "soapcpp2_yacc.y" { yyval.rec.minOccurs = (long)yystack.l_mark[-1].i; yyval.rec.maxOccurs = 1; yyval.rec.pattern = yystack.l_mark[-2].s; } break; case 189: #line 1393 "soapcpp2_yacc.y" { yyval.rec.minOccurs = (long)yystack.l_mark[-2].i; yyval.rec.maxOccurs = (long)yystack.l_mark[0].i; yyval.rec.pattern = yystack.l_mark[-3].s; } break; case 190: #line 1398 "soapcpp2_yacc.y" { yyval.rec.minOccurs = -1; yyval.rec.maxOccurs = (long)yystack.l_mark[0].i; yyval.rec.pattern = yystack.l_mark[-2].s; } break; case 191: #line 1403 "soapcpp2_yacc.y" { yyval.s = NULL; } break; case 192: #line 1404 "soapcpp2_yacc.y" { yyval.s = yystack.l_mark[0].s; } break; case 193: #line 1406 "soapcpp2_yacc.y" { yyval.i = yystack.l_mark[0].i; } break; case 194: #line 1407 "soapcpp2_yacc.y" { yyval.i = yystack.l_mark[0].i; } break; case 195: #line 1408 "soapcpp2_yacc.y" { yyval.i = -yystack.l_mark[0].i; } break; case 196: #line 1417 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 197: #line 1418 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 198: #line 1422 "soapcpp2_yacc.y" { yyval.rec.typ = yystack.l_mark[-2].rec.typ; yyval.rec.sto = Snone; yyval.rec.hasval = False; } break; case 200: #line 1429 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 201: #line 1432 "soapcpp2_yacc.y" { yyval.rec.hasval = False; yyval.rec.typ = mkint(); } break; case 202: #line 1435 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 203: #line 1437 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 204: #line 1440 "soapcpp2_yacc.y" { yyval.rec.hasval = False; yyval.rec.typ = mkint(); } break; case 205: #line 1443 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 206: #line 1445 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 207: #line 1448 "soapcpp2_yacc.y" { yyval.rec = iop("|", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 208: #line 1449 "soapcpp2_yacc.y" { yyval.rec = iop("^", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 209: #line 1450 "soapcpp2_yacc.y" { yyval.rec = iop("&", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 210: #line 1451 "soapcpp2_yacc.y" { yyval.rec = relop("==", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 211: #line 1452 "soapcpp2_yacc.y" { yyval.rec = relop("!=", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 212: #line 1453 "soapcpp2_yacc.y" { yyval.rec = relop("<", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 213: #line 1454 "soapcpp2_yacc.y" { yyval.rec = relop("<=", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 214: #line 1455 "soapcpp2_yacc.y" { yyval.rec = relop(">", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 215: #line 1456 "soapcpp2_yacc.y" { yyval.rec = relop(">=", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 216: #line 1457 "soapcpp2_yacc.y" { yyval.rec = iop("<<", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 217: #line 1458 "soapcpp2_yacc.y" { yyval.rec = iop(">>", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 218: #line 1459 "soapcpp2_yacc.y" { yyval.rec = op("+", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 219: #line 1460 "soapcpp2_yacc.y" { yyval.rec = op("-", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 220: #line 1461 "soapcpp2_yacc.y" { yyval.rec = op("*", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 221: #line 1462 "soapcpp2_yacc.y" { yyval.rec = op("/", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 222: #line 1463 "soapcpp2_yacc.y" { yyval.rec = iop("%", yystack.l_mark[-2].rec, yystack.l_mark[0].rec); } break; case 223: #line 1464 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 224: #line 1467 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.hasval) yyval.rec.val.i = !yystack.l_mark[0].rec.val.i; yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.hasval = yystack.l_mark[0].rec.hasval; } break; case 225: #line 1472 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.hasval) yyval.rec.val.i = ~yystack.l_mark[0].rec.val.i; yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.hasval = yystack.l_mark[0].rec.hasval; } break; case 226: #line 1477 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.hasval) { if (integer(yystack.l_mark[0].rec.typ)) yyval.rec.val.i = -yystack.l_mark[0].rec.val.i; else if (real(yystack.l_mark[0].rec.typ)) yyval.rec.val.r = -yystack.l_mark[0].rec.val.r; else typerror("string?"); } yyval.rec.typ = yystack.l_mark[0].rec.typ; yyval.rec.hasval = yystack.l_mark[0].rec.hasval; } break; case 227: #line 1487 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 228: #line 1488 "soapcpp2_yacc.y" { if (yystack.l_mark[0].rec.typ->type == Tpointer) { yyval.rec.typ = (Tnode*)yystack.l_mark[0].rec.typ->ref; } else typerror("dereference of non-pointer type"); yyval.rec.sto = Snone; yyval.rec.hasval = False; } break; case 229: #line 1495 "soapcpp2_yacc.y" { yyval.rec.typ = mkpointer(yystack.l_mark[0].rec.typ); yyval.rec.sto = Snone; yyval.rec.hasval = False; } break; case 230: #line 1500 "soapcpp2_yacc.y" { yyval.rec.hasval = True; yyval.rec.typ = mkint(); yyval.rec.val.i = yystack.l_mark[-1].rec.typ->width; } break; case 231: #line 1504 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[0].rec; } break; case 232: #line 1507 "soapcpp2_yacc.y" { yyval.rec = yystack.l_mark[-1].rec; } break; case 233: #line 1508 "soapcpp2_yacc.y" { if ((p = enumentry(yystack.l_mark[0].sym)) == (Entry*) 0) p = undefined(yystack.l_mark[0].sym); else yyval.rec.hasval = True; yyval.rec.typ = p->info.typ; yyval.rec.val = p->info.val; } break; case 234: #line 1515 "soapcpp2_yacc.y" { yyval.rec.typ = mkint(); yyval.rec.hasval = True; yyval.rec.val.i = yystack.l_mark[0].i; } break; case 235: #line 1519 "soapcpp2_yacc.y" { yyval.rec.typ = mkint(); yyval.rec.hasval = True; yyval.rec.val.i = 0; } break; case 236: #line 1523 "soapcpp2_yacc.y" { yyval.rec.typ = mkfloat(); yyval.rec.hasval = True; yyval.rec.val.r = yystack.l_mark[0].r; } break; case 237: #line 1527 "soapcpp2_yacc.y" { yyval.rec.typ = mkchar(); yyval.rec.hasval = True; yyval.rec.val.i = yystack.l_mark[0].c; } break; case 238: #line 1531 "soapcpp2_yacc.y" { yyval.rec.typ = mkstring(); yyval.rec.hasval = True; yyval.rec.val.s = yystack.l_mark[0].s; } break; case 239: #line 1535 "soapcpp2_yacc.y" { yyval.rec.typ = mkbool(); yyval.rec.hasval = True; yyval.rec.val.i = 0; } break; case 240: #line 1539 "soapcpp2_yacc.y" { yyval.rec.typ = mkbool(); yyval.rec.hasval = True; yyval.rec.val.i = 1; } break; #line 3770 "soapcpp2_yacc.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; yystack.l_mark -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state 0 to\ state %d\n", YYPREFIX, YYFINAL); #endif yystate = YYFINAL; *++yystack.s_mark = YYFINAL; *++yystack.l_mark = yyval; if (yychar < 0) { if ((yychar = YYLEX) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } #endif } if (yychar == 0) goto yyaccept; goto yyloop; } if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yystate) yystate = yytable[yyn]; else yystate = yydgoto[yym]; #if YYDEBUG if (yydebug) printf("%sdebug: after reduction, shifting from state %d \ to state %d\n", YYPREFIX, *yystack.s_mark, yystate); #endif if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack)) { goto yyoverflow; } *++yystack.s_mark = (short) yystate; *++yystack.l_mark = yyval; goto yyloop; yyoverflow: yyerror("yacc stack overflow"); yyabort: yyfreestack(&yystack); return (1); yyaccept: yyfreestack(&yystack); return (0); }