summaryrefslogtreecommitdiff
path: root/urlscanner.l
diff options
context:
space:
mode:
authorhorus_arch2016-09-09 12:30:02 +0200
committerhorus_arch2016-09-09 12:30:02 +0200
commit542b26d4dcc90f8186900d51960e3dfefaa0ad01 (patch)
treefc29f80a69a0a20deec97bd5f00efef599a1d0ad /urlscanner.l
parent32685cc367b86c81df3f025f63261aa91ea3cd8c (diff)
downloaduhttpd-542b26d4dcc90f8186900d51960e3dfefaa0ad01.tar.gz
Removes dependencies on cgo (flex + bison)
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));
-}