123456789101112131415161718192021222324252627282930 |
- #include "symbol_table.h"
- #include "asm_instructions.h"
-
- #ifndef COMPILATOR_2000_YACC_UTIL_H
- #define COMPILATOR_2000_YACC_UTIL_H
-
- typedef struct Condition {
- Instruction instruction;
- int not;
- } Condition;
-
- void write_affectation(SymbolTable* symbolTable, InstructionTable *instructionTable, char* symbol_dest, SymbolItem* src);
-
- const SymbolItem* write_op(SymbolTable* symbol_table, InstructionTable *instruction_table, Instruction instruction, SymbolItem *op1, SymbolItem *op2);
-
- const SymbolItem* write_negation(SymbolTable* symbol_table, InstructionTable *instruction_table, SymbolItem *op2);
-
- const SymbolItem* init_temp_symbol(SymbolTable* symbol_table, InstructionTable *instruction_table, int constant);
-
- void write_print(InstructionTable *instruction_table, SymbolItem *src);
-
- int update_jmf(InstructionTable *table, int address);
-
- int write_jmf(InstructionTable *table, SymbolItem* cond);
-
- const SymbolItem* write_not_condition(SymbolTable* symbol_table, InstructionTable *table, const SymbolItem* cond);
-
- const SymbolItem* write_condition(SymbolTable* symbol_table, InstructionTable *table, Condition* op, SymbolItem* cond1, SymbolItem* cond2);
-
- #endif //COMPILATOR_2000_YACC_UTIL_H
|