YACDB
Yet Another C(rappy) Database
parser_mallocs_frees.h
Go to the documentation of this file.
1
7#ifndef PARSER_MALLOCS_FREES_H
8#define PARSER_MALLOCS_FREES_H
9
10#include <stdlib.h>
11#include "instruction.h"
23void free_charray(charray *array);
36void free_instrarray(InstrArray * instrarray);
48struct SelInstr *selinstr_init();
54void free_selinstr(struct SelInstr *selinstr);
60struct CrtInstr *crtinstr_init();
67void free_crtinstr(struct CrtInstr *crtinstr);
73struct AddInstr *addinstr_init();
79void free_addinstr(struct AddInstr *addinstr);
97void free_condition(struct condition *cond);
98#endif
Structures for instruction management.
void free_selinstr(struct SelInstr *selinstr)
Free a SelInstr.
Definition: parser_mallocs_frees.c:70
struct CrtInstr * crtinstr_init()
Initialize a CrtInstr.
Definition: parser_mallocs_frees.c:81
struct SelInstr * selinstr_init()
Initialize a SelInstr.
Definition: parser_mallocs_frees.c:59
void free_instrarray(InstrArray *instrarray)
Free an InstrArray.
Definition: parser_mallocs_frees.c:28
void free_addinstr(struct AddInstr *addinstr)
Free an AddInstr.
Definition: parser_mallocs_frees.c:109
InstrArray * instrarray_init(int sz)
Initialize an InstrArray.
Definition: parser_mallocs_frees.c:20
void free_charray(charray *array)
Free a charray.
Definition: parser_mallocs_frees.c:10
void free_instr(instr *instr)
Free an instruction of any type.
Definition: parser_mallocs_frees.c:38
struct condition * condition_init()
Initialize a struct condition.
Definition: parser_mallocs_frees.c:124
charray * charray_init()
Initialize a charray.
Definition: parser_mallocs_frees.c:3
instr * unknowninstr_init()
Initialize an instr of instrType unknownInstrType.
Definition: parser_mallocs_frees.c:117
struct AddInstr * addinstr_init()
Initialize an AddInstr.
Definition: parser_mallocs_frees.c:99
void free_crtinstr(struct CrtInstr *crtinstr)
Free a CrtInstr.
Definition: parser_mallocs_frees.c:91
void free_condition(struct condition *cond)
Free a struct condition.
Definition: parser_mallocs_frees.c:132
Add instruction.
Definition: instruction.h:112
Create instruction.
Definition: instruction.h:96
An array of instruction.
Definition: instruction.h:128
Select instruction.
Definition: instruction.h:78
An array of char* (string)
Definition: instruction.h:48
An equality condition.
Definition: instruction.h:59
One yacDB instruction, this type is meant to be casted into other instr type.
Definition: instruction.h:69