]> git.draconx.ca Git - gob-dx.git/blobdiff - src/lexer.l
Release 0.93.2
[gob-dx.git] / src / lexer.l
index 14f699005f6160396f8861a96221b148e8ada9b9..b155aa76d8d1ada419c4a96a85ba46f4a678b126 100644 (file)
@@ -24,7 +24,7 @@
 #include <glib.h>
 #include <string.h>
 
-#include "tree.h"
+#include "treefuncs.h"
 #include "parse.h"
 #include "main.h"
 #include "util.h"
@@ -93,11 +93,33 @@ add_gtk_doc_func(void)
 %x GTK_DOC
 %x GTK_DOC_LINE
 
+
+
 %%
 
 <*>\n                  { line_no++; REJECT; }
 
-<*>MOTHERFUCKER                { fprintf(stderr,"You are a bad bad person!\n"); REJECT; }
+<COMMENT>^(I(S.RI).E\(([1-9][0-9]+|[2-9]))/(\))        {
+/* Thy evil easter egg */
+#define QQ(x) long x
+#define KK(x) =atoi(__(&,,x,))
+#define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
+#define PP(Q) (P%Q)==0
+#define ___(x,y,z) if(x z y)
+#define __(a,x,y,z) a(yytext[y] x z)
+#define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
+QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
+){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
+7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
+#undef QQ
+#undef KK
+#undef MM
+#undef PP
+#undef ___
+#undef __
+#undef O__O
+REJECT;
+}
 
 \/\/.*$                        { ; /*comment, ignore*/ }
 <C_CODE>^#[ \t]*include[ \t][<"][^\n">]*[>"] {
@@ -377,7 +399,6 @@ class               {
 <CLASS_CODE_I>virtual  {yylval.line = line_no; return VIRTUAL;}
 <CLASS_CODE_I>signal   {yylval.line = line_no; return SIGNAL;}
 <CLASS_CODE_I>override {yylval.line = line_no; return OVERRIDE;}
-<CLASS_CODE_I>onerror  {return ONERROR;}
 <CLASS_CODE_I>0|[1-9][0-9]*|0x[0-9a-fA-F]+|0[0-7]+|[0-9]*\.[0-9]+|\.[0-9][0-9]*        {
                        yylval.id = g_strdup(yytext);
                        return NUMBER;