]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/newsearch.l
Merge pull request #1 from meeb/meeb
[irc/quakenet/newserv.git] / newsearch / newsearch.l
index 7cf6b60fcca409126411c2e545223d83298c26d6..043c6e03f8817ba12d2fc1a0534547d94a9903b2 100644 (file)
@@ -1,8 +1,12 @@
 %option noyywrap
 
 %{
+
 #include <stdlib.h>
 #include <string.h>
+#ifndef __POSIX_VISIBLE
+#define fileno(x) 0
+#endif
 
 #include "../lib/sstring.h"
 
@@ -87,7 +91,7 @@ letter                [a-zA-Z]
 [ \t]+         { addpos(strlen(yytext));
                  return WHITESPACE;
                }
-({letter}|{digit})+    { addpos(strlen(yytext));
+({letter}|{digit}|[#\-\+\.\*])+        { addpos(strlen(yytext));
                  yylval = getsstring(yytext, 512);
                  return IDENTIFIER;
                }
@@ -107,3 +111,7 @@ letter              [a-zA-Z]
                  yyterminate();
                }
 %%
+
+void ydummyfn(void) {
+  yyunput(0, NULL);
+}