Browse Source

Nettoyage fini

Paul Faure 2 years ago
parent
commit
712e686699
5 changed files with 13 additions and 5 deletions
  1. 8
    0
      .gitignore
  2. 0
    0
      Lex_Yacc/al.lex
  3. 2
    2
      Lex_Yacc/as.y
  4. 1
    1
      Makefile
  5. 2
    2
      Tables/tables.c

+ 8
- 0
.gitignore View File

1
+Lex_Yacc/as.tab*
2
+Lex_Yacc/as.dot
3
+Lex_Yacc/as.output
4
+Lex_Yacc/lex.yy.*
5
+Tables/tables.o
6
+rondoudou_cross_assembleur
7
+Inputs/*
8
+Outputs/*

LexYacc/al.lex → Lex_Yacc/al.lex View File


LexYacc/as.y → Lex_Yacc/as.y View File

2
 	int nombre;
2
 	int nombre;
3
 }
3
 }
4
 %{
4
 %{
5
-#include "tables.h"
5
+#include "../Tables/tables.h"
6
 #include <stdio.h>
6
 #include <stdio.h>
7
 
7
 
8
 FILE * file;
8
 FILE * file;
153
   init();
153
   init();
154
 	yyparse();
154
 	yyparse();
155
 	write_asm(file);
155
 	write_asm(file);
156
-	write_code_machine_compact(file2);
156
+	write_code_machine(file2, 0);
157
 	return 0;
157
 	return 0;
158
 }
158
 }

+ 1
- 1
Makefile View File

15
 	@rm -f Tables/*.o
15
 	@rm -f Tables/*.o
16
 
16
 
17
 clean_Lex_Yacc:
17
 clean_Lex_Yacc:
18
-	@rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.*
18
+	@rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.* Lex_Yacc/as.dot
19
 
19
 
20
 clean_Inputs:
20
 clean_Inputs:
21
 	@rm -f Inputs/*
21
 	@rm -f Inputs/*

+ 2
- 2
Tables/tables.c View File

383
 			i--;
383
 			i--;
384
 		}
384
 		}
385
 	} else {
385
 	} else {
386
-		printf(file, "\"");
386
+		fprintf(file, "\"");
387
 		int i = MEM_INST_SIZE - 1;
387
 		int i = MEM_INST_SIZE - 1;
388
 		while (i>=0) {
388
 		while (i>=0) {
389
 			write_instruction_binary(file, buffer[i], 1);
389
 			write_instruction_binary(file, buffer[i], 1);
390
 			i--;
390
 			i--;
391
 		}
391
 		}
392
-		printf(file, "\"\n");
392
+		fprintf(file, "\"\n");
393
 	}
393
 	}
394
 }
394
 }

Loading…
Cancel
Save