Version fonctionnelle processeur sécurisé
这个提交包含在:
父节点
c9c60001de
当前提交
725e012507
共有 1 个文件被更改,包括 8 次插入 和 1 次删除
|
@ -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;
|
||||
|
|
正在加载…
在新工单中引用