diff options
author | thing1 <thing1@seacrossedlovers.xyz> | 2025-02-18 22:00:20 +0000 |
---|---|---|
committer | thing1 <thing1@seacrossedlovers.xyz> | 2025-02-18 22:00:20 +0000 |
commit | ecfbc703dc930a20d56562451f4aa807175503e2 (patch) | |
tree | 7c1dd2742363625f59e4d9f7ba62a8d9594cd463 /e.l |
Diffstat (limited to 'e.l')
-rw-r--r-- | e.l | 57 |
1 files changed, 57 insertions, 0 deletions
@@ -0,0 +1,57 @@ +%{ +#include "types.h" +#include "y.tab.h" +#include <stdlib.h> +%} + +%option noyywrap +%option yylineno + +%% +[0-9]+ { + yylval.intlit = atoi(yytext); + return INTLIT; +} + +[A-Z] { + yylval.funcname = yytext[0]; + return FUNCTIONNAME; +} + + +[a-z] { + yylval.varname = yytext[0]; + return VARNAME; +} + +[-=+*/{}:] { + return yytext[0]; +} + +dec { + return FUNCTIONDEC; +} + +print { + return PRINT; +} + +input { + return INPUT; +} + +ret { + return RET; +} + +jmp { + return JMP; +} + +jnz { + return JNZ; +} + + +[:\n\t\v ] {;} +%% |