All pastes #1242861 Raw Edit

conf.l

public text v1 · immutable
#1242861 ·published 2008-11-02 03:27 UTC
rendered paste body
%{
#include <stdio.h>
#include <string.h>
#include "conf_parser.h"
%}

%%
[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\/.-]+ return yylval.string=strdup(yytext); FILENAME;
\n		return NEWLINE;
[ \t]+		/* ignore whitespace */
%%