X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=scan.l;h=b080e5aaf6d90b9b0fef61debbd1b6da2e6e9890;hb=a36f51c503e2989889692cda72223874eb573d89;hp=c1b61e7082daf98c6828748d41aab2d7de71e67a;hpb=ea1ec85fd94e887ad47403458f416d01b2af2213;p=~andy%2Fct diff --git a/scan.l b/scan.l index c1b61e7..b080e5a 100644 --- a/scan.l +++ b/scan.l @@ -7,17 +7,20 @@ %option noyywrap %option nounput %option noinput +%option yylineno +%option never-interactive /* %option nodebug */ START [ \t]*<% -END [ \t]*%>[ \t]* +END [ \t]*%> DATA ([^<\n]|<[^%])*\n* CODE [ \t\n]([^%\n]|%[^>])*\n* -%s IN FMT +%s IN %% [[:space:]]*\n { debug("NL [%s]"); } {START} { debug("START [%s]"); yylval = g_strdup(yytext); BEGIN(IN); return START; } {DATA} { debug("DATA [%s]"); yylval = g_strdup(yytext); return DATA; } {END} { debug("END [%s]"); yylval = g_strdup(yytext); BEGIN(INITIAL); return END; } = { debug("OUT [%s]"); yylval = g_strdup(yytext); return OUT; } +% { debug("FMT [%s]"); yylval = g_strdup(yytext); return FMT; } {CODE} { debug("CODE [%s]"); yylval = g_strdup(yytext); return DATA; } %%