summaryrefslogtreecommitdiff
path: root/conf/confbase.Y
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-07-11 11:08:10 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-11 11:08:10 +0200
commit2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f (patch)
tree396657a62a5a63b0a304268bd011934f56d414ce /conf/confbase.Y
parentd429bc5c841a8e9d4c81786973edfa56d20a407e (diff)
parentcb339a30677901f2c248de08ff535cf0a9efab3d (diff)
Merge remote-tracking branch 'origin/master' into backport
Diffstat (limited to 'conf/confbase.Y')
-rw-r--r--conf/confbase.Y5
1 files changed, 3 insertions, 2 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y
index 5f45c507..1d5738ff 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -75,6 +75,7 @@ CF_DECLS
struct f_static_attr fsa;
struct f_lval flv;
struct f_line *fl;
+ struct f_arg *fa;
const struct filter *f;
struct f_tree *e;
struct f_trie *trie;
@@ -152,14 +153,14 @@ conf: definition ;
definition:
DEFINE symbol '=' term ';' {
struct f_val *val = cfg_allocz(sizeof(struct f_val));
- if (f_eval(f_linearize($4), cfg_mem, val) > F_RETURN) cf_error("Runtime error");
+ if (f_eval(f_linearize($4, 1), cfg_mem, val) > F_RETURN) cf_error("Runtime error");
cf_define_symbol($2, SYM_CONSTANT | val->type, val, val);
}
;
expr:
NUM
- | '(' term ')' { $$ = f_eval_int(f_linearize($2)); }
+ | '(' term ')' { $$ = f_eval_int(f_linearize($2, 1)); }
| CF_SYM_KNOWN {
if ($1->class != (SYM_CONSTANT | T_INT)) cf_error("Number constant expected");
$$ = SYM_VAL($1).i; }