Browse Source

Nettoyage fini

Paul Faure 2 months 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

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

+ 1
- 1
Makefile View File

@@ -15,7 +15,7 @@ clean_Tables:
15 15
 	@rm -f Tables/*.o
16 16
 
17 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 20
 clean_Inputs:
21 21
 	@rm -f Inputs/*

+ 2
- 2
Tables/tables.c View File

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

Loading…
Cancel
Save