Removed the 'temporary' config keyword.

This commit is contained in:
Gunnar Beutner 2012-07-02 12:55:08 +02:00
parent f2420fb17a
commit 639d2e5be0
7 changed files with 253 additions and 306 deletions

View File

@ -75,18 +75,6 @@ bool ConfigObject::IsLocal(void) const
return value; return value;
} }
void ConfigObject::SetTemporary(bool value)
{
GetProperties()->SetProperty("__temporary", value ? 1 : 0);
}
bool ConfigObject::IsTemporary(void) const
{
bool value = false;
GetProperties()->GetProperty("__temporary", &value);
return value;
}
void ConfigObject::SetAbstract(bool value) void ConfigObject::SetAbstract(bool value)
{ {
GetProperties()->SetProperty("__abstract", value ? 1 : 0); GetProperties()->SetProperty("__abstract", value ? 1 : 0);

View File

@ -76,9 +76,6 @@ public:
void SetLocal(bool value); void SetLocal(bool value);
bool IsLocal(void) const; bool IsLocal(void) const;
void SetTemporary(bool value);
bool IsTemporary(void) const;
void SetAbstract(bool value); void SetAbstract(bool value);
bool IsAbstract(void) const; bool IsAbstract(void) const;

View File

@ -370,8 +370,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp; yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 24 #define YY_NUM_RULES 23
#define YY_END_OF_BUFFER 25 #define YY_END_OF_BUFFER 24
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
but its presence is necessary. */ but its presence is necessary. */
struct yy_trans_info struct yy_trans_info
@ -379,16 +379,16 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[81] = static yyconst flex_int16_t yy_accept[72] =
{ 0, { 0,
0, 0, 0, 0, 25, 23, 22, 22, 23, 23, 0, 0, 0, 0, 24, 22, 21, 21, 22, 22,
23, 23, 23, 23, 10, 11, 8, 8, 8, 8, 22, 22, 22, 22, 9, 10, 7, 7, 7, 7,
8, 8, 8, 18, 19, 22, 0, 21, 14, 12, 7, 7, 17, 18, 21, 0, 20, 13, 11, 12,
13, 16, 0, 15, 10, 8, 8, 8, 8, 8, 15, 0, 14, 9, 7, 7, 7, 7, 7, 7,
8, 8, 18, 17, 9, 20, 8, 8, 8, 8, 17, 16, 8, 19, 7, 7, 7, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 7, 7, 7, 7, 6, 7, 7, 7, 7, 2,
8, 8, 8, 2, 8, 8, 8, 8, 8, 4, 7, 7, 7, 7, 3, 7, 4, 7, 1, 5,
8, 8, 5, 8, 8, 1, 6, 8, 3, 0 0
} ; } ;
static yyconst flex_int32_t yy_ec[256] = static yyconst flex_int32_t yy_ec[256] =
@ -404,9 +404,9 @@ static yyconst flex_int32_t yy_ec[256] =
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1, 1, 1, 1, 12, 1, 13, 14, 15, 16, 1, 1, 1, 1, 12, 1, 13, 14, 15, 16,
17, 12, 12, 18, 19, 20, 12, 21, 22, 23, 17, 12, 12, 18, 19, 20, 12, 21, 12, 22,
24, 25, 12, 26, 27, 28, 29, 12, 12, 12, 23, 12, 12, 24, 25, 26, 27, 12, 12, 12,
30, 12, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@ -423,84 +423,78 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst flex_int32_t yy_meta[31] = static yyconst flex_int32_t yy_meta[28] =
{ 0, { 0,
1, 1, 2, 3, 1, 4, 1, 5, 1, 5, 1, 1, 2, 3, 1, 4, 1, 5, 1, 5,
1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5 5, 5, 5, 5, 5, 5, 5
} ; } ;
static yyconst flex_int16_t yy_base[87] = static yyconst flex_int16_t yy_base[78] =
{ 0, { 0,
0, 0, 104, 103, 108, 111, 29, 31, 0, 0, 0, 0, 93, 92, 97, 100, 26, 28, 0, 0,
96, 95, 94, 29, 94, 111, 0, 89, 79, 77, 85, 84, 83, 26, 83, 100, 0, 78, 69, 67,
71, 85, 81, 0, 88, 34, 92, 0, 111, 111, 62, 74, 0, 78, 31, 82, 0, 100, 100, 100,
111, 111, 0, 111, 85, 0, 67, 24, 78, 71, 100, 0, 100, 75, 0, 59, 21, 68, 61, 61,
71, 68, 0, 111, 111, 0, 61, 67, 70, 73, 0, 100, 100, 0, 54, 58, 61, 64, 55, 58,
64, 67, 58, 56, 52, 54, 58, 0, 63, 53, 50, 46, 48, 50, 0, 55, 56, 52, 48, 0,
63, 59, 55, 0, 45, 46, 56, 53, 41, 0, 40, 50, 44, 32, 0, 25, 0, 22, 0, 0,
55, 36, 0, 34, 28, 0, 0, 20, 0, 111, 100, 39, 44, 49, 33, 54, 59
42, 47, 52, 36, 57, 62
} ; } ;
static yyconst flex_int16_t yy_def[87] = static yyconst flex_int16_t yy_def[78] =
{ 0, { 0,
80, 1, 81, 81, 80, 80, 80, 80, 82, 83, 71, 1, 72, 72, 71, 71, 71, 71, 73, 74,
80, 80, 80, 80, 80, 80, 84, 84, 84, 84, 71, 71, 71, 71, 71, 71, 75, 75, 75, 75,
84, 84, 84, 85, 80, 80, 82, 83, 80, 80, 75, 75, 76, 71, 71, 73, 74, 71, 71, 71,
80, 80, 86, 80, 80, 84, 84, 84, 84, 84, 71, 77, 71, 71, 75, 75, 75, 75, 75, 75,
84, 84, 85, 80, 80, 86, 84, 84, 84, 84, 76, 71, 71, 77, 75, 75, 75, 75, 75, 75,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
84, 84, 84, 84, 84, 84, 84, 84, 84, 0, 0, 71, 71, 71, 71, 71, 71
80, 80, 80, 80, 80, 80
} ; } ;
static yyconst flex_int16_t yy_nxt[142] = static yyconst flex_int16_t yy_nxt[128] =
{ 0, { 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 17, 17, 17, 17, 17, 19, 17, 16, 17, 18, 17, 17, 17, 17, 17, 19, 17,
20, 17, 21, 22, 17, 17, 17, 23, 17, 17, 20, 21, 22, 17, 17, 17, 17, 25, 25, 25,
26, 26, 26, 26, 32, 26, 26, 33, 48, 34, 25, 31, 25, 25, 32, 46, 33, 35, 47, 23,
36, 49, 24, 24, 24, 24, 24, 27, 27, 79, 23, 23, 23, 23, 26, 26, 70, 26, 26, 27,
27, 27, 28, 78, 28, 28, 28, 43, 43, 43, 69, 27, 27, 27, 41, 41, 41, 68, 41, 44,
77, 43, 46, 76, 46, 46, 46, 75, 74, 73, 67, 44, 44, 44, 66, 65, 64, 63, 62, 61,
72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51,
62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 50, 49, 48, 45, 34, 43, 42, 40, 39, 38,
52, 51, 50, 47, 35, 45, 44, 42, 41, 40, 37, 36, 34, 30, 29, 28, 71, 24, 24, 5,
39, 38, 37, 35, 31, 30, 29, 80, 25, 25, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
5, 80, 80, 80, 80, 80, 80, 80, 80, 80, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 71, 71, 71, 71, 71, 71, 71
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80
} ; } ;
static yyconst flex_int16_t yy_chk[142] = static yyconst flex_int16_t yy_chk[128] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 8,
7, 7, 8, 8, 14, 26, 26, 14, 38, 14, 8, 14, 25, 25, 14, 37, 14, 75, 37, 72,
84, 38, 81, 81, 81, 81, 81, 82, 82, 78, 72, 72, 72, 72, 73, 73, 68, 73, 73, 74,
82, 82, 83, 75, 83, 83, 83, 85, 85, 85, 66, 74, 74, 74, 76, 76, 76, 64, 76, 77,
74, 85, 86, 72, 86, 86, 86, 71, 69, 68, 63, 77, 77, 77, 62, 61, 59, 58, 57, 56,
67, 66, 65, 63, 62, 61, 60, 59, 57, 56, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45,
55, 54, 53, 52, 51, 50, 49, 48, 47, 42, 40, 39, 38, 36, 34, 26, 24, 22, 21, 20,
41, 40, 39, 37, 35, 27, 25, 23, 22, 21, 19, 18, 15, 13, 12, 11, 5, 4, 3, 71,
20, 19, 18, 15, 13, 12, 11, 5, 4, 3, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 71, 71, 71, 71, 71, 71, 71
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80
} ; } ;
/* Table of booleans, true if rule could match eol. */ /* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[25] = static yyconst flex_int32_t yy_rule_can_match_eol[24] =
{ 0, { 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 1, 0, 0, }; 0, 1, 0, 0, };
/* The intent behind this definition is that it'll catch /* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed. * any uses of REJECT which flex missed.
@ -551,7 +545,7 @@ do { \
} while (0) } while (0)
#define YY_NO_UNISTD_H 1 #define YY_NO_UNISTD_H 1
#line 555 "config_lexer.cc" #line 549 "config_lexer.cc"
#define INITIAL 0 #define INITIAL 0
#define IN_C_COMMENT 1 #define IN_C_COMMENT 1
@ -800,7 +794,7 @@ YY_DECL
#line 48 "config_lexer.ll" #line 48 "config_lexer.ll"
#line 804 "config_lexer.cc" #line 798 "config_lexer.cc"
yylval = yylval_param; yylval = yylval_param;
@ -857,13 +851,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 81 ) if ( yy_current_state >= 72 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 80 ); while ( yy_current_state != 71 );
yy_cp = yyg->yy_last_accepting_cpos; yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state; yy_current_state = yyg->yy_last_accepting_state;
@ -908,121 +902,116 @@ return T_LOCAL;
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 51 "config_lexer.ll" #line 51 "config_lexer.ll"
return T_TEMPORARY; return T_OBJECT;
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 52 "config_lexer.ll" #line 52 "config_lexer.ll"
return T_OBJECT; return T_INCLUDE;
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 53 "config_lexer.ll" #line 53 "config_lexer.ll"
return T_INCLUDE; return T_INHERITS;
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 54 "config_lexer.ll" #line 54 "config_lexer.ll"
return T_INHERITS; return T_NULL;
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 55 "config_lexer.ll" #line 55 "config_lexer.ll"
return T_NULL;
YY_BREAK
case 8:
YY_RULE_SETUP
#line 56 "config_lexer.ll"
{ yylval->text = strdup(yytext); return T_IDENTIFIER; } { yylval->text = strdup(yytext); return T_IDENTIFIER; }
YY_BREAK YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 56 "config_lexer.ll"
{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; }
YY_BREAK
case 9: case 9:
/* rule 9 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 57 "config_lexer.ll" #line 57 "config_lexer.ll"
{ yytext[yyleng-1] = '\0'; yylval->text = strdup(yytext + 1); return T_STRING; } { yylval->num = atoi(yytext); return T_NUMBER; }
YY_BREAK YY_BREAK
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 58 "config_lexer.ll" #line 58 "config_lexer.ll"
{ yylval->num = atoi(yytext); return T_NUMBER; } { yylval->op = OperatorSet; return T_EQUAL; }
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 59 "config_lexer.ll" #line 59 "config_lexer.ll"
{ yylval->op = OperatorSet; return T_EQUAL; } { yylval->op = OperatorPlus; return T_PLUS_EQUAL; }
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 60 "config_lexer.ll" #line 60 "config_lexer.ll"
{ yylval->op = OperatorPlus; return T_PLUS_EQUAL; } { yylval->op = OperatorMinus; return T_MINUS_EQUAL; }
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 61 "config_lexer.ll" #line 61 "config_lexer.ll"
{ yylval->op = OperatorMinus; return T_MINUS_EQUAL; } { yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 62 "config_lexer.ll" #line 62 "config_lexer.ll"
{ yylval->op = OperatorMultiply; return T_MULTIPLY_EQUAL; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 63 "config_lexer.ll"
{ yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; } { yylval->op = OperatorDivide; return T_DIVIDE_EQUAL; }
YY_BREAK YY_BREAK
case 16: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 66 "config_lexer.ll" #line 65 "config_lexer.ll"
BEGIN(IN_C_COMMENT); BEGIN(IN_C_COMMENT);
YY_BREAK YY_BREAK
case 17: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 70 "config_lexer.ll" #line 69 "config_lexer.ll"
BEGIN(INITIAL); BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 18: case 17:
/* rule 18 can match eol */ /* rule 17 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 71 "config_lexer.ll" #line 70 "config_lexer.ll"
/* ignore comment */ /* ignore comment */
YY_BREAK YY_BREAK
case 19: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 72 "config_lexer.ll" #line 71 "config_lexer.ll"
/* ignore star */ /* ignore star */
YY_BREAK YY_BREAK
case 19:
YY_RULE_SETUP
#line 74 "config_lexer.ll"
/* ignore C++-style comments */
YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 75 "config_lexer.ll" #line 75 "config_lexer.ll"
/* ignore C++-style comments */
YY_BREAK
case 21:
YY_RULE_SETUP
#line 76 "config_lexer.ll"
/* ignore shell-style comments */ /* ignore shell-style comments */
YY_BREAK YY_BREAK
case 22: case 21:
/* rule 22 can match eol */ /* rule 21 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 77 "config_lexer.ll" #line 76 "config_lexer.ll"
/* ignore whitespace */ /* ignore whitespace */
YY_BREAK YY_BREAK
case 22:
YY_RULE_SETUP
#line 78 "config_lexer.ll"
return yytext[0];
YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 79 "config_lexer.ll" #line 79 "config_lexer.ll"
return yytext[0];
YY_BREAK
case 24:
YY_RULE_SETUP
#line 80 "config_lexer.ll"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1026 "config_lexer.cc" #line 1015 "config_lexer.cc"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(IN_C_COMMENT): case YY_STATE_EOF(IN_C_COMMENT):
yyterminate(); yyterminate();
@ -1318,7 +1307,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 81 ) if ( yy_current_state >= 72 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1347,11 +1336,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 81 ) if ( yy_current_state >= 72 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 80); yy_is_jam = (yy_current_state == 71);
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
@ -2210,7 +2199,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables" #define YYTABLES_NAME "yytables"
#line 80 "config_lexer.ll" #line 79 "config_lexer.ll"

View File

@ -48,7 +48,6 @@ do { \
%% %%
abstract return T_ABSTRACT; abstract return T_ABSTRACT;
local return T_LOCAL; local return T_LOCAL;
temporary return T_TEMPORARY;
object return T_OBJECT; object return T_OBJECT;
include return T_INCLUDE; include return T_INCLUDE;
inherits return T_INHERITS; inherits return T_INHERITS;

View File

@ -139,11 +139,10 @@ using namespace icinga;
T_MULTIPLY_EQUAL = 265, T_MULTIPLY_EQUAL = 265,
T_DIVIDE_EQUAL = 266, T_DIVIDE_EQUAL = 266,
T_ABSTRACT = 267, T_ABSTRACT = 267,
T_TEMPORARY = 268, T_LOCAL = 268,
T_LOCAL = 269, T_OBJECT = 269,
T_OBJECT = 270, T_INCLUDE = 270,
T_INCLUDE = 271, T_INHERITS = 271
T_INHERITS = 272
}; };
#endif #endif
/* Tokens. */ /* Tokens. */
@ -157,11 +156,10 @@ using namespace icinga;
#define T_MULTIPLY_EQUAL 265 #define T_MULTIPLY_EQUAL 265
#define T_DIVIDE_EQUAL 266 #define T_DIVIDE_EQUAL 266
#define T_ABSTRACT 267 #define T_ABSTRACT 267
#define T_TEMPORARY 268 #define T_LOCAL 268
#define T_LOCAL 269 #define T_OBJECT 269
#define T_OBJECT 270 #define T_INCLUDE 270
#define T_INCLUDE 271 #define T_INHERITS 271
#define T_INHERITS 272
@ -181,7 +179,7 @@ typedef union YYSTYPE
/* Line 293 of yacc.c */ /* Line 293 of yacc.c */
#line 185 "config_parser.cc" #line 183 "config_parser.cc"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@ -205,7 +203,7 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 343 of yacc.c */ /* Line 343 of yacc.c */
#line 67 "config_parser.yy" #line 66 "config_parser.yy"
int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner); int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
@ -227,7 +225,6 @@ int yyparse(ConfigCompiler *context);
static stack<ExpressionList::Ptr> m_ExpressionLists; static stack<ExpressionList::Ptr> m_ExpressionLists;
static ConfigItem::Ptr m_Object; static ConfigItem::Ptr m_Object;
static bool m_Abstract; static bool m_Abstract;
static bool m_Temporary;
static bool m_Local; static bool m_Local;
static Dictionary::Ptr m_Array; static Dictionary::Ptr m_Array;
@ -241,7 +238,7 @@ void ConfigCompiler::Compile(void)
/* Line 343 of yacc.c */ /* Line 343 of yacc.c */
#line 245 "config_parser.cc" #line 242 "config_parser.cc"
#ifdef short #ifdef short
# undef short # undef short
@ -465,17 +462,17 @@ union yyalloc
#define YYLAST 48 #define YYLAST 48
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 29 #define YYNTOKENS 28
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 25 #define YYNNTS 25
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 48 #define YYNRULES 47
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 63 #define YYNSTATES 62
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
#define YYMAXUTOK 272 #define YYMAXUTOK 271
#define YYTRANSLATE(YYX) \ #define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@ -487,15 +484,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
27, 28, 20, 18, 22, 19, 2, 21, 2, 2, 26, 27, 19, 17, 21, 18, 2, 20, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 25, 2, 26, 2, 2, 2, 2, 2, 2, 2, 24, 2, 25, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 23, 2, 24, 2, 2, 2, 2, 2, 2, 2, 22, 2, 23, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@ -510,7 +507,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17 15, 16
}; };
#if YYDEBUG #if YYDEBUG
@ -519,37 +516,37 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint8 yyprhs[] = static const yytype_uint8 yyprhs[] =
{ {
0, 0, 3, 4, 7, 9, 11, 14, 15, 16, 0, 0, 3, 4, 7, 9, 11, 14, 15, 16,
25, 26, 29, 31, 33, 35, 37, 41, 43, 44, 25, 26, 29, 31, 33, 35, 39, 41, 42, 45,
47, 48, 53, 55, 58, 59, 61, 65, 69, 76, 46, 51, 53, 56, 57, 59, 63, 67, 74, 76,
78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96,
98, 100, 101, 106, 108, 110, 113, 114, 116 98, 99, 104, 106, 108, 111, 112, 114
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] = static const yytype_int8 yyrhs[] =
{ {
30, 0, -1, -1, 30, 31, -1, 33, -1, 32, 29, 0, -1, -1, 29, 30, -1, 32, -1, 31,
-1, 16, 3, -1, -1, -1, 34, 36, 15, 6, -1, 15, 3, -1, -1, -1, 33, 35, 14, 6,
3, 35, 40, 41, -1, -1, 36, 37, -1, 12, 3, 34, 39, 40, -1, -1, 35, 36, -1, 12,
-1, 13, -1, 14, -1, 39, -1, 38, 22, 39, -1, 13, -1, 38, -1, 37, 21, 38, -1, 3,
-1, 3, -1, -1, 17, 38, -1, -1, 23, 42, -1, -1, 16, 37, -1, -1, 22, 41, 42, 23,
43, 24, -1, 44, -1, 44, 22, -1, -1, 45, -1, 43, -1, 43, 21, -1, -1, 44, -1, 43,
-1, 44, 22, 45, -1, 6, 46, 48, -1, 6, 21, 44, -1, 6, 45, 47, -1, 6, 24, 3,
25, 3, 26, 46, 48, -1, 3, -1, 7, -1, 25, 45, 47, -1, 3, -1, 7, -1, 8, -1,
8, -1, 9, -1, 10, -1, 11, -1, 3, -1, 9, -1, 10, -1, 11, -1, 3, -1, 4, -1,
4, -1, 5, -1, 47, -1, 49, -1, 41, -1, 5, -1, 46, -1, 48, -1, 40, -1, -1, 26,
-1, 27, 50, 52, 28, -1, 47, -1, 53, -1, 49, 51, 27, -1, 46, -1, 52, -1, 52, 21,
53, 22, -1, -1, 51, -1, 53, 22, 51, -1 -1, -1, 50, -1, 52, 21, 50, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] = static const yytype_uint16 yyrline[] =
{ {
0, 102, 102, 103, 106, 106, 109, 115, 120, 115, 0, 100, 100, 101, 104, 104, 107, 113, 118, 113,
153, 154, 157, 161, 165, 171, 172, 175, 182, 183, 148, 149, 152, 156, 162, 163, 166, 173, 174, 178,
187, 186, 198, 199, 201, 202, 203, 206, 214, 228, 177, 189, 190, 192, 193, 194, 197, 205, 219, 228,
237, 238, 239, 240, 241, 247, 252, 256, 262, 263, 229, 230, 231, 232, 238, 243, 247, 253, 254, 255,
264, 271, 270, 282, 288, 289, 291, 293, 294 262, 261, 273, 279, 280, 282, 284, 285
}; };
#endif #endif
@ -560,14 +557,14 @@ static const char *const yytname[] =
{ {
"$end", "error", "$undefined", "T_STRING", "T_NUMBER", "T_NULL", "$end", "error", "$undefined", "T_STRING", "T_NUMBER", "T_NULL",
"T_IDENTIFIER", "T_EQUAL", "T_PLUS_EQUAL", "T_MINUS_EQUAL", "T_IDENTIFIER", "T_EQUAL", "T_PLUS_EQUAL", "T_MINUS_EQUAL",
"T_MULTIPLY_EQUAL", "T_DIVIDE_EQUAL", "T_ABSTRACT", "T_TEMPORARY", "T_MULTIPLY_EQUAL", "T_DIVIDE_EQUAL", "T_ABSTRACT", "T_LOCAL",
"T_LOCAL", "T_OBJECT", "T_INCLUDE", "T_INHERITS", "'+'", "'-'", "'*'", "T_OBJECT", "T_INCLUDE", "T_INHERITS", "'+'", "'-'", "'*'", "'/'", "','",
"'/'", "','", "'{'", "'}'", "'['", "']'", "'('", "')'", "$accept", "'{'", "'}'", "'['", "']'", "'('", "')'", "$accept", "statements",
"statements", "statement", "include", "object", "$@1", "$@2", "statement", "include", "object", "$@1", "$@2", "attributes",
"attributes", "attribute", "inherits_list", "inherits_item", "attribute", "inherits_list", "inherits_item", "inherits_specifier",
"inherits_specifier", "expressionlist", "$@3", "expressions", "expressionlist", "$@3", "expressions", "expressions_inner",
"expressions_inner", "expression", "operator", "simplevalue", "value", "expression", "operator", "simplevalue", "value", "tuple", "$@4",
"tuple", "$@4", "tupleitem", "tupleitems", "tupleitems_inner", 0 "tupleitem", "tupleitems", "tupleitems_inner", 0
}; };
#endif #endif
@ -577,29 +574,29 @@ static const char *const yytname[] =
static const yytype_uint16 yytoknum[] = static const yytype_uint16 yytoknum[] =
{ {
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 43, 45, 265, 266, 267, 268, 269, 270, 271, 43, 45, 42,
42, 47, 44, 123, 125, 91, 93, 40, 41 47, 44, 123, 125, 91, 93, 40, 41
}; };
# endif # endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] = static const yytype_uint8 yyr1[] =
{ {
0, 29, 30, 30, 31, 31, 32, 34, 35, 33, 0, 28, 29, 29, 30, 30, 31, 33, 34, 32,
36, 36, 37, 37, 37, 38, 38, 39, 40, 40, 35, 35, 36, 36, 37, 37, 38, 39, 39, 41,
42, 41, 43, 43, 44, 44, 44, 45, 45, 45, 40, 42, 42, 43, 43, 43, 44, 44, 44, 45,
46, 46, 46, 46, 46, 47, 47, 47, 48, 48, 45, 45, 45, 45, 46, 46, 46, 47, 47, 47,
48, 50, 49, 51, 52, 52, 53, 53, 53 49, 48, 50, 51, 51, 52, 52, 52
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] = static const yytype_uint8 yyr2[] =
{ {
0, 2, 0, 2, 1, 1, 2, 0, 0, 8, 0, 2, 0, 2, 1, 1, 2, 0, 0, 8,
0, 2, 1, 1, 1, 1, 3, 1, 0, 2, 0, 2, 1, 1, 1, 3, 1, 0, 2, 0,
0, 4, 1, 2, 0, 1, 3, 3, 6, 1, 4, 1, 2, 0, 1, 3, 3, 6, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 4, 1, 1, 2, 0, 1, 3 0, 4, 1, 1, 2, 0, 1, 3
}; };
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@ -608,42 +605,42 @@ static const yytype_uint8 yyr2[] =
static const yytype_uint8 yydefact[] = static const yytype_uint8 yydefact[] =
{ {
2, 7, 1, 0, 3, 5, 4, 10, 6, 0, 2, 7, 1, 0, 3, 5, 4, 10, 6, 0,
12, 13, 14, 0, 11, 0, 8, 18, 0, 0, 12, 13, 0, 11, 0, 8, 17, 0, 0, 16,
17, 19, 15, 20, 9, 0, 24, 16, 29, 0, 18, 14, 19, 9, 0, 23, 15, 28, 0, 0,
0, 22, 25, 30, 31, 32, 33, 34, 0, 0, 21, 24, 29, 30, 31, 32, 33, 0, 0, 20,
21, 23, 0, 35, 36, 37, 41, 40, 38, 27, 22, 0, 34, 35, 36, 40, 39, 37, 26, 38,
39, 26, 0, 46, 0, 43, 47, 0, 44, 28, 25, 0, 45, 0, 42, 46, 0, 43, 27, 41,
42, 45, 48 44, 47
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] = static const yytype_int8 yydefgoto[] =
{ {
-1, 1, 4, 5, 6, 7, 17, 9, 14, 21, -1, 1, 4, 5, 6, 7, 16, 9, 13, 20,
22, 19, 47, 26, 30, 31, 32, 39, 48, 49, 21, 18, 46, 25, 29, 30, 31, 38, 47, 48,
50, 53, 56, 57, 58 49, 52, 55, 56, 57
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -46 #define YYPACT_NINF -45
static const yytype_int8 yypact[] = static const yytype_int8 yypact[] =
{ {
-46, 9, -46, 16, -46, -46, -46, -46, -46, 14, -45, 9, -45, 14, -45, -45, -45, -45, -45, 13,
-46, -46, -46, 11, -46, 19, -46, 6, 30, 13, -45, -45, 15, -45, 19, -45, 16, 28, 11, -45,
-46, 15, -46, -46, -46, 30, 12, -46, -46, -4, 17, -45, -45, -45, 28, 12, -45, -45, -4, 18,
10, 17, -46, -46, -46, -46, -46, -46, 32, -3, 21, -45, -45, -45, -45, -45, -45, 31, -3, -45,
-46, 12, 18, -46, -46, -46, -46, -46, -46, -46, 12, 10, -45, -45, -45, -45, -45, -45, -45, -45,
-46, -46, 3, 27, -3, -46, -46, 20, 21, -46, -45, 3, 25, -3, -45, -45, 20, 22, -45, -45,
-46, 27, -46 25, -45
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] = static const yytype_int8 yypgoto[] =
{ {
-46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
22, -46, 23, -46, -46, -46, -1, -14, -45, -13, 24, -45, 26, -45, -45, -45, -1, -15, -44, -16,
-46, -46, -16, -46, -46 -45, -45, -20, -45, -45
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@ -652,39 +649,39 @@ static const yytype_int8 yypgoto[] =
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
43, 44, 45, 33, 34, 35, 36, 37, 55, 2, 42, 43, 44, 32, 33, 34, 35, 36, 54, 2,
33, 34, 35, 36, 37, 28, 55, 15, 29, 8, 32, 33, 34, 35, 36, 27, 54, 8, 28, 22,
23, 38, 16, 18, 46, 3, 10, 11, 12, 13, 37, 14, 15, 45, 3, 10, 11, 12, 42, 43,
43, 44, 45, 20, 40, 42, 23, 25, 54, 41, 44, 19, 17, 22, 41, 51, 53, 58, 24, 50,
51, 59, 24, 61, 52, 62, 0, 27, 60 61, 39, 40, 60, 23, 0, 0, 59, 26
}; };
#define yypact_value_is_default(yystate) \ #define yypact_value_is_default(yystate) \
((yystate) == (-46)) ((yystate) == (-45))
#define yytable_value_is_error(yytable_value) \ #define yytable_value_is_error(yytable_value) \
YYID (0) YYID (0)
static const yytype_int8 yycheck[] = static const yytype_int8 yycheck[] =
{ {
3, 4, 5, 7, 8, 9, 10, 11, 53, 0, 3, 4, 5, 7, 8, 9, 10, 11, 52, 0,
7, 8, 9, 10, 11, 3, 61, 6, 6, 3, 7, 8, 9, 10, 11, 3, 60, 3, 6, 22,
23, 25, 3, 17, 27, 16, 12, 13, 14, 15, 24, 6, 3, 26, 15, 12, 13, 14, 3, 4,
3, 4, 5, 3, 24, 3, 23, 22, 52, 22, 5, 3, 16, 22, 3, 25, 51, 53, 21, 40,
41, 54, 19, 22, 26, 61, -1, 25, 28 60, 23, 21, 21, 18, -1, -1, 27, 24
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */ symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] = static const yytype_uint8 yystos[] =
{ {
0, 30, 0, 16, 31, 32, 33, 34, 3, 36, 0, 29, 0, 15, 30, 31, 32, 33, 3, 35,
12, 13, 14, 15, 37, 6, 3, 35, 17, 40, 12, 13, 14, 36, 6, 3, 34, 16, 39, 3,
3, 38, 39, 23, 41, 22, 42, 39, 3, 6, 37, 38, 22, 40, 21, 41, 38, 3, 6, 42,
43, 44, 45, 7, 8, 9, 10, 11, 25, 46, 43, 44, 7, 8, 9, 10, 11, 24, 45, 23,
24, 22, 3, 3, 4, 5, 27, 41, 47, 48, 21, 3, 3, 4, 5, 26, 40, 46, 47, 48,
49, 45, 26, 50, 46, 47, 51, 52, 53, 48, 44, 25, 49, 45, 46, 50, 51, 52, 47, 27,
28, 22, 51 21, 50
}; };
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
@ -1570,7 +1567,7 @@ yyreduce:
case 6: case 6:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 110 "config_parser.yy" #line 108 "config_parser.yy"
{ {
context->HandleInclude((yyvsp[(2) - (2)].text)); context->HandleInclude((yyvsp[(2) - (2)].text));
} }
@ -1579,7 +1576,7 @@ yyreduce:
case 7: case 7:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 115 "config_parser.yy" #line 113 "config_parser.yy"
{ {
m_Abstract = false; m_Abstract = false;
m_Local = false; m_Local = false;
@ -1589,7 +1586,7 @@ yyreduce:
case 8: case 8:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 120 "config_parser.yy" #line 118 "config_parser.yy"
{ {
m_Object = boost::make_shared<ConfigItem>((yyvsp[(4) - (5)].text), (yyvsp[(5) - (5)].text), yylloc); m_Object = boost::make_shared<ConfigItem>((yyvsp[(4) - (5)].text), (yyvsp[(5) - (5)].text), yylloc);
free((yyvsp[(4) - (5)].text)); free((yyvsp[(4) - (5)].text));
@ -1600,7 +1597,7 @@ yyreduce:
case 9: case 9:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 126 "config_parser.yy" #line 124 "config_parser.yy"
{ {
Object::Ptr exprl_object = *(yyvsp[(8) - (8)].variant); Object::Ptr exprl_object = *(yyvsp[(8) - (8)].variant);
delete (yyvsp[(8) - (8)].variant); delete (yyvsp[(8) - (8)].variant);
@ -1615,9 +1612,6 @@ yyreduce:
Expression abstractexpr("__abstract", OperatorSet, m_Abstract ? 1 : 0, yylloc); Expression abstractexpr("__abstract", OperatorSet, m_Abstract ? 1 : 0, yylloc);
exprl->AddExpression(abstractexpr); exprl->AddExpression(abstractexpr);
Expression tempexpr("__temporary", OperatorSet, m_Temporary ? 1 : 0, yylloc);
exprl->AddExpression(tempexpr);
Expression localexpr("__local", OperatorSet, m_Local ? 1 : 0, yylloc); Expression localexpr("__local", OperatorSet, m_Local ? 1 : 0, yylloc);
exprl->AddExpression(localexpr); exprl->AddExpression(localexpr);
@ -1631,7 +1625,7 @@ yyreduce:
case 12: case 12:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 158 "config_parser.yy" #line 153 "config_parser.yy"
{ {
m_Abstract = true; m_Abstract = true;
} }
@ -1640,54 +1634,45 @@ yyreduce:
case 13: case 13:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 162 "config_parser.yy" #line 157 "config_parser.yy"
{
m_Temporary = true;
}
break;
case 14:
/* Line 1806 of yacc.c */
#line 166 "config_parser.yy"
{ {
m_Local = true; m_Local = true;
} }
break; break;
case 17: case 16:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 176 "config_parser.yy" #line 167 "config_parser.yy"
{ {
m_Object->AddParent((yyvsp[(1) - (1)].text)); m_Object->AddParent((yyvsp[(1) - (1)].text));
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
} }
break; break;
case 20: case 19:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 187 "config_parser.yy" #line 178 "config_parser.yy"
{ {
m_ExpressionLists.push(boost::make_shared<ExpressionList>()); m_ExpressionLists.push(boost::make_shared<ExpressionList>());
} }
break; break;
case 21: case 20:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 192 "config_parser.yy" #line 183 "config_parser.yy"
{ {
(yyval.variant) = new Variant(m_ExpressionLists.top()); (yyval.variant) = new Variant(m_ExpressionLists.top());
m_ExpressionLists.pop(); m_ExpressionLists.pop();
} }
break; break;
case 27: case 26:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 207 "config_parser.yy" #line 198 "config_parser.yy"
{ {
Expression expr((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc); Expression expr((yyvsp[(1) - (3)].text), (yyvsp[(2) - (3)].op), *(yyvsp[(3) - (3)].variant), yylloc);
free((yyvsp[(1) - (3)].text)); free((yyvsp[(1) - (3)].text));
@ -1697,10 +1682,10 @@ yyreduce:
} }
break; break;
case 28: case 27:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 215 "config_parser.yy" #line 206 "config_parser.yy"
{ {
Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc); Expression subexpr((yyvsp[(3) - (6)].text), (yyvsp[(5) - (6)].op), *(yyvsp[(6) - (6)].variant), yylloc);
free((yyvsp[(3) - (6)].text)); free((yyvsp[(3) - (6)].text));
@ -1716,10 +1701,10 @@ yyreduce:
} }
break; break;
case 29: case 28:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 229 "config_parser.yy" #line 220 "config_parser.yy"
{ {
Expression expr((yyvsp[(1) - (1)].text), OperatorSet, (yyvsp[(1) - (1)].text), yylloc); Expression expr((yyvsp[(1) - (1)].text), OperatorSet, (yyvsp[(1) - (1)].text), yylloc);
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
@ -1728,75 +1713,75 @@ yyreduce:
} }
break; break;
case 34: case 33:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 242 "config_parser.yy" #line 233 "config_parser.yy"
{ {
(yyval.op) = (yyvsp[(1) - (1)].op); (yyval.op) = (yyvsp[(1) - (1)].op);
} }
break; break;
case 35: case 34:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 248 "config_parser.yy" #line 239 "config_parser.yy"
{ {
(yyval.variant) = new Variant((yyvsp[(1) - (1)].text)); (yyval.variant) = new Variant((yyvsp[(1) - (1)].text));
free((yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text));
} }
break; break;
case 36: case 35:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 253 "config_parser.yy" #line 244 "config_parser.yy"
{ {
(yyval.variant) = new Variant((yyvsp[(1) - (1)].num)); (yyval.variant) = new Variant((yyvsp[(1) - (1)].num));
} }
break; break;
case 37: case 36:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 257 "config_parser.yy" #line 248 "config_parser.yy"
{ {
(yyval.variant) = new Variant(); (yyval.variant) = new Variant();
} }
break; break;
case 39:
/* Line 1806 of yacc.c */
#line 256 "config_parser.yy"
{
(yyval.variant) = (yyvsp[(1) - (1)].variant);
}
break;
case 40: case 40:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 265 "config_parser.yy" #line 262 "config_parser.yy"
{ {
(yyval.variant) = (yyvsp[(1) - (1)].variant); m_Array = boost::make_shared<Dictionary>();
} }
break; break;
case 41: case 41:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 271 "config_parser.yy" #line 267 "config_parser.yy"
{
m_Array = boost::make_shared<Dictionary>();
}
break;
case 42:
/* Line 1806 of yacc.c */
#line 276 "config_parser.yy"
{ {
(yyval.variant) = new Variant(m_Array); (yyval.variant) = new Variant(m_Array);
m_Array.reset(); m_Array.reset();
} }
break; break;
case 43: case 42:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 283 "config_parser.yy" #line 274 "config_parser.yy"
{ {
m_Array->AddUnnamedProperty(*(yyvsp[(1) - (1)].variant)); m_Array->AddUnnamedProperty(*(yyvsp[(1) - (1)].variant));
delete (yyvsp[(1) - (1)].variant); delete (yyvsp[(1) - (1)].variant);
@ -1806,7 +1791,7 @@ yyreduce:
/* Line 1806 of yacc.c */ /* Line 1806 of yacc.c */
#line 1810 "config_parser.cc" #line 1795 "config_parser.cc"
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires /* User semantic actions sometimes alter yychar, and that requires
@ -2044,6 +2029,6 @@ yyreturn:
/* Line 2067 of yacc.c */ /* Line 2067 of yacc.c */
#line 296 "config_parser.yy" #line 287 "config_parser.yy"

View File

@ -82,11 +82,10 @@ using namespace icinga;
T_MULTIPLY_EQUAL = 265, T_MULTIPLY_EQUAL = 265,
T_DIVIDE_EQUAL = 266, T_DIVIDE_EQUAL = 266,
T_ABSTRACT = 267, T_ABSTRACT = 267,
T_TEMPORARY = 268, T_LOCAL = 268,
T_LOCAL = 269, T_OBJECT = 269,
T_OBJECT = 270, T_INCLUDE = 270,
T_INCLUDE = 271, T_INHERITS = 271
T_INHERITS = 272
}; };
#endif #endif
/* Tokens. */ /* Tokens. */
@ -100,11 +99,10 @@ using namespace icinga;
#define T_MULTIPLY_EQUAL 265 #define T_MULTIPLY_EQUAL 265
#define T_DIVIDE_EQUAL 266 #define T_DIVIDE_EQUAL 266
#define T_ABSTRACT 267 #define T_ABSTRACT 267
#define T_TEMPORARY 268 #define T_LOCAL 268
#define T_LOCAL 269 #define T_OBJECT 269
#define T_OBJECT 270 #define T_INCLUDE 270
#define T_INCLUDE 271 #define T_INHERITS 271
#define T_INHERITS 272
@ -124,7 +122,7 @@ typedef union YYSTYPE
/* Line 2068 of yacc.c */ /* Line 2068 of yacc.c */
#line 128 "config_parser.h" #line 126 "config_parser.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */

View File

@ -52,7 +52,6 @@ using namespace icinga;
%token <op> T_MULTIPLY_EQUAL %token <op> T_MULTIPLY_EQUAL
%token <op> T_DIVIDE_EQUAL %token <op> T_DIVIDE_EQUAL
%token T_ABSTRACT %token T_ABSTRACT
%token T_TEMPORARY
%token T_LOCAL %token T_LOCAL
%token T_OBJECT %token T_OBJECT
%token T_INCLUDE %token T_INCLUDE
@ -85,7 +84,6 @@ int yyparse(ConfigCompiler *context);
static stack<ExpressionList::Ptr> m_ExpressionLists; static stack<ExpressionList::Ptr> m_ExpressionLists;
static ConfigItem::Ptr m_Object; static ConfigItem::Ptr m_Object;
static bool m_Abstract; static bool m_Abstract;
static bool m_Temporary;
static bool m_Local; static bool m_Local;
static Dictionary::Ptr m_Array; static Dictionary::Ptr m_Array;
@ -137,9 +135,6 @@ inherits_specifier expressionlist
Expression abstractexpr("__abstract", OperatorSet, m_Abstract ? 1 : 0, yylloc); Expression abstractexpr("__abstract", OperatorSet, m_Abstract ? 1 : 0, yylloc);
exprl->AddExpression(abstractexpr); exprl->AddExpression(abstractexpr);
Expression tempexpr("__temporary", OperatorSet, m_Temporary ? 1 : 0, yylloc);
exprl->AddExpression(tempexpr);
Expression localexpr("__local", OperatorSet, m_Local ? 1 : 0, yylloc); Expression localexpr("__local", OperatorSet, m_Local ? 1 : 0, yylloc);
exprl->AddExpression(localexpr); exprl->AddExpression(localexpr);
@ -158,10 +153,6 @@ attribute: T_ABSTRACT
{ {
m_Abstract = true; m_Abstract = true;
} }
| T_TEMPORARY
{
m_Temporary = true;
}
| T_LOCAL | T_LOCAL
{ {
m_Local = true; m_Local = true;