]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Changed syntax of expressions. Each `expr' can be now either a numeric literal
authorMartin Mares <mj@ucw.cz>
Mon, 15 May 2000 12:15:18 +0000 (12:15 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 15 May 2000 12:15:18 +0000 (12:15 +0000)
or a symbol or parenthesised filter expression.

conf/confbase.Y

index 588f5826f7a0b1efa97a3c544b943ac58fb366e0..31b361730c50da90efd7d2ed9e3cd4286365d992 100644 (file)
@@ -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; }
  ;