Browse code

core: reply_route aliased to main onreply_route block

- reply_route { ... } can be used instead of main onreply_route { ... }
- easier to refer to core reply routing actions, avoiding naming
confusion with tm reply routing blocks

Daniel-Constantin Mierla authored on 22/05/2011 13:02:09
Showing 2 changed files
... ...
@@ -202,6 +202,7 @@ ERROR	error
202 202
 ROUTE	route
203 203
 ROUTE_REQUEST request_route
204 204
 ROUTE_FAILURE failure_route
205
+ROUTE_REPLY reply_route
205 206
 ROUTE_ONREPLY onreply_route
206 207
 ROUTE_BRANCH branch_route
207 208
 ROUTE_SEND onsend_route
... ...
@@ -589,6 +590,7 @@ SUBST       subst
589 589
 <INITIAL>{ROUTE_REQUEST}	{ count(); yylval.strval=yytext; return ROUTE_REQUEST; }
590 590
 <INITIAL>{ROUTE_ONREPLY}	{ count(); yylval.strval=yytext;
591 591
 								return ROUTE_ONREPLY; }
592
+<INITIAL>{ROUTE_REPLY}	{ count(); yylval.strval=yytext; return ROUTE_REPLY; }
592 593
 <INITIAL>{ROUTE_FAILURE}	{ count(); yylval.strval=yytext;
593 594
 								return ROUTE_FAILURE; }
594 595
 <INITIAL>{ROUTE_BRANCH} { count(); yylval.strval=yytext; return ROUTE_BRANCH; }
... ...
@@ -310,6 +310,7 @@ extern char *finame;
310 310
 %token ROUTE_REQUEST
311 311
 %token ROUTE_FAILURE
312 312
 %token ROUTE_ONREPLY
313
+%token ROUTE_REPLY
313 314
 %token ROUTE_BRANCH
314 315
 %token ROUTE_SEND
315 316
 %token ROUTE_EVENT
... ...
@@ -1837,8 +1838,14 @@ failure_route_stm:
1837 1837
 	| ROUTE_FAILURE error { yyerror("invalid failure_route statement"); }
1838 1838
 	;
1839 1839
 
1840
+
1841
+route_reply_main:	ROUTE_ONREPLY { ; }
1842
+		  | ROUTE_REPLY { ; }
1843
+;
1844
+
1845
+
1840 1846
 onreply_route_stm:
1841
-	ROUTE_ONREPLY LBRACE {rt=CORE_ONREPLY_ROUTE;} actions RBRACE {
1847
+	route_reply_main LBRACE {rt=CORE_ONREPLY_ROUTE;} actions RBRACE {
1842 1848
 	#ifdef SHM_MEM
1843 1849
 		if (!shm_initialized() && init_shm()<0) {
1844 1850
 			yyerror("Can't initialize shared memory");
... ...
@@ -1848,6 +1855,7 @@ onreply_route_stm:
1848 1848
 		push($4, &onreply_rt.rlist[DEFAULT_RT]);
1849 1849
 	}
1850 1850
 	| ROUTE_ONREPLY error { yyerror("invalid onreply_route statement"); }
1851
+	| ROUTE_REPLY error { yyerror("invalid onreply_route statement"); }
1851 1852
 	| ROUTE_ONREPLY LBRACK route_name RBRACK 
1852 1853
 		{rt=(*$3=='0' && $3[1]==0)?CORE_ONREPLY_ROUTE:TM_ONREPLY_ROUTE;}
1853 1854
 		LBRACE actions RBRACE {