-
Notifications
You must be signed in to change notification settings - Fork 4
/
example.conf
75 lines (71 loc) · 2.03 KB
/
example.conf
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# -*- Conf DSL: language for configuration based on commands -*-
#
# ENBF C++ style:
# lexeme[a] => disable skipper for a
# a >> b => sequence: a followed by b
# a | b => alternative: a or b
# a - b => a but not b
# !a => predicate: if a matches, fail
# &a => predicate: if a matches, success
# *a => repetition: zero or more
# +a => repetition: one or more
# -a => optional
# a % b => a one or more times delimited by b: a >> *(b >> a)
# EOL => end of line
# DIGIT => std::isdigit
# ALPHA => std::isalpha
# BLANK => std::isblank
# CHAR => any character: [0, 256)
#
# Note: a predicate parser does not consume input
#
# == DSL Definition ==
#
# skipper = BLANK | ('#' >> *(CHAR - EOL) >> &EOL) | ('\' >> EOL)
#
# command = name >> *argument >> -pset >> EOL
#
# name = identifier
#
# identifier = lexeme[ALPHA >> *(ALPHA | DIGIT | '-')]
#
# argument = BUILT-IN-TYPE | STRING | UINT | INT | DOUBLE
#
# pset = '{' >> EOL >> +(name >> *argument >> EOL) >> '}'
#
# STRING is sequence of characters enclosed in quotation marks. The following
# sequences will be treated as a single character:
# \" => "
# \\ => \
# \n => NL
# \r => CR
# \t => TAB
#
# BUILT-IN-TYPE is any other type supported by the parser engine, ex.: ip address,
# ip prefix, mac addresses, ...
#
# Comments start with # and end at the EOL, see the skipper definition
#
# The parser assumes an UTF-8 encoding. The file must end with an EOL
#
# Each <value, pair> executes a command identified by <name> with <arguments> as
# parameters. <property-set> is passed as a map of <name, arguments>.
#
# Each command defines the <arguments> format.
#
module "madwifi"
module "icmp"
router "kenny" {
ip-address 2001:690:2380:777a:20c:6eff:feda:195c
ip-scope-id 2
}
router "kyle" {
ip-address 2001:690:2380:778f:20c:6eff:fedc:2a16
ip-scope-id 2
}
client "butters" {
ip-prefix 2001:690:2380:7792::/64
mac 00:13:e8:ef:6e:81 01:02:03:04:05:06
lma-id "kenny"
}