version 1.2, 2015/04/20 18:10:13
|
version 1.3, 2015/04/20 18:19:53
|
|
|
/* |
|
**============================================================================== |
|
** |
|
** Open Management Infrastructure (OMI) |
|
** |
|
** Copyright (c) Microsoft Corporation |
|
** |
|
** Licensed under the Apache License, Version 2.0 (the "License"); you may not |
|
** use this file except in compliance with the License. You may obtain a copy |
|
** of the License at |
|
** |
|
** http://www.apache.org/licenses/LICENSE-2.0 |
|
** |
|
** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
|
** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
|
** MERCHANTABLITY OR NON-INFRINGEMENT. |
|
** |
|
** See the Apache 2 License for the specific language governing permissions |
|
** and limitations under the License. |
|
** |
|
**============================================================================== |
|
*/ |
|
|
|
#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 20110908 |
|
|
|
#define YYEMPTY (-1) |
|
#define yyclearin (yychar = YYEMPTY) |
|
#define yyerrok (yyerrflag = 0) |
|
#define YYRECOVERING() (yyerrflag != 0) |
|
|
|
#define YYPREFIX "yy" |
|
|
|
#define YYPURE 0 |
|
| |
#line 2 "mof.y" | #line 2 "mof.y" |
| |
|
|
extern int yylex(); | extern int yylex(); |
extern int openIncludeFile(const char* path); | extern int openIncludeFile(const char* path); |
| |
|
|
#line 20 "mof.y" | #line 20 "mof.y" |
#ifdef YYSTYPE |
|
#undef YYSTYPE_IS_DECLARED |
|
#define YYSTYPE_IS_DECLARED 1 |
|
#endif |
|
#ifndef YYSTYPE_IS_DECLARED |
|
#define YYSTYPE_IS_DECLARED 1 |
|
typedef union | typedef union |
|
#ifdef __cplusplus |
|
YYSTYPE |
|
#endif |
|
|
{ | { |
MI_Boolean boolean; | MI_Boolean boolean; |
MI_Sint64 integer; | MI_Sint64 integer; |
|
|
MI_ClassDecl* classDeclaration; | MI_ClassDecl* classDeclaration; |
MI_InstanceDecl* instanceDeclaration; | MI_InstanceDecl* instanceDeclaration; |
} YYSTYPE; | } YYSTYPE; |
#endif /* !YYSTYPE_IS_DECLARED */ |
|
#line 68 "y.tab.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. */ |
|
#define YYERROR_DECL() yyerror(const char *s) |
|
#define YYERROR_CALL(msg) yyerror(msg) |
|
|
|
extern int YYPARSE_DECL(); |
|
|
|
#define TOK_ERROR 257 | #define TOK_ERROR 257 |
#define TOK_BOOLEAN 258 | #define TOK_BOOLEAN 258 |
#define TOK_SINT8 259 | #define TOK_SINT8 259 |
|
|
#define TOK_DATETIME 269 | #define TOK_DATETIME 269 |
#define TOK_CHAR16 270 | #define TOK_CHAR16 270 |
#define TOK_STRING 271 | #define TOK_STRING 271 |
#define TOK_BOOLEAN_VALUE 272 |
# define TOK_OBJECT 272 |
#define TOK_REF 273 |
# define TOK_BOOLEAN_VALUE 273 |
#define TOK_SCOPE 274 |
# define TOK_REF 274 |
#define TOK_CLASS 275 |
# define TOK_SCOPE 275 |
#define TOK_ASSOCIATION 276 |
# define TOK_CLASS 276 |
#define TOK_INDICATION 277 |
# define TOK_ASSOCIATION 277 |
#define TOK_QUALIFIER 278 |
# define TOK_INDICATION 278 |
#define TOK_PROPERTY 279 |
# define TOK_QUALIFIER 279 |
#define TOK_REFERENCE 280 |
# define TOK_PROPERTY 280 |
#define TOK_METHOD 281 |
# define TOK_REFERENCE 281 |
#define TOK_PARAMETER 282 |
# define TOK_METHOD 282 |
#define TOK_ANY 283 |
# define TOK_PARAMETER 283 |
#define TOK_FLAVOR 284 |
# define TOK_ANY 284 |
#define TOK_ENABLEOVERRIDE 285 |
# define TOK_FLAVOR 285 |
#define TOK_DISABLEOVERRIDE 286 |
# define TOK_ENABLEOVERRIDE 286 |
#define TOK_RESTRICTED 287 |
# define TOK_DISABLEOVERRIDE 287 |
#define TOK_TOSUBCLASS 288 |
# define TOK_RESTRICTED 288 |
#define TOK_TRANSLATABLE 289 |
# define TOK_TOSUBCLASS 289 |
#define TOK_INSTANCE 290 |
# define TOK_TOINSTANCE 290 |
#define TOK_OF 291 |
# define TOK_TRANSLATABLE 291 |
#define TOK_AS 292 |
# define TOK_INSTANCE 292 |
#define TOK_PRAGMA 293 |
# define TOK_OF 293 |
#define TOK_SCHEMA 294 |
# define TOK_AS 294 |
#define TOK_INTEGER_VALUE 295 |
# define TOK_PRAGMA 295 |
#define TOK_REAL_VALUE 296 |
# define TOK_SCHEMA 296 |
#define TOK_STRING_VALUE 297 |
# define TOK_INTEGER_VALUE 297 |
#define TOK_CHAR_VALUE 298 |
# define TOK_REAL_VALUE 298 |
#define TOK_IDENT 299 |
# define TOK_STRING_VALUE 299 |
#define TOK_ALIAS_IDENTIFIER 300 |
# define TOK_CHAR_VALUE 300 |
#define TOK_NULL 301 |
# define TOK_IDENT 301 |
|
# define TOK_ALIAS_IDENTIFIER 302 |
|
# define TOK_NULL 303 |
|
|
|
#ifdef __STDC__ |
|
#include <stdlib.h> |
|
#include <string.h> |
|
#define YYCONST const |
|
#else |
|
#include <malloc.h> |
|
#include <memory.h> |
|
#define YYCONST |
|
#endif |
|
|
|
#if defined(__cplusplus) || defined(__STDC__) |
|
|
|
#if defined(__cplusplus) && defined(__EXTERN_C__) |
|
extern "C" { |
|
#endif |
|
#ifndef yyerror |
|
#if defined(__cplusplus) |
|
void yyerror(YYCONST char *); |
|
#endif |
|
#endif |
|
#ifndef yylex |
|
int yylex(void); |
|
#endif |
|
int yyparse(void); |
|
#if defined(__cplusplus) && defined(__EXTERN_C__) |
|
} |
|
#endif |
|
|
|
#endif |
|
|
|
#define yyclearin yychar = -1 |
|
#define yyerrok yyerrflag = 0 |
|
extern int yychar; |
|
extern int yyerrflag; |
|
YYSTYPE yylval; |
|
YYSTYPE yyval; |
|
typedef int yytabelem; |
|
#ifndef YYMAXDEPTH |
|
#define YYMAXDEPTH 150 |
|
#endif |
|
#if YYMAXDEPTH > 0 |
|
int yy_yys[YYMAXDEPTH], *yys = yy_yys; |
|
YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; |
|
#else /* user does initial allocation */ |
|
int *yys; |
|
YYSTYPE *yyv; |
|
#endif |
|
static int yymaxdepth = YYMAXDEPTH; |
#define YYERRCODE 256 | #define YYERRCODE 256 |
static const short yylhs[] = { -1, |
static YYCONST yytabelem yyexca[] ={ |
0, 0, 0, 35, 35, 35, 35, 36, 31, 31, |
-1, 1, |
31, 31, 13, 13, 12, 12, 12, 12, 12, 12, |
0, -1, |
29, 28, 28, 27, 27, 27, 27, 30, 30, 25, |
-2, 0, |
25, 24, 24, 24, 24, 24, 7, 7, 7, 7, |
|
7, 7, 7, 7, 10, 10, 10, 10, 11, 11, |
|
11, 11, 6, 6, 6, 6, 6, 6, 6, 6, |
|
6, 6, 6, 6, 6, 6, 3, 9, 9, 8, |
|
8, 8, 8, 8, 8, 8, 8, 17, 17, 18, |
|
18, 18, 19, 20, 20, 5, 5, 5, 5, 5, |
|
5, 1, 1, 15, 15, 16, 16, 16, 16, 23, |
|
22, 22, 21, 21, 21, 21, 21, 21, 21, 21, |
|
26, 32, 32, 32, 32, 14, 4, 34, 34, 33, |
|
33, 2, 2, 2, 2, 2, |
|
}; |
|
static const short yylen[] = { 2, |
|
1, 2, 1, 1, 1, 1, 1, 5, 3, 5, |
|
4, 6, 4, 3, 1, 1, 1, 2, 2, 2, |
|
3, 1, 3, 1, 2, 3, 4, 3, 1, 1, |
|
3, 1, 1, 1, 1, 1, 3, 4, 4, 5, |
|
5, 6, 6, 7, 3, 4, 4, 5, 6, 7, |
|
5, 6, 1, 1, 1, 1, 1, 1, 1, 1, |
|
1, 1, 1, 1, 1, 1, 2, 1, 3, 2, |
|
2, 3, 3, 3, 3, 4, 4, 3, 2, 1, |
|
1, 1, 3, 1, 3, 1, 1, 1, 1, 1, |
|
1, 1, 2, 5, 6, 2, 4, 3, 5, 5, |
|
1, 3, 1, 1, 1, 1, 1, 1, 1, 1, |
|
5, 4, 5, 5, 6, 4, 2, 1, 2, 4, |
|
5, 1, 1, 1, 1, 1, |
|
}; |
|
static const short yydefred[] = { 0, |
|
3, 0, 0, 0, 0, 0, 0, 6, 0, 5, |
|
7, 1, 4, 123, 124, 126, 125, 122, 0, 0, |
|
0, 0, 0, 22, 0, 2, 0, 0, 0, 0, |
|
9, 0, 0, 0, 0, 0, 0, 0, 29, 0, |
|
21, 0, 0, 0, 0, 53, 54, 55, 56, 57, |
|
58, 59, 60, 61, 62, 63, 65, 64, 66, 0, |
|
0, 0, 0, 15, 17, 16, 0, 0, 0, 0, |
|
0, 0, 0, 0, 112, 92, 0, 90, 86, 87, |
|
88, 91, 0, 0, 32, 33, 34, 35, 36, 26, |
|
84, 0, 0, 23, 0, 11, 0, 10, 14, 67, |
|
0, 0, 0, 18, 20, 19, 0, 0, 0, 0, |
|
0, 0, 94, 0, 0, 117, 0, 0, 118, 0, |
|
114, 93, 8, 28, 83, 0, 27, 0, 0, 113, |
|
82, 45, 80, 0, 81, 0, 37, 0, 0, 13, |
|
0, 0, 0, 79, 97, 0, 0, 0, 95, 0, |
|
0, 0, 119, 85, 12, 115, 47, 0, 0, 0, |
|
68, 0, 0, 0, 39, 0, 46, 0, 0, 38, |
|
0, 0, 78, 99, 103, 104, 105, 106, 107, 108, |
|
109, 110, 101, 0, 0, 0, 0, 116, 51, 0, |
|
0, 0, 0, 0, 0, 41, 0, 48, 0, 0, |
|
0, 40, 0, 100, 0, 30, 0, 120, 0, 75, |
|
74, 49, 69, 0, 0, 43, 52, 0, 42, 0, |
|
102, 111, 0, 121, 77, 76, 50, 44, 31, |
|
}; |
|
static const short yydgoto[] = { 7, |
|
83, 61, 159, 74, 133, 160, 64, 161, 162, 65, |
|
66, 67, 31, 75, 8, 33, 111, 134, 135, 92, |
|
183, 184, 71, 90, 207, 115, 24, 25, 163, 40, |
|
10, 11, 119, 120, 12, 13, |
|
}; | }; |
static const short yysindex[] = { 55, |
# define YYNPROD 190 |
0, -138, -138, -273, -278, -138, 53, 0, -223, 0, |
# define YYLAST 1108 |
0, 0, 0, 0, 0, 0, 0, 0, -39, 33, |
static YYCONST yytabelem yyact[]={ |
-138, -13, -27, 0, -16, 0, -138, -258, -138, -89, |
|
0, 210, 2, -108, -239, -187, -123, -187, 0, 34, |
151, 147, 149, 201, 102, 155, 119, 15, 13, 120, |
0, -138, -35, -138, -30, 0, 0, 0, 0, 0, |
121, 61, 96, 190, 240, 13, 98, 202, 257, 48, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 47, |
152, 103, 104, 105, 106, 107, 108, 39, 183, 145, |
-168, -138, -138, 0, 0, 0, -65, 135, -21, -167, |
310, 265, 33, 210, 42, 75, 76, 77, 78, 79, |
-12, -185, 45, 4, 0, 0, -40, 0, 0, 0, |
80, 81, 82, 83, 84, 85, 87, 86, 88, 134, |
0, 0, -176, 85, 0, 0, 0, 0, 0, 0, |
208, 185, 90, 19, 22, 23, 26, 25, 24, 304, |
0, -22, -123, 0, -138, 0, -108, 0, 0, 0, |
52, 21, 30, 31, 45, 44, 27, 28, 29, 335, |
-11, -2, 71, 0, 0, 0, -138, -138, -88, 69, |
20, 160, 18, 95, 96, 42, 46, 250, 17, 32, |
67, 92, 0, -150, 84, 0, 74, -138, 0, 58, |
241, 242, 243, 57, 244, 245, 246, 247, 248, 36, |
0, 0, 0, 0, 0, -187, 0, -30, 4, 0, |
101, 282, 131, 284, 135, 137, 148, 146, 54, 66, |
0, 0, 0, 86, 0, -41, 0, 69, 8, 0, |
37, 56, 38, 35, 100, 171, 157, 19, 22, 23, |
-4, 3, 54, 0, 0, 69, -125, 108, 0, 69, |
26, 25, 24, 89, 188, 21, 30, 46, 354, 114, |
98, 94, 0, 0, 0, 0, 0, 101, -138, -138, |
27, 28, 29, 148, 20, 207, 18, 148, 122, 46, |
0, -7, 135, 109, 0, 69, 0, 126, -17, 0, |
97, 353, 17, 164, 322, 349, 323, 173, 206, 177, |
69, 14, 0, 0, 0, 0, 0, 0, 0, 0, |
303, 161, 259, 110, 111, 61, 112, 53, 205, 115, |
0, 0, 0, 22, -123, 127, 69, 0, 0, 117, |
192, 348, 159, 167, 168, 170, 318, 175, 319, 179, |
117, 130, 40, -138, -138, 0, 150, 0, 154, 27, |
347, 157, 70, 125, 144, 140, 59, 345, 59, 215, |
157, 0, 69, 0, -125, 0, 39, 0, 172, 0, |
219, 154, 223, 343, 196, 36, 342, 231, 228, 142, |
0, 0, 0, 117, 117, 0, 0, 173, 0, 174, |
69, 236, 234, 98, 341, 340, 37, 13, 38, 35, |
0, 0, -123, 0, 0, 0, 0, 0, 0, |
221, 156, 225, 19, 22, 23, 26, 25, 24, 252, |
}; |
9, 21, 30, 11, 255, 180, 27, 28, 29, 292, |
static const short yyrindex[] = { 0, |
20, 293, 18, 68, 334, 181, 12, 189, 17, 8, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
270, 123, 141, 278, 275, 260, 129, 283, 281, 272, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
330, 285, 264, 13, 287, 328, 288, 290, 289, 67, |
0, 0, -15, 0, 0, 0, 0, 0, 0, 0, |
249, 294, 65, 296, 128, 326, 19, 22, 23, 26, |
0, 0, 0, 0, 0, 0, 0, 0, 0, -14, |
25, 24, 325, 321, 21, 30, 316, 314, 300, 27, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
28, 29, 312, 20, 121, 18, 307, 64, 271, 305, |
|
217, 17, 301, 311, 209, 114, 299, 127, 315, 13, |
|
279, 317, 280, 273, 320, 274, 308, 309, 324, 214, |
|
114, 216, 50, 327, 206, 291, 306, 329, 286, 110, |
|
111, 61, 112, 126, 205, 115, 124, 263, 256, 206, |
|
337, 338, 117, 333, 110, 111, 61, 112, 114, 205, |
|
115, 148, 336, 344, 13, 251, 193, 346, 166, 182, |
|
268, 339, 269, 253, 162, 254, 350, 332, 351, 130, |
|
331, 352, 110, 111, 61, 112, 93, 163, 115, 165, |
|
198, 276, 192, 277, 75, 76, 77, 78, 79, 80, |
|
81, 82, 83, 84, 85, 87, 86, 88, 74, 13, |
|
4, 158, 19, 22, 23, 26, 25, 24, 238, 148, |
|
21, 30, 232, 148, 233, 27, 28, 29, 226, 20, |
|
227, 18, 235, 229, 237, 230, 222, 17, 224, 184, |
|
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
|
85, 87, 86, 88, 74, 199, 41, 200, 19, 22, |
|
23, 26, 25, 24, 148, 148, 21, 30, 148, 43, |
|
7, 27, 28, 29, 194, 20, 195, 18, 218, 5, |
|
220, 13, 176, 17, 178, 187, 75, 76, 77, 78, |
|
79, 80, 81, 82, 83, 84, 85, 87, 86, 88, |
|
114, 2, 113, 14, 19, 22, 23, 26, 25, 24, |
|
148, 99, 21, 30, 148, 355, 55, 27, 28, 29, |
|
40, 20, 13, 18, 110, 111, 61, 112, 58, 17, |
|
115, 75, 76, 77, 78, 79, 80, 81, 82, 83, |
|
84, 85, 87, 86, 88, 114, 60, 143, 295, 19, |
|
22, 23, 26, 25, 24, 92, 191, 21, 30, 172, |
|
239, 174, 27, 28, 29, 116, 20, 13, 18, 110, |
|
111, 61, 112, 258, 17, 115, 75, 76, 77, 78, |
|
79, 80, 81, 82, 83, 84, 85, 87, 86, 88, |
|
313, 148, 203, 262, 19, 22, 23, 26, 25, 24, |
|
49, 150, 21, 30, 6, 63, 1, 27, 28, 29, |
|
0, 20, 297, 18, 261, 298, 0, 262, 0, 17, |
|
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
|
85, 87, 86, 88, 0, 0, 0, 0, 19, 22, |
|
23, 26, 25, 24, 0, 0, 21, 30, 36, 0, |
|
0, 27, 28, 29, 0, 20, 0, 18, 0, 37, |
|
0, 38, 35, 17, 0, 0, 19, 22, 23, 26, |
|
25, 24, 0, 0, 21, 30, 0, 0, 0, 27, |
|
28, 29, 0, 20, 0, 18, 13, 0, 0, 36, |
|
0, 17, 0, 0, 0, 34, 0, 0, 0, 0, |
|
37, 0, 38, 35, 0, 16, 0, 19, 22, 23, |
|
26, 25, 24, 0, 0, 21, 30, 0, 0, 0, |
|
27, 28, 29, 211, 20, 0, 18, 47, 0, 0, |
|
0, 0, 17, 0, 36, 51, 0, 0, 0, 0, |
|
0, 62, 73, 0, 91, 37, 0, 38, 35, 0, |
|
0, 0, 19, 22, 23, 26, 25, 24, 0, 73, |
|
21, 30, 36, 0, 0, 27, 28, 29, 133, 20, |
|
71, 18, 0, 37, 94, 38, 35, 17, 169, 0, |
|
19, 22, 23, 26, 25, 24, 139, 71, 21, 30, |
|
36, 0, 0, 27, 28, 29, 132, 20, 204, 18, |
|
0, 37, 0, 38, 35, 17, 138, 0, 19, 22, |
|
23, 26, 25, 24, 0, 0, 21, 30, 36, 0, |
|
0, 27, 28, 29, 0, 20, 0, 18, 0, 37, |
|
0, 38, 35, 17, 136, 0, 19, 22, 23, 26, |
|
25, 24, 0, 0, 21, 30, 36, 0, 0, 27, |
|
28, 29, 3, 20, 0, 18, 109, 37, 118, 38, |
|
35, 17, 212, 0, 19, 22, 23, 26, 25, 24, |
|
0, 9, 21, 30, 11, 0, 0, 27, 28, 29, |
|
0, 20, 0, 18, 153, 10, 10, 12, 0, 17, |
|
8, 75, 76, 77, 78, 79, 80, 81, 82, 83, |
|
84, 85, 87, 86, 88, 0, 0, 0, 0, 267, |
|
0, 0, 0, 212, 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, 123, 0, |
0, 72, 0, 0, 0, 0, 0, 266, 0, 0, |
|
0, 0, 0, 0, 0, 186, 0, 0, 72, 0, |
|
0, 0, 0, 302, 0, 0, 0, 0, 212, 197, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
0, 0, -24, 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, 186, 0, 0, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
193, 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, 213, 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, 46, |
|
72, 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, 76, 81, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
}; |
|
static const short yygindex[] = { 0, |
|
205, 347, -23, 158, -28, -26, 189, 73, 95, 198, |
|
200, 0, -31, -25, 0, 0, -91, -85, 246, 0, |
|
65, 0, 0, -90, 0, 0, 229, 0, 9, 0, |
|
0, 0, 152, 0, 266, 0, |
|
}; |
|
#define YYTABLESIZE 542 |
|
static const short yytable[] = { 158, |
|
123, 6, 127, 63, 144, 69, 62, 84, 9, 91, |
|
139, 96, 36, 98, 73, 9, 89, 21, 29, 89, |
|
22, 126, 95, 199, 145, 6, 35, 42, 24, 25, |
|
37, 114, 44, 192, 89, 60, 193, 136, 68, 110, |
|
63, 108, 169, 62, 107, 70, 113, 132, 121, 6, |
|
172, 27, 164, 28, 167, 168, 137, 76, 138, 103, |
|
174, 170, 204, 171, 186, 205, 165, 218, 166, 109, |
|
193, 130, 202, 6, 203, 68, 41, 24, 25, 222, |
|
197, 118, 223, 30, 78, 201, 71, 30, 109, 71, |
|
32, 93, 30, 109, 206, 38, 155, 154, 210, 211, |
|
89, 209, 125, 156, 100, 99, 112, 79, 80, 76, |
|
81, 38, 70, 82, 116, 70, 73, 220, 38, 73, |
|
122, 72, 225, 226, 72, 124, 73, 146, 118, 140, |
|
6, 147, 229, 148, 150, 6, 195, 14, 15, 194, |
|
16, 17, 149, 6, 157, 6, 173, 185, 6, 175, |
|
176, 177, 188, 178, 179, 180, 181, 182, 187, 189, |
|
18, 85, 86, 87, 88, 89, 96, 196, 46, 47, |
|
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
|
58, 59, 152, 72, 198, 208, 14, 15, 212, 16, |
|
17, 38, 46, 47, 48, 49, 50, 51, 52, 53, |
|
54, 55, 56, 57, 58, 59, 143, 109, 216, 18, |
|
14, 15, 217, 16, 17, 219, 46, 47, 48, 49, |
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
|
224, 227, 228, 18, 14, 15, 98, 16, 17, 77, |
|
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
|
56, 57, 58, 59, 129, 104, 122, 18, 14, 15, |
|
78, 16, 17, 200, 105, 213, 106, 78, 39, 221, |
|
94, 153, 26, 0, 0, 0, 0, 0, 0, 0, |
|
0, 18, 0, 79, 80, 76, 81, 0, 131, 82, |
|
79, 80, 76, 81, 0, 131, 82, 46, 47, 48, |
|
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, |
|
59, 1, 0, 0, 0, 14, 15, 0, 16, 17, |
|
14, 15, 0, 16, 17, 0, 0, 2, 0, 2, |
|
3, 0, 3, 14, 15, 0, 16, 17, 18, 0, |
|
78, 0, 4, 18, 4, 5, 0, 5, 19, 20, |
|
0, 0, 23, 0, 0, 0, 18, 0, 0, 0, |
|
0, 0, 0, 79, 80, 76, 81, 34, 131, 82, |
|
0, 0, 0, 43, 0, 45, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 23, 0, |
|
97, 0, 46, 47, 48, 49, 50, 51, 52, 53, |
|
54, 55, 56, 57, 58, 59, 0, 0, 101, 102, |
|
14, 15, 0, 16, 17, 0, 0, 0, 0, 117, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
0, 0, 0, 18, 0, 0, 0, 0, 0, 0, |
|
0, 128, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 141, 142, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 151, 0, 117, 46, 47, 48, |
|
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, |
|
59, 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, 190, 191, 0, 0, 0, |
0, 0, 213, 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, |
214, 215, |
0, 0, 0, 0, 0, 0, 0, 213 }; |
}; |
static YYCONST yytabelem yypact[]={ |
static const short yycheck[] = { 41, |
|
41, 91, 93, 30, 93, 32, 30, 36, 0, 38, |
555, -76,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -294, -30, |
102, 43, 40, 45, 123, 7, 41, 291, 58, 44, |
-213, 548, -266, 548,-10000000, 389, 6,-10000000,-10000000,-10000000, |
299, 44, 58, 41, 110, 91, 40, 44, 44, 44, |
-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, |
58, 44, 291, 41, 59, 125, 44, 40, 30, 61, |
-10000000, -30, -274, 234,-10000000,-10000000,-10000000,-10000000,-10000000, 548, |
67, 68, 40, 67, 68, 44, 59, 59, 74, 91, |
54,-10000000, 43, -288,-10000000, -30, 142, -6, -30, 302, |
142, 275, 138, 277, 59, 141, 59, 297, 61, 125, |
593, -49, -278,-10000000, 548, 46, -265, 232,-10000000, 187, |
146, 59, 41, 61, 150, 44, 59, 41, 61, 91, |
-35,-10000000, -47, 96, 280,-10000000,-10000000,-10000000,-10000000,-10000000, |
44, 97, 59, 91, 61, 67, 93, 93, 93, 41, |
-10000000, 548, -223, 520, 492,-10000000,-10000000,-10000000,-10000000,-10000000, |
166, 73, 44, 123, 272, 171, 41, 123, 91, 44, |
-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, |
58, 58, 123, 91, 185, 123, 128, 126, 190, 191, |
-30, -111, 120, -246, 36,-10000000, 436, -49, -297,-10000000, |
125, 187, 125, 129, 273, 59, 274, 295, 296, 297, |
-265, -265,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 330, |
298, 123, 41, 301, 300, 44, 41, 203, 123, 44, |
-10000000,-10000000,-10000000, -289,-10000000,-10000000, 27,-10000000,-10000000,-10000000, |
297, 41, 214, 215, 44, 41, 123, 61, 120, 59, |
548,-10000000,-10000000, 275,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, |
91, 40, 223, 284, 61, 91, 163, 276, 277, 163, |
-10000000, 288, 548, 464, -169, 460, 548, 383, 548, -47, |
279, 280, 59, 91, 59, 91, 93, 40, 91, 275, |
-10000000, -49,-10000000, 270, -257, 359, 45, 53, -80, 391, |
276, 277, 59, 279, 280, 281, 282, 283, 61, 59, |
267,-10000000, 375, 548,-10000000,-10000000, -265,-10000000,-10000000,-10000000, |
299, 285, 286, 287, 288, 289, 44, 59, 258, 259, |
232, 309,-10000000,-10000000, 356, 2, 233, 230, 379, 548, |
260, 261, 262, 263, 264, 265, 266, 267, 268, 269, |
337, 548,-10000000, 329, 2, 334,-10000000, 323, 2, 333, |
270, 271, 125, 292, 59, 59, 276, 277, 59, 279, |
-10000000,-10000000,-10000000, 338, -196,-10000000,-10000000,-10000000, 45, -16, |
280, 123, 258, 259, 260, 261, 262, 263, 264, 265, |
-10000000, 266,-10000000,-10000000,-10000000, 2, 274,-10000000,-10000000,-10000000, |
266, 267, 268, 269, 270, 271, 295, 91, 59, 299, |
2, 249,-10000000,-10000000,-10000000,-10000000, -275, 17, 533, 248, |
276, 277, 59, 279, 280, 59, 258, 259, 260, 261, |
-10000000, 548, -243, 322,-10000000, 271, 2, 188,-10000000, 224, |
262, 263, 264, 265, 266, 267, 268, 269, 270, 271, |
2, 292,-10000000, 221, 2, 32,-10000000, 2, 239,-10000000, |
59, 59, 59, 299, 276, 277, 44, 279, 280, 35, |
2, 177,-10000000, 2, 236,-10000000, 150, 2, -265, 531, |
258, 259, 260, 261, 262, 263, 264, 265, 266, 267, |
-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, |
268, 269, 270, 271, 97, 67, 297, 299, 276, 277, |
-10000000,-10000000, 217,-10000000, 2, 213,-10000000, -30, 15,-10000000, |
272, 279, 280, 169, 67, 193, 67, 272, 23, 205, |
-10000000, 210, 278,-10000000, 5, 548, 548, -244,-10000000, 2, |
42, 120, 7, -1, -1, -1, -1, -1, -1, -1, |
203, 509, 198,-10000000, 2, 197,-10000000, 2, 97,-10000000, |
-1, 299, -1, 295, 296, 297, 298, -1, 300, 301, |
2, 194,-10000000, 75, 2, 193,-10000000, 186,-10000000, 2, |
295, 296, 297, 298, -1, 300, 301, 258, 259, 260, |
176,-10000000,-10000000, 2, 171, 296,-10000000,-10000000, -196,-10000000, |
261, 262, 263, 264, 265, 266, 267, 268, 269, 270, |
155,-10000000, -54,-10000000, -154,-10000000,-10000000,-10000000, 5, 5, |
271, 257, -1, -1, -1, 276, 277, -1, 279, 280, |
548, 126,-10000000, 125,-10000000, 117,-10000000, 114,-10000000, 2, |
276, 277, -1, 279, 280, -1, -1, 275, -1, 275, |
108,-10000000,-10000000, 2, 101,-10000000,-10000000, 92,-10000000, 76, |
278, -1, 278, 276, 277, -1, 279, 280, 299, -1, |
-10000000, -265,-10000000,-10000000,-10000000, -83,-10000000,-10000000,-10000000, 5, |
272, -1, 290, 299, 290, 293, -1, 293, 2, 3, |
-10000000,-10000000,-10000000,-10000000, 72,-10000000, 59,-10000000,-10000000,-10000000, |
-1, -1, 6, -1, -1, -1, 299, -1, -1, -1, |
-10000000, 350,-10000000,-10000000,-10000000,-10000000 }; |
-1, -1, -1, 295, 296, 297, 298, 21, 300, 301, |
static YYCONST yytabelem yypgo[]={ |
-1, -1, -1, 27, -1, 29, -1, -1, -1, -1, |
|
-1, -1, -1, -1, -1, -1, -1, -1, 42, -1, |
0, 566, 462, 655, 20, 130, 758, 683, 242, 33, |
44, -1, 258, 259, 260, 261, 262, 263, 264, 265, |
50, 239, 213, 180, 162, 99, 565, 65, 73, 564, |
266, 267, 268, 269, 270, 271, -1, -1, 62, 63, |
560, 1, 3, 552, 533, 17, 51, 445, 525, 14, |
276, 277, -1, 279, 280, -1, -1, -1, -1, 73, |
520, 515, 4, 508, 90, 507, 416, 480, 844, 476, |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
439, 430, 0, 2, 461, 370 }; |
-1, -1, -1, 299, -1, -1, -1, -1, -1, -1, |
static YYCONST yytabelem yyr1[]={ |
-1, 95, -1, -1, -1, -1, -1, -1, -1, -1, |
|
-1, -1, -1, 107, 108, -1, -1, -1, -1, -1, |
0, 1, 1, 1, 44, 44, 44, 44, 45, 45, |
-1, -1, -1, -1, 118, -1, 120, 258, 259, 260, |
40, 40, 40, 40, 17, 17, 16, 16, 16, 16, |
261, 262, 263, 264, 265, 266, 267, 268, 269, 270, |
16, 16, 16, 16, 16, 16, 16, 16, 38, 37, |
271, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
37, 36, 36, 36, 36, 39, 39, 33, 33, 34, |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
34, 32, 32, 32, 32, 32, 32, 8, 8, 8, |
-1, -1, -1, -1, -1, 159, 160, -1, -1, -1, |
8, 8, 8, 8, 8, 13, 13, 13, 13, 13, |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
13, 13, 13, 14, 14, 14, 14, 14, 14, 14, |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
14, 11, 11, 11, 11, 11, 11, 11, 11, 12, |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
12, 12, 12, 12, 12, 12, 12, 15, 15, 15, |
194, 195, |
15, 10, 10, 9, 9, 9, 9, 9, 9, 9, |
}; |
9, 21, 21, 22, 22, 23, 23, 24, 24, 25, |
#define YYFINAL 7 |
25, 25, 26, 26, 27, 27, 28, 28, 6, 6, |
|
6, 6, 6, 6, 2, 2, 19, 19, 20, 20, |
|
20, 20, 31, 30, 30, 29, 29, 29, 29, 29, |
|
29, 29, 29, 35, 41, 41, 41, 41, 18, 18, |
|
5, 43, 43, 42, 42, 42, 42, 4, 4, 4, |
|
4, 4, 3, 3, 3, 3, 3, 3, 3, 3, |
|
3, 3, 3, 3, 3, 3, 7, 7, 7, 7, |
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }; |
|
static YYCONST yytabelem yyr2[]={ |
|
|
|
0, 3, 5, 3, 3, 3, 3, 3, 11, 15, |
|
7, 11, 9, 13, 9, 7, 3, 3, 3, 3, |
|
3, 3, 5, 5, 5, 5, 5, 5, 7, 3, |
|
7, 3, 5, 7, 9, 7, 3, 3, 7, 3, |
|
5, 3, 3, 3, 3, 3, 3, 7, 9, 9, |
|
11, 11, 13, 13, 15, 7, 9, 9, 11, 11, |
|
13, 13, 15, 7, 9, 9, 11, 11, 13, 13, |
|
15, 9, 11, 13, 15, 11, 13, 15, 17, 9, |
|
11, 11, 13, 13, 15, 15, 17, 13, 15, 11, |
|
13, 3, 7, 5, 7, 7, 9, 7, 9, 9, |
|
11, 7, 5, 3, 3, 7, 5, 3, 7, 3, |
|
3, 13, 3, 3, 7, 5, 3, 7, 3, 3, |
|
3, 3, 3, 3, 3, 5, 11, 13, 5, 9, |
|
7, 11, 11, 3, 7, 3, 3, 3, 3, 3, |
|
3, 3, 3, 11, 9, 11, 11, 13, 9, 7, |
|
5, 3, 5, 5, 7, 9, 11, 3, 3, 3, |
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; |
|
static YYCONST yytabelem yychk[]={ |
|
|
|
-10000000, -1, -44, 257, -45, -40, -19, -41, 295, 276, |
|
-38, 279, 292, 91, -44, 301, -3, 301, 295, 276, |
|
293, 284, 277, 278, 281, 280, 279, 289, 290, 291, |
|
285, 276, 292, -4, -3, 272, 258, 269, 271, 293, |
|
-37, -36, -4, 40, -17, 58, 123, -3, 293, -20, |
|
58, -3, -4, 93, 44, -39, 58, 40, -27, 123, |
|
-2, 299, -3, -16, 125, -8, -15, -11, -12, -13, |
|
-14, -7, -38, -3, 272, 258, 259, 260, 261, 262, |
|
263, 264, 265, 266, 267, 268, 270, 269, 271, -17, |
|
58, -3, -31, 44, -7, -18, 123, -5, 294, -36, |
|
58, -34, -32, 286, 287, 288, 289, 290, 291, -6, |
|
297, 298, 300, -2, 273, 303, -28, 125, -6, 41, |
|
44, 299, -17, 125, -8, -15, -11, -12, -13, -14, |
|
59, -4, -7, -3, 272, -4, 274, -4, 274, -3, |
|
-18, -5, 59, -35, 44, 275, 61, -21, 91, -43, |
|
125, -42, -4, -38, -18, 302, -34, -32, 41, 125, |
|
44, -4, 59, 59, -21, 61, 40, -4, -4, 274, |
|
-4, 274, 59, -21, 61, -4, 59, -21, 61, -4, |
|
-17, -18, 59, 285, 40, -26, -6, -27, 61, 297, |
|
93, 125, -42, 59, 59, 61, -4, -6, 41, 59, |
|
61, -22, -25, -23, -6, 302, 292, 123, -10, 41, |
|
-9, -7, -3, -38, 59, -21, 61, 40, 59, -21, |
|
61, -4, 59, -21, 61, -4, 59, 61, -22, 59, |
|
61, -21, 59, 61, -22, 59, -21, 61, 40, -30, |
|
-29, 276, 277, 278, 280, 281, 282, 283, 284, -26, |
|
93, 59, -22, 59, 61, -22, 59, 293, -24, 125, |
|
-25, 41, 44, 59, -4, 274, -7, -3, 59, 61, |
|
-22, -10, 41, 59, 61, -22, 59, 61, -21, 59, |
|
61, -22, 59, -21, 61, -22, 59, -22, 59, 61, |
|
-22, 59, 59, 61, -22, -33, -32, 41, 44, 59, |
|
-22, 59, -3, 125, 44, 59, -9, -21, -4, -4, |
|
274, -22, 59, 41, 59, -22, 59, -22, 59, 61, |
|
-22, 59, 59, 61, -22, 59, 59, -22, 59, -22, |
|
59, 44, 41, -29, 59, 123, -25, -21, -21, -4, |
|
59, 59, 59, 59, -22, 59, -22, 59, 59, 59, |
|
-32, -43, -21, 59, 59, 125 }; |
|
static YYCONST yytabelem yydef[]={ |
|
|
|
0, -2, 1, 3, 4, 5, 6, 7, 0, 0, |
|
0, 0, 0, 0, 2, 0, 0, 162, 163, 164, |
|
165, 166, 167, 168, 169, 170, 171, 172, 173, 174, |
|
175, 0, 0, 0, 157, 158, 159, 160, 161, 0, |
|
0, 29, 31, 0, 10, 0, 0, 0, 0, 0, |
|
0, 157, 0, 28, 0, 32, 0, 0, 36, 0, |
|
0, 124, 0, 0, 0, 16, 17, 18, 19, 20, |
|
21, 0, 0, 0, 0, 176, 177, 178, 179, 180, |
|
181, 182, 183, 184, 185, 186, 187, 188, 189, 12, |
|
0, 0, 0, 0, 128, 144, 0, 0, 0, 30, |
|
0, 33, 39, 41, 42, 43, 44, 45, 46, 0, |
|
118, 119, 120, 121, 122, 123, 0, 115, 116, 8, |
|
0, 125, 11, 0, 22, 23, 24, 25, 26, 27, |
|
15, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
145, 0, 126, 0, 0, 0, 0, 130, 0, 0, |
|
0, 151, 0, 0, 146, 150, 34, 40, 35, 114, |
|
0, 0, 14, 47, 0, 0, 0, 0, 0, 0, |
|
0, 0, 55, 0, 0, 0, 63, 0, 0, 0, |
|
13, 147, 127, 0, 0, 129, 112, 113, 0, 0, |
|
102, 0, 152, 149, 153, 0, 0, 117, 9, 49, |
|
0, 0, 103, 104, 109, 110, 0, 0, 0, 0, |
|
91, 0, 0, 0, 48, 0, 0, 0, 56, 0, |
|
0, 0, 64, 0, 0, 0, 57, 0, 0, 71, |
|
0, 0, 65, 0, 0, 79, 0, 0, 0, 0, |
|
133, 135, 136, 137, 138, 139, 140, 141, 142, 131, |
|
101, 148, 0, 154, 0, 0, 51, 0, 0, 106, |
|
107, 0, 0, 89, 93, 0, 0, 0, 50, 0, |
|
0, 0, 0, 58, 0, 0, 72, 0, 0, 66, |
|
0, 0, 80, 0, 0, 0, 59, 0, 75, 0, |
|
0, 67, 81, 0, 0, 0, 37, 132, 0, 155, |
|
0, 53, 0, 105, 0, 87, 92, 97, 94, 95, |
|
0, 0, 52, 0, 90, 0, 60, 0, 76, 0, |
|
0, 68, 82, 0, 0, 61, 73, 0, 69, 0, |
|
83, 0, 143, 134, 156, 0, 108, 98, 99, 96, |
|
54, 88, 62, 74, 0, 70, 0, 85, 77, 84, |
|
38, 0, 100, 78, 86, 111 }; |
|
typedef struct |
|
#ifdef __cplusplus |
|
yytoktype |
|
#endif |
|
{ |
|
#ifdef __cplusplus |
|
const |
|
#endif |
|
char *t_name; int t_val; } yytoktype; |
#ifndef YYDEBUG | #ifndef YYDEBUG |
#define YYDEBUG 0 |
# define YYDEBUG 0 /* don't allow debugging */ |
#endif | #endif |
#define YYMAXTOKEN 301 |
|
#if YYDEBUG | #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, |
yytoktype yytoks[] = |
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, |
{ "TOK_ERROR", 257 }, |
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, |
{ "TOK_BOOLEAN", 258 }, |
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, |
{ "TOK_SINT8", 259 }, |
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, |
{ "TOK_UINT8", 260 }, |
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, |
{ "TOK_SINT16", 261 }, |
0,0,0,"TOK_ERROR","TOK_BOOLEAN","TOK_SINT8","TOK_UINT8","TOK_SINT16", |
{ "TOK_UINT16", 262 }, |
"TOK_UINT16","TOK_SINT32","TOK_UINT32","TOK_SINT64","TOK_UINT64","TOK_REAL32", |
{ "TOK_SINT32", 263 }, |
"TOK_REAL64","TOK_DATETIME","TOK_CHAR16","TOK_STRING","TOK_BOOLEAN_VALUE", |
{ "TOK_UINT32", 264 }, |
"TOK_REF","TOK_SCOPE","TOK_CLASS","TOK_ASSOCIATION","TOK_INDICATION", |
{ "TOK_SINT64", 265 }, |
"TOK_QUALIFIER","TOK_PROPERTY","TOK_REFERENCE","TOK_METHOD","TOK_PARAMETER", |
{ "TOK_UINT64", 266 }, |
"TOK_ANY","TOK_FLAVOR","TOK_ENABLEOVERRIDE","TOK_DISABLEOVERRIDE", |
{ "TOK_REAL32", 267 }, |
"TOK_RESTRICTED","TOK_TOSUBCLASS","TOK_TRANSLATABLE","TOK_INSTANCE","TOK_OF", |
{ "TOK_REAL64", 268 }, |
"TOK_AS","TOK_PRAGMA","TOK_SCHEMA","TOK_INTEGER_VALUE","TOK_REAL_VALUE", |
{ "TOK_DATETIME", 269 }, |
"TOK_STRING_VALUE","TOK_CHAR_VALUE","TOK_IDENT","TOK_ALIAS_IDENTIFIER", |
{ "TOK_CHAR16", 270 }, |
"TOK_NULL", |
{ "TOK_STRING", 271 }, |
|
{ "TOK_OBJECT", 272 }, |
|
{ "TOK_BOOLEAN_VALUE", 273 }, |
|
{ "TOK_REF", 274 }, |
|
{ "TOK_SCOPE", 275 }, |
|
{ "TOK_CLASS", 276 }, |
|
{ "TOK_ASSOCIATION", 277 }, |
|
{ "TOK_INDICATION", 278 }, |
|
{ "TOK_QUALIFIER", 279 }, |
|
{ "TOK_PROPERTY", 280 }, |
|
{ "TOK_REFERENCE", 281 }, |
|
{ "TOK_METHOD", 282 }, |
|
{ "TOK_PARAMETER", 283 }, |
|
{ "TOK_ANY", 284 }, |
|
{ "TOK_FLAVOR", 285 }, |
|
{ "TOK_ENABLEOVERRIDE", 286 }, |
|
{ "TOK_DISABLEOVERRIDE", 287 }, |
|
{ "TOK_RESTRICTED", 288 }, |
|
{ "TOK_TOSUBCLASS", 289 }, |
|
{ "TOK_TOINSTANCE", 290 }, |
|
{ "TOK_TRANSLATABLE", 291 }, |
|
{ "TOK_INSTANCE", 292 }, |
|
{ "TOK_OF", 293 }, |
|
{ "TOK_AS", 294 }, |
|
{ "TOK_PRAGMA", 295 }, |
|
{ "TOK_SCHEMA", 296 }, |
|
{ "TOK_INTEGER_VALUE", 297 }, |
|
{ "TOK_REAL_VALUE", 298 }, |
|
{ "TOK_STRING_VALUE", 299 }, |
|
{ "TOK_CHAR_VALUE", 300 }, |
|
{ "TOK_IDENT", 301 }, |
|
{ "TOK_ALIAS_IDENTIFIER", 302 }, |
|
{ "TOK_NULL", 303 }, |
|
{ "-unknown-", } -1 /* ends search */ |
}; | }; |
static const char *yyrule[] = { |
|
"$accept : mofSpecification", |
#ifdef __cplusplus |
|
const |
|
#endif |
|
char * yyreds[] = |
|
{ |
|
"-no such reduction-", |
"mofSpecification : mofProduction", | "mofSpecification : mofProduction", |
"mofSpecification : mofSpecification mofProduction", | "mofSpecification : mofSpecification mofProduction", |
"mofSpecification : TOK_ERROR", | "mofSpecification : TOK_ERROR", |
|
|
"mofProduction : qualifierDeclaration", | "mofProduction : qualifierDeclaration", |
"mofProduction : instanceDeclaration", | "mofProduction : instanceDeclaration", |
"compilerDirective : TOK_PRAGMA TOK_IDENT '(' stringValue ')'", | "compilerDirective : TOK_PRAGMA TOK_IDENT '(' stringValue ')'", |
"classDeclaration : TOK_CLASS identifier classBody", |
"compilerDirective : TOK_PRAGMA TOK_IDENT '(' stringValue ',' identifier ')'", |
"classDeclaration : TOK_CLASS identifier ':' identifier classBody", |
"classDeclaration : TOK_CLASS classNameIdentifier classBody", |
"classDeclaration : qualifierExpr TOK_CLASS identifier classBody", |
"classDeclaration : TOK_CLASS classNameIdentifier ':' classNameIdentifier classBody", |
"classDeclaration : qualifierExpr TOK_CLASS identifier ':' identifier classBody", |
"classDeclaration : qualifierExpr TOK_CLASS classNameIdentifier classBody", |
|
"classDeclaration : qualifierExpr TOK_CLASS classNameIdentifier ':' classNameIdentifier classBody", |
"classBody : '{' classFeatureList '}' ';'", | "classBody : '{' classFeatureList '}' ';'", |
"classBody : '{' '}' ';'", | "classBody : '{' '}' ';'", |
"classFeatureList : propertyDeclaration", | "classFeatureList : propertyDeclaration", |
"classFeatureList : methodDeclaration", | "classFeatureList : methodDeclaration", |
"classFeatureList : referenceDeclaration", | "classFeatureList : referenceDeclaration", |
|
"classFeatureList : dynamicReferenceDeclaration", |
|
"classFeatureList : staticEmbeddedInstanceDeclaration", |
|
"classFeatureList : dynamicEmbeddedInstanceDeclaration", |
"classFeatureList : classFeatureList propertyDeclaration", | "classFeatureList : classFeatureList propertyDeclaration", |
"classFeatureList : classFeatureList methodDeclaration", | "classFeatureList : classFeatureList methodDeclaration", |
"classFeatureList : classFeatureList referenceDeclaration", | "classFeatureList : classFeatureList referenceDeclaration", |
|
"classFeatureList : classFeatureList dynamicReferenceDeclaration", |
|
"classFeatureList : classFeatureList staticEmbeddedInstanceDeclaration", |
|
"classFeatureList : classFeatureList dynamicEmbeddedInstanceDeclaration", |
"qualifierExpr : '[' qualifierList ']'", | "qualifierExpr : '[' qualifierList ']'", |
"qualifierList : qualifier", | "qualifierList : qualifier", |
"qualifierList : qualifierList ',' qualifier", | "qualifierList : qualifierList ',' qualifier", |
"qualifier : identifier", | "qualifier : identifier", |
"qualifier : identifier qualifierParameter", | "qualifier : identifier qualifierParameter", |
"qualifier : identifier ':' flavor", |
"qualifier : identifier ':' qualifierFlavorList", |
"qualifier : identifier qualifierParameter ':' flavor", |
"qualifier : identifier qualifierParameter ':' qualifierFlavorList", |
"qualifierParameter : '(' constantValue ')'", | "qualifierParameter : '(' constantValue ')'", |
"qualifierParameter : arrayInitializer", |
"qualifierParameter : nonAggregateArrayInitializer", |
"flavorList : flavor", | "flavorList : flavor", |
"flavorList : flavorList ',' flavor", | "flavorList : flavorList ',' flavor", |
|
"qualifierFlavorList : flavor", |
|
"qualifierFlavorList : qualifierFlavorList flavor", |
"flavor : TOK_ENABLEOVERRIDE", | "flavor : TOK_ENABLEOVERRIDE", |
"flavor : TOK_DISABLEOVERRIDE", | "flavor : TOK_DISABLEOVERRIDE", |
"flavor : TOK_RESTRICTED", | "flavor : TOK_RESTRICTED", |
"flavor : TOK_TOSUBCLASS", | "flavor : TOK_TOSUBCLASS", |
|
"flavor : TOK_TOINSTANCE", |
"flavor : TOK_TRANSLATABLE", | "flavor : TOK_TRANSLATABLE", |
"propertyDeclaration : dataType identifier ';'", | "propertyDeclaration : dataType identifier ';'", |
"propertyDeclaration : qualifierExpr dataType identifier ';'", | "propertyDeclaration : qualifierExpr dataType identifier ';'", |
|
|
"propertyDeclaration : qualifierExpr dataType identifier '=' initializer ';'", | "propertyDeclaration : qualifierExpr dataType identifier '=' initializer ';'", |
"propertyDeclaration : dataType identifier subscript '=' initializer ';'", | "propertyDeclaration : dataType identifier subscript '=' initializer ';'", |
"propertyDeclaration : qualifierExpr dataType identifier subscript '=' initializer ';'", | "propertyDeclaration : qualifierExpr dataType identifier subscript '=' initializer ';'", |
"referenceDeclaration : objectRef identifier ';'", |
"staticEmbeddedInstanceDeclaration : classNameIdentifier identifier ';'", |
"referenceDeclaration : qualifierExpr objectRef identifier ';'", |
"staticEmbeddedInstanceDeclaration : qualifierExpr classNameIdentifier identifier ';'", |
"referenceDeclaration : objectRef identifier initializer ';'", |
"staticEmbeddedInstanceDeclaration : classNameIdentifier identifier subscript ';'", |
"referenceDeclaration : qualifierExpr objectRef identifier initializer ';'", |
"staticEmbeddedInstanceDeclaration : qualifierExpr classNameIdentifier identifier subscript ';'", |
|
"staticEmbeddedInstanceDeclaration : classNameIdentifier identifier '=' initializer ';'", |
|
"staticEmbeddedInstanceDeclaration : qualifierExpr classNameIdentifier identifier '=' initializer ';'", |
|
"staticEmbeddedInstanceDeclaration : classNameIdentifier identifier subscript '=' initializer ';'", |
|
"staticEmbeddedInstanceDeclaration : qualifierExpr classNameIdentifier identifier subscript '=' initializer ';'", |
|
"dynamicEmbeddedInstanceDeclaration : TOK_OBJECT identifier ';'", |
|
"dynamicEmbeddedInstanceDeclaration : qualifierExpr TOK_OBJECT identifier ';'", |
|
"dynamicEmbeddedInstanceDeclaration : TOK_OBJECT identifier subscript ';'", |
|
"dynamicEmbeddedInstanceDeclaration : qualifierExpr TOK_OBJECT identifier subscript ';'", |
|
"dynamicEmbeddedInstanceDeclaration : TOK_OBJECT identifier '=' initializer ';'", |
|
"dynamicEmbeddedInstanceDeclaration : qualifierExpr TOK_OBJECT identifier '=' initializer ';'", |
|
"dynamicEmbeddedInstanceDeclaration : TOK_OBJECT identifier subscript '=' initializer ';'", |
|
"dynamicEmbeddedInstanceDeclaration : qualifierExpr TOK_OBJECT identifier subscript '=' initializer ';'", |
|
"referenceDeclaration : classNameIdentifier TOK_REF identifier ';'", |
|
"referenceDeclaration : qualifierExpr classNameIdentifier TOK_REF identifier ';'", |
|
"referenceDeclaration : classNameIdentifier TOK_REF identifier '=' initializer ';'", |
|
"referenceDeclaration : qualifierExpr classNameIdentifier TOK_REF identifier '=' initializer ';'", |
|
"referenceDeclaration : classNameIdentifier TOK_REF identifier subscript ';'", |
|
"referenceDeclaration : qualifierExpr classNameIdentifier TOK_REF identifier subscript ';'", |
|
"referenceDeclaration : classNameIdentifier TOK_REF identifier subscript '=' initializer ';'", |
|
"referenceDeclaration : qualifierExpr classNameIdentifier TOK_REF identifier subscript '=' initializer ';'", |
|
"dynamicReferenceDeclaration : TOK_OBJECT TOK_REF identifier ';'", |
|
"dynamicReferenceDeclaration : qualifierExpr TOK_OBJECT TOK_REF identifier ';'", |
|
"dynamicReferenceDeclaration : TOK_OBJECT TOK_REF identifier subscript ';'", |
|
"dynamicReferenceDeclaration : qualifierExpr TOK_OBJECT TOK_REF identifier subscript ';'", |
|
"dynamicReferenceDeclaration : TOK_OBJECT TOK_REF identifier '=' initializer ';'", |
|
"dynamicReferenceDeclaration : TOK_OBJECT TOK_REF identifier subscript '=' initializer ';'", |
|
"dynamicReferenceDeclaration : qualifierExpr TOK_OBJECT TOK_REF identifier '=' initializer ';'", |
|
"dynamicReferenceDeclaration : qualifierExpr TOK_OBJECT TOK_REF identifier subscript '=' initializer ';'", |
"methodDeclaration : dataType identifier '(' parameterList ')' ';'", | "methodDeclaration : dataType identifier '(' parameterList ')' ';'", |
"methodDeclaration : qualifierExpr dataType identifier '(' parameterList ')' ';'", | "methodDeclaration : qualifierExpr dataType identifier '(' parameterList ')' ';'", |
"methodDeclaration : dataType identifier '(' ')' ';'", | "methodDeclaration : dataType identifier '(' ')' ';'", |
"methodDeclaration : qualifierExpr dataType identifier '(' ')' ';'", | "methodDeclaration : qualifierExpr dataType identifier '(' ')' ';'", |
"dataType : TOK_BOOLEAN", |
|
"dataType : TOK_SINT8", |
|
"dataType : TOK_UINT8", |
|
"dataType : TOK_SINT16", |
|
"dataType : TOK_UINT16", |
|
"dataType : TOK_SINT32", |
|
"dataType : TOK_UINT32", |
|
"dataType : TOK_SINT64", |
|
"dataType : TOK_UINT64", |
|
"dataType : TOK_REAL32", |
|
"dataType : TOK_REAL64", |
|
"dataType : TOK_CHAR16", |
|
"dataType : TOK_DATETIME", |
|
"dataType : TOK_STRING", |
|
"objectRef : identifier TOK_REF", |
|
"parameterList : parameter", | "parameterList : parameter", |
"parameterList : parameterList ',' parameter", | "parameterList : parameterList ',' parameter", |
"parameter : dataType identifier", | "parameter : dataType identifier", |
"parameter : objectRef identifier", |
"parameter : classNameIdentifier TOK_REF identifier", |
"parameter : qualifierExpr dataType identifier", | "parameter : qualifierExpr dataType identifier", |
"parameter : qualifierExpr objectRef identifier", |
"parameter : qualifierExpr classNameIdentifier TOK_REF identifier", |
"parameter : dataType identifier subscript", | "parameter : dataType identifier subscript", |
"parameter : objectRef identifier subscript", |
"parameter : classNameIdentifier TOK_REF identifier subscript", |
"parameter : qualifierExpr dataType identifier subscript", | "parameter : qualifierExpr dataType identifier subscript", |
"parameter : qualifierExpr objectRef identifier subscript", |
"parameter : qualifierExpr classNameIdentifier TOK_REF identifier subscript", |
"subscript : '[' TOK_INTEGER_VALUE ']'", | "subscript : '[' TOK_INTEGER_VALUE ']'", |
"subscript : '[' ']'", | "subscript : '[' ']'", |
"initializer : constantValue", |
"initializer : scalarInitializer", |
"initializer : arrayInitializer", | "initializer : arrayInitializer", |
"initializer : TOK_ALIAS_IDENTIFIER", |
|
"arrayInitializer : '{' arrayInitializerList '}'", | "arrayInitializer : '{' arrayInitializerList '}'", |
"arrayInitializerList : constantValue", |
"arrayInitializer : '{' '}'", |
"arrayInitializerList : arrayInitializerList ',' constantValue", |
"arrayInitializerList : scalarInitializer", |
|
"arrayInitializerList : arrayInitializerList ',' scalarInitializer", |
|
"scalarInitializer : constantValue", |
|
"scalarInitializer : TOK_ALIAS_IDENTIFIER", |
|
"scalarInitializer : TOK_INSTANCE TOK_OF classNameIdentifier '{' valueInitializerList '}'", |
|
"nonAggregateInitializer : constantValue", |
|
"nonAggregateInitializer : nonAggregateArrayInitializer", |
|
"nonAggregateArrayInitializer : '{' nonAggregateArrayInitializerList '}'", |
|
"nonAggregateArrayInitializer : '{' '}'", |
|
"nonAggregateArrayInitializerList : constantValue", |
|
"nonAggregateArrayInitializerList : nonAggregateArrayInitializerList ',' constantValue", |
"constantValue : TOK_INTEGER_VALUE", | "constantValue : TOK_INTEGER_VALUE", |
"constantValue : TOK_REAL_VALUE", | "constantValue : TOK_REAL_VALUE", |
"constantValue : TOK_CHAR_VALUE", | "constantValue : TOK_CHAR_VALUE", |
|
|
"qualifierDeclaration : TOK_QUALIFIER identifier qualifierType scopeExpr ';'", | "qualifierDeclaration : TOK_QUALIFIER identifier qualifierType scopeExpr ';'", |
"qualifierDeclaration : TOK_QUALIFIER identifier qualifierType scopeExpr flavorExpr ';'", | "qualifierDeclaration : TOK_QUALIFIER identifier qualifierType scopeExpr flavorExpr ';'", |
"qualifierType : ':' dataType", | "qualifierType : ':' dataType", |
"qualifierType : ':' dataType '=' initializer", |
"qualifierType : ':' dataType '=' nonAggregateInitializer", |
"qualifierType : ':' dataType subscript", | "qualifierType : ':' dataType subscript", |
"qualifierType : ':' dataType subscript '=' initializer", |
"qualifierType : ':' dataType subscript '=' nonAggregateInitializer", |
"scopeExpr : ',' TOK_SCOPE '(' scopeList ')'", | "scopeExpr : ',' TOK_SCOPE '(' scopeList ')'", |
"scopeList : scope", | "scopeList : scope", |
"scopeList : scopeList ',' scope", | "scopeList : scopeList ',' scope", |
|
|
"scope : TOK_PARAMETER", | "scope : TOK_PARAMETER", |
"scope : TOK_ANY", | "scope : TOK_ANY", |
"flavorExpr : ',' TOK_FLAVOR '(' flavorList ')'", | "flavorExpr : ',' TOK_FLAVOR '(' flavorList ')'", |
"instanceDeclaration : TOK_INSTANCE TOK_OF identifier instanceBody", |
"instanceDeclaration : TOK_INSTANCE TOK_OF classNameIdentifier instanceBody", |
"instanceDeclaration : qualifierExpr TOK_INDICATION TOK_OF identifier instanceBody", |
"instanceDeclaration : qualifierExpr TOK_INSTANCE TOK_OF classNameIdentifier instanceBody", |
"instanceDeclaration : TOK_INSTANCE TOK_OF identifier alias instanceBody", | "instanceDeclaration : TOK_INSTANCE TOK_OF identifier alias instanceBody", |
"instanceDeclaration : qualifierExpr TOK_INDICATION TOK_OF identifier alias instanceBody", |
"instanceDeclaration : qualifierExpr TOK_INSTANCE TOK_OF classNameIdentifier alias instanceBody", |
"instanceBody : '{' valueInitializerList '}' ';'", | "instanceBody : '{' valueInitializerList '}' ';'", |
|
"instanceBody : '{' '}' ';'", |
"alias : TOK_AS TOK_ALIAS_IDENTIFIER", | "alias : TOK_AS TOK_ALIAS_IDENTIFIER", |
"valueInitializerList : valueInitializer", | "valueInitializerList : valueInitializer", |
"valueInitializerList : valueInitializerList valueInitializer", | "valueInitializerList : valueInitializerList valueInitializer", |
|
"valueInitializer : identifier ';'", |
|
"valueInitializer : qualifierExpr identifier ';'", |
"valueInitializer : identifier '=' initializer ';'", | "valueInitializer : identifier '=' initializer ';'", |
"valueInitializer : qualifierExpr identifier '=' initializer ';'", | "valueInitializer : qualifierExpr identifier '=' initializer ';'", |
"identifier : TOK_IDENT", |
"identifier : classNameIdentifier", |
"identifier : TOK_ASSOCIATION", |
"identifier : TOK_OBJECT", |
"identifier : TOK_INDICATION", |
"identifier : TOK_BOOLEAN", |
"identifier : TOK_REFERENCE", |
"identifier : TOK_DATETIME", |
"identifier : TOK_PROPERTY", |
"identifier : TOK_STRING", |
|
"classNameIdentifier : TOK_IDENT", |
|
"classNameIdentifier : TOK_PRAGMA", |
|
"classNameIdentifier : TOK_CLASS", |
|
"classNameIdentifier : TOK_OF", |
|
"classNameIdentifier : TOK_ANY", |
|
"classNameIdentifier : TOK_ASSOCIATION", |
|
"classNameIdentifier : TOK_INDICATION", |
|
"classNameIdentifier : TOK_REFERENCE", |
|
"classNameIdentifier : TOK_PROPERTY", |
|
"classNameIdentifier : TOK_QUALIFIER", |
|
"classNameIdentifier : TOK_TOSUBCLASS", |
|
"classNameIdentifier : TOK_TOINSTANCE", |
|
"classNameIdentifier : TOK_TRANSLATABLE", |
|
"classNameIdentifier : TOK_FLAVOR", |
|
"dataType : TOK_BOOLEAN", |
|
"dataType : TOK_SINT8", |
|
"dataType : TOK_UINT8", |
|
"dataType : TOK_SINT16", |
|
"dataType : TOK_UINT16", |
|
"dataType : TOK_SINT32", |
|
"dataType : TOK_UINT32", |
|
"dataType : TOK_SINT64", |
|
"dataType : TOK_UINT64", |
|
"dataType : TOK_REAL32", |
|
"dataType : TOK_REAL64", |
|
"dataType : TOK_CHAR16", |
|
"dataType : TOK_DATETIME", |
|
"dataType : TOK_STRING", |
}; | }; |
#endif |
#endif /* YYDEBUG */ |
|
# line 1 "/usr/ccs/bin/yaccpar" |
int yydebug; |
/* |
int yynerrs; |
* Copyright (c) 1993 by Sun Microsystems, Inc. |
|
*/ |
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 500 |
|
#define YYMAXDEPTH 500 |
|
#endif |
|
#endif |
|
|
|
#define YYINITSTACKSIZE 500 |
|
| |
typedef struct { |
/* |
unsigned stacksize; |
** Skeleton parser driver for yacc output |
short *s_base; |
*/ |
short *s_mark; |
|
short *s_last; |
|
YYSTYPE *l_base; |
|
YYSTYPE *l_mark; |
|
} YYSTACKDATA; |
|
/* variables for the parser stack */ |
|
static YYSTACKDATA yystack; |
|
| |
#if YYDEBUG |
/* |
#include <stdio.h> /* needed for printf */ |
** yacc user known macros and defines |
|
*/ |
|
#define YYERROR goto yyerrlab |
|
#define YYACCEPT return(0) |
|
#define YYABORT return(1) |
|
#define YYBACKUP( newtoken, newvalue )\ |
|
{\ |
|
if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ |
|
{\ |
|
yyerror( "syntax error - cannot backup" );\ |
|
goto yyerrlab;\ |
|
}\ |
|
yychar = newtoken;\ |
|
yystate = *yyps;\ |
|
yylval = newvalue;\ |
|
goto yynewstate;\ |
|
} |
|
#define YYRECOVERING() (!!yyerrflag) |
|
#define YYNEW(type) PAL_Malloc(sizeof(type) * yynewmax) |
|
#define YYCOPY(to, from, type) \ |
|
(type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type)) |
|
#define YYENLARGE( from, type) \ |
|
(type *) PAL_Realloc((char *) from, yynewmax * sizeof(type)) |
|
#ifndef YYDEBUG |
|
# define YYDEBUG 1 /* make debugging available */ |
#endif | #endif |
| |
#include <stdlib.h> /* needed for malloc, etc */ |
/* |
#include <string.h> /* needed for memset */ |
** user known globals |
|
*/ |
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ |
int yydebug; /* set to 1 to get debugging */ |
static int yygrowstack(YYSTACKDATA *data) |
|
{ |
|
int i; |
|
unsigned newsize; |
|
short *newss; |
|
YYSTYPE *newvs; |
|
| |
if ((newsize = data->stacksize) == 0) |
/* |
newsize = YYINITSTACKSIZE; |
** driver internal defines |
else if (newsize >= YYMAXDEPTH) |
*/ |
return -1; |
#define YYFLAG (-10000000) |
else if ((newsize *= 2) > YYMAXDEPTH) |
|
newsize = YYMAXDEPTH; |
|
| |
i = data->s_mark - data->s_base; |
/* |
newss = (short *)realloc(data->s_base, newsize * sizeof(*newss)); |
** global variables used by the parser |
if (newss == 0) |
*/ |
return -1; |
YYSTYPE *yypv; /* top of value stack */ |
|
int *yyps; /* top of state stack */ |
| |
data->s_base = newss; |
int yystate; /* current state */ |
data->s_mark = newss + i; |
int yytmp; /* extra var (lasts between blocks) */ |
| |
newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs)); |
int yynerrs; /* number of errors */ |
if (newvs == 0) |
int yyerrflag; /* error recovery flag */ |
return -1; |
int yychar; /* current input token number */ |
| |
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) |
#ifdef YYNMBCHARS |
static void yyfreestack(YYSTACKDATA *data) |
#define YYLEX() yycvtok(yylex()) |
{ |
/* |
free(data->s_base); |
** yycvtok - return a token if i is a wchar_t value that exceeds 255. |
free(data->l_base); |
** If i<255, i itself is the token. If i>255 but the neither |
memset(data, 0, sizeof(*data)); |
** of the 30th or 31st bit is on, i is already a token. |
} |
*/ |
|
#if defined(__STDC__) || defined(__cplusplus) |
|
int yycvtok(int i) |
#else | #else |
#define yyfreestack(data) /* nothing */ |
int yycvtok(i) int i; |
#endif | #endif |
|
{ |
|
int first = 0; |
|
int last = YYNMBCHARS - 1; |
|
int mid; |
|
wchar_t j; |
|
|
|
if(i&0x60000000){/*Must convert to a token. */ |
|
if( yymbchars[last].character < i ){ |
|
return i;/*Giving up*/ |
|
} |
|
while ((last>=first)&&(first>=0)) {/*Binary search loop*/ |
|
mid = (first+last)/2; |
|
j = yymbchars[mid].character; |
|
if( j==i ){/*Found*/ |
|
return yymbchars[mid].tvalue; |
|
}else if( j<i ){ |
|
first = mid + 1; |
|
}else{ |
|
last = mid -1; |
|
} |
|
} |
|
/*No entry in the table.*/ |
|
return i;/* Giving up.*/ |
|
}else{/* i is already a token. */ |
|
return i; |
|
} |
|
} |
|
#else/*!YYNMBCHARS*/ |
|
#define YYLEX() yylex() |
|
#endif/*!YYNMBCHARS*/ |
| |
#define YYABORT goto yyabort |
/* |
#define YYREJECT goto yyabort |
** yyparse - return 0 if worked, 1 if syntax error not recovered from |
#define YYACCEPT goto yyaccept |
*/ |
#define YYERROR goto yyerrlab |
#if defined(__STDC__) || defined(__cplusplus) |
|
int yyparse(void) |
int |
#else |
YYPARSE_DECL() |
int yyparse() |
|
#endif |
{ | { |
int yym, yyn, yystate; |
register YYSTYPE *yypvt = 0; /* top of value stack for $vars */ |
#if YYDEBUG |
|
const char *yys; |
|
| |
if ((yys = getenv("YYDEBUG")) != 0) |
#if defined(__cplusplus) || defined(lint) |
|
/* |
|
workarounds to please C++ and lint - goto's inside |
|
switch should never be executed |
|
*/ |
|
static int __yaccpar_lint_workaround__ = 0; |
|
switch (__yaccpar_lint_workaround__) |
{ | { |
yyn = *yys; |
case 1: goto yyerrlab; |
if (yyn >= '0' && yyn <= '9') |
case 2: goto yynewstate; |
yydebug = yyn - '0'; |
|
} | } |
#endif | #endif |
| |
|
/* |
|
** Initialize externals - yyparse may be called more than once |
|
*/ |
|
yypv = &yyv[-1]; |
|
yyps = &yys[-1]; |
|
yystate = 0; |
|
yytmp = 0; |
yynerrs = 0; | yynerrs = 0; |
yyerrflag = 0; | yyerrflag = 0; |
yychar = YYEMPTY; |
yychar = -1; |
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 YYMAXDEPTH <= 0 |
if ((yyn = yydefred[yystate]) != 0) goto yyreduce; |
if (yymaxdepth <= 0) |
if (yychar < 0) |
|
{ | { |
if ((yychar = YYLEX) < 0) yychar = 0; |
if ((yymaxdepth = YYEXPAND(0)) <= 0) |
#if YYDEBUG |
|
if (yydebug) |
|
{ | { |
yys = 0; |
yyerror("yacc initialization error"); |
if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
YYABORT; |
if (!yys) yys = "illegal-symbol"; |
|
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 | #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"); |
{ |
|
register YYSTYPE *yy_pv; /* top of value stack */ |
|
register int *yy_ps; /* top of state stack */ |
|
register int yy_state; /* current state */ |
|
register int yy_n; /* internal state number info */ |
|
goto yystack; /* moved from 6 lines above to here to please C++ */ |
| |
goto yyerrlab; |
/* |
|
** get globals into registers. |
|
** branch to here only if YYBACKUP was called. |
|
*/ |
|
yynewstate: |
|
yy_pv = yypv; |
|
yy_ps = yyps; |
|
yy_state = yystate; |
|
goto yy_newstate; |
| |
yyerrlab: |
/* |
++yynerrs; |
** get globals into registers. |
|
** either we just started, or we just finished a reduction |
|
*/ |
|
yystack: |
|
yy_pv = yypv; |
|
yy_ps = yyps; |
|
yy_state = yystate; |
| |
yyinrecovery: |
/* |
if (yyerrflag < 3) |
** top of for (;;) loop while no reductions done |
{ |
*/ |
yyerrflag = 3; |
yy_stack: |
for (;;) |
/* |
{ |
** put a state and value onto the stacks |
if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 && |
*/ |
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) |
|
{ |
|
#if YYDEBUG | #if YYDEBUG |
|
/* |
|
** if debugging, look up token value in list of value vs. |
|
** name pairs. 0 and negative (-1) are special values. |
|
** Note: linear search is used since time is not a real |
|
** consideration while debugging. |
|
*/ |
if (yydebug) | 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; |
register int yy_i; |
} |
|
yystate = yytable[yyn]; |
printf( "State %d, token ", yy_state ); |
*++yystack.s_mark = yytable[yyn]; |
if ( yychar == 0 ) |
*++yystack.l_mark = yylval; |
printf( "end-of-file\n" ); |
goto yyloop; |
else if ( yychar < 0 ) |
} |
printf( "-none-\n" ); |
else | else |
{ | { |
#if YYDEBUG |
for ( yy_i = 0; yytoks[yy_i].t_val >= 0; |
if (yydebug) |
yy_i++ ) |
printf("%sdebug: error recovery discarding state %d\n", |
{ |
YYPREFIX, *yystack.s_mark); |
if ( yytoks[yy_i].t_val == yychar ) |
#endif |
break; |
if (yystack.s_mark <= yystack.s_base) goto yyabort; |
|
--yystack.s_mark; |
|
--yystack.l_mark; |
|
} | } |
|
printf( "%s\n", yytoks[yy_i].t_name ); |
} | } |
} | } |
else |
#endif /* YYDEBUG */ |
|
if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */ |
{ | { |
if (yychar == 0) goto yyabort; |
/* |
#if YYDEBUG |
** reallocate and recover. Note that pointers |
if (yydebug) |
** have to be reset, or bad things will happen |
|
*/ |
|
long yyps_index = (yy_ps - yys); |
|
long yypv_index = (yy_pv - yyv); |
|
long yypvt_index = (yypvt - yyv); |
|
int yynewmax; |
|
#ifdef YYEXPAND |
|
yynewmax = YYEXPAND(yymaxdepth); |
|
#else |
|
yynewmax = 2 * yymaxdepth; /* double table size */ |
|
if (yymaxdepth == YYMAXDEPTH) /* first time growth */ |
|
{ |
|
char *newyys = (char *)YYNEW(int); |
|
char *newyyv = (char *)YYNEW(YYSTYPE); |
|
if (newyys != 0 && newyyv != 0) |
|
{ |
|
yys = YYCOPY(newyys, yys, int); |
|
yyv = YYCOPY(newyyv, yyv, YYSTYPE); |
|
} |
|
else |
|
yynewmax = 0; /* failed */ |
|
} |
|
else /* not first time */ |
{ | { |
yys = 0; |
yys = YYENLARGE(yys, int); |
if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
yyv = YYENLARGE(yyv, YYSTYPE); |
if (!yys) yys = "illegal-symbol"; |
if (yys == 0 || yyv == 0) |
printf("%sdebug: state %d, error recovery discards token %d (%s)\n", |
yynewmax = 0; /* failed */ |
YYPREFIX, yystate, yychar, yys); |
|
} | } |
#endif | #endif |
yychar = YYEMPTY; |
if (yynewmax <= yymaxdepth) /* tables not expanded */ |
goto yyloop; |
{ |
|
yyerror( "yacc stack overflow" ); |
|
YYABORT; |
|
} |
|
yymaxdepth = yynewmax; |
|
|
|
yy_ps = yys + yyps_index; |
|
yy_pv = yyv + yypv_index; |
|
yypvt = yyv + yypvt_index; |
} | } |
|
*yy_ps = yy_state; |
|
*++yy_pv = yyval; |
| |
yyreduce: |
/* |
|
** we have a new state - find out what to do |
|
*/ |
|
yy_newstate: |
|
if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG ) |
|
goto yydefault; /* simple state */ |
#if YYDEBUG | #if YYDEBUG |
if (yydebug) |
/* |
printf("%sdebug: state %d, reducing by rule %d (%s)\n", |
** if debugging, need to mark whether new token grabbed |
YYPREFIX, yystate, yyn, yyrule[yyn]); |
*/ |
|
yytmp = yychar < 0; |
#endif | #endif |
yym = yylen[yyn]; |
if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) ) |
if (yym) |
yychar = 0; /* reached EOF */ |
yyval = yystack.l_mark[1-yym]; |
#if YYDEBUG |
|
if ( yydebug && yytmp ) |
|
{ |
|
register int yy_i; |
|
|
|
printf( "Received token " ); |
|
if ( yychar == 0 ) |
|
printf( "end-of-file\n" ); |
|
else if ( yychar < 0 ) |
|
printf( "-none-\n" ); |
else | else |
memset(&yyval, 0, sizeof yyval); |
|
switch (yyn) |
|
{ | { |
case 1: |
for ( yy_i = 0; yytoks[yy_i].t_val >= 0; |
#line 139 "mof.y" |
yy_i++ ) |
{ | { |
} |
if ( yytoks[yy_i].t_val == yychar ) |
break; | break; |
case 2: |
|
#line 142 "mof.y" |
|
{ |
|
} | } |
break; |
printf( "%s\n", yytoks[yy_i].t_name ); |
case 3: |
|
#line 145 "mof.y" |
|
{ |
|
YYABORT; |
|
} | } |
break; |
|
case 4: |
|
#line 151 "mof.y" |
|
{ |
|
} | } |
break; |
#endif /* YYDEBUG */ |
case 5: |
if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) ) |
#line 154 "mof.y" |
goto yydefault; |
|
if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/ |
{ | { |
/* [TODO: validate the class here] */ |
yychar = -1; |
yystack.l_mark[0].classDeclaration->flags = MI_FLAG_CLASS; |
yyval = yylval; |
yystack.l_mark[0].classDeclaration->flags |= GetQualFlags(yystack.l_mark[0].classDeclaration->qualifiers, yystack.l_mark[0].classDeclaration->numQualifiers); |
yy_state = yy_n; |
if (FinalizeClass(yystack.l_mark[0].classDeclaration) != 0) |
if ( yyerrflag > 0 ) |
YYABORT; |
yyerrflag--; |
|
goto yy_stack; |
AddClassDecl(yystack.l_mark[0].classDeclaration); |
|
|
|
if (state.classDeclCallback) |
|
(*state.classDeclCallback)(yystack.l_mark[0].classDeclaration, state.classDeclCallbackData); |
|
} | } |
break; |
|
case 6: |
|
#line 167 "mof.y" |
|
{ |
|
AddQualifierDeclaration(yystack.l_mark[0].qualifierDeclaration); |
|
| |
if (state.qualifierDeclCallback) |
yydefault: |
(*state.qualifierDeclCallback)(yystack.l_mark[0].qualifierDeclaration, state.qualifierDeclCallbackData); |
if ( ( yy_n = yydef[ yy_state ] ) == -2 ) |
} |
|
break; |
|
case 7: |
|
#line 174 "mof.y" |
|
{ | { |
if (FinalizeInstance(yystack.l_mark[0].instanceDeclaration) != 0) |
#if YYDEBUG |
YYABORT; |
yytmp = yychar < 0; |
|
#endif |
AddInstanceDecl(yystack.l_mark[0].instanceDeclaration); |
if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) ) |
|
yychar = 0; /* reached EOF */ |
|
#if YYDEBUG |
|
if ( yydebug && yytmp ) |
|
{ |
|
register int yy_i; |
| |
if (state.instanceDeclCallback) |
printf( "Received token " ); |
(*state.instanceDeclCallback)(yystack.l_mark[0].instanceDeclaration, state.instanceDeclCallbackData); |
if ( yychar == 0 ) |
} |
printf( "end-of-file\n" ); |
break; |
else if ( yychar < 0 ) |
case 8: |
printf( "-none-\n" ); |
#line 186 "mof.y" |
else |
{ | { |
if (strcmp(yystack.l_mark[-3].string, "include") == 0) |
for ( yy_i = 0; |
|
yytoks[yy_i].t_val >= 0; |
|
yy_i++ ) |
{ | { |
if (openIncludeFile(yystack.l_mark[-1].string) != 0) |
if ( yytoks[yy_i].t_val |
YYABORT; |
== yychar ) |
} |
|
else if (strcmp(yystack.l_mark[-3].string, "instancelocale") == 0) |
|
{ | { |
if (state.pragmaCallback) |
break; |
(*state.pragmaCallback)(yystack.l_mark[-3].string, yystack.l_mark[-1].string, state.pragmaCallbackData); |
|
} | } |
else if (strcmp(yystack.l_mark[-3].string, "locale") == 0) |
|
{ |
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yystack.l_mark[-3].string, yystack.l_mark[-1].string, state.pragmaCallbackData); |
|
} | } |
else if (strcmp(yystack.l_mark[-3].string, "namespace") == 0) |
printf( "%s\n", yytoks[yy_i].t_name ); |
{ |
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yystack.l_mark[-3].string, yystack.l_mark[-1].string, state.pragmaCallbackData); |
|
} | } |
else |
} |
|
#endif /* YYDEBUG */ |
|
/* |
|
** look through exception table |
|
*/ |
{ | { |
yywarnf(ID_UNKNOWN_PRAGMA, |
register YYCONST int *yyxi = yyexca; |
"warning: unknown pragma: %s=%s", yystack.l_mark[-3].string, yystack.l_mark[-1].string); |
|
| |
if (state.pragmaCallback) |
while ( ( *yyxi != -1 ) || |
(*state.pragmaCallback)(yystack.l_mark[-3].string, yystack.l_mark[-1].string, state.pragmaCallbackData); |
( yyxi[1] != yy_state ) ) |
|
{ |
|
yyxi += 2; |
} | } |
|
while ( ( *(yyxi += 2) >= 0 ) && |
|
( *yyxi != yychar ) ) |
|
; |
|
if ( ( yy_n = yyxi[1] ) < 0 ) |
|
YYACCEPT; |
} | } |
break; |
} |
case 9: |
|
#line 219 "mof.y" |
/* |
{ |
** check for syntax error |
/* Check whether class already exists */ |
*/ |
if (FindClassDecl(yystack.l_mark[-1].string)) |
if ( yy_n == 0 ) /* have an error */ |
{ |
{ |
|
/* no worry about speed here! */ |
|
switch ( yyerrflag ) |
|
{ |
|
case 0: /* new error */ |
|
yyerror( "syntax error" ); |
|
goto skip_init; |
|
yyerrlab: |
|
/* |
|
** get globals into registers. |
|
** we have a user generated syntax type error |
|
*/ |
|
yy_pv = yypv; |
|
yy_ps = yyps; |
|
yy_state = yystate; |
|
skip_init: |
|
yynerrs++; |
|
/* FALLTHRU */ |
|
case 1: |
|
case 2: /* incompletely recovered error */ |
|
/* try again... */ |
|
yyerrflag = 3; |
|
/* |
|
** find state where "error" is a legal |
|
** shift action |
|
*/ |
|
while ( yy_ps >= yys ) |
|
{ |
|
yy_n = yypact[ *yy_ps ] + YYERRCODE; |
|
if ( yy_n >= 0 && yy_n < YYLAST && |
|
yychk[yyact[yy_n]] == YYERRCODE) { |
|
/* |
|
** simulate shift of "error" |
|
*/ |
|
yy_state = yyact[ yy_n ]; |
|
goto yy_stack; |
|
} |
|
/* |
|
** current state has no shift on |
|
** "error", pop stack |
|
*/ |
|
#if YYDEBUG |
|
# define _POP_ "Error recovery pops state %d, uncovers state %d\n" |
|
if ( yydebug ) |
|
printf( _POP_, *yy_ps, |
|
yy_ps[-1] ); |
|
# undef _POP_ |
|
#endif |
|
yy_ps--; |
|
yy_pv--; |
|
} |
|
/* |
|
** there is no state on stack with "error" as |
|
** a valid shift. give up. |
|
*/ |
|
YYABORT; |
|
case 3: /* no shift yet; eat a token */ |
|
#if YYDEBUG |
|
/* |
|
** if debugging, look up token in list of |
|
** pairs. 0 and negative shouldn't occur, |
|
** but since timing doesn't matter when |
|
** debugging, it doesn't hurt to leave the |
|
** tests here. |
|
*/ |
|
if ( yydebug ) |
|
{ |
|
register int yy_i; |
|
|
|
printf( "Error recovery discards " ); |
|
if ( yychar == 0 ) |
|
printf( "token end-of-file\n" ); |
|
else if ( yychar < 0 ) |
|
printf( "token -none-\n" ); |
|
else |
|
{ |
|
for ( yy_i = 0; |
|
yytoks[yy_i].t_val >= 0; |
|
yy_i++ ) |
|
{ |
|
if ( yytoks[yy_i].t_val |
|
== yychar ) |
|
{ |
|
break; |
|
} |
|
} |
|
printf( "token %s\n", |
|
yytoks[yy_i].t_name ); |
|
} |
|
} |
|
#endif /* YYDEBUG */ |
|
if ( yychar == 0 ) /* reached EOF. quit */ |
|
YYABORT; |
|
yychar = -1; |
|
goto yy_newstate; |
|
} |
|
}/* end if ( yy_n == 0 ) */ |
|
/* |
|
** reduction by production yy_n |
|
** put stack tops, etc. so things right after switch |
|
*/ |
|
#if YYDEBUG |
|
/* |
|
** if debugging, print the string that is the user's |
|
** specification of the reduction which is just about |
|
** to be done. |
|
*/ |
|
if ( yydebug ) |
|
printf( "Reduce by (%d) \"%s\"\n", |
|
yy_n, yyreds[ yy_n ] ); |
|
#endif |
|
yytmp = yy_n; /* value to switch over */ |
|
yypvt = yy_pv; /* $vars top of value stack */ |
|
/* |
|
** Look in goto table for next state |
|
** Sorry about using yy_state here as temporary |
|
** register variable, but why not, if it works... |
|
** If yyr2[ yy_n ] doesn't have the low order bit |
|
** set, then there is no action to be done for |
|
** this reduction. So, no saving & unsaving of |
|
** registers done. The only difference between the |
|
** code just after the if and the body of the if is |
|
** the goto yy_stack in the body. This way the test |
|
** can be made before the choice of what to do is needed. |
|
*/ |
|
{ |
|
/* length of production doubled with extra bit */ |
|
register int yy_len = yyr2[ yy_n ]; |
|
|
|
if ( !( yy_len & 01 ) ) |
|
{ |
|
yy_len >>= 1; |
|
yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ |
|
yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + |
|
*( yy_ps -= yy_len ) + 1; |
|
if ( yy_state >= YYLAST || |
|
yychk[ yy_state = |
|
yyact[ yy_state ] ] != -yy_n ) |
|
{ |
|
yy_state = yyact[ yypgo[ yy_n ] ]; |
|
} |
|
goto yy_stack; |
|
} |
|
yy_len >>= 1; |
|
yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ |
|
yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + |
|
*( yy_ps -= yy_len ) + 1; |
|
if ( yy_state >= YYLAST || |
|
yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) |
|
{ |
|
yy_state = yyact[ yypgo[ yy_n ] ]; |
|
} |
|
} |
|
/* save until reenter driver code */ |
|
yystate = yy_state; |
|
yyps = yy_ps; |
|
yypv = yy_pv; |
|
} |
|
/* |
|
** code supplied by user is placed in this switch |
|
*/ |
|
switch( yytmp ) |
|
{ |
|
|
|
case 1: |
|
# line 167 "mof.y" |
|
{ |
|
} break; |
|
case 2: |
|
# line 170 "mof.y" |
|
{ |
|
} break; |
|
case 3: |
|
# line 173 "mof.y" |
|
{ |
|
YYABORT; |
|
} break; |
|
case 4: |
|
# line 179 "mof.y" |
|
{ |
|
} break; |
|
case 5: |
|
# line 182 "mof.y" |
|
{ |
|
/* [TODO: validate the class here] */ |
|
yypvt[-0].classDeclaration->flags = MI_FLAG_CLASS; |
|
yypvt[-0].classDeclaration->flags |= GetQualFlags(yypvt[-0].classDeclaration->qualifiers, yypvt[-0].classDeclaration->numQualifiers); |
|
if (FinalizeClass(yypvt[-0].classDeclaration) != 0) |
|
YYABORT; |
|
|
|
AddClassDecl(yypvt[-0].classDeclaration); |
|
|
|
if (state.classDeclCallback) |
|
(*state.classDeclCallback)(yypvt[-0].classDeclaration, state.classDeclCallbackData); |
|
} break; |
|
case 6: |
|
# line 195 "mof.y" |
|
{ |
|
AddQualifierDeclaration(yypvt[-0].qualifierDeclaration); |
|
|
|
if (state.qualifierDeclCallback) |
|
(*state.qualifierDeclCallback)(yypvt[-0].qualifierDeclaration, state.qualifierDeclCallbackData); |
|
} break; |
|
case 7: |
|
# line 202 "mof.y" |
|
{ |
|
if (FinalizeInstance(yypvt[-0].instanceDeclaration) != 0) |
|
YYABORT; |
|
|
|
AddInstanceDecl(yypvt[-0].instanceDeclaration); |
|
|
|
if (state.instanceDeclCallback) |
|
(*state.instanceDeclCallback)(yypvt[-0].instanceDeclaration, state.instanceDeclCallbackData); |
|
} break; |
|
case 8: |
|
# line 214 "mof.y" |
|
{ |
|
if (strcmp(yypvt[-3].string, "include") == 0) |
|
{ |
|
if (openIncludeFile(yypvt[-1].string) != 0) |
|
YYABORT; |
|
} |
|
else if (strcmp(yypvt[-3].string, "instancelocale") == 0) |
|
{ |
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-3].string, yypvt[-1].string, state.pragmaCallbackData); |
|
} |
|
else if (strcmp(yypvt[-3].string, "locale") == 0) |
|
{ |
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-3].string, yypvt[-1].string, state.pragmaCallbackData); |
|
} |
|
else if (strcmp(yypvt[-3].string, "namespace") == 0) |
|
{ |
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-3].string, yypvt[-1].string, state.pragmaCallbackData); |
|
} |
|
else if (state.extensionsEnabled == MI_TRUE && strcmp(yypvt[-3].string, "deleteclass") == 0) |
|
{ |
|
yywarnf(ID_UNKNOWN_PRAGMA, |
|
"warning: nonstandard pragma: %s(%s)", yypvt[-5].string, yypvt[-3].string); |
|
|
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-3].string, yypvt[-1].string, state.pragmaCallbackData); |
|
} |
|
else |
|
{ |
|
yywarnf(ID_UNKNOWN_PRAGMA, |
|
"warning: unknown pragma: %s(%s)", yypvt[-3].string, yypvt[-1].string); |
|
|
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-3].string, yypvt[-1].string, state.pragmaCallbackData); |
|
} |
|
} break; |
|
case 9: |
|
# line 250 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_TRUE && strcmp(yypvt[-5].string, "deleteclass") == 0) |
|
{ |
|
yywarnf(ID_UNKNOWN_PRAGMA, |
|
"warning: nonstandard pragma: %s(%s)", yypvt[-5].string, yypvt[-3].string); |
|
|
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-5].string, yypvt[-3].string, state.pragmaCallbackData); |
|
} |
|
else |
|
{ |
|
yywarnf(ID_UNKNOWN_PRAGMA, |
|
"warning: unknown pragma: %s(%s)", yypvt[-5].string, yypvt[-3].string); |
|
|
|
if (state.pragmaCallback) |
|
(*state.pragmaCallback)(yypvt[-5].string, yypvt[-3].string, state.pragmaCallbackData); |
|
} |
|
} break; |
|
case 10: |
|
# line 268 "mof.y" |
|
{ |
|
/* Check whether class already exists */ |
|
if (FindClassDecl(yypvt[-1].string)) |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
{ |
yyerrorf(ID_CLASS_ALREADY_DEFINED, | yyerrorf(ID_CLASS_ALREADY_DEFINED, |
"class already defined: \"%s\"", yystack.l_mark[-1].string); |
"class already defined: \"%s\"", yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
|
else |
|
yywarnf(ID_CLASS_ALREADY_DEFINED, |
|
"class already defined: \"%s\"", yypvt[-1].string); |
|
} |
| |
yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); | yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); |
yyval.classDeclaration->flags = MI_FLAG_CLASS; | yyval.classDeclaration->flags = MI_FLAG_CLASS; |
yyval.classDeclaration->name = yystack.l_mark[-1].string; |
yyval.classDeclaration->name = yypvt[-1].string; |
yyval.classDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.classDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.classDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.classDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.classDeclaration->methods = yystack.l_mark[0].featureList.methodList.data; |
yyval.classDeclaration->methods = yypvt[-0].featureList.methodList.data; |
yyval.classDeclaration->numMethods = yystack.l_mark[0].featureList.methodList.size; |
yyval.classDeclaration->numMethods = yypvt[-0].featureList.methodList.size; |
} |
} break; |
break; |
case 11: |
case 10: |
# line 292 "mof.y" |
#line 237 "mof.y" |
|
{ | { |
const MI_ClassDecl* scd; | const MI_ClassDecl* scd; |
| |
/* Check whether class already exists */ | /* Check whether class already exists */ |
if (FindClassDecl(yystack.l_mark[-3].string)) |
if (FindClassDecl(yypvt[-3].string)) |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
{ | { |
yyerrorf(ID_CLASS_ALREADY_DEFINED, | yyerrorf(ID_CLASS_ALREADY_DEFINED, |
"class already defined: \"%s\"", yystack.l_mark[-3].string); |
"class already defined: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
|
else |
|
yywarnf(ID_CLASS_ALREADY_DEFINED, |
|
"class already defined: \"%s\"", yypvt[-3].string); |
|
} |
| |
/* Check whether superclass exists */ | /* Check whether superclass exists */ |
scd = FindClassDecl(yystack.l_mark[-1].string); |
scd = FindClassDecl(yypvt[-1].string); |
| |
if (!scd) | if (!scd) |
{ | { |
yyerrorf(ID_UNDEFINED_SUPERCLASS, | yyerrorf(ID_UNDEFINED_SUPERCLASS, |
"super class of \"%s\" is undefined: \"%s\"", yystack.l_mark[-3].string, yystack.l_mark[-1].string); |
"super class of \"%s\" is undefined: \"%s\"", yypvt[-3].string, yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); | yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); |
yyval.classDeclaration->flags = MI_FLAG_CLASS; | yyval.classDeclaration->flags = MI_FLAG_CLASS; |
yyval.classDeclaration->name = yystack.l_mark[-3].string; |
yyval.classDeclaration->name = yypvt[-3].string; |
yyval.classDeclaration->superClass = yystack.l_mark[-1].string; |
yyval.classDeclaration->superClass = yypvt[-1].string; |
yyval.classDeclaration->superClassDecl = (MI_ClassDecl*)scd; | yyval.classDeclaration->superClassDecl = (MI_ClassDecl*)scd; |
yyval.classDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.classDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.classDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.classDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.classDeclaration->methods = yystack.l_mark[0].featureList.methodList.data; |
yyval.classDeclaration->methods = yypvt[-0].featureList.methodList.data; |
yyval.classDeclaration->numMethods = yystack.l_mark[0].featureList.methodList.size; |
yyval.classDeclaration->numMethods = yypvt[-0].featureList.methodList.size; |
} |
} break; |
break; |
case 12: |
case 11: |
# line 330 "mof.y" |
#line 269 "mof.y" |
|
{ | { |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_CLASS, &yystack.l_mark[-3].qualifierList) != 0) |
if (CheckScope(MI_FLAG_CLASS, &yypvt[-3].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
/* Check whether class already exists */ | /* Check whether class already exists */ |
if (FindClassDecl(yystack.l_mark[-1].string)) |
if (FindClassDecl(yypvt[-1].string)) |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
{ | { |
yyerrorf(ID_CLASS_ALREADY_DEFINED, | yyerrorf(ID_CLASS_ALREADY_DEFINED, |
"class already defined: \"%s\"", yystack.l_mark[-1].string); |
"class already defined: \"%s\"", yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
|
else |
|
yywarnf(ID_CLASS_ALREADY_DEFINED, |
|
"class already defined: \"%s\"", yypvt[-1].string); |
|
} |
| |
yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); | yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); |
yyval.classDeclaration->flags = MI_FLAG_CLASS; | yyval.classDeclaration->flags = MI_FLAG_CLASS; |
yyval.classDeclaration->name = yystack.l_mark[-1].string; |
yyval.classDeclaration->name = yypvt[-1].string; |
yyval.classDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.classDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.classDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.classDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.classDeclaration->methods = yystack.l_mark[0].featureList.methodList.data; |
yyval.classDeclaration->methods = yypvt[-0].featureList.methodList.data; |
yyval.classDeclaration->numMethods = yystack.l_mark[0].featureList.methodList.size; |
yyval.classDeclaration->numMethods = yypvt[-0].featureList.methodList.size; |
yyval.classDeclaration->qualifiers = yystack.l_mark[-3].qualifierList.data; |
yyval.classDeclaration->qualifiers = yypvt[-3].qualifierList.data; |
yyval.classDeclaration->numQualifiers = yystack.l_mark[-3].qualifierList.size; |
yyval.classDeclaration->numQualifiers = yypvt[-3].qualifierList.size; |
} |
} break; |
break; |
case 13: |
case 12: |
# line 360 "mof.y" |
#line 293 "mof.y" |
|
{ | { |
const MI_ClassDecl* scd; | const MI_ClassDecl* scd; |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_CLASS, &yystack.l_mark[-5].qualifierList) != 0) |
if (CheckScope(MI_FLAG_CLASS, &yypvt[-5].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
/* Check whether class already exists */ | /* Check whether class already exists */ |
if (FindClassDecl(yystack.l_mark[-3].string)) |
if (FindClassDecl(yypvt[-3].string)) |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
{ | { |
yyerrorf(ID_CLASS_ALREADY_DEFINED, | yyerrorf(ID_CLASS_ALREADY_DEFINED, |
"class already defined: \"%s\"", yystack.l_mark[-3].string); |
"class already defined: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
|
else |
|
yywarnf(ID_CLASS_ALREADY_DEFINED, |
|
"class already defined: \"%s\"", yypvt[-3].string); |
|
} |
| |
/* Check whether superclass exists */ | /* Check whether superclass exists */ |
scd = FindClassDecl(yystack.l_mark[-1].string); |
scd = FindClassDecl(yypvt[-1].string); |
| |
if (!scd) | if (!scd) |
{ | { |
yyerrorf(ID_UNDEFINED_SUPERCLASS, | yyerrorf(ID_UNDEFINED_SUPERCLASS, |
"super class of \"%s\" is undefined: \"%s\"", yystack.l_mark[-3].string, yystack.l_mark[-1].string); |
"super class of \"%s\" is undefined: \"%s\"", yypvt[-3].string, yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); | yyval.classDeclaration = CALLOC_T(MI_ClassDecl, 1); |
yyval.classDeclaration->flags = MI_FLAG_CLASS; | yyval.classDeclaration->flags = MI_FLAG_CLASS; |
yyval.classDeclaration->name = yystack.l_mark[-3].string; |
yyval.classDeclaration->name = yypvt[-3].string; |
yyval.classDeclaration->superClass = scd->name; | yyval.classDeclaration->superClass = scd->name; |
yyval.classDeclaration->superClassDecl = (MI_ClassDecl*)scd; | yyval.classDeclaration->superClassDecl = (MI_ClassDecl*)scd; |
yyval.classDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.classDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.classDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.classDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.classDeclaration->methods = yystack.l_mark[0].featureList.methodList.data; |
yyval.classDeclaration->methods = yypvt[-0].featureList.methodList.data; |
yyval.classDeclaration->numMethods = yystack.l_mark[0].featureList.methodList.size; |
yyval.classDeclaration->numMethods = yypvt[-0].featureList.methodList.size; |
yyval.classDeclaration->qualifiers = yystack.l_mark[-5].qualifierList.data; |
yyval.classDeclaration->qualifiers = yypvt[-5].qualifierList.data; |
yyval.classDeclaration->numQualifiers = yystack.l_mark[-5].qualifierList.size; |
yyval.classDeclaration->numQualifiers = yypvt[-5].qualifierList.size; |
} |
} break; |
break; |
|
case 13: |
|
#line 333 "mof.y" |
|
{ |
|
yyval.featureList = yystack.l_mark[-2].featureList; |
|
} |
|
break; |
|
case 14: | case 14: |
#line 337 "mof.y" |
# line 406 "mof.y" |
|
{ |
|
yyval.featureList = yypvt[-2].featureList; |
|
} break; |
|
case 15: |
|
# line 410 "mof.y" |
{ | { |
yyval.featureList.propertySet.data = NULL; | yyval.featureList.propertySet.data = NULL; |
yyval.featureList.propertySet.size = 0; | yyval.featureList.propertySet.size = 0; |
yyval.featureList.methodList.data = NULL; | yyval.featureList.methodList.data = NULL; |
yyval.featureList.methodList.size = 0; | yyval.featureList.methodList.size = 0; |
} |
} break; |
break; |
case 16: |
case 15: |
# line 419 "mof.y" |
#line 346 "mof.y" |
|
{ | { |
if (CheckPropertyValueConstraints(yystack.l_mark[0].property) != 0) |
if (CheckPropertyValueConstraints(yypvt[-0].property) != 0) |
{ | { |
YYABORT; | YYABORT; |
} | } |
|
|
yyval.featureList.propertySet.size = 0; | yyval.featureList.propertySet.size = 0; |
yyval.featureList.methodList.data = NULL; | yyval.featureList.methodList.data = NULL; |
yyval.featureList.methodList.size = 0; | yyval.featureList.methodList.size = 0; |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
} |
} break; |
break; |
case 17: |
case 16: |
# line 433 "mof.y" |
#line 360 "mof.y" |
|
{ | { |
yyval.featureList.propertySet.data = NULL; | yyval.featureList.propertySet.data = NULL; |
yyval.featureList.propertySet.size = 0; | yyval.featureList.propertySet.size = 0; |
yyval.featureList.methodList.data = NULL; | yyval.featureList.methodList.data = NULL; |
yyval.featureList.methodList.size = 0; | yyval.featureList.methodList.size = 0; |
yystack.l_mark[0].methodDecl->flags = MI_FLAG_METHOD; |
yypvt[-0].methodDecl->flags = MI_FLAG_METHOD; |
yystack.l_mark[0].methodDecl->flags |= GetQualFlags(yystack.l_mark[0].methodDecl->qualifiers, yystack.l_mark[0].methodDecl->numQualifiers); |
yypvt[-0].methodDecl->flags |= GetQualFlags(yypvt[-0].methodDecl->qualifiers, yypvt[-0].methodDecl->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.methodList, yystack.l_mark[0].methodDecl); |
PtrArray_Append((PtrArray*)&yyval.featureList.methodList, yypvt[-0].methodDecl); |
} |
} break; |
break; |
case 18: |
case 17: |
# line 443 "mof.y" |
#line 370 "mof.y" |
|
{ | { |
yyval.featureList.propertySet.data = NULL; | yyval.featureList.propertySet.data = NULL; |
yyval.featureList.propertySet.size = 0; | yyval.featureList.propertySet.size = 0; |
yyval.featureList.methodList.data = NULL; | yyval.featureList.methodList.data = NULL; |
yyval.featureList.methodList.size = 0; | yyval.featureList.methodList.size = 0; |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
} |
} break; |
break; |
case 19: |
case 18: |
# line 453 "mof.y" |
#line 380 "mof.y" |
{ |
|
yyval.featureList.propertySet.data = NULL; |
|
yyval.featureList.propertySet.size = 0; |
|
yyval.featureList.methodList.data = NULL; |
|
yyval.featureList.methodList.size = 0; |
|
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
|
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
|
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 20: |
|
# line 463 "mof.y" |
{ | { |
if (CheckPropertyValueConstraints(yystack.l_mark[0].property) != 0) |
yyval.featureList.propertySet.data = NULL; |
|
yyval.featureList.propertySet.size = 0; |
|
yyval.featureList.methodList.data = NULL; |
|
yyval.featureList.methodList.size = 0; |
|
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
|
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
|
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 21: |
|
# line 473 "mof.y" |
|
{ |
|
yyval.featureList.propertySet.data = NULL; |
|
yyval.featureList.propertySet.size = 0; |
|
yyval.featureList.methodList.data = NULL; |
|
yyval.featureList.methodList.size = 0; |
|
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
|
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
|
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 22: |
|
# line 483 "mof.y" |
|
{ |
|
if (CheckPropertyValueConstraints(yypvt[-0].property) != 0) |
{ | { |
YYABORT; | YYABORT; |
} | } |
| |
if (FindProperty(&yystack.l_mark[-1].featureList.propertySet, yystack.l_mark[0].property->name)) |
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
{ | { |
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, | yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
"class feature already defined: \"%s\"", yystack.l_mark[0].property->name); |
"class feature already defined: \"%s\"", yypvt[-0].property->name); |
YYABORT; | YYABORT; |
} | } |
| |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 23: |
|
# line 501 "mof.y" |
|
{ |
|
if (FindMethod(&yypvt[-1].featureList.methodList, yypvt[-0].methodDecl->name)) |
|
{ |
|
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
|
"class feature already defined: \"%s\"", yypvt[-0].methodDecl->name); |
|
YYABORT; |
} | } |
break; |
|
case 19: |
yypvt[-0].methodDecl->flags = MI_FLAG_METHOD; |
#line 398 "mof.y" |
yypvt[-0].methodDecl->flags |= GetQualFlags(yypvt[-0].methodDecl->qualifiers, yypvt[-0].methodDecl->numQualifiers); |
|
PtrArray_Append((PtrArray*)&yyval.featureList.methodList, yypvt[-0].methodDecl); |
|
} break; |
|
case 24: |
|
# line 514 "mof.y" |
{ | { |
if (FindMethod(&yystack.l_mark[-1].featureList.methodList, yystack.l_mark[0].methodDecl->name)) |
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
{ | { |
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, | yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
"class feature already defined: \"%s\"", yystack.l_mark[0].methodDecl->name); |
"class feature already defined: \"%s\"", yypvt[-0].property->name); |
YYABORT; | YYABORT; |
} | } |
| |
yystack.l_mark[0].methodDecl->flags = MI_FLAG_METHOD; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].methodDecl->flags |= GetQualFlags(yystack.l_mark[0].methodDecl->qualifiers, yystack.l_mark[0].methodDecl->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.methodList, yystack.l_mark[0].methodDecl); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 25: |
|
# line 527 "mof.y" |
|
{ |
|
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
|
{ |
|
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
|
"class feature already defined: \"%s\"", yypvt[-0].property->name); |
|
YYABORT; |
} | } |
break; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
case 20: |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
#line 411 "mof.y" |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 26: |
|
# line 539 "mof.y" |
{ | { |
if (FindProperty(&yystack.l_mark[-1].featureList.propertySet, yystack.l_mark[0].property->name)) |
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
{ | { |
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, | yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
"class feature already defined: \"%s\"", yystack.l_mark[0].property->name); |
"class feature already defined: \"%s\"", yypvt[-0].property->name); |
YYABORT; | YYABORT; |
} | } |
| |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
} |
} break; |
break; |
case 27: |
case 21: |
# line 552 "mof.y" |
#line 426 "mof.y" |
{ |
|
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
{ | { |
yyval.qualifierList = yystack.l_mark[-1].qualifierList; |
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
|
"class feature already defined: \"%s\"", yypvt[-0].property->name); |
|
YYABORT; |
} | } |
break; |
|
case 22: |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
#line 432 "mof.y" |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
|
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
|
} break; |
|
case 28: |
|
# line 567 "mof.y" |
|
{ |
|
yyval.qualifierList = yypvt[-1].qualifierList; |
|
} break; |
|
case 29: |
|
# line 573 "mof.y" |
{ | { |
yyval.qualifierList.data = NULL; | yyval.qualifierList.data = NULL; |
yyval.qualifierList.size = 0; | yyval.qualifierList.size = 0; |
PtrArray_Append((PtrArray*)&yyval.qualifierList, yystack.l_mark[0].qualifier); |
PtrArray_Append((PtrArray*)&yyval.qualifierList, yypvt[-0].qualifier); |
} |
} break; |
break; |
case 30: |
case 23: |
# line 579 "mof.y" |
#line 438 "mof.y" |
|
{ | { |
if (FindQualifier(&yystack.l_mark[-2].qualifierList, yystack.l_mark[0].qualifier->name)) |
if (FindQualifier(&yypvt[-2].qualifierList, yypvt[-0].qualifier->name)) |
{ | { |
yyerrorf(ID_DUPLICATE_QUALIFIER, | yyerrorf(ID_DUPLICATE_QUALIFIER, |
"duplicate qualifier: \"%s\"", yystack.l_mark[0].qualifier->name); |
"duplicate qualifier: \"%s\"", yypvt[-0].qualifier->name); |
YYABORT; | YYABORT; |
} | } |
| |
PtrArray_Append((PtrArray*)&yyval.qualifierList, yystack.l_mark[0].qualifier); |
PtrArray_Append((PtrArray*)&yyval.qualifierList, yypvt[-0].qualifier); |
} |
} break; |
break; |
case 31: |
case 24: |
# line 592 "mof.y" |
#line 451 "mof.y" |
|
{ | { |
MI_Qualifier* q; | MI_Qualifier* q; |
const MI_QualifierDecl* qd; | const MI_QualifierDecl* qd; |
| |
qd = FindQualifierDeclaration(yystack.l_mark[0].string); |
qd = FindQualifierDeclaration(yypvt[-0].string); |
| |
if (!qd) | if (!qd) |
{ | { |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yystack.l_mark[0].string); |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yypvt[-0].string); |
YYABORT; | YYABORT; |
} | } |
| |
if (qd->type != MI_BOOLEAN) | if (qd->type != MI_BOOLEAN) |
{ | { |
yyerrorf(ID_MISSING_QUALIFIER_INITIALIZER, | yyerrorf(ID_MISSING_QUALIFIER_INITIALIZER, |
"qualifier is missing initializer: \"%s\"", yystack.l_mark[0].string); |
"qualifier is missing initializer: \"%s\"", yypvt[-0].string); |
YYABORT; | YYABORT; |
} | } |
| |
|
|
q->flavor = qd->flavor; | q->flavor = qd->flavor; |
q->value = NewTrueValue(); | q->value = NewTrueValue(); |
yyval.qualifier = q; | yyval.qualifier = q; |
} |
} break; |
break; |
case 32: |
case 25: |
# line 620 "mof.y" |
#line 479 "mof.y" |
|
{ | { |
MI_Qualifier* q; | MI_Qualifier* q; |
const MI_QualifierDecl* qd; | const MI_QualifierDecl* qd; |
void* value; | void* value; |
| |
qd = FindQualifierDeclaration(yystack.l_mark[-1].string); |
qd = FindQualifierDeclaration(yypvt[-1].string); |
| |
if (!qd) | if (!qd) |
{ | { |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yystack.l_mark[-1].string); |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
| |
if (InitializerToValue(&yystack.l_mark[0].initializer, qd->type, &value) != 0) |
if (InitializerToValue(&yypvt[-0].initializer, qd->type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_QUALIFIER_INITIALIZER, | yyerrorf(ID_INVALID_QUALIFIER_INITIALIZER, |
"invalid initializer for qualifer: \"%s\"", yystack.l_mark[-1].string); |
"invalid initializer for qualifer: \"%s\"", yypvt[-1].string); |
YYABORT; | YYABORT; |
} | } |
| |
|
|
q->flavor = qd->flavor; | q->flavor = qd->flavor; |
q->value = value; | q->value = value; |
yyval.qualifier = q; | yyval.qualifier = q; |
} |
} break; |
break; |
case 33: |
case 26: |
# line 648 "mof.y" |
#line 507 "mof.y" |
|
{ | { |
MI_Qualifier* q; | MI_Qualifier* q; |
const MI_QualifierDecl* qd; | const MI_QualifierDecl* qd; |
| |
qd = FindQualifierDeclaration(yystack.l_mark[-2].string); |
qd = FindQualifierDeclaration(yypvt[-2].string); |
| |
if (!qd) | if (!qd) |
{ | { |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yystack.l_mark[-2].string); |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yypvt[-2].string); |
YYABORT; | YYABORT; |
} | } |
| |
if (qd->type != MI_BOOLEAN) | if (qd->type != MI_BOOLEAN) |
{ | { |
yyerrorf(ID_MISSING_QUALIFIER_INITIALIZER, | yyerrorf(ID_MISSING_QUALIFIER_INITIALIZER, |
"qualifier is missing initializer: \"%s\"", yystack.l_mark[-2].string); |
"qualifier is missing initializer: \"%s\"", yypvt[-2].string); |
YYABORT; | YYABORT; |
} | } |
| |
q = CALLOC_T(MI_Qualifier, 1); | q = CALLOC_T(MI_Qualifier, 1); |
q->name = qd->name; /* use casing of qualifier declaration name */ | q->name = qd->name; /* use casing of qualifier declaration name */ |
q->type = qd->type; | q->type = qd->type; |
q->flavor = PropagateFlavors(yystack.l_mark[0].flags, qd->flavor); |
q->flavor = PropagateFlavors(yypvt[-0].flags, qd->flavor); |
q->value = NewTrueValue(); | q->value = NewTrueValue(); |
yyval.qualifier = q; | yyval.qualifier = q; |
} |
} break; |
break; |
case 34: |
case 27: |
# line 675 "mof.y" |
#line 534 "mof.y" |
|
{ | { |
MI_Qualifier* q; | MI_Qualifier* q; |
const MI_QualifierDecl* qd; | const MI_QualifierDecl* qd; |
void* value; | void* value; |
| |
qd = FindQualifierDeclaration(yystack.l_mark[-3].string); |
qd = FindQualifierDeclaration(yypvt[-3].string); |
| |
if (!qd) | if (!qd) |
{ | { |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yystack.l_mark[-3].string); |
yyerrorf(ID_UNDEFINED_QUALIFIER, "undefined qualifier: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
| |
if (InitializerToValue(&yystack.l_mark[-2].initializer, qd->type, &value) != 0) |
if (InitializerToValue(&yypvt[-2].initializer, qd->type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_QUALIFIER_INITIALIZER, | yyerrorf(ID_INVALID_QUALIFIER_INITIALIZER, |
"invalid initializer for qualifer: \"%s\"", yystack.l_mark[-3].string); |
"invalid initializer for qualifer: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
| |
|
|
q->name = qd->name; /* use casing of qualifier declaration name */ | q->name = qd->name; /* use casing of qualifier declaration name */ |
q->type = qd->type; | q->type = qd->type; |
q->value = value; | q->value = value; |
q->flavor = PropagateFlavors(yystack.l_mark[0].flags, qd->flavor); |
q->flavor = PropagateFlavors(yypvt[-0].flags, qd->flavor); |
yyval.qualifier = q; | yyval.qualifier = q; |
} |
} break; |
break; |
case 35: |
case 28: |
# line 705 "mof.y" |
#line 564 "mof.y" |
|
{ | { |
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); | memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); | yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
yyval.initializer.data[0] = yystack.l_mark[-1].constantValue; |
yyval.initializer.data[0] = yypvt[-1].constantValue; |
yyval.initializer.size = 1; | yyval.initializer.size = 1; |
} |
} break; |
break; |
case 36: |
case 29: |
# line 712 "mof.y" |
#line 571 "mof.y" |
|
{ | { |
yyval.initializer = yystack.l_mark[0].initializer; |
yyval.initializer = yypvt[-0].initializer; |
} |
} break; |
break; |
case 37: |
case 30: |
# line 718 "mof.y" |
#line 577 "mof.y" |
|
{ | { |
yyval.flags = yystack.l_mark[0].flags; |
yyval.flags = yypvt[-0].flags; |
} |
} break; |
break; |
case 38: |
case 31: |
# line 722 "mof.y" |
#line 581 "mof.y" |
|
{ | { |
yyval.flags |= yystack.l_mark[0].flags; |
yyval.flags |= yypvt[-0].flags; |
} |
} break; |
break; |
case 39: |
case 32: |
# line 728 "mof.y" |
#line 587 "mof.y" |
{ |
|
yyval.flags = yypvt[-0].flags; |
|
} break; |
|
case 40: |
|
# line 732 "mof.y" |
|
{ |
|
yyval.flags |= yypvt[-0].flags; |
|
} break; |
|
case 41: |
|
# line 738 "mof.y" |
{ | { |
yyval.flags = MI_FLAG_ENABLEOVERRIDE; | yyval.flags = MI_FLAG_ENABLEOVERRIDE; |
} |
} break; |
break; |
case 42: |
case 33: |
# line 742 "mof.y" |
#line 591 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_DISABLEOVERRIDE; | yyval.flags = MI_FLAG_DISABLEOVERRIDE; |
} |
} break; |
break; |
case 43: |
case 34: |
# line 746 "mof.y" |
#line 595 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_RESTRICTED; | yyval.flags = MI_FLAG_RESTRICTED; |
} |
} break; |
break; |
case 44: |
case 35: |
# line 750 "mof.y" |
#line 599 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_TOSUBCLASS; | yyval.flags = MI_FLAG_TOSUBCLASS; |
|
} break; |
|
case 45: |
|
# line 754 "mof.y" |
|
{ |
|
yyval.flags = MI_FLAG_TOINSTANCE; |
|
if (state.extensionsEnabled == MI_FALSE) |
|
{ |
|
yyerrorf(ID_UNSUPPORTED, "Unsupported flavor: ToInstance"); |
|
YYABORT; |
} | } |
break; |
} break; |
case 36: |
case 46: |
#line 603 "mof.y" |
# line 763 "mof.y" |
{ | { |
yyval.flags = MI_FLAG_TRANSLATABLE; | yyval.flags = MI_FLAG_TRANSLATABLE; |
} |
} break; |
break; |
case 47: |
case 37: |
# line 769 "mof.y" |
#line 609 "mof.y" |
|
{ | { |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-1].string; |
yyval.property->name = yypvt[-1].string; |
yyval.property->type = yystack.l_mark[-2].type; |
yyval.property->type = yypvt[-2].type; |
} |
} break; |
break; |
case 48: |
case 38: |
# line 775 "mof.y" |
#line 615 "mof.y" |
|
{ | { |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PROPERTY, &yystack.l_mark[-3].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PROPERTY, &yypvt[-3].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-1].string; |
yyval.property->name = yypvt[-1].string; |
yyval.property->type = yystack.l_mark[-2].type; |
yyval.property->type = yypvt[-2].type; |
yyval.property->qualifiers = yystack.l_mark[-3].qualifierList.data; |
yyval.property->qualifiers = yypvt[-3].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-3].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-3].qualifierList.size; |
} |
} break; |
break; |
case 49: |
case 39: |
# line 787 "mof.y" |
#line 627 "mof.y" |
|
{ | { |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-2].string; |
yyval.property->name = yypvt[-2].string; |
yyval.property->type = ARRAYOF(yystack.l_mark[-3].type); |
yyval.property->type = ARRAYOF(yypvt[-3].type); |
yyval.property->subscript = (MI_Uint32)yystack.l_mark[-1].integer; |
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
} |
} break; |
break; |
case 50: |
case 40: |
# line 794 "mof.y" |
#line 634 "mof.y" |
|
{ | { |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PROPERTY, &yystack.l_mark[-4].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PROPERTY, &yypvt[-4].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-2].string; |
yyval.property->name = yypvt[-2].string; |
yyval.property->type = ARRAYOF(yystack.l_mark[-3].type); |
yyval.property->type = ARRAYOF(yypvt[-3].type); |
yyval.property->qualifiers = yystack.l_mark[-4].qualifierList.data; |
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-4].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
yyval.property->subscript = (MI_Uint32)yystack.l_mark[-1].integer; |
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
} |
} break; |
break; |
case 51: |
case 41: |
# line 807 "mof.y" |
#line 647 "mof.y" |
|
{ | { |
void* value; | void* value; |
| |
if (InitializerToValue(&yystack.l_mark[-1].initializer, yystack.l_mark[-4].type, &value) != 0) |
if (InitializerToValue(&yypvt[-1].initializer, yypvt[-4].type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-3].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->type = yystack.l_mark[-4].type; |
yyval.property->type = yypvt[-4].type; |
yyval.property->value = value; | yyval.property->value = value; |
} |
} break; |
break; |
case 52: |
case 42: |
# line 822 "mof.y" |
#line 662 "mof.y" |
|
{ | { |
void* value; | void* value; |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PROPERTY, &yystack.l_mark[-5].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PROPERTY, &yypvt[-5].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
if (InitializerToValue(&yystack.l_mark[-1].initializer, yystack.l_mark[-4].type, &value) != 0) |
if (InitializerToValue(&yypvt[-1].initializer, yypvt[-4].type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-3].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->type = yystack.l_mark[-4].type; |
yyval.property->type = yypvt[-4].type; |
yyval.property->qualifiers = yystack.l_mark[-5].qualifierList.data; |
yyval.property->qualifiers = yypvt[-5].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-5].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-5].qualifierList.size; |
yyval.property->value = value; | yyval.property->value = value; |
} |
} break; |
break; |
case 53: |
case 43: |
# line 843 "mof.y" |
#line 683 "mof.y" |
|
{ | { |
void* value; | void* value; |
| |
if (InitializerToValue(&yystack.l_mark[-1].initializer, ARRAYOF(yystack.l_mark[-5].type), &value) != 0) |
if (InitializerToValue(&yypvt[-1].initializer, ARRAYOF(yypvt[-5].type), &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-4].string; |
yyval.property->name = yypvt[-4].string; |
yyval.property->type = ARRAYOF(yystack.l_mark[-5].type); |
yyval.property->type = ARRAYOF(yypvt[-5].type); |
yyval.property->subscript = (MI_Uint32)yystack.l_mark[-3].integer; |
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
yyval.property->value = value; | yyval.property->value = value; |
} |
} break; |
break; |
case 54: |
case 44: |
# line 859 "mof.y" |
#line 699 "mof.y" |
|
{ | { |
void* value; | void* value; |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PROPERTY, &yystack.l_mark[-6].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PROPERTY, &yypvt[-6].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
if (InitializerToValue(&yystack.l_mark[-1].initializer, ARRAYOF(yystack.l_mark[-5].type), &value) != 0) |
if (InitializerToValue(&yypvt[-1].initializer, ARRAYOF(yypvt[-5].type), &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-4].string; |
yyval.property->name = yypvt[-4].string; |
yyval.property->type = ARRAYOF(yystack.l_mark[-5].type); |
yyval.property->type = ARRAYOF(yypvt[-5].type); |
yyval.property->qualifiers = yystack.l_mark[-6].qualifierList.data; |
yyval.property->qualifiers = yypvt[-6].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-6].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-6].qualifierList.size; |
yyval.property->subscript = (MI_Uint32)yystack.l_mark[-3].integer; |
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
yyval.property->value = value; | yyval.property->value = value; |
|
} break; |
|
case 55: |
|
# line 883 "mof.y" |
|
{ |
|
const MI_ClassDecl* cd; |
|
|
|
/* Verify that class exists */ |
|
cd = FindClassDecl(yypvt[-2].string); |
|
if (!cd) |
|
{ |
|
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-2].string); |
|
YYABORT; |
} | } |
break; |
|
case 45: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 723 "mof.y" |
yyval.property->type = MI_INSTANCE; |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->className = cd->name; |
|
} break; |
|
case 56: |
|
# line 900 "mof.y" |
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-2].string); |
cd = FindClassDecl(yypvt[-2].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-2].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-2].string); |
YYABORT; | YYABORT; |
} | } |
| |
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-3].qualifierList) != 0) |
|
YYABORT; |
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->type = MI_REFERENCE; |
yyval.property->type = MI_INSTANCE; |
yyval.property->name = yystack.l_mark[-1].string; |
yyval.property->name = yypvt[-1].string; |
yyval.property->className = cd->name; | yyval.property->className = cd->name; |
|
yyval.property->qualifiers = yypvt[-3].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-3].qualifierList.size; |
|
} break; |
|
case 57: |
|
# line 923 "mof.y" |
|
{ |
|
const MI_ClassDecl* cd; |
|
|
|
/* Verify that class exists */ |
|
cd = FindClassDecl(yypvt[-3].string); |
|
if (!cd) |
|
{ |
|
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
|
YYABORT; |
} | } |
break; |
|
case 46: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 740 "mof.y" |
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
|
} break; |
|
case 58: |
|
# line 941 "mof.y" |
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-2].string); |
cd = FindClassDecl(yypvt[-3].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-2].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_REFERENCE, &yystack.l_mark[-3].qualifierList) != 0) |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-4].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->type = MI_REFERENCE; |
yyval.property->type = MI_INSTANCEA; |
yyval.property->name = yystack.l_mark[-1].string; |
yyval.property->name = yypvt[-2].string; |
yyval.property->className = cd->name; | yyval.property->className = cd->name; |
yyval.property->qualifiers = yystack.l_mark[-3].qualifierList.data; |
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
yyval.property->numQualifiers = yystack.l_mark[-3].qualifierList.size; |
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
} |
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
break; |
} break; |
case 47: |
case 59: |
#line 763 "mof.y" |
# line 965 "mof.y" |
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-3].string); |
cd = FindClassDecl(yypvt[-4].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-3].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-4].string); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->type = MI_REFERENCE; |
yyval.property->type = MI_INSTANCE; |
yyval.property->name = yystack.l_mark[-2].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->className = cd->name; | yyval.property->className = cd->name; |
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); | yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
/* [TODO: use initializer */ |
/* TODO: use initializer */ |
} |
} break; |
break; |
case 60: |
case 48: |
# line 984 "mof.y" |
#line 782 "mof.y" |
|
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-3].string); |
cd = FindClassDecl(yypvt[-4].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-3].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-4].string); |
YYABORT; | YYABORT; |
} | } |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_REFERENCE, &yystack.l_mark[-4].qualifierList) != 0) |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-5].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->type = MI_REFERENCE; |
yyval.property->type = MI_INSTANCE; |
yyval.property->name = yystack.l_mark[-2].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->className = cd->name; | yyval.property->className = cd->name; |
yyval.property->qualifiers = yystack.l_mark[-4].qualifierList.data; |
yyval.property->qualifiers = yypvt[-5].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-4].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-5].qualifierList.size; |
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); | yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
/* [TODO: use initializer */ |
/* TODO: use initializer */ |
} |
} break; |
break; |
case 61: |
case 49: |
# line 1009 "mof.y" |
#line 809 "mof.y" |
|
{ | { |
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
const MI_ClassDecl* cd; |
yyval.methodDecl->name = yystack.l_mark[-4].string; |
|
yyval.methodDecl->parameters = yystack.l_mark[-2].parameterList.data; |
/* Verify that class exists */ |
yyval.methodDecl->numParameters = yystack.l_mark[-2].parameterList.size; |
cd = FindClassDecl(yypvt[-5].string); |
yyval.methodDecl->returnType = yystack.l_mark[-5].type; |
if (!cd) |
|
{ |
|
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-5].string); |
|
YYABORT; |
} | } |
break; |
|
case 50: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 817 "mof.y" |
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 62: |
|
# line 1029 "mof.y" |
{ | { |
|
const MI_ClassDecl* cd; |
|
|
|
/* Verify that class exists */ |
|
cd = FindClassDecl(yypvt[-5].string); |
|
if (!cd) |
|
{ |
|
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-5].string); |
|
YYABORT; |
|
} |
|
|
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_METHOD, &yystack.l_mark[-6].qualifierList) != 0) |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-6].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.methodDecl->name = yystack.l_mark[-4].string; |
yyval.property->type = MI_INSTANCEA; |
yyval.methodDecl->parameters = yystack.l_mark[-2].parameterList.data; |
yyval.property->name = yypvt[-4].string; |
yyval.methodDecl->numParameters = yystack.l_mark[-2].parameterList.size; |
yyval.property->className = cd->name; |
yyval.methodDecl->qualifiers = yystack.l_mark[-6].qualifierList.data; |
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
yyval.methodDecl->numQualifiers = yystack.l_mark[-6].qualifierList.size; |
yyval.property->qualifiers = yypvt[-6].qualifierList.data; |
yyval.methodDecl->returnType = yystack.l_mark[-5].type; |
yyval.property->numQualifiers = yypvt[-6].qualifierList.size; |
} |
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
break; |
/* TODO: use initializer */ |
case 51: |
} break; |
#line 831 "mof.y" |
case 63: |
|
# line 1057 "mof.y" |
{ | { |
MOF_ParameterList parameterList = PTRARRAY_INITIALIZER; |
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCE; |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->className = "?"; |
|
} break; |
|
case 64: |
|
# line 1066 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCE; |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->className = "?"; |
|
yyval.property->qualifiers = yypvt[-3].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-3].qualifierList.size; |
|
} break; |
|
case 65: |
|
# line 1077 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = 0; |
|
} break; |
|
case 66: |
|
# line 1087 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = 0; |
|
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
|
} break; |
|
case 67: |
|
# line 1099 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = "?"; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 68: |
|
# line 1110 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = "?"; |
|
yyval.property->qualifiers = yypvt[-5].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-5].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 69: |
|
# line 1123 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 70: |
|
# line 1135 "mof.y" |
|
{ |
|
if (state.extensionsEnabled == MI_FALSE) |
|
yywarnf(ID_UNSUPPORTED, "warning: OBJECT keyword is not supported"); |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_INSTANCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yyval.property->qualifiers = yypvt[-6].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-6].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 71: |
|
# line 1151 "mof.y" |
|
{ |
|
const MI_ClassDecl* cd; |
| |
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
/* Verify that class exists */ |
yyval.methodDecl->name = yystack.l_mark[-3].string; |
cd = FindClassDecl(yypvt[-3].string); |
yyval.methodDecl->parameters = parameterList.data; |
if (!cd) |
yyval.methodDecl->numParameters = parameterList.size; |
{ |
yyval.methodDecl->returnType = yystack.l_mark[-4].type; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
|
YYABORT; |
} | } |
break; |
|
case 52: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 841 "mof.y" |
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->className = cd->name; |
|
} break; |
|
case 72: |
|
# line 1168 "mof.y" |
{ | { |
MOF_ParameterList parameterList = PTRARRAY_INITIALIZER; |
const MI_ClassDecl* cd; |
|
|
|
/* Verify that class exists */ |
|
cd = FindClassDecl(yypvt[-3].string); |
|
if (!cd) |
|
{ |
|
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
|
YYABORT; |
|
} |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_METHOD, &yystack.l_mark[-5].qualifierList) != 0) |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-4].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.methodDecl->name = yystack.l_mark[-3].string; |
yyval.property->type = MI_REFERENCE; |
yyval.methodDecl->parameters = parameterList.data; |
yyval.property->name = yypvt[-1].string; |
yyval.methodDecl->numParameters = parameterList.size; |
yyval.property->className = cd->name; |
yyval.methodDecl->qualifiers = yystack.l_mark[-5].qualifierList.data; |
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
yyval.methodDecl->numQualifiers = yystack.l_mark[-5].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
yyval.methodDecl->returnType = yystack.l_mark[-4].type; |
} break; |
} |
case 73: |
break; |
# line 1191 "mof.y" |
case 53: |
|
#line 859 "mof.y" |
|
{ | { |
yyval.type = MI_BOOLEAN; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 54: |
cd = FindClassDecl(yypvt[-5].string); |
#line 863 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_SINT8; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-5].string); |
|
YYABORT; |
} | } |
break; |
|
case 55: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 867 "mof.y" |
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = cd->name; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* [TODO: use initializer */ |
|
} break; |
|
case 74: |
|
# line 1210 "mof.y" |
{ | { |
yyval.type = MI_UINT8; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 56: |
cd = FindClassDecl(yypvt[-5].string); |
#line 871 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_SINT16; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-5].string); |
|
YYABORT; |
} | } |
break; |
|
case 57: |
/* Check qualifier scope */ |
#line 875 "mof.y" |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-6].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->qualifiers = yypvt[-6].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-6].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* [TODO: use initializer */ |
|
} break; |
|
case 75: |
|
# line 1235 "mof.y" |
{ | { |
yyval.type = MI_UINT16; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 58: |
cd = FindClassDecl(yypvt[-4].string); |
#line 879 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_SINT32; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-4].string); |
|
YYABORT; |
} | } |
break; |
|
case 59: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 883 "mof.y" |
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
|
} break; |
|
case 76: |
|
# line 1253 "mof.y" |
{ | { |
yyval.type = MI_UINT32; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 60: |
cd = FindClassDecl(yypvt[-4].string); |
#line 887 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_SINT64; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-4].string); |
|
YYABORT; |
} | } |
break; |
|
case 61: |
/* Check qualifier scope */ |
#line 891 "mof.y" |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-5].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
|
yyval.property->qualifiers = yypvt[-5].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-5].qualifierList.size; |
|
} break; |
|
case 77: |
|
# line 1277 "mof.y" |
{ | { |
yyval.type = MI_UINT64; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 62: |
cd = FindClassDecl(yypvt[-6].string); |
#line 895 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_REAL32; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-6].string); |
|
YYABORT; |
} | } |
break; |
|
case 63: |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
#line 899 "mof.y" |
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 78: |
|
# line 1297 "mof.y" |
{ | { |
yyval.type = MI_REAL64; |
const MI_ClassDecl* cd; |
} |
|
break; |
/* Verify that class exists */ |
case 64: |
cd = FindClassDecl(yypvt[-6].string); |
#line 903 "mof.y" |
if (!cd) |
{ | { |
yyval.type = MI_CHAR16; |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-6].string); |
|
YYABORT; |
} | } |
break; |
|
case 65: |
/* Check qualifier scope */ |
#line 907 "mof.y" |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-7].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = cd->name; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yyval.property->qualifiers = yypvt[-7].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-7].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 79: |
|
# line 1325 "mof.y" |
{ | { |
yyval.type = MI_DATETIME; |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
} |
yyval.property->type = MI_REFERENCE; |
break; |
yyval.property->name = yypvt[-1].string; |
case 66: |
yyval.property->className = "?"; |
#line 911 "mof.y" |
} break; |
|
case 80: |
|
# line 1332 "mof.y" |
{ | { |
yyval.type = MI_STRING; |
/* Check qualifier scope */ |
} |
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-4].qualifierList) != 0) |
break; |
YYABORT; |
case 67: |
|
#line 917 "mof.y" |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->className = "?"; |
|
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
|
} break; |
|
case 81: |
|
# line 1345 "mof.y" |
{ | { |
yyval.string = yystack.l_mark[-1].string; |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
} |
yyval.property->type = MI_REFERENCEA; |
break; |
yyval.property->name = yypvt[-2].string; |
case 68: |
yyval.property->className = "?"; |
#line 923 "mof.y" |
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
|
} break; |
|
case 82: |
|
# line 1353 "mof.y" |
|
{ |
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-5].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-2].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-1].integer; |
|
yyval.property->qualifiers = yypvt[-5].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-5].qualifierList.size; |
|
} break; |
|
case 83: |
|
# line 1367 "mof.y" |
{ | { |
yystack.l_mark[0].parameter->flags = MI_FLAG_PARAMETER; |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yystack.l_mark[0].parameter->flags |= GetQualFlags(yystack.l_mark[0].parameter->qualifiers, yystack.l_mark[0].parameter->numQualifiers); |
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = "?"; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 84: |
|
# line 1376 "mof.y" |
|
{ |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 85: |
|
# line 1386 "mof.y" |
|
{ |
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-6].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCE; |
|
yyval.property->name = yypvt[-3].string; |
|
yyval.property->className = "?"; |
|
yyval.property->qualifiers = yypvt[-6].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-6].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 86: |
|
# line 1401 "mof.y" |
|
{ |
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_REFERENCE, &yypvt[-7].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->type = MI_REFERENCEA; |
|
yyval.property->name = yypvt[-4].string; |
|
yyval.property->className = "?"; |
|
yyval.property->subscript = (MI_Uint32)yypvt[-3].integer; |
|
yyval.property->qualifiers = yypvt[-7].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-7].qualifierList.size; |
|
yywarnf(ID_IGNORED_INITIALIZER, "warning: ignored initializer"); |
|
/* TODO: use initializer */ |
|
} break; |
|
case 87: |
|
# line 1419 "mof.y" |
|
{ |
|
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
|
yyval.methodDecl->name = yypvt[-4].string; |
|
yyval.methodDecl->parameters = yypvt[-2].parameterList.data; |
|
yyval.methodDecl->numParameters = yypvt[-2].parameterList.size; |
|
yyval.methodDecl->returnType = yypvt[-5].type; |
|
} break; |
|
case 88: |
|
# line 1427 "mof.y" |
|
{ |
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_METHOD, &yypvt[-6].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
|
yyval.methodDecl->name = yypvt[-4].string; |
|
yyval.methodDecl->parameters = yypvt[-2].parameterList.data; |
|
yyval.methodDecl->numParameters = yypvt[-2].parameterList.size; |
|
yyval.methodDecl->qualifiers = yypvt[-6].qualifierList.data; |
|
yyval.methodDecl->numQualifiers = yypvt[-6].qualifierList.size; |
|
yyval.methodDecl->returnType = yypvt[-5].type; |
|
} break; |
|
case 89: |
|
# line 1441 "mof.y" |
|
{ |
|
MOF_ParameterList parameterList = PTRARRAY_INITIALIZER; |
|
|
|
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
|
yyval.methodDecl->name = yypvt[-3].string; |
|
yyval.methodDecl->parameters = parameterList.data; |
|
yyval.methodDecl->numParameters = parameterList.size; |
|
yyval.methodDecl->returnType = yypvt[-4].type; |
|
} break; |
|
case 90: |
|
# line 1451 "mof.y" |
|
{ |
|
MOF_ParameterList parameterList = PTRARRAY_INITIALIZER; |
|
|
|
/* Check qualifier scope */ |
|
if (CheckScope(MI_FLAG_METHOD, &yypvt[-5].qualifierList) != 0) |
|
YYABORT; |
|
|
|
yyval.methodDecl = CALLOC_T(MI_MethodDecl, 1); |
|
yyval.methodDecl->name = yypvt[-3].string; |
|
yyval.methodDecl->parameters = parameterList.data; |
|
yyval.methodDecl->numParameters = parameterList.size; |
|
yyval.methodDecl->qualifiers = yypvt[-5].qualifierList.data; |
|
yyval.methodDecl->numQualifiers = yypvt[-5].qualifierList.size; |
|
yyval.methodDecl->returnType = yypvt[-4].type; |
|
} break; |
|
case 91: |
|
# line 1469 "mof.y" |
|
{ |
|
yypvt[-0].parameter->flags = MI_FLAG_PARAMETER; |
|
yypvt[-0].parameter->flags |= GetQualFlags(yypvt[-0].parameter->qualifiers, yypvt[-0].parameter->numQualifiers); |
yyval.parameterList.data = NULL; | yyval.parameterList.data = NULL; |
yyval.parameterList.size = 0; | yyval.parameterList.size = 0; |
PtrArray_Append((PtrArray*)&yyval.parameterList, yystack.l_mark[0].parameter); |
PtrArray_Append((PtrArray*)&yyval.parameterList, yypvt[-0].parameter); |
} |
} break; |
break; |
case 92: |
case 69: |
# line 1477 "mof.y" |
#line 931 "mof.y" |
|
{ | { |
if (FindParameter(&yystack.l_mark[-2].parameterList, yystack.l_mark[0].parameter->name)) |
if (FindParameter(&yypvt[-2].parameterList, yypvt[-0].parameter->name)) |
{ | { |
yyerrorf(ID_PARAMETER_ALREADY_DEFINED, | yyerrorf(ID_PARAMETER_ALREADY_DEFINED, |
"parameter already defined: \"%s\"", yystack.l_mark[0].parameter->name); |
"parameter already defined: \"%s\"", yypvt[-0].parameter->name); |
YYABORT; | YYABORT; |
} | } |
| |
yystack.l_mark[0].parameter->flags = MI_FLAG_PARAMETER; |
yypvt[-0].parameter->flags = MI_FLAG_PARAMETER; |
yystack.l_mark[0].parameter->flags |= GetQualFlags(yystack.l_mark[0].parameter->qualifiers, yystack.l_mark[0].parameter->numQualifiers); |
yypvt[-0].parameter->flags |= GetQualFlags(yypvt[-0].parameter->qualifiers, yypvt[-0].parameter->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.parameterList, yystack.l_mark[0].parameter); |
PtrArray_Append((PtrArray*)&yyval.parameterList, yypvt[-0].parameter); |
} |
} break; |
break; |
case 93: |
case 70: |
# line 1492 "mof.y" |
#line 946 "mof.y" |
|
{ | { |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[0].string; |
yyval.parameter->name = yypvt[-0].string; |
yyval.parameter->type = yystack.l_mark[-1].type; |
yyval.parameter->type = yypvt[-1].type; |
} |
} break; |
break; |
case 94: |
case 71: |
# line 1498 "mof.y" |
#line 952 "mof.y" |
|
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-1].string); |
cd = FindClassDecl(yypvt[-2].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-1].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-2].string); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[0].string; |
yyval.parameter->name = yypvt[-0].string; |
yyval.parameter->type = MI_REFERENCE; | yyval.parameter->type = MI_REFERENCE; |
yyval.parameter->className = cd->name; | yyval.parameter->className = cd->name; |
} |
} break; |
break; |
case 95: |
case 72: |
# line 1515 "mof.y" |
#line 969 "mof.y" |
|
{ | { |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PARAMETER, &yystack.l_mark[-2].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PARAMETER, &yypvt[-2].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[0].string; |
yyval.parameter->name = yypvt[-0].string; |
yyval.parameter->type = yystack.l_mark[-1].type; |
yyval.parameter->type = yypvt[-1].type; |
yyval.parameter->qualifiers = yystack.l_mark[-2].qualifierList.data; |
yyval.parameter->qualifiers = yypvt[-2].qualifierList.data; |
yyval.parameter->numQualifiers = yystack.l_mark[-2].qualifierList.size; |
yyval.parameter->numQualifiers = yypvt[-2].qualifierList.size; |
} |
} break; |
break; |
case 96: |
case 73: |
# line 1527 "mof.y" |
#line 981 "mof.y" |
|
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-1].string); |
cd = FindClassDecl(yypvt[-2].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-1].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-2].string); |
YYABORT; | YYABORT; |
} | } |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PARAMETER, &yystack.l_mark[-2].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PARAMETER, &yypvt[-3].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[0].string; |
yyval.parameter->name = yypvt[-0].string; |
yyval.parameter->type = MI_REFERENCE; | yyval.parameter->type = MI_REFERENCE; |
yyval.parameter->className = cd->name; | yyval.parameter->className = cd->name; |
yyval.parameter->qualifiers = yystack.l_mark[-2].qualifierList.data; |
yyval.parameter->qualifiers = yypvt[-3].qualifierList.data; |
yyval.parameter->numQualifiers = yystack.l_mark[-2].qualifierList.size; |
yyval.parameter->numQualifiers = yypvt[-3].qualifierList.size; |
} |
} break; |
break; |
case 97: |
case 74: |
# line 1550 "mof.y" |
#line 1004 "mof.y" |
|
{ | { |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[-1].string; |
yyval.parameter->name = yypvt[-1].string; |
yyval.parameter->type = ARRAYOF(yystack.l_mark[-2].type); |
yyval.parameter->type = ARRAYOF(yypvt[-2].type); |
yyval.parameter->subscript = (MI_Uint32)yystack.l_mark[0].integer; |
yyval.parameter->subscript = (MI_Uint32)yypvt[-0].integer; |
} |
} break; |
break; |
case 98: |
case 75: |
# line 1557 "mof.y" |
#line 1011 "mof.y" |
|
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-2].string); |
cd = FindClassDecl(yypvt[-3].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-2].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[-1].string; |
yyval.parameter->name = yypvt[-1].string; |
yyval.parameter->type = ARRAYOF(MI_REFERENCE); | yyval.parameter->type = ARRAYOF(MI_REFERENCE); |
yyval.parameter->className = cd->name; | yyval.parameter->className = cd->name; |
yyval.parameter->subscript = (MI_Uint32)yystack.l_mark[0].integer; |
yyval.parameter->subscript = (MI_Uint32)yypvt[-0].integer; |
} |
} break; |
break; |
case 99: |
case 76: |
# line 1575 "mof.y" |
#line 1029 "mof.y" |
|
{ | { |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PARAMETER, &yystack.l_mark[-3].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PARAMETER, &yypvt[-3].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[-1].string; |
yyval.parameter->name = yypvt[-1].string; |
yyval.parameter->type = ARRAYOF(yystack.l_mark[-2].type); |
yyval.parameter->type = ARRAYOF(yypvt[-2].type); |
yyval.parameter->subscript = (MI_Uint32)yystack.l_mark[0].integer; |
yyval.parameter->subscript = (MI_Uint32)yypvt[-0].integer; |
yyval.parameter->qualifiers = yystack.l_mark[-3].qualifierList.data; |
yyval.parameter->qualifiers = yypvt[-3].qualifierList.data; |
yyval.parameter->numQualifiers = yystack.l_mark[-3].qualifierList.size; |
yyval.parameter->numQualifiers = yypvt[-3].qualifierList.size; |
} |
} break; |
break; |
case 100: |
case 77: |
# line 1588 "mof.y" |
#line 1042 "mof.y" |
|
{ | { |
const MI_ClassDecl* cd; | const MI_ClassDecl* cd; |
| |
/* Verify that class exists */ | /* Verify that class exists */ |
cd = FindClassDecl(yystack.l_mark[-2].string); |
cd = FindClassDecl(yypvt[-3].string); |
if (!cd) | if (!cd) |
{ | { |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yystack.l_mark[-2].string); |
yyerrorf(ID_UNDEFINED_CLASS, "undefined class: \"%s\"", yypvt[-3].string); |
YYABORT; | YYABORT; |
} | } |
| |
/* Check qualifier scope */ | /* Check qualifier scope */ |
if (CheckScope(MI_FLAG_PARAMETER, &yystack.l_mark[-3].qualifierList) != 0) |
if (CheckScope(MI_FLAG_PARAMETER, &yypvt[-4].qualifierList) != 0) |
YYABORT; | YYABORT; |
| |
yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); | yyval.parameter = CALLOC_T(MI_ParameterDecl, 1); |
yyval.parameter->name = yystack.l_mark[-1].string; |
yyval.parameter->name = yypvt[-1].string; |
yyval.parameter->type = ARRAYOF(MI_REFERENCE); | yyval.parameter->type = ARRAYOF(MI_REFERENCE); |
yyval.parameter->className = cd->name; | yyval.parameter->className = cd->name; |
yyval.parameter->subscript = (MI_Uint32)yystack.l_mark[0].integer; |
yyval.parameter->subscript = (MI_Uint32)yypvt[-0].integer; |
yyval.parameter->qualifiers = yystack.l_mark[-3].qualifierList.data; |
yyval.parameter->qualifiers = yypvt[-4].qualifierList.data; |
yyval.parameter->numQualifiers = yystack.l_mark[-3].qualifierList.size; |
yyval.parameter->numQualifiers = yypvt[-4].qualifierList.size; |
} |
} break; |
break; |
case 101: |
case 78: |
# line 1614 "mof.y" |
#line 1068 "mof.y" |
|
{ | { |
if (yystack.l_mark[-1].integer <= 0) |
if (yypvt[-1].integer <= 0) |
{ | { |
yyerrorf(ID_ILLEGAL_ARRAY_SUBSCRIPT, | yyerrorf(ID_ILLEGAL_ARRAY_SUBSCRIPT, |
"illegal array subscript: " SINT64_FMT, yystack.l_mark[-1].integer); |
"illegal array subscript: " SINT64_FMT, yypvt[-1].integer); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.integer = yystack.l_mark[-1].integer; |
yyval.integer = yypvt[-1].integer; |
} |
} break; |
break; |
case 102: |
case 79: |
# line 1625 "mof.y" |
#line 1079 "mof.y" |
|
{ | { |
/* 0 signifies a dynamic array */ | /* 0 signifies a dynamic array */ |
yyval.integer = 0; | yyval.integer = 0; |
} |
} break; |
break; |
case 103: |
case 80: |
# line 1632 "mof.y" |
#line 1086 "mof.y" |
{ |
|
yyval.initializer = yypvt[-0].initializer; |
|
} break; |
|
case 104: |
|
# line 1636 "mof.y" |
|
{ |
|
yyval.initializer = yypvt[-0].initializer; |
|
} break; |
|
case 105: |
|
# line 1642 "mof.y" |
|
{ |
|
yyval.initializer = yypvt[-1].initializer; |
|
} break; |
|
case 106: |
|
# line 1646 "mof.y" |
|
{ |
|
yyval.initializer.data = NULL; |
|
yyval.initializer.size = 0; |
|
yyval.initializer.isArray = 1; |
|
} break; |
|
case 107: |
|
# line 1654 "mof.y" |
{ | { |
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); | memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); | yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
yyval.initializer.data[0] = yystack.l_mark[0].constantValue; |
yyval.initializer.data[0] = yypvt[-0].initializer.data[0]; |
yyval.initializer.size = 1; | yyval.initializer.size = 1; |
} |
yyval.initializer.isArray = 1; |
break; |
} break; |
case 81: |
case 108: |
#line 1093 "mof.y" |
# line 1662 "mof.y" |
{ | { |
yyval.initializer = yystack.l_mark[0].initializer; |
yypvt[-2].initializer.data = REALLOC_T(MOF_ConstantValue, yypvt[-2].initializer.data, yypvt[-2].initializer.size + 1); |
} |
yypvt[-2].initializer.data[yypvt[-2].initializer.size] = yypvt[-0].initializer.data[0]; |
break; |
yypvt[-2].initializer.size++; |
case 82: |
yyval.initializer = yypvt[-2].initializer; |
#line 1097 "mof.y" |
} break; |
|
case 109: |
|
# line 1671 "mof.y" |
|
{ |
|
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
|
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
|
yyval.initializer.data[0] = yypvt[-0].constantValue; |
|
yyval.initializer.size = 1; |
|
} break; |
|
case 110: |
|
# line 1678 "mof.y" |
{ | { |
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); | memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); | yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
yyval.initializer.data[0].type = TOK_STRING_VALUE; | yyval.initializer.data[0].type = TOK_STRING_VALUE; |
yyval.initializer.data[0].value.string = yystack.l_mark[0].string; |
yyval.initializer.data[0].value.string = yypvt[-0].string; |
yyval.initializer.size = 0; |
yyval.initializer.size = 1; |
} |
/* TODO: look up alias, get and store instance decl. for alias */ |
break; |
} break; |
case 83: |
case 111: |
#line 1107 "mof.y" |
# line 1687 "mof.y" |
{ | { |
yyval.initializer = yystack.l_mark[-1].initializer; |
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
} |
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
break; |
yyval.initializer.data[0].type = TOK_STRING_VALUE; |
case 84: |
yyval.initializer.data[0].value.string = yypvt[-3].string; |
#line 1113 "mof.y" |
yyval.initializer.size = 1; |
|
/* TODO: look up class $3, validate property names/types, store dynamic instance properties in this instance */ |
|
} break; |
|
case 112: |
|
# line 1698 "mof.y" |
{ | { |
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); | memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); | yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
yyval.initializer.data[0] = yystack.l_mark[0].constantValue; |
yyval.initializer.data[0] = yypvt[-0].constantValue; |
yyval.initializer.size = 1; | yyval.initializer.size = 1; |
yyval.initializer.isArray = 1; |
} break; |
} |
case 113: |
break; |
# line 1705 "mof.y" |
case 85: |
|
#line 1121 "mof.y" |
|
{ | { |
yystack.l_mark[-2].initializer.data = REALLOC_T(MOF_ConstantValue, yystack.l_mark[-2].initializer.data, yystack.l_mark[-2].initializer.size + 1); |
yyval.initializer = yypvt[-0].initializer; |
yystack.l_mark[-2].initializer.data[yystack.l_mark[-2].initializer.size] = yystack.l_mark[0].constantValue; |
} break; |
yystack.l_mark[-2].initializer.size++; |
case 114: |
yyval.initializer = yystack.l_mark[-2].initializer; |
# line 1711 "mof.y" |
} |
{ |
break; |
yyval.initializer = yypvt[-1].initializer; |
case 86: |
} break; |
#line 1130 "mof.y" |
case 115: |
|
# line 1715 "mof.y" |
|
{ |
|
yyval.initializer.data = NULL; |
|
yyval.initializer.size = 0; |
|
yyval.initializer.isArray = MI_TRUE; |
|
} break; |
|
case 116: |
|
# line 1723 "mof.y" |
|
{ |
|
memset(&yyval.initializer, 0, sizeof(yyval.initializer)); |
|
yyval.initializer.data = CALLOC_T(MOF_ConstantValue, 1); |
|
yyval.initializer.data[0] = yypvt[-0].constantValue; |
|
yyval.initializer.size = 1; |
|
yyval.initializer.isArray = MI_TRUE; |
|
} break; |
|
case 117: |
|
# line 1731 "mof.y" |
|
{ |
|
yypvt[-2].initializer.data = REALLOC_T(MOF_ConstantValue, yypvt[-2].initializer.data, yypvt[-2].initializer.size + 1); |
|
yypvt[-2].initializer.data[yypvt[-2].initializer.size] = yypvt[-0].constantValue; |
|
yypvt[-2].initializer.size++; |
|
yypvt[-2].initializer.isArray = MI_TRUE; |
|
yyval.initializer = yypvt[-2].initializer; |
|
} break; |
|
case 118: |
|
# line 1741 "mof.y" |
{ | { |
yyval.constantValue.type = TOK_INTEGER_VALUE; | yyval.constantValue.type = TOK_INTEGER_VALUE; |
yyval.constantValue.value.integer = yystack.l_mark[0].integer; |
yyval.constantValue.value.integer = yypvt[-0].integer; |
} |
} break; |
break; |
case 119: |
case 87: |
# line 1746 "mof.y" |
#line 1135 "mof.y" |
|
{ | { |
yyval.constantValue.type = TOK_REAL_VALUE; | yyval.constantValue.type = TOK_REAL_VALUE; |
yyval.constantValue.value.real = yystack.l_mark[0].real; |
yyval.constantValue.value.real = yypvt[-0].real; |
} |
} break; |
break; |
case 120: |
case 88: |
# line 1751 "mof.y" |
#line 1140 "mof.y" |
|
{ | { |
yyval.constantValue.type = TOK_CHAR_VALUE; | yyval.constantValue.type = TOK_CHAR_VALUE; |
yyval.constantValue.value.character = yystack.l_mark[0].character; |
yyval.constantValue.value.character = yypvt[-0].character; |
} |
} break; |
break; |
case 121: |
case 89: |
# line 1756 "mof.y" |
#line 1145 "mof.y" |
|
{ | { |
yyval.constantValue.type = TOK_STRING_VALUE; | yyval.constantValue.type = TOK_STRING_VALUE; |
yyval.constantValue.value.string = yystack.l_mark[0].string; |
yyval.constantValue.value.string = yypvt[-0].string; |
} |
} break; |
break; |
case 122: |
case 90: |
# line 1761 "mof.y" |
#line 1150 "mof.y" |
|
{ | { |
yyval.constantValue.type = TOK_BOOLEAN_VALUE; | yyval.constantValue.type = TOK_BOOLEAN_VALUE; |
yyval.constantValue.value.boolean = yystack.l_mark[0].boolean; |
yyval.constantValue.value.boolean = yypvt[-0].boolean; |
} |
} break; |
break; |
case 123: |
case 91: |
# line 1766 "mof.y" |
#line 1155 "mof.y" |
|
{ | { |
yyval.constantValue.type = TOK_NULL; | yyval.constantValue.type = TOK_NULL; |
} |
} break; |
break; |
case 124: |
case 92: |
# line 1772 "mof.y" |
#line 1161 "mof.y" |
|
{ |
|
yyval.string = yystack.l_mark[0].string; |
|
} |
|
break; |
|
case 93: |
|
#line 1165 "mof.y" |
|
{ | { |
size_t size = strlen(yystack.l_mark[-1].string) + strlen(yystack.l_mark[0].string) + 1; |
yyval.string = yypvt[-0].string; |
yyval.string = (char*)MOF_Realloc(&state.heap, yystack.l_mark[-1].string, size); |
} break; |
Strcat(yyval.string, size, yystack.l_mark[0].string); |
case 125: |
MOF_Free(&state.heap, yystack.l_mark[0].string); |
# line 1776 "mof.y" |
} |
|
break; |
|
case 94: |
|
#line 1174 "mof.y" |
|
{ | { |
yystack.l_mark[-2].qualifierDeclaration->name = yystack.l_mark[-3].string; |
size_t size = strlen(yypvt[-1].string) + strlen(yypvt[-0].string) + 1; |
yystack.l_mark[-2].qualifierDeclaration->scope = yystack.l_mark[-1].flags; |
yyval.string = (char*)MOF_Realloc(&state.heap, yypvt[-1].string, size); |
yystack.l_mark[-2].qualifierDeclaration->flavor = 0; |
Strcat(yyval.string, size, yypvt[-0].string); |
yyval.qualifierDeclaration = yystack.l_mark[-2].qualifierDeclaration; |
MOF_Free(&state.heap, yypvt[-0].string); |
} |
} break; |
break; |
case 126: |
case 95: |
# line 1785 "mof.y" |
#line 1181 "mof.y" |
|
{ | { |
yystack.l_mark[-3].qualifierDeclaration->name = yystack.l_mark[-4].string; |
yypvt[-2].qualifierDeclaration->name = yypvt[-3].string; |
yystack.l_mark[-3].qualifierDeclaration->scope = yystack.l_mark[-2].flags; |
yypvt[-2].qualifierDeclaration->scope = yypvt[-1].flags; |
yystack.l_mark[-3].qualifierDeclaration->flavor = yystack.l_mark[-1].flags; |
yypvt[-2].qualifierDeclaration->flavor = 0; |
yyval.qualifierDeclaration = yystack.l_mark[-3].qualifierDeclaration; |
yyval.qualifierDeclaration = yypvt[-2].qualifierDeclaration; |
} |
} break; |
break; |
case 127: |
case 96: |
# line 1792 "mof.y" |
#line 1190 "mof.y" |
{ |
|
yypvt[-3].qualifierDeclaration->name = yypvt[-4].string; |
|
yypvt[-3].qualifierDeclaration->scope = yypvt[-2].flags; |
|
yypvt[-3].qualifierDeclaration->flavor = yypvt[-1].flags; |
|
yyval.qualifierDeclaration = yypvt[-3].qualifierDeclaration; |
|
} break; |
|
case 128: |
|
# line 1801 "mof.y" |
{ | { |
yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); | yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); |
yyval.qualifierDeclaration->type = yystack.l_mark[0].type; |
yyval.qualifierDeclaration->type = yypvt[-0].type; |
} |
} break; |
break; |
case 129: |
case 97: |
# line 1806 "mof.y" |
#line 1195 "mof.y" |
|
{ | { |
void* value; | void* value; |
| |
if (InitializerToValue(&yystack.l_mark[0].initializer, yystack.l_mark[-2].type, &value) != 0) |
if (InitializerToValue(&yypvt[-0].initializer, yypvt[-2].type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); | yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); |
yyval.qualifierDeclaration->type = yystack.l_mark[-2].type; |
yyval.qualifierDeclaration->type = yypvt[-2].type; |
yyval.qualifierDeclaration->value = value; | yyval.qualifierDeclaration->value = value; |
ReleaseInitializer(&yystack.l_mark[0].initializer); |
ReleaseInitializer(&yypvt[-0].initializer); |
} |
} break; |
break; |
case 130: |
case 98: |
# line 1821 "mof.y" |
#line 1210 "mof.y" |
|
{ | { |
yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); | yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); |
yyval.qualifierDeclaration->type = ARRAYOF(yystack.l_mark[-1].type); |
yyval.qualifierDeclaration->type = ARRAYOF(yypvt[-1].type); |
yyval.qualifierDeclaration->subscript = (MI_Uint32)yystack.l_mark[0].integer; |
yyval.qualifierDeclaration->subscript = (MI_Uint32)yypvt[-0].integer; |
} |
} break; |
break; |
case 131: |
case 99: |
# line 1827 "mof.y" |
#line 1216 "mof.y" |
|
{ | { |
void* value = NULL; | void* value = NULL; |
| |
if (InitializerToValue(&yystack.l_mark[0].initializer, ARRAYOF(yystack.l_mark[-3].type), &value) != 0) |
if (InitializerToValue(&yypvt[-0].initializer, ARRAYOF(yypvt[-3].type), &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); | yyval.qualifierDeclaration = CALLOC_T(MI_QualifierDecl, 1); |
yyval.qualifierDeclaration->type = ARRAYOF(yystack.l_mark[-3].type); |
yyval.qualifierDeclaration->type = ARRAYOF(yypvt[-3].type); |
yyval.qualifierDeclaration->subscript = (MI_Uint32)yystack.l_mark[-2].integer; |
yyval.qualifierDeclaration->subscript = (MI_Uint32)yypvt[-2].integer; |
yyval.qualifierDeclaration->value = value; | yyval.qualifierDeclaration->value = value; |
ReleaseInitializer(&yystack.l_mark[0].initializer); |
ReleaseInitializer(&yypvt[-0].initializer); |
} |
} break; |
break; |
case 132: |
case 100: |
# line 1845 "mof.y" |
#line 1234 "mof.y" |
{ |
{ |
yyval.flags = yypvt[-1].flags; |
yyval.flags = yystack.l_mark[-1].flags; |
} break; |
} |
case 133: |
break; |
# line 1851 "mof.y" |
case 101: |
{ |
#line 1240 "mof.y" |
yyval.flags = yypvt[-0].flags; |
{ |
} break; |
yyval.flags = yystack.l_mark[0].flags; |
case 134: |
} |
# line 1855 "mof.y" |
break; |
{ |
case 102: |
yyval.flags |= yypvt[-0].flags; |
#line 1244 "mof.y" |
} break; |
{ |
case 135: |
yyval.flags |= yystack.l_mark[0].flags; |
# line 1861 "mof.y" |
} |
|
break; |
|
case 103: |
|
#line 1250 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_CLASS; | yyval.flags = MI_FLAG_CLASS; |
} |
} break; |
break; |
case 136: |
case 104: |
# line 1865 "mof.y" |
#line 1254 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_ASSOCIATION; | yyval.flags = MI_FLAG_ASSOCIATION; |
} |
} break; |
break; |
case 137: |
case 105: |
# line 1869 "mof.y" |
#line 1258 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_INDICATION; | yyval.flags = MI_FLAG_INDICATION; |
} |
} break; |
break; |
case 138: |
case 106: |
# line 1873 "mof.y" |
#line 1262 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_PROPERTY; | yyval.flags = MI_FLAG_PROPERTY; |
} |
} break; |
break; |
case 139: |
case 107: |
# line 1877 "mof.y" |
#line 1266 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_REFERENCE; | yyval.flags = MI_FLAG_REFERENCE; |
} |
} break; |
break; |
case 140: |
case 108: |
# line 1881 "mof.y" |
#line 1270 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_METHOD; | yyval.flags = MI_FLAG_METHOD; |
} |
} break; |
break; |
case 141: |
case 109: |
# line 1885 "mof.y" |
#line 1274 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_PARAMETER; | yyval.flags = MI_FLAG_PARAMETER; |
} |
} break; |
break; |
case 142: |
case 110: |
# line 1889 "mof.y" |
#line 1278 "mof.y" |
|
{ | { |
yyval.flags = MI_FLAG_ANY; | yyval.flags = MI_FLAG_ANY; |
} |
} break; |
break; |
case 143: |
case 111: |
# line 1895 "mof.y" |
#line 1284 "mof.y" |
|
{ | { |
/* Reject incompatiable ToSubclass and Restricted flavors */ | /* Reject incompatiable ToSubclass and Restricted flavors */ |
if (yystack.l_mark[-1].flags & MI_FLAG_TOSUBCLASS && yystack.l_mark[-1].flags & MI_FLAG_RESTRICTED) |
if (yypvt[-1].flags & MI_FLAG_TOSUBCLASS && yypvt[-1].flags & MI_FLAG_RESTRICTED) |
{ | { |
yyerrorf(ID_INCOMPATIBLE_FLAVORS, "incompatible flavors: %s/%s", | yyerrorf(ID_INCOMPATIBLE_FLAVORS, "incompatible flavors: %s/%s", |
"ToSubclass", "Restricted"); | "ToSubclass", "Restricted"); |
|
|
} | } |
| |
/* Reject incompatiable EnableOverride and DisableOverride flavors */ | /* Reject incompatiable EnableOverride and DisableOverride flavors */ |
if (yystack.l_mark[-1].flags & MI_FLAG_ENABLEOVERRIDE && yystack.l_mark[-1].flags & MI_FLAG_DISABLEOVERRIDE) |
if (yypvt[-1].flags & MI_FLAG_ENABLEOVERRIDE && yypvt[-1].flags & MI_FLAG_DISABLEOVERRIDE) |
{ | { |
yyerrorf(ID_INCOMPATIBLE_FLAVORS, "incompatible flavors: %s/%s", | yyerrorf(ID_INCOMPATIBLE_FLAVORS, "incompatible flavors: %s/%s", |
"EnableOverride", "DisableOverride"); | "EnableOverride", "DisableOverride"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.flags = yystack.l_mark[-1].flags; |
yyval.flags = yypvt[-1].flags; |
} |
} break; |
break; |
case 144: |
case 112: |
# line 1917 "mof.y" |
#line 1306 "mof.y" |
|
{ | { |
yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); | yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); |
yyval.instanceDeclaration->flags = 0; | yyval.instanceDeclaration->flags = 0; |
yyval.instanceDeclaration->name = yystack.l_mark[-1].string; |
yyval.instanceDeclaration->name = yypvt[-1].string; |
yyval.instanceDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.instanceDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.instanceDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.instanceDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
} |
} break; |
break; |
case 145: |
case 113: |
# line 1925 "mof.y" |
#line 1314 "mof.y" |
|
{ | { |
yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); | yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); |
yyval.instanceDeclaration->flags = 0; | yyval.instanceDeclaration->flags = 0; |
yyval.instanceDeclaration->name = yystack.l_mark[-1].string; |
yyval.instanceDeclaration->name = yypvt[-1].string; |
yyval.instanceDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.instanceDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.instanceDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.instanceDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.instanceDeclaration->qualifiers = yystack.l_mark[-4].qualifierList.data; |
yyval.instanceDeclaration->qualifiers = yypvt[-4].qualifierList.data; |
yyval.instanceDeclaration->numQualifiers = yystack.l_mark[-4].qualifierList.size; |
yyval.instanceDeclaration->numQualifiers = yypvt[-4].qualifierList.size; |
} |
} break; |
break; |
case 146: |
case 114: |
# line 1935 "mof.y" |
#line 1324 "mof.y" |
|
{ | { |
/* [TODO]: handle alias */ | /* [TODO]: handle alias */ |
yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); | yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); |
yyval.instanceDeclaration->flags = 0; | yyval.instanceDeclaration->flags = 0; |
yyval.instanceDeclaration->name = yystack.l_mark[-2].string; |
yyval.instanceDeclaration->name = yypvt[-2].string; |
yyval.instanceDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.instanceDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.instanceDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.instanceDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
} |
} break; |
break; |
case 147: |
case 115: |
# line 1944 "mof.y" |
#line 1333 "mof.y" |
|
{ | { |
/* [TODO]: handle alias */ | /* [TODO]: handle alias */ |
yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); | yyval.instanceDeclaration = CALLOC_T(MI_InstanceDecl, 1); |
yyval.instanceDeclaration->flags = 0; | yyval.instanceDeclaration->flags = 0; |
yyval.instanceDeclaration->name = yystack.l_mark[-2].string; |
yyval.instanceDeclaration->name = yypvt[-2].string; |
yyval.instanceDeclaration->properties = yystack.l_mark[0].featureList.propertySet.data; |
yyval.instanceDeclaration->properties = yypvt[-0].featureList.propertySet.data; |
yyval.instanceDeclaration->numProperties = yystack.l_mark[0].featureList.propertySet.size; |
yyval.instanceDeclaration->numProperties = yypvt[-0].featureList.propertySet.size; |
yyval.instanceDeclaration->qualifiers = yystack.l_mark[-5].qualifierList.data; |
yyval.instanceDeclaration->qualifiers = yypvt[-5].qualifierList.data; |
yyval.instanceDeclaration->numQualifiers = yystack.l_mark[-5].qualifierList.size; |
yyval.instanceDeclaration->numQualifiers = yypvt[-5].qualifierList.size; |
} |
} break; |
break; |
case 148: |
case 116: |
# line 1957 "mof.y" |
#line 1346 "mof.y" |
{ |
{ |
yyval.featureList = yypvt[-2].featureList; |
yyval.featureList = yystack.l_mark[-2].featureList; |
} break; |
} |
case 149: |
break; |
# line 1961 "mof.y" |
case 117: |
|
#line 1352 "mof.y" |
|
{ | { |
yyval.string = yystack.l_mark[0].string; |
yyval.featureList.propertySet.data = NULL; |
} |
yyval.featureList.propertySet.size = 0; |
break; |
yyval.featureList.methodList.data = NULL; |
case 118: |
yyval.featureList.methodList.size = 0; |
#line 1358 "mof.y" |
} break; |
|
case 150: |
|
# line 1970 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 151: |
|
# line 1976 "mof.y" |
{ | { |
yyval.featureList.propertySet.data = NULL; | yyval.featureList.propertySet.data = NULL; |
yyval.featureList.propertySet.size = 0; | yyval.featureList.propertySet.size = 0; |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
} |
} break; |
break; |
case 152: |
case 119: |
# line 1984 "mof.y" |
#line 1366 "mof.y" |
|
{ | { |
if (FindProperty(&yystack.l_mark[-1].featureList.propertySet, yystack.l_mark[0].property->name)) |
if (FindProperty(&yypvt[-1].featureList.propertySet, yypvt[-0].property->name)) |
{ | { |
yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, | yyerrorf(ID_CLASS_FEATURE_ALREADY_DEFINED, |
"instance property already defined: \"%s\"", yystack.l_mark[0].property->name); |
"instance property already defined: \"%s\"", yypvt[-0].property->name); |
YYABORT; | YYABORT; |
} | } |
| |
yystack.l_mark[0].property->flags = MI_FLAG_PROPERTY; |
yypvt[-0].property->flags = MI_FLAG_PROPERTY; |
yystack.l_mark[0].property->flags |= GetQualFlags(yystack.l_mark[0].property->qualifiers, yystack.l_mark[0].property->numQualifiers); |
yypvt[-0].property->flags |= GetQualFlags(yypvt[-0].property->qualifiers, yypvt[-0].property->numQualifiers); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yystack.l_mark[0].property); |
PtrArray_Append((PtrArray*)&yyval.featureList.propertySet, yypvt[-0].property); |
} |
} break; |
break; |
case 153: |
case 120: |
# line 1999 "mof.y" |
#line 1381 "mof.y" |
{ |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->type = TOK_NULL; |
|
} break; |
|
case 154: |
|
# line 2005 "mof.y" |
|
{ |
|
yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
|
yyval.property->name = yypvt[-1].string; |
|
yyval.property->type = TOK_NULL; |
|
yyval.property->qualifiers = yypvt[-2].qualifierList.data; |
|
yyval.property->numQualifiers = yypvt[-2].qualifierList.size; |
|
} break; |
|
case 155: |
|
# line 2013 "mof.y" |
{ | { |
void* value; | void* value; |
MI_Type type = InitializerToType(&yystack.l_mark[-1].initializer); |
MI_Type type = InitializerToType(&yypvt[-1].initializer); |
|
if (InitializerToValue(&yypvt[-1].initializer, type, &value) != 0) |
if (InitializerToValue(&yystack.l_mark[-1].initializer, type, &value) != 0) |
|
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-3].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->type = type; | yyval.property->type = type; |
yyval.property->value = value; | yyval.property->value = value; |
} |
} break; |
break; |
case 156: |
case 121: |
# line 2028 "mof.y" |
#line 1397 "mof.y" |
|
{ | { |
void* value; | void* value; |
MI_Type type = InitializerToType(&yystack.l_mark[-1].initializer); |
MI_Type type = InitializerToType(&yypvt[-1].initializer); |
| |
if (InitializerToValue(&yystack.l_mark[-1].initializer, type, &value) != 0) |
if (InitializerToValue(&yypvt[-1].initializer, type, &value) != 0) |
{ | { |
yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); | yyerrorf(ID_INVALID_INITIALIZER, "invalid initializer"); |
YYABORT; | YYABORT; |
} | } |
| |
yyval.property = CALLOC_T(MI_PropertyDecl, 1); | yyval.property = CALLOC_T(MI_PropertyDecl, 1); |
yyval.property->name = yystack.l_mark[-3].string; |
yyval.property->name = yypvt[-3].string; |
yyval.property->type = type; | yyval.property->type = type; |
yyval.property->value = value; | yyval.property->value = value; |
yyval.property->qualifiers = yystack.l_mark[-4].qualifierList.data; |
yyval.property->qualifiers = yypvt[-4].qualifierList.data; |
yyval.property->numQualifiers = yystack.l_mark[-4].qualifierList.size; |
yyval.property->numQualifiers = yypvt[-4].qualifierList.size; |
} |
} break; |
break; |
case 157: |
case 122: |
# line 2048 "mof.y" |
#line 1417 "mof.y" |
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 158: |
|
# line 2052 "mof.y" |
|
{ |
|
yyval.string = "Object"; |
|
} break; |
|
case 159: |
|
# line 2056 "mof.y" |
|
{ |
|
yyval.string = "Boolean"; |
|
} break; |
|
case 160: |
|
# line 2060 "mof.y" |
|
{ |
|
yyval.string = "Datetime"; |
|
} break; |
|
case 161: |
|
# line 2064 "mof.y" |
|
{ |
|
yyval.string = "String"; |
|
} break; |
|
case 162: |
|
# line 2074 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 163: |
|
# line 2078 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 164: |
|
# line 2082 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 165: |
|
# line 2086 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 166: |
|
# line 2090 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 167: |
|
# line 2094 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 168: |
|
# line 2098 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 169: |
|
# line 2102 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 170: |
|
# line 2106 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 171: |
|
# line 2110 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 172: |
|
# line 2114 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 173: |
|
# line 2118 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 174: |
|
# line 2122 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 175: |
|
# line 2126 "mof.y" |
|
{ |
|
yyval.string = yypvt[-0].string; |
|
} break; |
|
case 176: |
|
# line 2132 "mof.y" |
{ | { |
yyval.string = yystack.l_mark[0].string; |
yyval.type = MI_BOOLEAN; |
} |
} break; |
break; |
case 177: |
case 123: |
# line 2136 "mof.y" |
#line 1421 "mof.y" |
|
{ | { |
yyval.string = MOF_Strdup(&state.heap, "Association"); |
yyval.type = MI_SINT8; |
} |
} break; |
break; |
case 178: |
case 124: |
# line 2140 "mof.y" |
#line 1425 "mof.y" |
|
{ | { |
yyval.string = MOF_Strdup(&state.heap, "Indication"); |
yyval.type = MI_UINT8; |
} |
} break; |
break; |
case 179: |
case 125: |
# line 2144 "mof.y" |
#line 1429 "mof.y" |
|
{ | { |
yyval.string = MOF_Strdup(&state.heap, "Reference"); |
yyval.type = MI_SINT16; |
} |
} break; |
break; |
case 180: |
case 126: |
# line 2148 "mof.y" |
#line 1433 "mof.y" |
|
{ | { |
yyval.string = MOF_Strdup(&state.heap, "Property"); |
yyval.type = MI_UINT16; |
} |
} break; |
break; |
case 181: |
#line 2249 "y.tab.c" |
# line 2152 "mof.y" |
} |
|
yystack.s_mark -= yym; |
|
yystate = *yystack.s_mark; |
|
yystack.l_mark -= yym; |
|
yym = yylhs[yyn]; |
|
if (yystate == 0 && yym == 0) |
|
{ | { |
#if YYDEBUG |
yyval.type = MI_SINT32; |
if (yydebug) |
} break; |
printf("%sdebug: after reduction, shifting from state 0 to\ |
case 182: |
state %d\n", YYPREFIX, YYFINAL); |
# line 2156 "mof.y" |
#endif |
|
yystate = YYFINAL; |
|
*++yystack.s_mark = YYFINAL; |
|
*++yystack.l_mark = yyval; |
|
if (yychar < 0) |
|
{ | { |
if ((yychar = YYLEX) < 0) yychar = 0; |
yyval.type = MI_UINT32; |
#if YYDEBUG |
} break; |
if (yydebug) |
case 183: |
|
# line 2160 "mof.y" |
{ | { |
yys = 0; |
yyval.type = MI_SINT64; |
if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; |
} break; |
if (!yys) yys = "illegal-symbol"; |
case 184: |
printf("%sdebug: state %d, reading %d (%s)\n", |
# line 2164 "mof.y" |
YYPREFIX, YYFINAL, yychar, yys); |
{ |
} |
yyval.type = MI_UINT64; |
#endif |
} break; |
} |
case 185: |
if (yychar == 0) goto yyaccept; |
# line 2168 "mof.y" |
goto yyloop; |
{ |
} |
yyval.type = MI_REAL32; |
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && |
} break; |
yyn <= YYTABLESIZE && yycheck[yyn] == yystate) |
case 186: |
yystate = yytable[yyn]; |
# line 2172 "mof.y" |
else |
{ |
yystate = yydgoto[yym]; |
yyval.type = MI_REAL64; |
#if YYDEBUG |
} break; |
if (yydebug) |
case 187: |
printf("%sdebug: after reduction, shifting from state %d \ |
# line 2176 "mof.y" |
to state %d\n", YYPREFIX, *yystack.s_mark, yystate); |
{ |
#endif |
yyval.type = MI_CHAR16; |
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack)) |
} break; |
|
case 188: |
|
# line 2180 "mof.y" |
|
{ |
|
yyval.type = MI_DATETIME; |
|
} break; |
|
case 189: |
|
# line 2184 "mof.y" |
{ | { |
goto yyoverflow; |
yyval.type = MI_STRING; |
|
} break; |
|
# line 531 "/usr/ccs/bin/yaccpar" |
} | } |
*++yystack.s_mark = (short) yystate; |
goto yystack; /* reset registers in driver code */ |
*++yystack.l_mark = yyval; |
|
goto yyloop; |
|
|
|
yyoverflow: |
|
yyerror("yacc stack overflow"); |
|
|
|
yyabort: |
|
yyfreestack(&yystack); |
|
return (1); |
|
|
|
yyaccept: |
|
yyfreestack(&yystack); |
|
return (0); |
|
} | } |
|
|