summaryrefslogtreecommitdiff
path: root/urlscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'urlscanner.l')
-rw-r--r--urlscanner.l52
1 files changed, 0 insertions, 52 deletions
diff --git a/urlscanner.l b/urlscanner.l
deleted file mode 100644
index 79768b2..0000000
--- a/urlscanner.l
+++ /dev/null
@@ -1,52 +0,0 @@
-%option noyywrap
-%option yylineno
-%option nounput
-
-%{
-#include "urlscanner.h"
-#include "string.h"
-yystype yylval;
-#define YY_NO_INPUT
-%}
-
-%x ATAG_HREF
-%x ATAG_BETWEEN
-%x ATAG_DESC
-
-%%
-
-[^<]* { }
-
-"<a"[^>]*"href=\"" { BEGIN(ATAG_HREF); }
-
-<ATAG_HREF>[^\"]+ {
- yylval = strdup(yytext);
- BEGIN(ATAG_BETWEEN);
- return TOKEN_URL;
-}
-
-<ATAG_HREF>\" {
- yylval = "";
- BEGIN(ATAG_BETWEEN);
- return TOKEN_URL;
-}
-
-<ATAG_BETWEEN>[^>]* { }
-
-<ATAG_BETWEEN>">" { BEGIN(ATAG_DESC); }
-
-<ATAG_DESC>[^<]* {
- yylval = strdup(yytext);
- BEGIN(INITIAL);
- return TOKEN_TEXT;
-}
-
-. { /* skip */ }
-
-<<EOF>> { return MYEOF; }
-
-%%
-
-void scan_string(const char* str) {
- yy_switch_to_buffer(yy_scan_string(str));
-}