xref: /dragonfly/libexec/dma/aliases_scan.l (revision 9f7604d7)
1 %{
2 
3 #pragma GCC diagnostic ignored "-Wsign-compare"
4 #include <string.h>
5 #include "aliases_parse.h"
6 
7 %}
8 
9 %option yylineno
10 %option noinput
11 %option nounput
12 
13 %%
14 
15 [^:,#[:space:][:cntrl:]]+	{yylval.ident = strdup(yytext); return T_IDENT;}
16 ^([[:blank:]]*(#.*)?\n)+	;/* ignore empty lines */
17 [:,\n]				return yytext[0];
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 %%
24