public LessEqual()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, RealType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, RealType), BooleanType);
 }
        public SubExpressionNode()
        {
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Integer);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Float), Float);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Float), Float);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Integer), Float);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Float), Float);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Char), Float);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Integer);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, String), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, Integer), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, String), String);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, Float), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, String), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, Boolean), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, String), String);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, Char), String);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, String), String);
        }
 public GreaterThan()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, RealType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, RealType), BooleanType);
 }
 public LeftShiftExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Integer);
 }
Exemple #5
0
 public Mult()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), IntegerType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, RealType), RealType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, IntegerType), RealType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, RealType), RealType);
 }
 public AssignationRghtShftExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Integer);
 }
Exemple #7
0
 public AssignationAndStatementNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Char);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, Boolean), Boolean);
 }
Exemple #8
0
 public AssignationLftShftStatementNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Char);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Char);
 }
Exemple #9
0
 public AssignationOrExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, Boolean), Boolean);
 }
 public AssignationDivExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);;
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Char);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Char), Float);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Integer), Float);
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Float), Float);
 }
Exemple #11
0
 public Equal()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(StringType, StringType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, RealType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, IntegerType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, RealType), BooleanType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(CharType, CharType), BooleanType);
 }
Exemple #12
0
        public AssignationMultStatemntNode()
        {
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Integer);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Integer);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Float), Float);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Integer), Float);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Char), Float);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Char);
        }
        public AssignationEqualStatementNode(){
            OperatorRules.Add(new Tuple<CustomType, CustomType>(Integer, Integer), Integer);
            OperatorRules.Add(new Tuple<CustomType, CustomType>(Integer, Char), Integer);


            OperatorRules.Add(new Tuple<CustomType, CustomType>(Float, Float), Float);
            OperatorRules.Add(new Tuple<CustomType, CustomType>(Float, Integer), Float);
            OperatorRules.Add(new Tuple<CustomType, CustomType>(Float, Char), Float);

            OperatorRules.Add(new Tuple<CustomType, CustomType>(Char, Char), Char);
            OperatorRules.Add(new Tuple<CustomType, CustomType>(Boolean, Boolean), Boolean);
            OperatorRules.Add(new Tuple<CustomType, CustomType>(String, String), String);
        }
Exemple #14
0
 public Sum()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), IntegerType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(StringType, StringType), StringType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(StringType, IntegerType), StringType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, StringType), StringType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, RealType), RealType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(RealType, IntegerType), RealType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, RealType), RealType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(CharType, CharType), StringType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(CharType, IntegerType), StringType);
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, CharType), StringType);
 }
        public LessThanExpressionNode()
        {
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Boolean);;
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Enum, Enum), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Integer), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Char), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Boolean);
        }
Exemple #16
0
        public NotEqualExpressionNode()
        {
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Integer), Boolean);;
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Integer), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Char), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Enum, Enum), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Integer, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Integer), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Float), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Float, Char), Boolean);

            OperatorRules.Add(new Tuple <CustomType, CustomType>(Char, Char), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, Boolean), Boolean);
            OperatorRules.Add(new Tuple <CustomType, CustomType>(String, String), Boolean);
        }
Exemple #17
0
 public Or()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(BooleanType, BooleanType), BooleanType);
 }
Exemple #18
0
 public Div()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), IntegerType);
 }
 public LogicalOrExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, Boolean), Boolean);
 }