aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-06-29 12:42:44 +0000
committerOmar Polo <op@omarpolo.com>2021-06-29 12:42:44 +0000
commit6b86655a10753eae668e839207692d9d43138679 (patch)
tree0137f9c497a71d2c89e2172ec70c44da67074ac7 /parse.y
parentf98e9045aef95fe28972d477ee549974c7cefb9f (diff)
don't require the strict order macro > options > servers
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y16
1 files changed, 4 insertions, 12 deletions
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);