summaryrefslogtreecommitdiff
path: root/conf/confbase.Y
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-07-13 14:14:37 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-13 14:14:37 +0200
commit68a2c9d4c91a36c90a768926495f7894324287c5 (patch)
tree996387a4741746aa1c5cad1d238b886cfe7620d6 /conf/confbase.Y
parentaf0d5ec2797bab2a928fa8ce2caf81608a3f7443 (diff)
parent2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f (diff)
Merge commit '2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f' into thread-next
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 a603153c..241c332d 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -76,6 +76,7 @@ CF_DECLS
struct f_attr_bit fab;
struct f_lval flv;
struct f_line *fl;
+ struct f_arg *fa;
const struct filter *f;
struct f_tree *e;
struct f_trie *trie;
@@ -154,14 +155,14 @@ conf: definition ;
definition:
DEFINE symbol '=' term ';' {
struct f_val val;
- if (f_eval(f_linearize($4), &val) > F_RETURN) cf_error("Runtime error");
+ if (f_eval(f_linearize($4, 1), &val) > F_RETURN) cf_error("Runtime error");
cf_define_symbol($2, SYM_CONSTANT | val.type, val, lp_val_copy(cfg_mem, &val));
}
;
expr:
NUM
- | '(' term ')' { $$ = f_eval_int(f_linearize($2)); }
+ | '(' term ')' { $$ = f_eval_int(f_linearize($2, 1)); }
| symbol_known {
if ($1->class != (SYM_CONSTANT | T_INT)) cf_error("Number constant expected");
$$ = SYM_VAL($1).i; }