rendered paste body%{
#include <stdio.h>
#include <string.h>
#include "conf_parser.h"
%}
%option noyywrap
%%
[0-9]+ return NUMBER;
readonly return READONLY;
debug return TOKDEBUG;
mountpoint return MOUNTPOINT;
logfile return LOGFILE;
loglevel return LOGLEVEL;
pkgdir return PKGDIR;
dbtype return DBTYPE;
dbpath return DBPATH;
[a-zA-Z][a-zA-Z0-9]* yylval.string=strdup(yytext); return WORD;
[a-zA-Z0-9\/.-]+ yylval.string=strdup(yytext); return FILENAME;
\n return NEWLINE;
[ \t]+ /* ignore whitespace */
%%