Пример #1
0
 public static SCode Make(PrimitiveIsCharA predicate, SCode consequent, SCode alternative)
 {
     return
         (predicate is PrimitiveIsCharA0) ? PCondIsCharA0.Make ((PrimitiveIsCharA0) predicate, consequent, alternative)
         : (predicate is PrimitiveIsCharA1) ? PCondIsCharA1.Make ((PrimitiveIsCharA1) predicate, consequent, alternative)
         : (consequent is LexicalVariable) ? PCondIsCharAL.Make (predicate, (LexicalVariable) consequent, alternative)
         : (consequent is Quotation) ? PCondIsCharAQ.Make (predicate, (Quotation) consequent, alternative)
         : (alternative is LexicalVariable) ? PCondIsCharASL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsCharASQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsCharA (predicate, consequent, alternative);
 }
Пример #2
0
 public static SCode Make(PrimitiveIsCharA predicate, Argument consequent, SCode alternative)
 {
     throw new NotImplementedException ();
 }
Пример #3
0
 internal static PCondIsCharA Make(PrimitiveIsCharA predicate, SCode consequent, Quotation alternative)
 {
     return new PCondIsCharASQ (predicate, consequent, alternative);
 }
Пример #4
0
 protected PCondIsCharAA(PrimitiveIsCharA predicate, Argument consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #5
0
 internal static PCondIsCharA Make(PrimitiveIsCharA predicate, SCode consequent, LexicalVariable lexicalVariable)
 {
     throw new NotImplementedException ();
 }
Пример #6
0
 protected PCondIsCharASQ(PrimitiveIsCharA predicate, SCode consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
     this.alternativeValue = alternative.Quoted;
 }
Пример #7
0
 protected PCondIsCharAQQ(PrimitiveIsCharA predicate, Quotation consequent, Quotation alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #8
0
 internal static SCode Make(PrimitiveIsCharA 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 PCondIsCharAQQ (predicate, consequent, alternative);
 }
Пример #9
0
 protected PCondIsCharAQL(PrimitiveIsCharA predicate, Quotation consequent, LexicalVariable alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #10
0
 internal static SCode Make(PrimitiveIsCharA predicate, Quotation consequent, LexicalVariable alternative)
 {
     return new PCondIsCharAQL (predicate, consequent, alternative);
 }
Пример #11
0
 internal static SCode Make(PrimitiveIsCharA predicate, Quotation consequent, SCode alternative)
 {
     return
         (alternative is LexicalVariable) ? PCondIsCharAQL.Make (predicate, consequent, (LexicalVariable) alternative)
         : (alternative is Quotation) ? PCondIsCharAQQ.Make (predicate, consequent, (Quotation) alternative)
         : new PCondIsCharAQ (predicate, consequent, alternative);
 }
Пример #12
0
 protected PCondIsCharAQ(PrimitiveIsCharA predicate, Quotation consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentValue = consequent.Quoted;
 }
Пример #13
0
 public static SCode Make(PrimitiveIsCharA predicate, LexicalVariable consequent, Quotation alternative)
 {
     throw new NotImplementedException ();
 }
Пример #14
0
 protected PCondIsCharAL1(PrimitiveIsCharA predicate, LexicalVariable1 consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
 }
Пример #15
0
 protected PCondIsCharAL(PrimitiveIsCharA predicate, LexicalVariable consequent, SCode alternative)
     : base(predicate, consequent, alternative)
 {
     this.consequentName = consequent.Name;
     this.consequentDepth = consequent.Depth;
     this.consequentOffset = consequent.Offset;
 }