aboutsummaryrefslogtreecommitdiffstats
path: root/test/littlesemantics/little.flex
diff options
context:
space:
mode:
Diffstat (limited to 'test/littlesemantics/little.flex')
-rw-r--r--test/littlesemantics/little.flex41
1 files changed, 0 insertions, 41 deletions
diff --git a/test/littlesemantics/little.flex b/test/littlesemantics/little.flex
deleted file mode 100644
index 57a1e0cd..00000000
--- a/test/littlesemantics/little.flex
+++ /dev/null
@@ -1,41 +0,0 @@
-%option noyywrap
-%{
-#include <string.h>
-#include "little.tab.h"
-extern char* lextext;
-extern int lexnum;
-%}
-
-
-DIGIT [0-9]
-ID [A-Za-z_][A-Za-z_0-9]*
-
-%%
-
--?{DIGIT}+ { lexnum = atoi(yytext); return NUM; }
-"while" { return T_WHILE; }
-"do" { return T_DO; }
-"done" { return T_DONE; }
-"end" { return T_END; }
-"in" { return T_IN; }
-"skip" { return T_SKIP; }
-"variables" {return T_VARIABLES; }
-":=" {return T_ASSIGN; }
-">" {return T_GT; }
-";" {return T_SCOLUMN;}
-"+" {return T_PLUS;}
-"(" {return T_OPEN;}
-")" {return T_CLOSE;}
-"{" {return T_OPEN_B;}
-"}" {return T_CLOSE_B;}
-[ \t\n]
-{ID} { if(!(lextext =(char*)malloc(yyleng*sizeof(char)))) {
- printf("failed memory allocation for variable %s", yytext);
- exit(-1);
- }
- memcpy(lextext, yytext, yyleng);
- return(ID);
-}
-
-%%
-