summaryrefslogtreecommitdiffstats
path: root/filter/config.Y
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-15 12:49:38 +0200
committerMartin Mares <mj@ucw.cz>2000-05-15 12:49:38 +0200
commit1c20608e02109ef0839e0168d100c75f0cc65fd9 (patch)
treeca87f7fbac8f1364fb3cc0ed0fafc621fea02c17 /filter/config.Y
parent9449c91ab2eb962b17989125c712f805f82a092b (diff)
downloadbird-1c20608e02109ef0839e0168d100c75f0cc65fd9.tar
bird-1c20608e02109ef0839e0168d100c75f0cc65fd9.zip
Added f_eval_int() and EVAL configuration command.
Diffstat (limited to 'filter/config.Y')
-rw-r--r--filter/config.Y11
1 files changed, 8 insertions, 3 deletions
diff --git a/filter/config.Y b/filter/config.Y
index 343c1e0..4c4a859 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -1,7 +1,7 @@
/*
* BIRD - filters
*
- * Copyright 1998,1999 Pavel Machek
+ * Copyright 1998--2000 Pavel Machek
*
* Can be freely distributed and used under the terms of the GNU GPL.
*
@@ -33,7 +33,7 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
ADD, DELETE, CONTAINS, RESET,
PREPEND, MATCH,
EMPTY,
- FILTER, WHERE)
+ FILTER, WHERE, EVAL)
%nonassoc THEN
%nonassoc ELSE
@@ -59,6 +59,11 @@ filter_def:
}
;
+CF_ADDTO(conf, filter_eval)
+filter_eval:
+ EVAL term { f_eval_int($2); }
+ ;
+
type:
INT { $$ = T_INT; }
| BOOL { $$ = T_BOOL; }
@@ -164,7 +169,7 @@ function_body:
CF_ADDTO(conf, function_def)
function_def:
- FUNCTION SYM { DBG( "Begining of function %s\n", $2->name ); cf_push_scope($2); } function_params function_body {
+ FUNCTION SYM { DBG( "Beginning of function %s\n", $2->name ); cf_push_scope($2); } function_params function_body {
extern struct f_inst *startup_func, *test1_func, *test2_func;
cf_define_symbol($2, SYM_FUNCTION, $5);
if (!strcasecmp($2->name, "__startup"))