home *** CD-ROM | disk | FTP | other *** search
- package webeq3.constants;
-
- public class OperatorProperty implements PropertyConstants {
- public boolean large;
- public boolean stretchy;
- public boolean movescripts;
- public boolean symmetric;
- public boolean accent;
- public boolean binaryop;
- public boolean l_fence;
- public boolean r_fence;
- public int lspace;
- public int rspace;
- public double minsize;
- public double maxsize;
- public int precedence;
- public int fencetype;
-
- public OperatorProperty() {
- this.large = false;
- this.stretchy = false;
- this.movescripts = false;
- this.symmetric = true;
- this.accent = true;
- this.binaryop = false;
- this.l_fence = false;
- this.r_fence = false;
- this.lspace = 0;
- this.rspace = 0;
- this.minsize = (double)0.0F;
- this.maxsize = (double)10000.0F;
- this.precedence = 0;
- this.fencetype = 0;
- }
-
- public OperatorProperty(int var1, int var2, int var3) {
- this.large = false;
- this.stretchy = false;
- this.movescripts = false;
- this.symmetric = true;
- this.accent = true;
- this.binaryop = false;
- this.l_fence = false;
- this.r_fence = false;
- this.lspace = 0;
- this.rspace = 0;
- this.minsize = (double)0.0F;
- this.maxsize = (double)10000.0F;
- this.precedence = 0;
- this.fencetype = 0;
- this.lspace = var2;
- this.rspace = var3;
- this.large = (var1 & 1) != 0;
- this.stretchy = (var1 & 2) != 0;
- this.movescripts = (var1 & 4) != 0;
- this.symmetric = (var1 & 8) != 0;
- this.accent = (var1 & 16) != 0;
- this.l_fence = (var1 & 32) != 0;
- this.r_fence = (var1 & 64) != 0;
- }
-
- public OperatorProperty(int var1, int var2, int var3, int var4) {
- this(var1, var2, var3);
- this.precedence = var4;
- }
-
- public OperatorProperty(int var1, int var2, int var3, boolean var4, int var5) {
- this(var1, var2, var3, var4);
- this.precedence = var5;
- }
-
- public OperatorProperty(int var1, int var2, int var3, boolean var4) {
- this.large = false;
- this.stretchy = false;
- this.movescripts = false;
- this.symmetric = true;
- this.accent = true;
- this.binaryop = false;
- this.l_fence = false;
- this.r_fence = false;
- this.lspace = 0;
- this.rspace = 0;
- this.minsize = (double)0.0F;
- this.maxsize = (double)10000.0F;
- this.precedence = 0;
- this.fencetype = 0;
- this.lspace = var2;
- this.rspace = var3;
- this.large = (var1 & 1) != 0;
- this.stretchy = (var1 & 2) != 0;
- this.movescripts = (var1 & 4) != 0;
- this.symmetric = (var1 & 8) != 0;
- this.accent = (var1 & 16) != 0;
- this.binaryop = var4;
- this.l_fence = (var1 & 32) != 0;
- this.r_fence = (var1 & 64) != 0;
- }
-
- public boolean isRFence() {
- return this.r_fence;
- }
-
- public boolean isLFence() {
- return this.l_fence;
- }
-
- public OperatorProperty copy() {
- OperatorProperty var1 = new OperatorProperty();
- var1.lspace = this.lspace;
- var1.rspace = this.rspace;
- var1.large = this.large;
- var1.stretchy = this.stretchy;
- var1.movescripts = this.movescripts;
- var1.symmetric = this.symmetric;
- var1.accent = this.accent;
- var1.binaryop = this.binaryop;
- var1.l_fence = this.l_fence;
- var1.r_fence = this.r_fence;
- var1.precedence = this.precedence;
- return var1;
- }
-
- public String toString() {
- if (this.l_fence && this.r_fence) {
- return "A_FENCE";
- } else if (this.l_fence) {
- return "L_FENCE";
- } else {
- return this.r_fence ? "R_FENCE" : "OP";
- }
- }
-
- public static String formToString(int var0) {
- if (var0 == 0) {
- return "UNKNOWN";
- } else if (var0 == 1) {
- return "INFIX";
- } else if (var0 == 2) {
- return "PREFIX";
- } else {
- return var0 == 3 ? "POSTFIX" : "???";
- }
- }
- }
-