RdPMonteur.l 1.13 KB
Newer Older
Jaime Arias's avatar
Jaime Arias committed
1
2
3
4
5
6
7
8
9
10
%{
/************* INCLUDES AND EXTERNALS *************************************/

#include <stdio.h>
#include <string.h>
#include "RdPMonteur.tab.h"

%}

%%
Jaime Arias's avatar
Jaime Arias committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"("			                  { return('('); }
")"			                  { return(')'); }
"{"			                  { return('{'); }
"}"			                  { return('}'); }
":"			                  { return(':'); }
";"			                  { return(';'); }
"<."[ ]*".>"		          { return(TOKEN);}
"<."			                { return('['); }
".>"			                { return(']'); }
"<"			                  { return(INHIBITOR); }
"#trans"		              { return(TRANS);}
"#place"		              { return(PLACE);}
"#queue"		              { return(QUEUE);}
"#endtr"		              { return(ENDTR);}
"reset"		                { return(RESET);}
"loss"		                { return(LOSS);}
mk/[ ]*"("		            { return(MK);}
cp/[ ]*"("		            { return(CP);}
^in			                  { return(IN);}
^out			                { return(OUT);}
[0-9]+		                { sscanf(yytext,"%d",&yylval.i); return(ENTIER);}
[a-zA-Z_][a-zA-Z0-9_]*	  { yylval.s = strdup(yytext); return(VARIABLE);}
[ \t\n]			              {}
Jaime Arias's avatar
Jaime Arias committed
34
%%