예제 #1
0
 protected override ConditionImp VisitConditionElement(False info)
 {
     return(new FalseImp());
 }
예제 #2
0
 public void Visit(False n)
 {
     Helpers.WriteLine($"{_tab}{n.Text} [{n.Location.StartLine}, {n.Location.StartColumn}]");
 }
 //-----------------------------------------------------------
 public string Visit(False node)
 {
     return("\t\tldc.i4.0\n");
 }
예제 #4
0
 private static Function[] ProduceFunctions()
 {
     Function[] retval = new Function[368];
     retval[0]                        = new Count();                            // COUNT
     retval[FunctionID.IF]            = new If();                               // IF
     retval[2]                        = LogicalFunction.ISNA;                   // IsNA
     retval[3]                        = LogicalFunction.ISERROR;                // IsERROR
     retval[FunctionID.SUM]           = AggregateFunction.SUM;                  // SUM
     retval[5]                        = AggregateFunction.AVERAGE;              // AVERAGE
     retval[6]                        = AggregateFunction.MIN;                  // MIN
     retval[7]                        = AggregateFunction.MAX;                  // MAX
     retval[8]                        = new Row();                              // ROW
     retval[9]                        = new Column();                           // COLUMN
     retval[10]                       = new Na();                               // NA
     retval[11]                       = new Npv();                              // NPV
     retval[12]                       = AggregateFunction.STDEV;                // STDEV
     retval[13]                       = NumericFunction.DOLLAR;                 // DOLLAR
     retval[14]                       = new Fixed();                            // FIXED
     retval[15]                       = NumericFunction.SIN;                    // SIN
     retval[16]                       = NumericFunction.COS;                    // COS
     retval[17]                       = NumericFunction.TAN;                    // TAN
     retval[18]                       = NumericFunction.ATAN;                   // ATAN
     retval[19]                       = new Pi();                               // PI
     retval[20]                       = NumericFunction.SQRT;                   // SQRT
     retval[21]                       = NumericFunction.EXP;                    // EXP
     retval[22]                       = NumericFunction.LN;                     // LN
     retval[23]                       = NumericFunction.LOG10;                  // LOG10
     retval[24]                       = NumericFunction.ABS;                    // ABS
     retval[25]                       = NumericFunction.INT;                    // INT
     retval[26]                       = NumericFunction.SIGN;                   // SIGN
     retval[27]                       = NumericFunction.ROUND;                  // ROUND
     retval[28]                       = new Lookup();                           // LOOKUP
     retval[29]                       = new Index();                            // INDEX
     retval[30]                       = new Rept();                             // REPT
     retval[31]                       = TextFunction.MID;                       // MID
     retval[32]                       = TextFunction.LEN;                       // LEN
     retval[33]                       = new Value();                            // VALUE
     retval[34]                       = new True();                             // TRUE
     retval[35]                       = new False();                            // FALSE
     retval[36]                       = new And();                              // AND
     retval[37]                       = new Or();                               // OR
     retval[38]                       = new Not();                              // NOT
     retval[39]                       = NumericFunction.MOD;                    // MOD
     retval[40]                       = new NotImplementedFunction("DCOUNT");   // DCOUNT
     retval[41]                       = new NotImplementedFunction("DSUM");     // DSUM
     retval[42]                       = new NotImplementedFunction("DAVERAGE"); // DAVERAGE
     retval[43]                       = new DStarRunner(new DMin());            // DMIN
     retval[44]                       = new NotImplementedFunction("DMAX");     // DMAX
     retval[45]                       = new NotImplementedFunction("DSTDEV");   // DSTDEV
     retval[46]                       = AggregateFunction.VAR;                  // VAR
     retval[47]                       = new NotImplementedFunction("DVAR");     // DVAR
     retval[48]                       = TextFunction.TEXT;                      // TEXT
     retval[49]                       = new NotImplementedFunction("LINEST");   // LINEST
     retval[50]                       = new NotImplementedFunction("TREND");    // TREND
     retval[51]                       = new NotImplementedFunction("LOGEST");   // LOGEST
     retval[52]                       = new NotImplementedFunction("GROWTH");   // GROWTH
     retval[53]                       = new NotImplementedFunction("GOTO");     // GOTO
     retval[54]                       = new NotImplementedFunction("HALT");     // HALT
     retval[56]                       = FinanceFunction.PV;                     // PV
     retval[57]                       = FinanceFunction.FV;                     // FV
     retval[58]                       = FinanceFunction.NPER;                   // NPER
     retval[59]                       = FinanceFunction.PMT;                    // PMT
     retval[60]                       = new Rate();                             // RATE
     retval[61]                       = new Mirr();                             // MIRR
     retval[62]                       = new Irr();                              // IRR
     retval[63]                       = new Rand();                             // RAND
     retval[64]                       = new Match();                            // MATCH
     retval[65]                       = DateFunc.instance;                      // DATE
     retval[66]                       = new TimeFunc();                         // TIME
     retval[67]                       = CalendarFieldFunction.DAY;              // DAY
     retval[68]                       = CalendarFieldFunction.MONTH;            // MONTH
     retval[69]                       = CalendarFieldFunction.YEAR;             // YEAR
     retval[70]                       = WeekdayFunc.instance;                   // WEEKDAY
     retval[71]                       = CalendarFieldFunction.HOUR;
     retval[72]                       = CalendarFieldFunction.MINUTE;
     retval[73]                       = CalendarFieldFunction.SECOND;
     retval[74]                       = new Now();
     retval[75]                       = new NotImplementedFunction("AREAS");         // AREAS
     retval[76]                       = new Rows();                                  // ROWS
     retval[77]                       = new Columns();                               // COLUMNS
     retval[FunctionID.OFFSET]        = new Offset();                                // Offset.Evaluate has a different signature
     retval[79]                       = new NotImplementedFunction("ABSREF");        // ABSREF
     retval[80]                       = new NotImplementedFunction("RELREF");        // RELREF
     retval[81]                       = new NotImplementedFunction("ARGUMENT");      // ARGUMENT
     retval[82]                       = TextFunction.SEARCH;
     retval[83]                       = new NotImplementedFunction("TRANSPOSE");     // TRANSPOSE
     retval[84]                       = new NotImplementedFunction("ERROR");         // ERROR
     retval[85]                       = new NotImplementedFunction("STEP");          // STEP
     retval[86]                       = new NotImplementedFunction("TYPE");          // TYPE
     retval[87]                       = new NotImplementedFunction("ECHO");          // ECHO
     retval[88]                       = new NotImplementedFunction("SetNAME");       // SetNAME
     retval[89]                       = new NotImplementedFunction("CALLER");        // CALLER
     retval[90]                       = new NotImplementedFunction("DEREF");         // DEREF
     retval[91]                       = new NotImplementedFunction("WINDOWS");       // WINDOWS
     retval[92]                       = new NotImplementedFunction("SERIES");        // SERIES
     retval[93]                       = new NotImplementedFunction("DOCUMENTS");     // DOCUMENTS
     retval[94]                       = new NotImplementedFunction("ACTIVECELL");    // ACTIVECELL
     retval[95]                       = new NotImplementedFunction("SELECTION");     // SELECTION
     retval[96]                       = new NotImplementedFunction("RESULT");        // RESULT
     retval[97]                       = NumericFunction.ATAN2;                       // ATAN2
     retval[98]                       = NumericFunction.ASIN;                        // ASIN
     retval[99]                       = NumericFunction.ACOS;                        // ACOS
     retval[FunctionID.CHOOSE]        = new Choose();
     retval[101]                      = new Hlookup();                               // HLOOKUP
     retval[102]                      = new Vlookup();                               // VLOOKUP
     retval[103]                      = new NotImplementedFunction("LINKS");         // LINKS
     retval[104]                      = new NotImplementedFunction("INPUT");         // INPUT
     retval[105]                      = LogicalFunction.ISREF;                       // IsREF
     retval[106]                      = new NotImplementedFunction("GetFORMULA");    // GetFORMULA
     retval[107]                      = new NotImplementedFunction("GetNAME");       // GetNAME
     retval[108]                      = new NotImplementedFunction("SetVALUE");      // SetVALUE
     retval[109]                      = NumericFunction.LOG;                         // LOG
     retval[110]                      = new NotImplementedFunction("EXEC");          // EXEC
     retval[111]                      = TextFunction.CHAR;                           // CHAR
     retval[112]                      = TextFunction.LOWER;                          // LOWER
     retval[113]                      = TextFunction.UPPER;                          // UPPER
     retval[114]                      = TextFunction.PROPER;                         // PROPER
     retval[115]                      = TextFunction.LEFT;                           // LEFT
     retval[116]                      = TextFunction.RIGHT;                          // RIGHT
     retval[117]                      = TextFunction.EXACT;                          // EXACT
     retval[118]                      = TextFunction.TRIM;                           // TRIM
     retval[119]                      = new Replace();                               // Replace
     retval[120]                      = new Substitute();                            // SUBSTITUTE
     retval[121]                      = new Code();                                  // CODE
     retval[122]                      = new NotImplementedFunction("NAMES");         // NAMES
     retval[123]                      = new NotImplementedFunction("DIRECTORY");     // DIRECTORY
     retval[124]                      = TextFunction.FIND;                           // Find
     retval[125]                      = new NotImplementedFunction("CELL");          // CELL
     retval[126]                      = LogicalFunction.ISERR;                       // IsERR
     retval[127]                      = LogicalFunction.ISTEXT;                      // IsTEXT
     retval[128]                      = LogicalFunction.ISNUMBER;                    // IsNUMBER
     retval[129]                      = LogicalFunction.ISBLANK;                     // IsBLANK
     retval[130]                      = new T();                                     // T
     retval[131]                      = new NotImplementedFunction("N");             // N
     retval[132]                      = new NotImplementedFunction("FOPEN");         // FOPEN
     retval[133]                      = new NotImplementedFunction("FCLOSE");        // FCLOSE
     retval[134]                      = new NotImplementedFunction("FSIZE");         // FSIZE
     retval[135]                      = new NotImplementedFunction("FReadLN");       // FReadLN
     retval[136]                      = new NotImplementedFunction("FRead");         // FRead
     retval[137]                      = new NotImplementedFunction("FWriteLN");      // FWriteLN
     retval[138]                      = new NotImplementedFunction("FWrite");        // FWrite
     retval[139]                      = new NotImplementedFunction("FPOS");          // FPOS
     retval[140]                      = new NotImplementedFunction("DATEVALUE");     // DATEVALUE
     retval[141]                      = new NotImplementedFunction("TIMEVALUE");     // TIMEVALUE
     retval[142]                      = new NotImplementedFunction("SLN");           // SLN
     retval[143]                      = new NotImplementedFunction("SYD");           // SYD
     retval[144]                      = new NotImplementedFunction("DDB");           // DDB
     retval[145]                      = new NotImplementedFunction("GetDEF");        // GetDEF
     retval[146]                      = new NotImplementedFunction("REFTEXT");       // REFTEXT
     retval[147]                      = new NotImplementedFunction("TEXTREF");       // TEXTREF
     retval[FunctionID.INDIRECT]      = null;                                        // Indirect.Evaluate has different signature
     retval[149]                      = new NotImplementedFunction("REGISTER");      // REGISTER
     retval[150]                      = new NotImplementedFunction("CALL");          // CALL
     retval[151]                      = new NotImplementedFunction("AddBAR");        // AddBAR
     retval[152]                      = new NotImplementedFunction("AddMENU");       // AddMENU
     retval[153]                      = new NotImplementedFunction("AddCOMMAND");    // AddCOMMAND
     retval[154]                      = new NotImplementedFunction("ENABLECOMMAND"); // ENABLECOMMAND
     retval[155]                      = new NotImplementedFunction("CHECKCOMMAND");  // CHECKCOMMAND
     retval[156]                      = new NotImplementedFunction("RenameCOMMAND"); // RenameCOMMAND
     retval[157]                      = new NotImplementedFunction("SHOWBAR");       // SHOWBAR
     retval[158]                      = new NotImplementedFunction("DELETEMENU");    // DELETEMENU
     retval[159]                      = new NotImplementedFunction("DELETECOMMAND"); // DELETECOMMAND
     retval[160]                      = new NotImplementedFunction("GetCHARTITEM");  // GetCHARTITEM
     retval[161]                      = new NotImplementedFunction("DIALOGBOX");     // DIALOGBOX
     retval[162]                      = TextFunction.CLEAN;                          // CLEAN
     retval[163]                      = new NotImplementedFunction("MDETERM");       // MDETERM
     retval[164]                      = new NotImplementedFunction("MINVERSE");      // MINVERSE
     retval[165]                      = new NotImplementedFunction("MMULT");         // MMULT
     retval[166]                      = new NotImplementedFunction("FILES");         // FILES
     retval[167]                      = new IPMT();
     retval[168]                      = new PPMT();
     retval[169]                      = new Counta();                                 // COUNTA
     retval[170]                      = new NotImplementedFunction("CANCELKEY");      // CANCELKEY
     retval[175]                      = new NotImplementedFunction("INITIATE");       // INITIATE
     retval[176]                      = new NotImplementedFunction("REQUEST");        // REQUEST
     retval[177]                      = new NotImplementedFunction("POKE");           // POKE
     retval[178]                      = new NotImplementedFunction("EXECUTE");        // EXECUTE
     retval[179]                      = new NotImplementedFunction("TERMINATE");      // TERMINATE
     retval[180]                      = new NotImplementedFunction("RESTART");        // RESTART
     retval[181]                      = new NotImplementedFunction("HELP");           // HELP
     retval[182]                      = new NotImplementedFunction("GetBAR");         // GetBAR
     retval[183]                      = AggregateFunction.PRODUCT;                    // PRODUCT
     retval[184]                      = NumericFunction.FACT;                         // FACT
     retval[185]                      = new NotImplementedFunction("GetCELL");        // GetCELL
     retval[186]                      = new NotImplementedFunction("GetWORKSPACE");   // GetWORKSPACE
     retval[187]                      = new NotImplementedFunction("GetWINDOW");      // GetWINDOW
     retval[188]                      = new NotImplementedFunction("GetDOCUMENT");    // GetDOCUMENT
     retval[189]                      = new NotImplementedFunction("DPRODUCT");       // DPRODUCT
     retval[190]                      = LogicalFunction.ISNONTEXT;                    // IsNONTEXT
     retval[191]                      = new NotImplementedFunction("GetNOTE");        // GetNOTE
     retval[192]                      = new NotImplementedFunction("NOTE");           // NOTE
     retval[193]                      = new NotImplementedFunction("STDEVP");         // STDEVP
     retval[194]                      = AggregateFunction.VARP;                       // VARP
     retval[195]                      = new NotImplementedFunction("DSTDEVP");        // DSTDEVP
     retval[196]                      = new NotImplementedFunction("DVARP");          // DVARP
     retval[197]                      = NumericFunction.TRUNC;                        // TRUNC
     retval[198]                      = LogicalFunction.ISLOGICAL;                    // IsLOGICAL
     retval[199]                      = new NotImplementedFunction("DCOUNTA");        // DCOUNTA
     retval[200]                      = new NotImplementedFunction("DELETEBAR");      // DELETEBAR
     retval[201]                      = new NotImplementedFunction("UNREGISTER");     // UNREGISTER
     retval[204]                      = new NotImplementedFunction("USDOLLAR");       // USDOLLAR
     retval[205]                      = new NotImplementedFunction("FindB");          // FindB
     retval[206]                      = new NotImplementedFunction("SEARCHB");        // SEARCHB
     retval[207]                      = new NotImplementedFunction("ReplaceB");       // ReplaceB
     retval[208]                      = new NotImplementedFunction("LEFTB");          // LEFTB
     retval[209]                      = new NotImplementedFunction("RIGHTB");         // RIGHTB
     retval[210]                      = new NotImplementedFunction("MIDB");           // MIDB
     retval[211]                      = new NotImplementedFunction("LENB");           // LENB
     retval[212]                      = NumericFunction.ROUNDUP;                      // ROUNDUP
     retval[213]                      = NumericFunction.ROUNDDOWN;                    // ROUNDDOWN
     retval[214]                      = new NotImplementedFunction("ASC");            // ASC
     retval[215]                      = new NotImplementedFunction("DBCS");           // DBCS
     retval[216]                      = new Rank();                                   // RANK
     retval[219]                      = new Address();                                // AddRESS
     retval[220]                      = new Days360();                                // DAYS360
     retval[221]                      = new Today();                                  // TODAY
     retval[222]                      = new NotImplementedFunction("VDB");            // VDB
     retval[227]                      = AggregateFunction.MEDIAN;                     // MEDIAN
     retval[228]                      = new Sumproduct();                             // SUMPRODUCT
     retval[229]                      = NumericFunction.SINH;                         // SINH
     retval[230]                      = NumericFunction.COSH;                         // COSH
     retval[231]                      = NumericFunction.TANH;                         // TANH
     retval[232]                      = NumericFunction.ASINH;                        // ASINH
     retval[233]                      = NumericFunction.ACOSH;                        // ACOSH
     retval[234]                      = NumericFunction.ATANH;                        // ATANH
     retval[235]                      = new DStarRunner(new DGet());                  // DGet
     retval[236]                      = new NotImplementedFunction("CreateOBJECT");   // CreateOBJECT
     retval[237]                      = new NotImplementedFunction("VOLATILE");       // VOLATILE
     retval[238]                      = new NotImplementedFunction("LASTERROR");      // LASTERROR
     retval[239]                      = new NotImplementedFunction("CUSTOMUNDO");     // CUSTOMUNDO
     retval[240]                      = new NotImplementedFunction("CUSTOMREPEAT");   // CUSTOMREPEAT
     retval[241]                      = new NotImplementedFunction("FORMULAConvert"); // FORMULAConvert
     retval[242]                      = new NotImplementedFunction("GetLINKINFO");    // GetLINKINFO
     retval[243]                      = new NotImplementedFunction("TEXTBOX");        // TEXTBOX
     retval[244]                      = new NotImplementedFunction("INFO");           // INFO
     retval[245]                      = new NotImplementedFunction("GROUP");          // GROUP
     retval[246]                      = new NotImplementedFunction("GetOBJECT");      // GetOBJECT
     retval[247]                      = new NotImplementedFunction("DB");             // DB
     retval[248]                      = new NotImplementedFunction("PAUSE");          // PAUSE
     retval[250]                      = new NotImplementedFunction("RESUME");         // RESUME
     retval[252]                      = new NotImplementedFunction("FREQUENCY");      // FREQUENCY
     retval[253]                      = new NotImplementedFunction("AddTOOLBAR");     // AddTOOLBAR
     retval[254]                      = new NotImplementedFunction("DELETETOOLBAR");  // DELETETOOLBAR
     retval[FunctionID.EXTERNAL_FUNC] = null;                                         // ExternalFunction is a FreeREfFunction
     retval[256]                      = new NotImplementedFunction("RESetTOOLBAR");   // RESetTOOLBAR
     retval[257]                      = new NotImplementedFunction("EVALUATE");       // EVALUATE
     retval[258]                      = new NotImplementedFunction("GetTOOLBAR");     // GetTOOLBAR
     retval[259]                      = new NotImplementedFunction("GetTOOL");        // GetTOOL
     retval[260]                      = new NotImplementedFunction("SPELLINGCHECK");  // SPELLINGCHECK
     retval[261]                      = new Errortype();                              // ERRORTYPE
     retval[262]                      = new NotImplementedFunction("APPTITLE");       // APPTITLE
     retval[263]                      = new NotImplementedFunction("WINDOWTITLE");    // WINDOWTITLE
     retval[264]                      = new NotImplementedFunction("SAVETOOLBAR");    // SAVETOOLBAR
     retval[265]                      = new NotImplementedFunction("ENABLETOOL");     // ENABLETOOL
     retval[266]                      = new NotImplementedFunction("PRESSTOOL");      // PRESSTOOL
     retval[267]                      = new NotImplementedFunction("REGISTERID");     // REGISTERID
     retval[268]                      = new NotImplementedFunction("GetWORKBOOK");    // GetWORKBOOK
     retval[269]                      = AggregateFunction.AVEDEV;                     // AVEDEV
     retval[270]                      = new NotImplementedFunction("BETADIST");       // BETADIST
     retval[271]                      = new NotImplementedFunction("GAMMALN");        // GAMMALN
     retval[272]                      = new NotImplementedFunction("BETAINV");        // BETAINV
     retval[273]                      = new NotImplementedFunction("BINOMDIST");      // BINOMDIST
     retval[274]                      = new NotImplementedFunction("CHIDIST");        // CHIDIST
     retval[275]                      = new NotImplementedFunction("CHIINV");         // CHIINV
     retval[276]                      = NumericFunction.COMBIN;                       // COMBIN
     retval[277]                      = new NotImplementedFunction("CONFIDENCE");     // CONFIDENCE
     retval[278]                      = new NotImplementedFunction("CRITBINOM");      // CRITBINOM
     retval[279]                      = new Even();                                   // EVEN
     retval[280]                      = new NotImplementedFunction("EXPONDIST");      // EXPONDIST
     retval[281]                      = new NotImplementedFunction("FDIST");          // FDIST
     retval[282]                      = new NotImplementedFunction("FINV");           // FINV
     retval[283]                      = new NotImplementedFunction("FISHER");         // FISHER
     retval[284]                      = new NotImplementedFunction("FISHERINV");      // FISHERINV
     retval[285]                      = NumericFunction.FLOOR;                        // FLOOR
     retval[286]                      = new NotImplementedFunction("GAMMADIST");      // GAMMADIST
     retval[287]                      = new NotImplementedFunction("GAMMAINV");       // GAMMAINV
     retval[288]                      = NumericFunction.CEILING;                      // CEILING
     retval[289]                      = new NotImplementedFunction("HYPGEOMDIST");    // HYPGEOMDIST
     retval[290]                      = new NotImplementedFunction("LOGNORMDIST");    // LOGNORMDIST
     retval[291]                      = new NotImplementedFunction("LOGINV");         // LOGINV
     retval[292]                      = new NotImplementedFunction("NEGBINOMDIST");   // NEGBINOMDIST
     retval[293]                      = new NotImplementedFunction("NORMDIST");       // NORMDIST
     retval[294]                      = new NotImplementedFunction("NORMSDIST");      // NORMSDIST
     retval[295]                      = new NotImplementedFunction("NORMINV");        // NORMINV
     retval[296]                      = new NotImplementedFunction("NORMSINV");       // NORMSINV
     retval[297]                      = new NotImplementedFunction("STANDARDIZE");    // STANDARDIZE
     retval[298]                      = new Odd();                                    // ODD
     retval[299]                      = new NotImplementedFunction("PERMUT");         // PERMUT
     retval[300]                      = NumericFunction.POISSON;                      // POISSON
     retval[301]                      = new NotImplementedFunction("TDIST");          // TDIST
     retval[302]                      = new NotImplementedFunction("WEIBULL");        // WEIBULL
     retval[303]                      = new Sumxmy2();                                // SUMXMY2
     retval[304]                      = new Sumx2my2();                               // SUMX2MY2
     retval[305]                      = new Sumx2py2();                               // SUMX2PY2
     retval[306]                      = new NotImplementedFunction("CHITEST");        // CHITEST
     retval[307]                      = new NotImplementedFunction("CORREL");         // CORREL
     retval[308]                      = new NotImplementedFunction("COVAR");          // COVAR
     retval[309]                      = new NotImplementedFunction("FORECAST");       // FORECAST
     retval[310]                      = new NotImplementedFunction("FTEST");          // FTEST
     retval[311]                      = new Intercept();                              // INTERCEPT
     retval[312]                      = new NotImplementedFunction("PEARSON");        // PEARSON
     retval[313]                      = new NotImplementedFunction("RSQ");            // RSQ
     retval[314]                      = new NotImplementedFunction("STEYX");          // STEYX
     retval[315]                      = new Slope();                                  // SLOPE
     retval[316]                      = new NotImplementedFunction("TTEST");          // TTEST
     retval[317]                      = new NotImplementedFunction("PROB");           // PROB
     retval[318]                      = AggregateFunction.DEVSQ;                      // DEVSQ
     retval[319]                      = new NotImplementedFunction("GEOMEAN");        // GEOMEAN
     retval[320]                      = new NotImplementedFunction("HARMEAN");        // HARMEAN
     retval[321]                      = AggregateFunction.SUMSQ;                      // SUMSQ
     retval[322]                      = new NotImplementedFunction("KURT");           // KURT
     retval[323]                      = new NotImplementedFunction("SKEW");           // SKEW
     retval[324]                      = new NotImplementedFunction("ZTEST");          // ZTEST
     retval[325]                      = AggregateFunction.LARGE;                      // LARGE
     retval[326]                      = AggregateFunction.SMALL;                      // SMALL
     retval[327]                      = new NotImplementedFunction("QUARTILE");       // QUARTILE
     retval[328]                      = AggregateFunction.PERCENTILE;                 // PERCENTILE
     retval[329]                      = new NotImplementedFunction("PERCENTRANK");    // PERCENTRANK
     retval[330]                      = new Mode();                                   // MODE
     retval[331]                      = new NotImplementedFunction("TRIMMEAN");       // TRIMMEAN
     retval[332]                      = new NotImplementedFunction("TINV");           // TINV
     retval[334]                      = new NotImplementedFunction("MOVIECOMMAND");   // MOVIECOMMAND
     retval[335]                      = new NotImplementedFunction("GetMOVIE");       // GetMOVIE
     retval[336]                      = TextFunction.CONCATENATE;                     // CONCATENATE
     retval[337]                      = NumericFunction.POWER;                        // POWER
     retval[338]                      = new NotImplementedFunction("PIVOTAddDATA");   // PIVOTAddDATA
     retval[339]                      = new NotImplementedFunction("GetPIVOTTABLE");  // GetPIVOTTABLE
     retval[340]                      = new NotImplementedFunction("GetPIVOTFIELD");  // GetPIVOTFIELD
     retval[341]                      = new NotImplementedFunction("GetPIVOTITEM");   // GetPIVOTITEM
     retval[342]                      = NumericFunction.RADIANS;
     ;                                                                                // RADIANS
     retval[343] = NumericFunction.DEGREES;                                           // DEGREES
     retval[344] = new Subtotal();                                                    // SUBTOTAL
     retval[345] = new Sumif();                                                       // SUMIF
     retval[346] = new Countif();                                                     // COUNTIF
     retval[347] = new Countblank();                                                  // COUNTBLANK
     retval[348] = new NotImplementedFunction("SCENARIOGet");                         // SCENARIOGet
     retval[349] = new NotImplementedFunction("OPTIONSLISTSGet");                     // OPTIONSLISTSGet
     retval[350] = new NotImplementedFunction("IsPMT");                               // IsPMT
     retval[351] = new NotImplementedFunction("DATEDIF");                             // DATEDIF
     retval[352] = new NotImplementedFunction("DATESTRING");                          // DATESTRING
     retval[353] = new NotImplementedFunction("NUMBERSTRING");                        // NUMBERSTRING
     retval[354] = new Roman();                                                       // ROMAN
     retval[355] = new NotImplementedFunction("OPENDIALOG");                          // OPENDIALOG
     retval[356] = new NotImplementedFunction("SAVEDIALOG");                          // SAVEDIALOG
     retval[357] = new NotImplementedFunction("VIEWGet");                             // VIEWGet
     retval[358] = new NotImplementedFunction("GetPIVOTDATA");                        // GetPIVOTDATA
     retval[359] = new Hyperlink();                                                   // HYPERLINK
     retval[360] = new NotImplementedFunction("PHONETIC");                            // PHONETIC
     retval[361] = new NotImplementedFunction("AVERAGEA");                            // AVERAGEA
     retval[362] = new Maxa();                                                        // MAXA
     retval[363] = new Mina();                                                        // MINA
     retval[364] = new NotImplementedFunction("STDEVPA");                             // STDEVPA
     retval[365] = new NotImplementedFunction("VARPA");                               // VARPA
     retval[366] = new NotImplementedFunction("STDEVA");                              // STDEVA
     retval[367] = new NotImplementedFunction("VARA");                                // VARA
     return(retval);
 }
예제 #5
0
 public BuiltInFunctions()
 {
     // Text
     Functions["len"]         = new Len();
     Functions["lower"]       = new Lower();
     Functions["upper"]       = new Upper();
     Functions["left"]        = new Left();
     Functions["right"]       = new Right();
     Functions["mid"]         = new Mid();
     Functions["replace"]     = new Replace();
     Functions["rept"]        = new Rept();
     Functions["substitute"]  = new Substitute();
     Functions["concatenate"] = new Concatenate();
     Functions["concat"]      = new Concat();
     Functions["textjoin"]    = new Textjoin();
     Functions["char"]        = new CharFunction();
     Functions["exact"]       = new Exact();
     Functions["find"]        = new Find();
     Functions["fixed"]       = new Fixed();
     Functions["proper"]      = new Proper();
     Functions["search"]      = new Search();
     Functions["text"]        = new Text.Text();
     Functions["t"]           = new T();
     Functions["hyperlink"]   = new Hyperlink();
     Functions["value"]       = new Value(CultureInfo.CurrentCulture);
     Functions["trim"]        = new Trim();
     Functions["clean"]       = new Clean();
     Functions["unicode"]     = new Unicode();
     Functions["unichar"]     = new Unichar();
     Functions["numbervalue"] = new NumberValue();
     Functions["dollar"]      = new Dollar();
     // Numbers
     Functions["int"] = new CInt();
     // Math
     Functions["aggregate"]       = new Aggregate();
     Functions["abs"]             = new Abs();
     Functions["asin"]            = new Asin();
     Functions["asinh"]           = new Asinh();
     Functions["acot"]            = new Acot();
     Functions["acoth"]           = new Acoth();
     Functions["cos"]             = new Cos();
     Functions["cot"]             = new Cot();
     Functions["coth"]            = new Coth();
     Functions["cosh"]            = new Cosh();
     Functions["csc"]             = new Csc();
     Functions["csch"]            = new Csch();
     Functions["power"]           = new Power();
     Functions["gcd"]             = new Gcd();
     Functions["lcm"]             = new Lcm();
     Functions["sec"]             = new Sec();
     Functions["sech"]            = new SecH();
     Functions["sign"]            = new Sign();
     Functions["sqrt"]            = new Sqrt();
     Functions["sqrtpi"]          = new SqrtPi();
     Functions["pi"]              = new Pi();
     Functions["product"]         = new Product();
     Functions["ceiling"]         = new Ceiling();
     Functions["ceiling.precise"] = new CeilingPrecise();
     Functions["ceiling.math"]    = new CeilingMath();
     Functions["iso.ceiling"]     = new IsoCeiling();
     Functions["combin"]          = new Combin();
     Functions["combina"]         = new Combina();
     Functions["permut"]          = new Permut();
     Functions["permutationa"]    = new Permutationa();
     Functions["count"]           = new Count();
     Functions["counta"]          = new CountA();
     Functions["countblank"]      = new CountBlank();
     Functions["countif"]         = new CountIf();
     Functions["countifs"]        = new CountIfs();
     Functions["fact"]            = new Fact();
     Functions["factdouble"]      = new FactDouble();
     Functions["floor"]           = new Floor();
     Functions["floor.precise"]   = new FloorPrecise();
     Functions["floor.math"]      = new FloorMath();
     Functions["radians"]         = new Radians();
     Functions["roman"]           = new Roman();
     Functions["sin"]             = new Sin();
     Functions["sinh"]            = new Sinh();
     Functions["sum"]             = new Sum();
     Functions["sumif"]           = new SumIf();
     Functions["sumifs"]          = new SumIfs();
     Functions["sumproduct"]      = new SumProduct();
     Functions["sumsq"]           = new Sumsq();
     Functions["sumxmy2"]         = new Sumxmy2();
     Functions["sumx2my2"]        = new SumX2mY2();
     Functions["sumx2py2"]        = new SumX2pY2();
     Functions["seriessum"]       = new Seriessum();
     Functions["stdev"]           = new Stdev();
     Functions["stdeva"]          = new Stdeva();
     Functions["stdevp"]          = new StdevP();
     Functions["stdevpa"]         = new Stdevpa();
     Functions["stdev.s"]         = new StdevDotS();
     Functions["stdev.p"]         = new StdevDotP();
     Functions["subtotal"]        = new Subtotal();
     Functions["exp"]             = new Exp();
     Functions["log"]             = new Log();
     Functions["log10"]           = new Log10();
     Functions["ln"]              = new Ln();
     Functions["max"]             = new Max();
     Functions["maxa"]            = new Maxa();
     Functions["median"]          = new Median();
     Functions["min"]             = new Min();
     Functions["mina"]            = new Mina();
     Functions["mod"]             = new Mod();
     Functions["mode"]            = new Mode();
     Functions["mode.sngl"]       = new ModeSngl();
     Functions["mround"]          = new Mround();
     Functions["multinomial"]     = new Multinomial();
     Functions["average"]         = new Average();
     Functions["averagea"]        = new AverageA();
     Functions["averageif"]       = new AverageIf();
     Functions["averageifs"]      = new AverageIfs();
     Functions["round"]           = new Round();
     Functions["rounddown"]       = new Rounddown();
     Functions["roundup"]         = new Roundup();
     Functions["rand"]            = new Rand();
     Functions["randbetween"]     = new RandBetween();
     Functions["rank"]            = new Rank();
     Functions["rank.eq"]         = new RankEq();
     Functions["rank.avg"]        = new RankAvg();
     Functions["percentile"]      = new Percentile();
     Functions["percentile.inc"]  = new PercentileInc();
     Functions["percentile.exc"]  = new PercentileExc();
     Functions["quartile"]        = new Quartile();
     Functions["quartile.inc"]    = new QuartileInc();
     Functions["quartile.exc"]    = new QuartileExc();
     Functions["percentrank"]     = new Percentrank();
     Functions["percentrank.inc"] = new PercentrankInc();
     Functions["percentrank.exc"] = new PercentrankExc();
     Functions["quotient"]        = new Quotient();
     Functions["trunc"]           = new Trunc();
     Functions["tan"]             = new Tan();
     Functions["tanh"]            = new Tanh();
     Functions["atan"]            = new Atan();
     Functions["atan2"]           = new Atan2();
     Functions["atanh"]           = new Atanh();
     Functions["acos"]            = new Acos();
     Functions["acosh"]           = new Acosh();
     Functions["covar"]           = new Covar();
     Functions["covariance.p"]    = new CovarianceP();
     Functions["covariance.s"]    = new CovarianceS();
     Functions["var"]             = new Var();
     Functions["vara"]            = new Vara();
     Functions["var.s"]           = new VarDotS();
     Functions["varp"]            = new VarP();
     Functions["varpa"]           = new Varpa();
     Functions["var.p"]           = new VarDotP();
     Functions["large"]           = new Large();
     Functions["small"]           = new Small();
     Functions["degrees"]         = new Degrees();
     Functions["odd"]             = new Odd();
     Functions["even"]            = new Even();
     // Information
     Functions["isblank"]    = new IsBlank();
     Functions["isnumber"]   = new IsNumber();
     Functions["istext"]     = new IsText();
     Functions["isnontext"]  = new IsNonText();
     Functions["iserror"]    = new IsError();
     Functions["iserr"]      = new IsErr();
     Functions["error.type"] = new ErrorType();
     Functions["iseven"]     = new IsEven();
     Functions["isodd"]      = new IsOdd();
     Functions["islogical"]  = new IsLogical();
     Functions["isna"]       = new IsNa();
     Functions["na"]         = new Na();
     Functions["n"]          = new N();
     Functions["type"]       = new TypeFunction();
     // Logical
     Functions["if"]      = new If();
     Functions["ifs"]     = new Ifs();
     Functions["maxifs"]  = new MaxIfs();
     Functions["minifs"]  = new MinIfs();
     Functions["iferror"] = new IfError();
     Functions["ifna"]    = new IfNa();
     Functions["not"]     = new Not();
     Functions["and"]     = new And();
     Functions["or"]      = new Or();
     Functions["true"]    = new True();
     Functions["false"]   = new False();
     Functions["switch"]  = new Switch();
     Functions["xor"]     = new Xor();
     // Reference and lookup
     Functions["address"]  = new Address();
     Functions["hlookup"]  = new HLookup();
     Functions["vlookup"]  = new VLookup();
     Functions["lookup"]   = new Lookup();
     Functions["match"]    = new Match();
     Functions["row"]      = new Row();
     Functions["rows"]     = new Rows();
     Functions["column"]   = new Column();
     Functions["columns"]  = new Columns();
     Functions["choose"]   = new Choose();
     Functions["index"]    = new RefAndLookup.Index();
     Functions["indirect"] = new Indirect();
     Functions["offset"]   = new Offset();
     // Date
     Functions["date"]             = new Date();
     Functions["datedif"]          = new DateDif();
     Functions["today"]            = new Today();
     Functions["now"]              = new Now();
     Functions["day"]              = new Day();
     Functions["month"]            = new Month();
     Functions["year"]             = new Year();
     Functions["time"]             = new Time();
     Functions["hour"]             = new Hour();
     Functions["minute"]           = new Minute();
     Functions["second"]           = new Second();
     Functions["weeknum"]          = new Weeknum();
     Functions["weekday"]          = new Weekday();
     Functions["days"]             = new Days();
     Functions["days360"]          = new Days360();
     Functions["yearfrac"]         = new Yearfrac();
     Functions["edate"]            = new Edate();
     Functions["eomonth"]          = new Eomonth();
     Functions["isoweeknum"]       = new IsoWeekNum();
     Functions["workday"]          = new Workday();
     Functions["workday.intl"]     = new WorkdayIntl();
     Functions["networkdays"]      = new Networkdays();
     Functions["networkdays.intl"] = new NetworkdaysIntl();
     Functions["datevalue"]        = new DateValue();
     Functions["timevalue"]        = new TimeValue();
     // Database
     Functions["dget"]     = new Dget();
     Functions["dcount"]   = new Dcount();
     Functions["dcounta"]  = new DcountA();
     Functions["dmax"]     = new Dmax();
     Functions["dmin"]     = new Dmin();
     Functions["dsum"]     = new Dsum();
     Functions["daverage"] = new Daverage();
     Functions["dvar"]     = new Dvar();
     Functions["dvarp"]    = new Dvarp();
     //Finance
     Functions["cumipmt"]    = new Cumipmt();
     Functions["cumprinc"]   = new Cumprinc();
     Functions["dollarde"]   = new DollarDe();
     Functions["dollarfr"]   = new DollarFr();
     Functions["ddb"]        = new Ddb();
     Functions["effect"]     = new Effect();
     Functions["fvschedule"] = new FvSchedule();
     Functions["pduration"]  = new Pduration();
     Functions["rri"]        = new Rri();
     Functions["pmt"]        = new Pmt();
     Functions["ppmt"]       = new Ppmt();
     Functions["ipmt"]       = new Ipmt();
     Functions["ispmt"]      = new IsPmt();
     Functions["pv"]         = new Pv();
     Functions["fv"]         = new Fv();
     Functions["npv"]        = new Npv();
     Functions["rate"]       = new Rate();
     Functions["nper"]       = new Nper();
     Functions["nominal"]    = new Nominal();
     Functions["irr"]        = new Irr();
     Functions["mirr"]       = new Mirr();
     Functions["xirr"]       = new Xirr();
     Functions["sln"]        = new Sln();
     Functions["syd"]        = new Syd();
     Functions["xnpv"]       = new Xnpv();
     Functions["coupdays"]   = new Coupdays();
     Functions["coupdaysnc"] = new Coupdaysnc();
     Functions["coupdaybs"]  = new Coupdaybs();
     Functions["coupnum"]    = new Coupnum();
     Functions["coupncd"]    = new Coupncd();
     Functions["couppcd"]    = new Couppcd();
     Functions["price"]      = new Price();
     Functions["yield"]      = new Yield();
     Functions["yieldmat"]   = new Yieldmat();
     Functions["duration"]   = new Duration();
     Functions["disc"]       = new Disc();
     //Engineering
     Functions["bitand"]       = new BitAnd();
     Functions["bitor"]        = new BitOr();
     Functions["bitxor"]       = new BitXor();
     Functions["bitlshift"]    = new BitLshift();
     Functions["bitrshift"]    = new BitRshift();
     Functions["convert"]      = new ConvertFunction();
     Functions["bin2dec"]      = new Bin2Dec();
     Functions["bin2hex"]      = new Bin2Hex();
     Functions["bin2oct"]      = new Bin2Oct();
     Functions["dec2bin"]      = new Dec2Bin();
     Functions["dec2hex"]      = new Dec2Hex();
     Functions["dec2oct"]      = new Dec2Oct();
     Functions["hex2bin"]      = new Hex2Bin();
     Functions["hex2dec"]      = new Hex2Dec();
     Functions["hex2oct"]      = new Hex2Oct();
     Functions["oct2bin"]      = new Oct2Bin();
     Functions["oct2dec"]      = new Oct2Dec();
     Functions["oct2hex"]      = new Oct2Hex();
     Functions["delta"]        = new Delta();
     Functions["erf"]          = new Erf();
     Functions["erf.precise"]  = new ErfPrecise();
     Functions["erfc"]         = new Erfc();
     Functions["erfc.precise"] = new ErfcPrecise();
     Functions["besseli"]      = new BesselI();
     Functions["besselj"]      = new BesselJ();
     Functions["besselk"]      = new BesselK();
     Functions["bessely"]      = new BesselY();
 }
예제 #6
0
 public Type Visit(False node)
 {
     return(Type.BOOL);
 }
 [Fact] public void TestImplies3() => Test(False.Implies(False), True);
예제 #8
0
 public void Visit(False n)
 {
     Globals.Builder.WriteBinaryOp("mov", "rax", 0.ToString(), $"[{n.Location.StartLine}, {n.Location.StartColumn}] Explicit false.");
 }
 protected override INotifyExpression <T> ApplyParametersCore(IDictionary <string, object> parameters, IDictionary <INotifiable, INotifiable> trace)
 {
     return(new ObservableConditionalExpression <T>(Test.ApplyParameters(parameters, trace), True.ApplyParameters(parameters, trace), False.ApplyParameters(parameters, trace)));
 }
예제 #10
0
        public void TestTerminals()
        {
            AssertSuccess(LBrace.Parse("{"), '{', true);
            AssertSuccess(RBrace.Parse("}"), '}', true);
            AssertSuccess(LParen.Parse("("), '(', true);
            AssertSuccess(RParen.Parse(")"), ')', true);
            AssertSuccess(Comma.Parse(","), ',', true);
            AssertSuccess(UScore.Parse("_"), '_', true);
            AssertSuccess(DQuote.Parse("\""), '"', true);
            AssertSuccess(SQuote.Parse("'"), '\'', true);

            AssertSuccess(Str.Parse("\"abc\""), "abc", true);
            AssertSuccess(Chr.Parse("'a'"), "a", true);

            AssertSuccess(ExprParser.Int.Parse("234"), "234", true);
            AssertSuccess(Float.Parse("234.0"), "234.0", true);
            AssertSuccess(Float.Parse(".0"), ".0", true);
            AssertSuccess(Float.Parse("1e2"), "1e2", true);
            AssertSuccess(Float.Parse("1E2"), "1E2", true);
            AssertSuccess(Float.Parse("1E-2"), "1E-2", true);
            AssertSuccess(Float.Parse("1E+2"), "1E+2", true);
            AssertSuccess(Float.Parse("1.0E2"), "1.0E2", true);
            AssertSuccess(Float.Parse("1.0E-2"), "1.0E-2", true);
            AssertSuccess(Float.Parse("1.0E+2"), "1.0E+2", true);


            AssertSuccess(IdStart.Parse("_"), '_', true);
            AssertSuccess(IdStart.Parse("a"), 'a', true);
            AssertSuccess(IdRest.Parse("_"), '_', true);
            AssertSuccess(IdRest.Parse("1"), '1', true);
            AssertSuccess(IdRest.Parse("_"), '_', true);
            AssertSuccess(IdRest.Parse("a"), 'a', true);
            AssertSuccess(Id.Parse("_"), "_", true);
            AssertSuccess(Id.Parse("A"), "A", true);
            AssertSuccess(Id.Parse("z"), "z", true);
            AssertSuccess(Id.Parse("abc"), "abc", true);
            AssertSuccess(Id.Parse("_abc"), "_abc", true);
            AssertSuccess(Id.Parse("_1"), "_1", true);
            AssertSuccess(Id.Parse("_1_a_zZ"), "_1_a_zZ", true);
            AssertSuccess(Id.Parse("e"), "e", true);
            AssertSuccess(Id.Parse("el"), "el", true);
            AssertSuccess(Id.Parse("els"), "els", true);
            AssertSuccess(Id.Parse("else1"), "else1", true);
            AssertSuccess(Id.Parse("i"), "i", true);
            AssertSuccess(Id.Parse("if1"), "if1", true);
            AssertSuccess(Id.Parse("if_"), "if_", true);
            AssertSuccess(Id.Parse("t"), "t", true);
            AssertSuccess(Id.Parse("tr"), "tr", true);

            AssertSuccess(True.Parse("true"), "true", true);
            AssertSuccess(False.Parse("false"), "false", true);
            AssertSuccess(If.Parse("if"), "if", true);
            AssertSuccess(Else.Parse("else"), "else", true);
            AssertSuccess(Then.Parse("then"), "then", true);
            AssertSuccess(ExprParser.In.Parse("in"), "in", true);

            AssertSuccess(Bool.Parse("true"), "true", true);
            AssertSuccess(Bool.Parse("false"), "false", true);
            AssertSuccess(Bool.Parse("\"true\""), "true", true);
            AssertSuccess(Bool.Parse("\"false\""), "false", true);

            AssertSuccess(KeyWords.Parse("else"), "else", true);
            AssertSuccess(KeyWords.Parse("then"), "then", true);
            AssertSuccess(KeyWords.Parse("if"), "if", true);
            AssertSuccess(KeyWords.Parse("in "), "in", true);
        }
예제 #11
0
파일: func.cs 프로젝트: maysam/ParsLogPlot
 <DesignTimeVisible(False)> _
예제 #12
0
 protected virtual TC VisitConditionElement(False info)
 {
     throw new NotSupportedException();
 }
예제 #13
0
파일: Parser.cs 프로젝트: BetoVas97/chimera
        public Node SimpleExpression()
        {
            switch (CurrentToken)
            {
            case TokenCategory.PARENTHESIS_OPEN:
                Expect(TokenCategory.PARENTHESIS_OPEN);
                var expr = Expression();
                Expect(TokenCategory.PARENTHESIS_CLOSE);
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var result = new ListItem();
                    result.Add(expr);
                    auxiliarMethod(result);
                    return(result);
                }
                else
                {
                    return(expr);
                }

            case TokenCategory.IDENTIFIER:
                var identifier = Expect(TokenCategory.IDENTIFIER);
                if (CurrentToken == TokenCategory.PARENTHESIS_OPEN)
                {
                    var result = Call();
                    result.AnchorToken = identifier;
                    if (CurrentToken == TokenCategory.BRACKET_OPEN)
                    {
                        var call = new ListItem();
                        call.Add(result);
                        auxiliarMethod(call);
                        return(call);
                    }
                    else
                    {
                        return(result);
                    }
                }
                else
                {
                    if (CurrentToken == TokenCategory.BRACKET_OPEN)
                    {
                        var listI = new ListItem();
                        listI.Add(new Identifier()
                        {
                            AnchorToken = identifier
                        });
                        auxiliarMethod(listI);
                        return(listI);
                    }
                    else
                    {
                        var id = new Identifier()
                        {
                            AnchorToken = identifier
                        };
                        return(id);
                    }
                }

            case TokenCategory.INT_LITERAL:
                var iLiteral = new Int_Literal()
                {
                    AnchorToken = Expect(TokenCategory.INT_LITERAL)
                };
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var listI = new ListItem();
                    listI.Add(iLiteral);
                    auxiliarMethod(listI);
                    return(listI);
                }
                else
                {
                    return(iLiteral);
                }

            case TokenCategory.STR_LITERAL:
                var sLiteral = new Str_Literal()
                {
                    AnchorToken = Expect(TokenCategory.STR_LITERAL)
                };
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var listI = new ListItem();
                    listI.Add(sLiteral);
                    auxiliarMethod(listI);
                    return(listI);
                }
                else
                {
                    return(sLiteral);
                }

            case TokenCategory.TRUE:
                var tLiteral = new True()
                {
                    AnchorToken = Expect(TokenCategory.TRUE)
                };
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var listI = new ListItem();
                    listI.Add(tLiteral);
                    auxiliarMethod(listI);
                    return(listI);
                }
                else
                {
                    return(tLiteral);
                }

            case TokenCategory.FALSE:
                var fLiteral = new False()
                {
                    AnchorToken = Expect(TokenCategory.FALSE)
                };
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var listI = new ListItem();
                    listI.Add(fLiteral);
                    auxiliarMethod(listI);
                    return(listI);
                }
                else
                {
                    return(fLiteral);
                }

            case TokenCategory.BRACE_OPEN:
                var list = List();
                if (CurrentToken == TokenCategory.BRACKET_OPEN)
                {
                    var listI = new ListItem();
                    listI.Add(list);
                    auxiliarMethod(listI);
                    return(listI);
                }
                else
                {
                    return(list);
                }

            default:
                throw new SyntaxError(firstOfSimpleExpression,
                                      tokenStream.Current);
            }
        }
예제 #14
0
 public void Visit(False n)
 {
     Helpers.WriteColor("false", ConsoleColor.DarkMagenta, ConsoleColor.Black);
 }
 public override string ToString()
 {
     return(string.Format("({0} ? {1} : {2})", Test.ToString(), True.ToString(), False.ToString()) + "{" + (Value != null ? Value.ToString() : "(null)") + "}");
 }
예제 #16
0
 public override bool TryGetFalse(out False f)
 {
     f = this;
     return(true);
 }
 public override INotifyExpression <T> ApplyParameters(IDictionary <string, object> parameters)
 {
     return(new ObservableConditionalExpression <T>(Test.ApplyParameters(parameters), True.ApplyParameters(parameters), False.ApplyParameters(parameters)));
 }
예제 #18
0
 public override Expression CopyExpression(CopyState state)
 {
     return(new ConditionalOp(Source, Condition.CopyExpression(state), True.CopyExpression(state), False.CopyExpression(state)));
 }
예제 #19
0
 public IFormula visit(False f)
 {
     return(f);
 }
예제 #20
0
 public virtual bool TryGetFalse(out False f)
 {
     f = null; return(false);
 }
예제 #21
0
 public BuiltInFunctions()
 {
     // Text
     Functions["len"]         = new Len();
     Functions["lower"]       = new Lower();
     Functions["upper"]       = new Upper();
     Functions["left"]        = new Left();
     Functions["right"]       = new Right();
     Functions["mid"]         = new Mid();
     Functions["replace"]     = new Replace();
     Functions["rept"]        = new Rept();
     Functions["substitute"]  = new Substitute();
     Functions["concatenate"] = new Concatenate();
     Functions["char"]        = new CharFunction();
     Functions["exact"]       = new Exact();
     Functions["find"]        = new Find();
     Functions["fixed"]       = new Fixed();
     Functions["proper"]      = new Proper();
     Functions["search"]      = new Search();
     Functions["text"]        = new Text.Text();
     Functions["t"]           = new T();
     Functions["hyperlink"]   = new Hyperlink();
     Functions["value"]       = new Value();
     // Numbers
     Functions["int"] = new CInt();
     // Math
     Functions["abs"]         = new Abs();
     Functions["asin"]        = new Asin();
     Functions["asinh"]       = new Asinh();
     Functions["cos"]         = new Cos();
     Functions["cosh"]        = new Cosh();
     Functions["power"]       = new Power();
     Functions["sign"]        = new Sign();
     Functions["sqrt"]        = new Sqrt();
     Functions["sqrtpi"]      = new SqrtPi();
     Functions["pi"]          = new Pi();
     Functions["product"]     = new Product();
     Functions["ceiling"]     = new Ceiling();
     Functions["count"]       = new Count();
     Functions["counta"]      = new CountA();
     Functions["countblank"]  = new CountBlank();
     Functions["countif"]     = new CountIf();
     Functions["countifs"]    = new CountIfs();
     Functions["fact"]        = new Fact();
     Functions["floor"]       = new Floor();
     Functions["sin"]         = new Sin();
     Functions["sinh"]        = new Sinh();
     Functions["sum"]         = new Sum();
     Functions["sumif"]       = new SumIf();
     Functions["sumifs"]      = new SumIfs();
     Functions["sumproduct"]  = new SumProduct();
     Functions["sumsq"]       = new Sumsq();
     Functions["stdev"]       = new Stdev();
     Functions["stdevp"]      = new StdevP();
     Functions["stdev.s"]     = new Stdev();
     Functions["stdev.p"]     = new StdevP();
     Functions["subtotal"]    = new Subtotal();
     Functions["exp"]         = new Exp();
     Functions["log"]         = new Log();
     Functions["log10"]       = new Log10();
     Functions["ln"]          = new Ln();
     Functions["max"]         = new Max();
     Functions["maxa"]        = new Maxa();
     Functions["median"]      = new Median();
     Functions["min"]         = new Min();
     Functions["mina"]        = new Mina();
     Functions["mod"]         = new Mod();
     Functions["average"]     = new Average();
     Functions["averagea"]    = new AverageA();
     Functions["averageif"]   = new AverageIf();
     Functions["averageifs"]  = new AverageIfs();
     Functions["round"]       = new Round();
     Functions["rounddown"]   = new Rounddown();
     Functions["roundup"]     = new Roundup();
     Functions["rand"]        = new Rand();
     Functions["randbetween"] = new RandBetween();
     Functions["rank"]        = new Rank();
     Functions["rank.eq"]     = new Rank();
     Functions["rank.avg"]    = new Rank(true);
     Functions["quotient"]    = new Quotient();
     Functions["trunc"]       = new Trunc();
     Functions["tan"]         = new Tan();
     Functions["tanh"]        = new Tanh();
     Functions["atan"]        = new Atan();
     Functions["atan2"]       = new Atan2();
     Functions["atanh"]       = new Atanh();
     Functions["acos"]        = new Acos();
     Functions["acosh"]       = new Acosh();
     Functions["var"]         = new Var();
     Functions["varp"]        = new VarP();
     Functions["large"]       = new Large();
     Functions["small"]       = new Small();
     Functions["degrees"]     = new Degrees();
     // Information
     Functions["isblank"]    = new IsBlank();
     Functions["isnumber"]   = new IsNumber();
     Functions["istext"]     = new IsText();
     Functions["isnontext"]  = new IsNonText();
     Functions["iserror"]    = new IsError();
     Functions["iserr"]      = new IsErr();
     Functions["error.type"] = new ErrorType();
     Functions["iseven"]     = new IsEven();
     Functions["isodd"]      = new IsOdd();
     Functions["islogical"]  = new IsLogical();
     Functions["isna"]       = new IsNa();
     Functions["na"]         = new Na();
     Functions["n"]          = new N();
     // Logical
     Functions["if"]      = new If();
     Functions["iferror"] = new IfError();
     Functions["ifna"]    = new IfNa();
     Functions["not"]     = new Not();
     Functions["and"]     = new And();
     Functions["or"]      = new Or();
     Functions["true"]    = new True();
     Functions["false"]   = new False();
     // Reference and lookup
     Functions["address"] = new Address();
     Functions["hlookup"] = new HLookup();
     Functions["vlookup"] = new VLookup();
     Functions["lookup"]  = new Lookup();
     Functions["match"]   = new Match();
     Functions["row"]     = new Row()
     {
         SkipArgumentEvaluation = true
     };
     Functions["rows"] = new Rows()
     {
         SkipArgumentEvaluation = true
     };
     Functions["column"] = new Column()
     {
         SkipArgumentEvaluation = true
     };
     Functions["columns"] = new Columns()
     {
         SkipArgumentEvaluation = true
     };
     Functions["choose"]   = new Choose();
     Functions["index"]    = new Index();
     Functions["indirect"] = new Indirect();
     Functions["offset"]   = new Offset()
     {
         SkipArgumentEvaluation = true
     };
     // Date
     Functions["DATEDIF"]          = new DATEDIF();
     Functions["date"]             = new Date();
     Functions["today"]            = new Today();
     Functions["now"]              = new Now();
     Functions["day"]              = new Day();
     Functions["month"]            = new Month();
     Functions["year"]             = new Year();
     Functions["time"]             = new Time();
     Functions["hour"]             = new Hour();
     Functions["minute"]           = new Minute();
     Functions["second"]           = new Second();
     Functions["weeknum"]          = new Weeknum();
     Functions["weekday"]          = new Weekday();
     Functions["days360"]          = new Days360();
     Functions["yearfrac"]         = new Yearfrac();
     Functions["edate"]            = new Edate();
     Functions["eomonth"]          = new Eomonth();
     Functions["isoweeknum"]       = new IsoWeekNum();
     Functions["workday"]          = new Workday();
     Functions["networkdays"]      = new Networkdays();
     Functions["networkdays.intl"] = new NetworkdaysIntl();
     Functions["datevalue"]        = new DateValue();
     Functions["timevalue"]        = new TimeValue();
     // Database
     Functions["dget"]     = new Dget();
     Functions["dcount"]   = new Dcount();
     Functions["dcounta"]  = new DcountA();
     Functions["dmax"]     = new Dmax();
     Functions["dmin"]     = new Dmin();
     Functions["dsum"]     = new Dsum();
     Functions["daverage"] = new Daverage();
     Functions["dvar"]     = new Dvar();
     Functions["dvarp"]    = new Dvarp();
     //Financial
     Functions["Pmt"]  = new PMT();
     Functions["Rate"] = new Rate();
 }
 //-----------------------------------------------------------
 private Type Visit(False node, Table table)
 {
     return(Type.BOOLEAN);
 }
        public void CompareTo()
        {
            switch (comparisonType)
            {
            case ComparisonType.Equal:
                if (firstValue == secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.NotEqual:
                if (firstValue != secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.Greater:
                if (firstValue > secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.Less:
                if (firstValue < secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.GreaterOrEqual:
                if (firstValue >= secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;

            case ComparisonType.LessOrEqual:
                if (firstValue <= secondValue)
                {
                    True.Invoke();
                }
                else
                {
                    False.Invoke();
                }
                break;
            }
        }
 public SemanticAtom Visit(False n)
 {
     return(null);
 }
예제 #25
0
 public IFormula visit(False f)
 {
     return(new True());
 }
 public SemanticAtom Visit(False n)
 {
     n.RealizedType = Primitive.Boolean;
     return(n.RealizedType);
 }