This repository was archived by the owner on Mar 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinterpreter.h
More file actions
58 lines (50 loc) · 1.3 KB
/
interpreter.h
File metadata and controls
58 lines (50 loc) · 1.3 KB
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
/*
* Project name:
* Implementace interpretu imperativního jazyka IFJ14
*
* Repository:
* https://github.com/Dasio/IFJ
*
* Team:
* Dávid Mikuš (xmikus15)
* Peter Hostačný (xhosta03)
* Tomáš Kello (xkello00)
* Adam Lučanský (xlucan01)
* Michaela Lukášová (xlukas09)
*/
/**
* Interpreter module, containing instruction tape.
*/
#include "system.h"
#include "instruction.h"
#include "instructions_generated.h"
#include "instructions_regular.h"
#include "vector.h"
#include "stack.h"
#ifndef _INTERPRETER_H
#define _INTERPRETER_H
/**
* Initializes instruction tape in module
*/
void initInterpret();
/**
* Appends instruction to end of instruction tape.
* @param op Op code of instruction (see instruction.h)
* @param a Operand A (Destination A)
* @param b Operand B (Source B)
* @param c Operand C (Source C)
*/
void generateExprInstruction(InstructionOp op, Operand* a, Operand* b, Operand* c);
/**
* Appends instruction to end of instruction tape.
* @param op Op code of instruction (see instruction.h)
* @param a Operand A (Destination A)
* @param b Operand B (Source B)
*/
void generateInstruction(InstructionOp op, Operand* a, Operand* b, Operand* c);
/**
* Prints content of tape to stderr.
*/
void dumpTape();
void runInterpretation();
#endif