Ejemplo n.º 1
0
 public static SCode Make(PrimitiveIsRecordL predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsRecordLSQ (predicate, consequent, alternative);
 }
Ejemplo n.º 2
0
 public static SCode Make(PrimitiveIsRecordL predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsRecordLSL (predicate, consequent, alternative);
 }
Ejemplo n.º 3
0
 protected PCondIsRecordLSQ(PrimitiveIsRecordL predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Ejemplo n.º 4
0
 public static SCode Make(PrimitiveIsRecordL 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 PCondIsRecordLQQ (predicate, consequent, alternative);
 }
Ejemplo n.º 5
0
 protected PCondIsRecordLSL(PrimitiveIsRecordL predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 6
0
 protected PCondIsRecordLQQ(PrimitiveIsRecordL predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 7
0
 public static SCode Make(PrimitiveIsRecordL predicate, Quotation consequent, SCode alternative)
 {
     return
       (alternative is LexicalVariable) ? PCondIsRecordLQL.Make (predicate, consequent, (LexicalVariable) alternative)
       : (alternative is Quotation) ? PCondIsRecordLQQ.Make (predicate, consequent, (Quotation) alternative)
       : new PCondIsRecordLQ (predicate, consequent, alternative);
 }
Ejemplo n.º 8
0
 protected PCondIsRecordLLQ(PrimitiveIsRecordL predicate, LexicalVariable consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 9
0
 public static SCode Make(PrimitiveIsRecordL predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsRecordA) ? PCondIsRecordA.Make ((PrimitiveIsRecordA) predicate, consequent, alternative)
         : (predicate is PrimitiveIsRecordL1) ? PCondIsRecordL1.Make ((PrimitiveIsRecordL1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsRecordLL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsRecordLQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsRecordLSL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsRecordLSQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsRecordL (predicate, consequent, alternative);
 }
Ejemplo n.º 10
0
 protected PCondIsRecordL(PrimitiveIsRecordL 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;
 }