Ejemplo n.º 1
0
 public static SCode Make(PrimitiveIsVectorL predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsVectorLSQ (predicate, consequent, alternative);
 }
Ejemplo n.º 2
0
 public static SCode Make(PrimitiveIsVectorL predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsVectorLSL (predicate, consequent, alternative);
 }
Ejemplo n.º 3
0
 protected PCondIsVectorLSQ(PrimitiveIsVectorL predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Ejemplo n.º 4
0
 public static SCode Make(PrimitiveIsVectorL predicate, Quotation consequent, Quotation alternative)
 {
     if (consequent.Quoted == alternative.Quoted) {
         Debug.WriteLine ("; Optimize (if <expr> <literal> <literal>) => (begin <expr> <literal>)");
         return Sequence2.Make (predicate, consequent);
     }
     else if (Configuration.EnableTrueUnspecific && consequent.Quoted == Constant.Unspecific) {
         Debug.WriteLine ("; Optimize (if <expr> <unspecific> <literal>) => (begin <expr> <literal>)");
         return Sequence2.Make (predicate, alternative);
     }
     else if (Configuration.EnableTrueUnspecific && alternative.Quoted == Constant.Unspecific) {
         Debug.WriteLine ("; Optimize (if <expr> <literal> <unspecific>) => (begin <expr> <literal>)");
         return Sequence2.Make (predicate, consequent);
     }
     return new PCondIsVectorLQQ (predicate, consequent, alternative);
 }
Ejemplo n.º 5
0
 protected PCondIsVectorLSL(PrimitiveIsVectorL predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 6
0
 protected PCondIsVectorLQQ(PrimitiveIsVectorL predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 7
0
 protected PCondIsVectorLQL(PrimitiveIsVectorL predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 8
0
 public static SCode Make(PrimitiveIsVectorL predicate, Quotation consequent, SCode alternative)
 {
     return
       (alternative is LexicalVariable) ? PCondIsVectorLQL.Make (predicate, consequent, (LexicalVariable) alternative)
       : (alternative is Quotation) ? PCondIsVectorLQQ.Make (predicate, consequent, (Quotation) alternative)
       : new PCondIsVectorLQ (predicate, consequent, alternative);
 }
Ejemplo n.º 9
0
 public static SCode Make(PrimitiveIsVectorL predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsVectorA) ? PCondIsVectorA.Make ((PrimitiveIsVectorA) predicate, consequent, alternative)
         : (predicate is PrimitiveIsVectorL1) ? PCondIsVectorL1.Make ((PrimitiveIsVectorL1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsVectorLL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsVectorLQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsVectorLSL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsVectorLSQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsVectorL (predicate, consequent, alternative);
 }
Ejemplo n.º 10
0
 protected PCondIsVectorL(PrimitiveIsVectorL predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.predicateName = ((LexicalVariable) predicate.Operand).Name;
     this.predicateDepth = ((LexicalVariable) predicate.Operand).Depth;
     this.predicateOffset = ((LexicalVariable) predicate.Operand).Offset;
 }