diff --git a/ChangeLog b/ChangeLog index 472bedf..41f544a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2021-06-29 Omar Polo + * parse.y (conf): don't require the strict order macro > options > servers + * gmid.c (main): add -D to define macros from the cmd line * parse.y (yylex): allow to define macros in the config file diff --git a/parse.y b/parse.y index e4e1b30..3e30c8c 100644 --- a/parse.y +++ b/parse.y @@ -97,10 +97,10 @@ char *symget(const char *); %% -conf : vars options vhosts ; - -vars : /* empty */ - | vars var +conf : /* empty */ + | conf var + | conf option + | conf vhost ; var : TSTRING '=' TSTRING { @@ -120,10 +120,6 @@ var : TSTRING '=' TSTRING { } ; -options : /* empty */ - | options option - ; - option : TCHROOT TSTRING { conf.chroot = $2; } | TIPV6 TBOOL { conf.ipv6 = $2; } | TMIME TSTRING TSTRING { add_mime(&conf.mime, $2, $3); } @@ -136,10 +132,6 @@ option : TCHROOT TSTRING { conf.chroot = $2; } | TUSER TSTRING { conf.user = $2; } ; -vhosts : /* empty */ - | vhosts vhost - ; - vhost : TSERVER TSTRING { host = new_vhost(); TAILQ_INSERT_HEAD(&hosts, host, vhosts);