Update copyright statement
[nbd.git] / nbdtab_parser.y
blob7ee698a6858eeb3c5e184d94247f5d76a34b2f07
1 %{
2 extern int yylex();
3 #include <stdio.h>
4 #include <stdbool.h>
5 #include <stdint.h>
6 #include "nbdclt.h"
7 typedef char * YYSTYPE;
8 %}
10 %define parse.trace
11 %define api.value.type {char *}
13 %token SPACE
14 %token STRING
18 nbdtab:
19 %empty
20 | '\n' nbdtab
21 | mountdef nbdtab
24 mountdef:
25 STRING SPACE STRING SPACE STRING optlist { nbdtab_commit_line($1, $3, $5); }
28 optlist:
29 %empty
30 | SPACE options
33 options:
34 options ',' option
35 | option
38 option:
39 STRING { nbdtab_set_flag($1); }
40 | STRING '=' STRING { nbdtab_set_property($1, $3); }