File: conf.l

package info (click to toggle)
bandwidthd 2.0.1+cvs20090917-10
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,204 kB
  • sloc: sh: 3,008; ansic: 2,746; php: 1,263; yacc: 216; makefile: 162; lex: 36; sql: 27
file content (36 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download | duplicates (6)
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
%{
#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; }
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; }
sensor_id				{ return TOKSENSORID; }
htdocs_dir				{ return TOKHTDOCSDIR; }
log_dir					{ return TOKLOGDIR; }
description				{ return TOKDESCRIPTION; }
management_url			{ return TOKMANAGEMENTURL; }
extensions				{ return TOKEXTENSIONS; }
.						{ return TOKJUNK; }
%%