interpreteur.l et instructions.h

This commit is contained in:
Leonie Gallois 2021-04-29 11:31:50 +02:00
parent 791facef81
commit 0fa10f44a9
2 changed files with 7 additions and 0 deletions

View file

@ -16,6 +16,9 @@
#define AFCA 13
#define WR 14
#define READ 15
#define RET 16
#define CALL 17
#define COPR 18
#define MAX_INSTRUCTIONS_SIZE 256
#define MAX_MEMORY_SIZE 256
@ -24,6 +27,7 @@ void asm_init();
void asm_add_3(char ins, int arg1, int arg2, int arg3);
void asm_add_2(char ins, int arg1, int arg2);
void asm_add_1(char ins, int arg1);
void asm_add_0(char ins);
void asm_run();
#endif // #ifndef __INSTRUCTIONS_H__

View file

@ -21,6 +21,9 @@ PRI {return tPRI;}
AFCA {return tAFCA;}
WR {return tWR;}
READ {return tREAD;}
RET {return tRET;}
CALL {return tCALL;}
COPR {return tCOPR;}
-?[0-9]+ {
yylval.nb = atoi(yytext);