-
Notifications
You must be signed in to change notification settings - Fork 0
/
brainfuck.cpp
36 lines (32 loc) · 865 Bytes
/
brainfuck.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
#include <iostream>
#include <string>
#include "brainfuck.h"
Brainfuck::Brainfuck(std::string& str):
compiler(str),
executor(str) {
//std::cout << "RECIEN CREADO: " << '\n';
//excecutor.print_code();
}
Brainfuck::Brainfuck(std::string& str, std::string& _in, std::string& _out):
compiler(str),
executor(str, _in, _out) {
//std::cout << "RECIEN CREADO: " << '\n';
//excecutor.print_code();
}
bool Brainfuck::start() {
bool is_all_ok = true;
//std::cout << "ANTES DE COMPILAR: " << '\n';
//excecutor.print_code();
is_all_ok = compiler.start();
if (! is_all_ok) return false;
//std::cout << "HAGO START: " << '\n';
executor.start();
//excecutor.print_code();
return true;
}
/*
void Brainfuck::print_code() {
excecutor.print_code();
}
*/
Brainfuck::~Brainfuck() {}