aboutsummaryrefslogtreecommitdiff
path: root/12/main.l
diff options
context:
space:
mode:
Diffstat (limited to '12/main.l')
-rw-r--r--12/main.l5
1 files changed, 5 insertions, 0 deletions
diff --git a/12/main.l b/12/main.l
index 2fa1b44..5641fad 100644
--- a/12/main.l
+++ b/12/main.l
@@ -12,6 +12,7 @@ extern int yylval;
12"long" return LONG; 12"long" return LONG;
13"return" return RET; 13"return" return RET;
14"for" return FOR; 14"for" return FOR;
15"while" return WHILE;
15"if" return IF; 16"if" return IF;
16"else" return ELSE; 17"else" return ELSE;
17"," return COMMA; 18"," return COMMA;
@@ -33,6 +34,10 @@ extern int yylval;
33">" return GT; 34">" return GT;
34"<=" return LTE; 35"<=" return LTE;
35">=" return GTE; 36">=" return GTE;
37[0-9]+ {
38 yylval = atoi(yytext);
39 return NUM;
40};
36[a-zA-Z_][a-zA-Z_0-9]* return ID; 41[a-zA-Z_][a-zA-Z_0-9]* return ID;
37. ; 42. ;
38\n ; 43\n ;