Specification
prog:
| v = value; SEMI_COLON
| EOF
​
value:
| SET; host = host;
| POST; data_items = data_items; TO; series = series;
| GET; func = func?; FROM; series = series; since = since; filter_items = filter_items?;
| GET; func = func?; FROM; series = series; range = range; filter_items = filter_items?;
| GET; func = func?; FROM; series = series; last = last; filter_items = filter_items?;
| DELETE; FROM; series = series; range = range; filter_items = filter_items?;
​
host:
HOST; s = STRING
data_items:
dpl = separated_list(COMMA, data_item)
​
ts:
TIMESTAMP; EQUALS; n = INT; COMMA
num:
VALUE?; EQUALS?; v = FLOAT;
​
data_item:
LEFT_PAREN?; ts = ts?; tag_items = tag_items?; num = num; RIGHT_PAREN?
​
tag_items:
TAG; EQUALS; LEFT_BRACK; tl = separated_list(COMMA, tag_item); RIGHT_BRACK; COMMA
​
tag_item:
LEFT_PAREN?; s1 = STRING; EQUALS; s2 = STRING; RIGHT_PAREN?
​
func:
MIN | MAX; | SUM; | COUNT; | MEAN; | SD;
series:
l = separated_nonempty_list(COMMA, STRING)
​
range:
| RANGE; n1 = INT; SECONDS; TO; n2 = INT; SECONDS
| RANGE; n1 = INT; TO; n2 = INT;
| RANGE; n1 = INT; MINUTES; TO; n2 = INT; MINUTES
| RANGE; n1 = INT; HOURS; TO; n2 = INT; HOURS
| RANGE; n1 = INT; DAYS; TO; n2 = INT; DAYS
​
last:
LAST; n = INT
​
filter_items:
| FILTER; lis = separated_nonempty_list(COMMA, filter_item)
​
filter_item:
s1 = STRING; IS; s2 = STRING
​
since:
| SINCE; n = INT; SECONDS
| SINCE; n = INT;
| SINCE; n = INT; MINUTES
| SINCE; n = INT; HOURS
| SINCE; n = INT; DAYS
Copy link