Changeset 14777 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankExpressions.cs
- Timestamp:
- 03/23/17 01:11:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/YankExpressions.cs
r14744 r14777 24 24 } 25 25 26 [PushExpression(StackType .Integer, "INTEGER.YANK")]26 [PushExpression(StackTypes.Integer, "INTEGER.YANK")] 27 27 public class IntegerYankExpression : YankExpression<long> { 28 28 public override bool Eval(IPushInterpreter interpreter) { … … 31 31 } 32 32 33 [PushExpression(StackType .Float, "FLOAT.YANK")]33 [PushExpression(StackTypes.Float, "FLOAT.YANK", StackTypes.Integer)] 34 34 public class FloatYankExpression : YankExpression<double> { 35 35 public override bool Eval(IPushInterpreter interpreter) { … … 38 38 } 39 39 40 [PushExpression(StackType .Boolean, "BOOLEAN.YANK")]40 [PushExpression(StackTypes.Boolean, "BOOLEAN.YANK", StackTypes.Integer)] 41 41 public class BooleanYankExpression : YankExpression<bool> { 42 42 public override bool Eval(IPushInterpreter interpreter) { … … 45 45 } 46 46 47 [PushExpression(StackType .Name, "NAME.YANK")]47 [PushExpression(StackTypes.Name, "NAME.YANK", StackTypes.Integer)] 48 48 public class NameYankExpression : YankExpression<string> { 49 49 public override bool Eval(IPushInterpreter interpreter) { … … 52 52 } 53 53 54 [PushExpression(StackType .Exec, "EXEC.YANK")]54 [PushExpression(StackTypes.Exec, "EXEC.YANK", StackTypes.Integer)] 55 55 public class ExecYankExpression : YankExpression<Expression> { 56 56 public override bool Eval(IPushInterpreter interpreter) { … … 59 59 } 60 60 61 [PushExpression(StackType .Code, "CODE.YANK")]61 [PushExpression(StackTypes.Code, "CODE.YANK", StackTypes.Integer)] 62 62 public class CodeYankExpression : YankExpression<Expression> { 63 63 public override bool Eval(IPushInterpreter interpreter) { … … 65 65 } 66 66 } 67 68 [PushExpression(StackTypes.Char, "CHAR.YANK", StackTypes.Integer)] 69 public class CharYankExpression : YankExpression<char> { 70 public override bool Eval(IPushInterpreter interpreter) { 71 return Eval(interpreter.CharStack, interpreter.IntegerStack); 72 } 73 } 74 75 [PushExpression(StackTypes.String, "STRING.YANK", StackTypes.Integer)] 76 public class StringYankExpression : YankExpression<string> { 77 public override bool Eval(IPushInterpreter interpreter) { 78 return Eval(interpreter.StringStack, interpreter.IntegerStack); 79 } 80 } 67 81 }
Note: See TracChangeset
for help on using the changeset viewer.