Esempio n. 1
0
 protected PCondIsComplexLSQ(PrimitiveIsComplexL predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Esempio n. 2
0
 public static SCode Make(PrimitiveIsComplexL predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsComplexLSQ (predicate, consequent, alternative);
 }
Esempio n. 3
0
 protected PCondIsComplexLSL(PrimitiveIsComplexL predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 4
0
 public static SCode Make(PrimitiveIsComplexL predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsComplexLSL (predicate, consequent, alternative);
 }
Esempio n. 5
0
 protected PCondIsComplexLQQ(PrimitiveIsComplexL predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 6
0
 public static SCode Make(PrimitiveIsComplexL 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 PCondIsComplexLQQ (predicate, consequent, alternative);
 }
Esempio n. 7
0
 protected PCondIsComplexLQL(PrimitiveIsComplexL predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Esempio n. 8
0
 public static SCode Make(PrimitiveIsComplexL predicate, Quotation consequent, SCode alternative)
 {
     return
       (alternative is LexicalVariable) ? PCondIsComplexLQL.Make (predicate, consequent, (LexicalVariable) alternative)
       : (alternative is Quotation) ? PCondIsComplexLQQ.Make (predicate, consequent, (Quotation) alternative)
       : new PCondIsComplexLQ (predicate, consequent, alternative);
 }
Esempio n. 9
0
 protected PCondIsComplexLQ(PrimitiveIsComplexL predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Esempio n. 10
0
 public static SCode Make(PrimitiveIsComplexL predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsComplexA) ? PCondIsComplexA.Make ((PrimitiveIsComplexA) predicate, consequent, alternative)
         : (predicate is PrimitiveIsComplexL1) ? PCondIsComplexL1.Make ((PrimitiveIsComplexL1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsComplexLL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsComplexLQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsComplexLSL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsComplexLSQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsComplexL (predicate, consequent, alternative);
 }
Esempio n. 11
0
 protected PCondIsComplexL(PrimitiveIsComplexL 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;
 }