Пример #1
0
 internal static SCode Make(PrimitiveIsSymbolL1 predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsSymbolL1SQ (predicate, consequent, alternative);
 }
Пример #2
0
 internal static SCode Make(PrimitiveIsSymbolL1 predicate, SCode consequent, LexicalVariable alternative)
 {
     return new PCondIsSymbolL1SL (predicate, consequent, alternative);
 }
Пример #3
0
 protected PCondIsSymbolL1SQ(PrimitiveIsSymbolL1 predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Пример #4
0
 internal static SCode Make(PrimitiveIsSymbolL1 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 PCondIsSymbolL1QQ (predicate, consequent, alternative);
 }
Пример #5
0
 protected PCondIsSymbolL1SL(PrimitiveIsSymbolL1 predicate, SCode consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #6
0
 internal static SCode Make(PrimitiveIsSymbolL1 predicate, Quotation quotation, LexicalVariable alternative)
 {
     throw new NotImplementedException ();
 }
Пример #7
0
 protected PCondIsSymbolL1QQ(PrimitiveIsSymbolL1 predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #8
0
 internal static SCode Make(PrimitiveIsSymbolL1 predicate, Quotation consequent, SCode alternative)
 {
     return
     (alternative is LexicalVariable) ? PCondIsSymbolL1QL.Make (predicate, consequent, (LexicalVariable) alternative)
     : (alternative is Quotation) ? PCondIsSymbolL1QQ.Make (predicate, consequent, (Quotation) alternative)
     : new PCondIsSymbolL1Q (predicate, consequent, alternative);
 }
Пример #9
0
 protected PCondIsSymbolL1QL(PrimitiveIsSymbolL1 predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #10
0
 protected PCondIsSymbolL1Q(PrimitiveIsSymbolL1 predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Пример #11
0
 protected PCondIsSymbolL1LQ(PrimitiveIsSymbolL1 predicate, LexicalVariable consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Пример #12
0
 protected PCondIsSymbolL1L(PrimitiveIsSymbolL1 predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }
Пример #13
0
 public static SCode Make(PrimitiveIsSymbolL1 predicate, SCode consequent, SCode alternative)
 {
     return
        (consequent is LexicalVariable) ? PCondIsSymbolL1L.Make (predicate, (LexicalVariable) consequent, alternative)
        : (consequent is Quotation) ? PCondIsSymbolL1Q.Make (predicate, (Quotation) consequent, alternative)
        : (alternative is LexicalVariable) ? PCondIsSymbolL1SL.Make (predicate, consequent, (LexicalVariable) alternative)
        : (alternative is Quotation) ? PCondIsSymbolL1SQ.Make (predicate, consequent, (Quotation) alternative)
        : new PCondIsSymbolL1 (predicate, consequent, alternative);
 }
Пример #14
0
 protected PCondIsSymbolL1(PrimitiveIsSymbolL1 predicate, SCode consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }