diff options
author | Omar Polo <op@omarpolo.com> | 2024-01-26 16:54:58 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-01-26 16:54:58 +0000 |
commit | ddb089c157628dc1b5ad10b526d24fb1a28c438e (patch) | |
tree | fe42cb7371b0222a2b74bdb25a48d0af7f6391f7 /parse.y | |
parent | 3524375abe3db49d8eb887adc30476044ea029cf (diff) |
rework the grammar so that ; is accepted after variables and options
See Codeberg issue #1.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 23 |
1 files changed, 9 insertions, 14 deletions
@@ -150,13 +150,12 @@ typedef struct { %% conf : /* empty */ - | conf include '\n' - | conf '\n' - | conf varset '\n' - | conf option '\n' - | conf vhost '\n' - | conf types '\n' - | conf error '\n' { file->errors++; } + | conf include nl + | conf varset nl + | conf option nl + | conf vhost nl + | conf types nl + | conf error nl { file->errors++; } ; include : INCLUDE STRING { @@ -617,7 +616,7 @@ mediaopts_l : mediaopts_l mediaoptsl nl mediaoptsl : STRING { free(current_media); current_media = $1; - } medianames_l optsemicolon + } medianames_l | include ; @@ -633,17 +632,13 @@ medianamesl : numberstring { ; nl : '\n' optnl + | ';' optnl ; -optnl : '\n' optnl /* zero or more newlines */ - | ';' optnl /* semicolons too */ +optnl : nl | /*empty*/ ; -optsemicolon : ';' - | - ; - %% static const struct keyword { |