-
Notifications
You must be signed in to change notification settings - Fork 12
/
conf.l
38 lines (36 loc) · 1.39 KB
/
conf.l
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
%{
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "conf.tab.h"
%}
%%
[ \t]+ /* Ignore */;
\n { return TOKNEWLINE; }
#.*\n { return TOKNEWLINE; }
([0-9]{1,3}"."){3,3}([0-9]{1,3}) { bdconfig_lval.string=strdup(yytext); return IPADDR; }
[-0-9]+ { bdconfig_lval.number=atoi(yytext); return NUMBER; }
\".*\" { bdconfig_lval.string=strdup(yytext); return STRING; }
\/ { return TOKSLASH; }
true|false { bdconfig_lval.number=!strcmp(yytext,"true"); return STATE; }
subnet { return TOKSUBNET; }
notsubnet { return TOKNOTSUBNET; }
dev { return TOKDEV; }
skip_intervals { return TOKSKIPINTERVALS; }
graph_cutoff { return TOKGRAPHCUTOFF; }
promiscuous { return TOKPROMISC; }
output_cdf { return TOKOUTPUTCDF; }
recover_cdf { return TOKRECOVERCDF; }
graph { return TOKGRAPH; }
filter { return TOKFILTER; }
meta_refresh { return TOKMETAREFRESH; }
pgsql_connect_string { return TOKPGSQLCONNECTSTRING; }
sqlite_filename { return TOKSQLITEFILENAME; }
sensor_id { return TOKSENSORID; }
htdocs_dir { return TOKHTDOCSDIR; }
log_dir { return TOKLOGDIR; }
description { return TOKDESCRIPTION; }
management_url { return TOKMANAGEMENTURL; }
extensions { return TOKEXTENSIONS; }
. { return TOKJUNK; }
%%