aboutsummaryrefslogtreecommitdiffstats
path: root/test/littlesemantics/little.flex
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-02-17 13:44:32 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-02-17 13:44:32 +0000
commit6224148fdd809170d138216d72b8e6180d626aec (patch)
treef67127b4ab6026f5e29d0b6aa69bec4f8a223fb2 /test/littlesemantics/little.flex
parentf9ebf19ba3ca4c3ee67cc88bbea407d4dd734249 (diff)
downloadcompcert-6224148fdd809170d138216d72b8e6180d626aec.tar.gz
compcert-6224148fdd809170d138216d72b8e6180d626aec.zip
Reorganization test directory
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1253 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
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);
-}
-
-%%
-