mirror of https://github.com/omar-polo/gmid.git
rework the grammar so that ; is accepted after variables and options
See Codeberg issue #1.
This commit is contained in:
parent
3524375abe
commit
ddb089c157
23
parse.y
23
parse.y
|
@ -150,13 +150,12 @@ typedef struct {
|
||||||
%%
|
%%
|
||||||
|
|
||||||
conf : /* empty */
|
conf : /* empty */
|
||||||
| conf include '\n'
|
| conf include nl
|
||||||
| conf '\n'
|
| conf varset nl
|
||||||
| conf varset '\n'
|
| conf option nl
|
||||||
| conf option '\n'
|
| conf vhost nl
|
||||||
| conf vhost '\n'
|
| conf types nl
|
||||||
| conf types '\n'
|
| conf error nl { file->errors++; }
|
||||||
| conf error '\n' { file->errors++; }
|
|
||||||
;
|
;
|
||||||
|
|
||||||
include : INCLUDE STRING {
|
include : INCLUDE STRING {
|
||||||
|
@ -617,7 +616,7 @@ mediaopts_l : mediaopts_l mediaoptsl nl
|
||||||
mediaoptsl : STRING {
|
mediaoptsl : STRING {
|
||||||
free(current_media);
|
free(current_media);
|
||||||
current_media = $1;
|
current_media = $1;
|
||||||
} medianames_l optsemicolon
|
} medianames_l
|
||||||
| include
|
| include
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -633,17 +632,13 @@ medianamesl : numberstring {
|
||||||
;
|
;
|
||||||
|
|
||||||
nl : '\n' optnl
|
nl : '\n' optnl
|
||||||
|
| ';' optnl
|
||||||
;
|
;
|
||||||
|
|
||||||
optnl : '\n' optnl /* zero or more newlines */
|
optnl : nl
|
||||||
| ';' optnl /* semicolons too */
|
|
||||||
| /*empty*/
|
| /*empty*/
|
||||||
;
|
;
|
||||||
|
|
||||||
optsemicolon : ';'
|
|
||||||
|
|
|
||||||
;
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
static const struct keyword {
|
static const struct keyword {
|
||||||
|
|
Loading…
Reference in New Issue