Ejemplo n.º 1
0
 protected PCondIsNegativeA1SQ(PrimitiveIsNegativeA1 predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Ejemplo n.º 2
0
 internal static SCode Make(PrimitiveIsNegativeA1 predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsNegativeA1SQ (predicate, consequent, alternative);
 }
Ejemplo n.º 3
0
 protected PCondIsNegativeA1SL(PrimitiveIsNegativeA1 predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeName = alternative.Name;
     this.alternativeDepth = alternative.Depth;
     this.alternativeOffset = alternative.Offset;
 }
Ejemplo n.º 4
0
 internal static SCode Make(PrimitiveIsNegativeA1 predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsNegativeA1SL (predicate, consequent, alternative);
 }
Ejemplo n.º 5
0
 protected PCondIsNegativeA1QQ(PrimitiveIsNegativeA1 predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 6
0
 internal static SCode Make(PrimitiveIsNegativeA1 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);
     }
     throw new NotImplementedException ();
 }
Ejemplo n.º 7
0
 protected PCondIsNegativeA1QL(PrimitiveIsNegativeA1 predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Ejemplo n.º 8
0
 internal static SCode Make(PrimitiveIsNegativeA1 predicate, Quotation quotation, LexicalVariable alternative)
 {
     throw new NotImplementedException ();
 }
Ejemplo n.º 9
0
 internal static SCode Make(PrimitiveIsNegativeA1 predicate, Quotation consequent, SCode alternative)
 {
     return
     (alternative is LexicalVariable) ? PCondIsNegativeA1QL.Make (predicate, consequent, (LexicalVariable) alternative)
     : (alternative is Quotation) ? PCondIsNegativeA1QQ.Make (predicate, consequent, (Quotation) alternative)
     : new PCondIsNegativeA1Q (predicate, consequent, alternative);
 }
Ejemplo n.º 10
0
 protected PCondIsNegativeA1Q(PrimitiveIsNegativeA1 predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Ejemplo n.º 11
0
 protected PCondIsNegativeA1LQ(PrimitiveIsNegativeA1 predicate, LexicalVariable consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Ejemplo n.º 12
0
 protected PCondIsNegativeA1L(PrimitiveIsNegativeA1 predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }
Ejemplo n.º 13
0
 protected PCondIsNegativeA1(PrimitiveIsNegativeA1 predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }