Fix some compiler warnings and make dma(8) compile clean on FreeBSD. Commit
[dragonfly.git] / libexec / dma / aliases_scan.l
1 %{
2 /* $DragonFly: src/libexec/dma/aliases_scan.l,v 1.2 2008/02/03 11:06:17 matthias Exp $ */
3
4 #include <string.h>
5 #include "aliases_parse.h"
6
7 int yylex(void);
8 %}
9
10 %option yylineno
11 %option nounput
12
13 %%
14
15 [^:,#[:space:][:cntrl:]]+       {yylval.ident = strdup(yytext); return T_IDENT;}
16 [:,\n]                          return yytext[0];
17 ^([[:blank:]]*(#.*)?\n)+        ;/* ignore empty lines */
18 (\n?[[:blank:]]+|#.*)+          ;/* ignore whitespace and continuation */
19 \\\n                            ;/* ignore continuation.  not allowed in comments */
20 .                               return T_ERROR;
21 <<EOF>>                         return T_EOF;
22
23 %%