diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-15 14:15:18 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-15 14:15:18 +0200 |
commit | cc590a11a7a285463dff89d0bd677d0762dd8e45 (patch) | |
tree | 8f2057f5f663cd1b22c6d0833243b780d5f30996 /conf | |
parent | 6be662d917822e9a23b0abd613e170c1d42bfdbe (diff) | |
download | bird-cc590a11a7a285463dff89d0bd677d0762dd8e45.tar bird-cc590a11a7a285463dff89d0bd677d0762dd8e45.zip |
Changed syntax of expressions. Each `expr' can be now either a numeric literal
or a symbol or parenthesised filter expression.
Diffstat (limited to 'conf')
-rw-r--r-- | conf/confbase.Y | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y index 588f582..31b3617 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -82,12 +82,7 @@ CF_ADDTO(conf, ';') expr: NUM - | expr '+' expr { $$ = $1 + $3; } - | expr '-' expr { $$ = $1 - $3; } - | expr '*' expr { $$ = $1 * $3; } - | expr '/' expr { if ($3) $$ = $1 / $3; else cf_error("Division by zero"); } - | expr '%' expr { if ($3) $$ = $1 % $3; else cf_error("Division by zero"); } - | '(' expr ')' { $$ = $2; } + | '(' term ')' { $$ = f_eval_int($2); } | SYM { if ($1->class != SYM_NUMBER) cf_error("Number expected"); else $$ = $1->aux; } ; |