diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-12-13 09:26:10 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-12-13 09:26:10 +0800 |
commit | 8d3a30913b6e67bb0e88166feb50fad535341e30 (patch) | |
tree | 530815c5c40841271820c870062813c5831a2aef /src/kanga/kanga2mips/KangaSym.java | |
parent | c53fdd66cadbe32ee9234cd6d9961b4d3e2b468f (diff) | |
download | minijava-8d3a30913b6e67bb0e88166feb50fad535341e30.tar.xz |
Kanga to MIPS
Diffstat (limited to 'src/kanga/kanga2mips/KangaSym.java')
-rw-r--r-- | src/kanga/kanga2mips/KangaSym.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/kanga/kanga2mips/KangaSym.java b/src/kanga/kanga2mips/KangaSym.java new file mode 100644 index 0000000..2b49e3c --- /dev/null +++ b/src/kanga/kanga2mips/KangaSym.java @@ -0,0 +1,24 @@ +package kanga.kanga2mips; + +public class KangaSym { + public enum Type { HALLOC, BINOP, SIMPLE }; + public enum SimpleType { REG, INT, LABEL }; + + public Type e_type; + public SimpleType s_type; + public int value; // for integer simple type + public int binop; // Binary operator + public String name; // for register or label name + public String name2; // for second oprand + public KangaSym oprand2; // for second oprand + + public KangaSym(Type t) { + e_type = t; + } + + public KangaSym(Type t, SimpleType s) { + e_type = t; + s_type = s; + } + +} |