Ejemplo n.º 1
0
 protected PCondIsSymbolLSQ(PrimitiveIsSymbolL predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Ejemplo n.º 2
0
 public static SCode Make(PrimitiveIsSymbolL predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsSymbolLSQ (predicate, consequent, alternative);
 }
Ejemplo n.º 3
0
 protected PCondIsSymbolLSL(PrimitiveIsSymbolL predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 4
0
 public static SCode Make(PrimitiveIsSymbolL predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsSymbolLSL (predicate, consequent, alternative);
 }
Ejemplo n.º 5
0
 protected PCondIsSymbolLQQ(PrimitiveIsSymbolL predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 6
0
 public static SCode Make(PrimitiveIsSymbolL 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 PCondIsSymbolLQQ (predicate, consequent, alternative);
 }
Ejemplo n.º 7
0
 protected PCondIsSymbolLQL(PrimitiveIsSymbolL predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 8
0
 public static SCode Make(PrimitiveIsSymbolL predicate, Quotation consequent, SCode alternative)
 {
     return
       (alternative is LexicalVariable) ? PCondIsSymbolLQL.Make (predicate, consequent, (LexicalVariable) alternative)
       : (alternative is Quotation) ? PCondIsSymbolLQQ.Make (predicate, consequent, (Quotation) alternative)
       : new PCondIsSymbolLQ (predicate, consequent, alternative);
 }
Ejemplo n.º 9
0
 protected PCondIsSymbolLQ(PrimitiveIsSymbolL predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Ejemplo n.º 10
0
 public static SCode Make(PrimitiveIsSymbolL predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsSymbolA) ? PCondIsSymbolA.Make ((PrimitiveIsSymbolA) predicate, consequent, alternative)
         : (predicate is PrimitiveIsSymbolL1) ? PCondIsSymbolL1.Make ((PrimitiveIsSymbolL1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsSymbolLL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsSymbolLQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsSymbolLSL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsSymbolLSQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsSymbolL (predicate, consequent, alternative);
 }
Ejemplo n.º 11
0
 protected PCondIsSymbolL(PrimitiveIsSymbolL 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;
 }