Commit Diff
Diff:
f98e9045aef95fe28972d477ee549974c7cefb9f
6b86655a10753eae668e839207692d9d43138679
Commit:
6b86655a10753eae668e839207692d9d43138679
Tree:
0137f9c497a71d2c89e2172ec70c44da67074ac7
Author:
Omar Polo <op@omarpolo.com>
Date:
Tue Jun 29 12:42:44 2021 UTC
Message:
don't require the strict order macro > options > servers
commit - f98e9045aef95fe28972d477ee549974c7cefb9f
commit + 6b86655a10753eae668e839207692d9d43138679
blob - 472bedff33446af49b6954e29dcbc93ff2361ba2
blob + 41f544aab3783401e8f920b79b61254002e1ae57
--- ChangeLog
+++ ChangeLog
@@ -1,4 +1,6 @@
2021-06-29 Omar Polo <op@omarpolo.com>
+
+ * parse.y (conf): don't require the strict order macro > options > servers
* gmid.c (main): add -D to define macros from the cmd line
blob - e4e1b3074f0559f5b6c1f6d4e8d8f8a330346967
blob + 3e30c8c80deafc11b2bf4f43c08c8b0f0569f720
--- parse.y
+++ parse.y
@@ -97,10 +97,10 @@ conf : vars options vhosts ;
%%
-conf : vars options vhosts ;
-
-vars : /* empty */
- | vars var
+conf : /* empty */
+ | conf var
+ | conf option
+ | conf vhost
;
var : TSTRING '=' TSTRING {
@@ -118,10 +118,6 @@ var : TSTRING '=' TSTRING {
free($1);
free($3);
}
- ;
-
-options : /* empty */
- | options option
;
option : TCHROOT TSTRING { conf.chroot = $2; }
@@ -134,10 +130,6 @@ option : TCHROOT TSTRING { conf.chroot = $2; }
yyerror("invalid protocols string \"%s\"", $2);
}
| TUSER TSTRING { conf.user = $2; }
- ;
-
-vhosts : /* empty */
- | vhosts vhost
;
vhost : TSERVER TSTRING {
Omar Polo