-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
58 lines (36 loc) · 1018 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <string.h>
/*#include "include/node.h"
#include "include/dump.h"
#include "include/asm.h"
#include "HashList/list.h"
#include "include/lexer.h"*/
#include "include/gram&help_functions.h"
List* WORKING_TAPE = nullptr;
HashTree* tree = (HashTree*) calloc(1, sizeof (HashTree));
int main(void)
{
Tree* tokens_list = begin_lexering("hell.txt");
WORKING_TAPE = tokens_list->lst->prev;
H_list_init(tree, 30);
Node* root = getFuncInit(); //getG();
//graph_tree_dump(root);
do_tree_simplify(&root);
graph_tree_dump(root);
do_asm_translation(root);
H_list_destructor(tree);
tree_destruct(root);
/*printf("%d", tokens_list->size);
List* lll = tokens_list->lst;
for (int i = 0; i < tokens_list->size; i++)
{
node_fmt_print(stdout, lll->prev->node);
lll = lll->prev;
}*/
list_destructor(tokens_list);
free(tree);
free(tokens_list);
}