Browse code

- support for string [] identifiers, such as @proxy_authorize["iptel.org"]

Jan Janak authored on 27/06/2006 13:46:13
Showing 1 changed files
... ...
@@ -1359,6 +1359,19 @@ select_param:
1359 1359
 		sel.params[sel.n].v.i = $3;
1360 1360
 		sel.n++;
1361 1361
 	}
1362
+	| ID LBRACK STRING RBRACK {
1363
+		if (sel.n >= MAX_SELECT_PARAMS-2) {
1364
+			yyerror("Select identifier too long\n");
1365
+		}
1366
+		sel.params[sel.n].type = SEL_PARAM_STR;
1367
+		sel.params[sel.n].v.s.s = $1;
1368
+		sel.params[sel.n].v.s.len = strlen($1);
1369
+		sel.n++;
1370
+		sel.params[sel.n].type = SEL_PARAM_STR;
1371
+		sel.params[sel.n].v.s.s = $3;
1372
+		sel.params[sel.n].v.s.len = strlen($3);
1373
+		sel.n++;
1374
+	}
1362 1375
 	;
1363 1376
 select_params:
1364 1377
 	select_params DOT select_param