From 542b26d4dcc90f8186900d51960e3dfefaa0ad01 Mon Sep 17 00:00:00 2001 From: horus_arch Date: Fri, 9 Sep 2016 12:30:02 +0200 Subject: Removes dependencies on cgo (flex + bison) --- urlscanner.l | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 urlscanner.l (limited to 'urlscanner.l') 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 - -%% - -[^<]* { } - -"]*"href=\"" { BEGIN(ATAG_HREF); } - -[^\"]+ { - yylval = strdup(yytext); - BEGIN(ATAG_BETWEEN); - return TOKEN_URL; -} - -\" { - yylval = ""; - BEGIN(ATAG_BETWEEN); - return TOKEN_URL; -} - -[^>]* { } - -">" { BEGIN(ATAG_DESC); } - -[^<]* { - yylval = strdup(yytext); - BEGIN(INITIAL); - return TOKEN_TEXT; -} - -. { /* skip */ } - -<> { return MYEOF; } - -%% - -void scan_string(const char* str) { - yy_switch_to_buffer(yy_scan_string(str)); -} -- cgit v1.2.3