aboutsummaryrefslogtreecommitdiff
path: root/src/tpc.lex
diff options
context:
space:
mode:
Diffstat (limited to 'src/tpc.lex')
-rw-r--r--src/tpc.lex7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tpc.lex b/src/tpc.lex
index 5137d39..7a0d6b6 100644
--- a/src/tpc.lex
+++ b/src/tpc.lex
@@ -5,7 +5,8 @@
5 */ 5 */
6 6
7#include "tpc.tab.h" 7#include "tpc.tab.h"
8 8#define INT 0
9#define CHAR 1
9int lineno = 1; 10int lineno = 1;
10%} 11%}
11 12
@@ -22,8 +23,8 @@ int lineno = 1;
22"+"|- { yylval.addsub=yytext[0]; return ADDSUB; } 23"+"|- { yylval.addsub=yytext[0]; return ADDSUB; }
23"<"|"<="|">"|">=" { strcpy(yylval.comp, yytext); return ORDER; } 24"<"|"<="|">"|">=" { strcpy(yylval.comp, yytext); return ORDER; }
24==|!= { strcpy(yylval.comp, yytext); return EQ; } 25==|!= { strcpy(yylval.comp, yytext); return EQ; }
25entier { strcpy(yylval.type, yytext); return TYPE; } 26entier { yylval.type = INT; return TYPE; }
26caractere { strcpy(yylval.type, yytext); return TYPE; } 27caractere { yylval.type = CHAR; return TYPE; }
27void { return VOID; } 28void { return VOID; }
28const { return CONST; } 29const { return CONST; }
29if { return IF; } 30if { return IF; }