-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbnf
36 lines (29 loc) · 888 Bytes
/
bnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<string> ::= <quoted_string>
|<unquoted_string>
|<host_name_string>
|<key>
<conf> ::= <global_conf> <host_confs>
<global_conf> :: = global "{" <key_value_pairs> "}" ";"
|global "{" <key_value_pairs> "}"
<host_confs> ::= empty| <host_confs> <host_conf>
<host_conf> ::= host <host_name> "{" <key_value_pairs> "}" ";"
|host <host_name> "{" <key_value_pairs> "}"
<key_value_pairs> ::= /* empty */
| <key_value> "\n"
| <key_value_pairs> <key_value> "\n"
<key_value> ::= <key> "=" <int>
|<key> "=" <float>
|<key> "=" <string>
<host_name> ::= <host_name_string>
|<key>
Token Type
<key> = [_\-a-zA-Z][[:ascii:]]*
<int> ::= [0-9]+
<float> ::= [0-9]+\.[0-9]+
<quoted_string> ::= ".*"
<unquoted_string> = [a-zA-Z_][a-zA-Z0-9\.\-_\\/]+
<host_name_string> = [a-zA-Z0-9\.\-_]+
=
}
{
;