-/* $OpenBSD: parse.y,v 1.292 2023/05/10 07:19:49 op Exp $ */
+/* $OpenBSD: parse.y,v 1.293 2023/12/01 09:25:49 op Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
}
;
-comma : ','
+comma : ',' optnl
| nl
| /* empty */
;
}
;
-keyval_list : keyval
+keyval_list : keyval optnl
| keyval comma keyval_list
;
}
;
-string_list : stringel
+string_list : stringel optnl
| stringel comma string_list
;
filter_config->filter_subsystem |= FILTER_SUBSYSTEM_SMTP_OUT;
dict_init(&filter_config->chain_procs);
dsp->u.remote.filtername = filtername;
-} '{' filter_list '}' {
+} '{' optnl filter_list '}' {
dict_set(conf->sc_filters_dict, dsp->u.remote.filtername, filter_config);
filter_config = NULL;
}
;
filter_list:
-filterel
+filterel optnl
| filterel comma filter_list
;
filter_config = xcalloc(1, sizeof *filter_config);
filter_config->filter_type = FILTER_TYPE_CHAIN;
dict_init(&filter_config->chain_procs);
-} '{' filter_list '}' {
+} '{' optnl filter_list '}' {
dict_set(conf->sc_filters_dict, $2, filter_config);
filter_config = NULL;
}
filter_config->filter_type = FILTER_TYPE_CHAIN;
filter_config->filter_subsystem |= FILTER_SUBSYSTEM_SMTP_IN;
dict_init(&filter_config->chain_procs);
- } '{' filter_list '}' {
+ } '{' optnl filter_list '}' {
dict_set(conf->sc_filters_dict, listen_opts.filtername, filter_config);
filter_config = NULL;
}
filter_config->filter_type = FILTER_TYPE_CHAIN;
filter_config->filter_subsystem |= FILTER_SUBSYSTEM_SMTP_IN;
dict_init(&filter_config->chain_procs);
- } '{' filter_list '}' {
+ } '{' optnl filter_list '}' {
dict_set(conf->sc_filters_dict, listen_opts.filtername, filter_config);
filter_config = NULL;
}
| TABLE STRING {
table = table_create(conf, "static", $2, NULL);
free($2);
- } '{' tableval_list '}' {
+ } '{' optnl tableval_list '}' {
table = NULL;
}
;
free($1);
$$ = t;
}
- | '{' {
+ | '{' optnl {
table = table_create(conf, "static", NULL, NULL);
} tableval_list '}' {
$$ = table;