Browse code

core: removed append_branch() from cfg language structure

- cfg append_branch() is no longer implemented by core, being moved to
corex module in order to allow variables in the parameters

Daniel-Constantin Mierla authored on 30/08/2012 20:36:10
Showing 2 changed files
... ...
@@ -236,7 +236,6 @@ PREFIX			"prefix"
236 236
 STRIP			"strip"
237 237
 STRIP_TAIL		"strip_tail"
238 238
 SET_USERPHONE		"userphone"
239
-APPEND_BRANCH	"append_branch"
240 239
 REMOVE_BRANCH	"remove_branch"
241 240
 CLEAR_BRANCHES	"clear_branches"
242 241
 IF				"if"
... ...
@@ -641,8 +640,6 @@ IMPORTFILE      "import_file"
641 640
 <INITIAL>{PREFIX}	{ count(); yylval.strval=yytext; return PREFIX; }
642 641
 <INITIAL>{STRIP}	{ count(); yylval.strval=yytext; return STRIP; }
643 642
 <INITIAL>{STRIP_TAIL}	{ count(); yylval.strval=yytext; return STRIP_TAIL; }
644
-<INITIAL>{APPEND_BRANCH}	{ count(); yylval.strval=yytext;
645
-								return APPEND_BRANCH; }
646 643
 <INITIAL>{REMOVE_BRANCH}	{ count(); yylval.strval=yytext;
647 644
 								return REMOVE_BRANCH; }
648 645
 <INITIAL>{CLEAR_BRANCHES}	{ count(); yylval.strval=yytext;
... ...
@@ -3289,29 +3289,6 @@ cmd:
3289 3289
 	| STRIP LPAREN error RPAREN { $$=0; yyerror("bad argument, number expected"); }
3290 3290
 	| SET_USERPHONE LPAREN RPAREN { $$=mk_action(SET_USERPHONE_T, 0); set_cfg_pos($$); }
3291 3291
 	| SET_USERPHONE error { $$=0; yyerror("missing '(' or ')' ?"); }
3292
-	| APPEND_BRANCH LPAREN STRING COMMA STRING RPAREN {
3293
-		qvalue_t q;
3294
-		if (str2q(&q, $5, strlen($5)) < 0) {
3295
-			yyerror("bad argument, q value expected");
3296
-		}
3297
-		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, $3, NUMBER_ST, (void *)(long)q);
3298
-		set_cfg_pos($$);
3299
-	}
3300
-	| APPEND_BRANCH LPAREN STRING RPAREN {
3301
-		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, $3,
3302
-							NUMBER_ST, (void *)Q_UNSPECIFIED);
3303
-		set_cfg_pos($$);
3304
-	}
3305
-	| APPEND_BRANCH LPAREN RPAREN {
3306
-		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, 0,
3307
-							NUMBER_ST, (void *)Q_UNSPECIFIED);
3308
-		set_cfg_pos($$);
3309
-	}
3310
-	| APPEND_BRANCH {
3311
-		$$=mk_action(APPEND_BRANCH_T, 2, STRING_ST, 0,
3312
-							NUMBER_ST, (void *)Q_UNSPECIFIED);
3313
-		set_cfg_pos($$);
3314
-	}
3315 3292
 	| REMOVE_BRANCH LPAREN intno RPAREN {
3316 3293
 			$$=mk_action(REMOVE_BRANCH_T, 1, NUMBER_ST, (void*)$3);
3317 3294
 			set_cfg_pos($$);