Version fonctionnelle processeur sécurisé
This commit is contained in:
parent
c9c60001de
commit
725e012507
1 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
%{
|
||||
#include "../Tables/tables.h"
|
||||
#include <stdlib.h>
|
||||
%}
|
||||
|
||||
%token tMUL tDIV tADD tSUB tINF tSUP tEQU
|
||||
|
@ -65,7 +66,13 @@ Instruction : tSTOP tNB {add_instruction(STOP, $2, 0, 0);};
|
|||
|
||||
%%
|
||||
|
||||
int main(void) {
|
||||
int main(int argc, char * argv[]) {
|
||||
if (argc != 2) {
|
||||
printf("Specifiez le fichier à interpreter");
|
||||
exit(2);
|
||||
}
|
||||
extern FILE * yyin;
|
||||
yyin = fopen(argv[1], "r");
|
||||
yyparse();
|
||||
execute();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue