Commit | Line | Data |
---|---|---|
f67beddd | 1 | %{ |
f67beddd MS |
2 | |
3 | #include <string.h> | |
92fe556d | 4 | #include "dma.h" |
f67beddd | 5 | #include "aliases_parse.h" |
dba19026 | 6 | |
92fe556d DF |
7 | #define YY_NO_INPUT |
8 | ||
f67beddd MS |
9 | %} |
10 | ||
11 | %option yylineno | |
dba19026 | 12 | %option nounput |
f67beddd MS |
13 | |
14 | %% | |
15 | ||
16 | [^:,#[:space:][:cntrl:]]+ {yylval.ident = strdup(yytext); return T_IDENT;} | |
f67beddd | 17 | ^([[:blank:]]*(#.*)?\n)+ ;/* ignore empty lines */ |
c8b07ee5 | 18 | [:,\n] return yytext[0]; |
f67beddd MS |
19 | (\n?[[:blank:]]+|#.*)+ ;/* ignore whitespace and continuation */ |
20 | \\\n ;/* ignore continuation. not allowed in comments */ | |
21 | . return T_ERROR; | |
22 | <<EOF>> return T_EOF; | |
23 | ||
24 | %% |