Ejemplo n.º 1
0
 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);
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 17
0
 public Or()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(BooleanType, BooleanType), BooleanType);
 }
Ejemplo n.º 18
0
 public Div()
 {
     OperatorRules.Add(new Tuple <BaseType, BaseType>(IntegerType, IntegerType), IntegerType);
 }
 public LogicalOrExpressionNode()
 {
     OperatorRules.Add(new Tuple <CustomType, CustomType>(Boolean, Boolean), Boolean);
 }