-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatement.h
74 lines (62 loc) · 1.15 KB
/
statement.h
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
#ifndef STATEMENT_H
#define STATEMENT_H
#include <QMainWindow>
#include <vector>
#include <exp.h>
#include <calc.h>
#include <QRegularExpression>
using namespace std;
class Statement
{
public:
Statement(int num);
int lineNum;
QString treeNode;
vector<Exp*> child;
void run();
virtual ~Statement();
};
class RemStmt: public Statement
{
public:
RemStmt(int num, QString ss);
virtual ~RemStmt();
};
class LetStmt: public Statement
{
public:
LetStmt(int num, QString var, QString exp);
virtual ~LetStmt();
};
class PrintStmt: public Statement
{
public:
PrintStmt(int num, QString ss);
virtual ~PrintStmt();
};
class InputStmt: public Statement
{
public:
InputStmt(int num, QString ss);
virtual ~InputStmt();
};
class GotoStmt: public Statement
{
public:
GotoStmt(int num, int val);
virtual ~GotoStmt();
};
class IfStmt: public Statement
{
public:
IfStmt(int num, QString ss);
virtual ~IfStmt();
};
class EndStmt: public Statement
{
public:
EndStmt(int num);
virtual ~EndStmt();
};
#endif // STATEMENT_H