13 #include "res_parse.h"
15 #ifdef HAVE_LIBDMALLOC
20 #define YY_INPUT(buf,result,max_size) { result = res_parse_getchars(buf, max_size); }
23 #define yyunput ATTRIBUTE_UNUSED yyunput
26 extern int res_lineno;
27 extern int res_parse_getchars(char *buf, int max_size);
32 %option outfile="lex.yy.c"
36 PARENSTR ([^ (){}=\"\'\t\r\n]|\([^\)]*\))+
42 \"[^"]*\" { reslval.sval = strdup(yytext+1);
43 reslval.sval[strlen(reslval.sval) - 1] = 0;
46 \'[^']*\' { reslval.sval = strdup(yytext+1);
47 reslval.sval[strlen(reslval.sval) - 1] = 0;
50 {COMMENT}\n { res_lineno++; }
51 [ \t\r\n] { if (yytext[0] == '\n') res_lineno++; }
53 {INCSTR} { reslval.sval = strdup(yytext);
56 {PARENSTR} { reslval.sval = strdup(yytext);
59 . { return yytext[0]; }