コード例 #1
0
 public static void SetDelayed(this OsmiumEngine engine, Value lhs, Value rhs)
 {
     engine.Evaluate(engine.Expr(engine.System.SetDelayed,
                                 lhs,
                                 rhs
                                 ));
 }
コード例 #2
0
ファイル: OsmiumEngine.cs プロジェクト: profMagija/Osmium
 public SymbolTable(OsmiumEngine engine)
 {
     _engine  = engine;
     _symbols = new Dictionary <string, Symbol>();
 }
コード例 #3
0
 public static ExpressionValue List(this OsmiumEngine engine, params Value[] values)
 {
     return(engine.Expr(engine.System.List, values));
 }
コード例 #4
0
        public SystemSymbols(OsmiumEngine e)
        {
            All                = e.GetSymbol("System`", "All");
            Append             = e.GetSymbol("System`", "Append");
            Apply              = e.GetSymbol("System`", "Apply");
            True               = e.GetSymbol("System`", "True");
            False              = e.GetSymbol("System`", "False");
            Symbol             = e.GetSymbol("System`", "Symbol");
            List               = e.GetSymbol("System`", "List");
            Association        = e.GetSymbol("System`", "Association");
            Blank              = e.GetSymbol("System`", "Blank");
            BlankSequence      = e.GetSymbol("System`", "BlankSequence");
            BlankNullSequence  = e.GetSymbol("System`", "BlankNullSequence");
            Pattern            = e.GetSymbol("System`", "Pattern");
            PatternTest        = e.GetSymbol("System`", "PatternTest");
            Sequence           = e.GetSymbol("System`", "Sequence");
            Set                = e.GetSymbol("System`", "Set");
            SetDelayed         = e.GetSymbol("System`", "SetDelayed");
            UpSet              = e.GetSymbol("System`", "UpSet");
            UpSetDelayed       = e.GetSymbol("System`", "UpSetDelayed");
            TagSet             = e.GetSymbol("System`", "TagSet");
            TagSetDelayed      = e.GetSymbol("System`", "TagSetDelayed");
            Unset              = e.GetSymbol("System`", "Unset");
            TagUnset           = e.GetSymbol("System`", "TagUnset");
            Null               = e.GetSymbol("System`", "Null");
            String             = e.GetSymbol("System`", "String");
            Integer            = e.GetSymbol("System`", "Integer");
            Real               = e.GetSymbol("System`", "Real");
            Rational           = e.GetSymbol("System`", "Rational");
            Complex            = e.GetSymbol("System`", "Complex");
            Get                = e.GetSymbol("System`", "Get");
            Slot               = e.GetSymbol("System`", "Slot");
            SlotSequence       = e.GetSymbol("System`", "SlotSequence");
            Optional           = e.GetSymbol("System`", "Optional");
            MessageName        = e.GetSymbol("System`", "MessageName");
            Part               = e.GetSymbol("System`", "Part");
            Increment          = e.GetSymbol("System`", "Increment");
            Decrement          = e.GetSymbol("System`", "Decrement");
            PreIncrement       = e.GetSymbol("System`", "PreIncrement");
            PreDecrement       = e.GetSymbol("System`", "PreDecrement");
            Composition        = e.GetSymbol("System`", "Composition");
            RightComposition   = e.GetSymbol("System`", "RightComposition");
            Map                = e.GetSymbol("System`", "Map");
            MapAll             = e.GetSymbol("System`", "MapAll");
            Factorial          = e.GetSymbol("System`", "Factorial");
            Factorial2         = e.GetSymbol("System`", "Factorial2");
            Conjugate          = e.GetSymbol("System`", "Conjugate");
            Transpose          = e.GetSymbol("System`", "Transpose");
            ConjugateTranspose = e.GetSymbol("System`", "ConjugateTranspose");
            Derivative         = e.GetSymbol("System`", "Derivative");
            StringJoin         = e.GetSymbol("System`", "StringJoin");
            Times              = e.GetSymbol("System`", "Times");
            Plus               = e.GetSymbol("System`", "Plus");
            PlusMinus          = e.GetSymbol("System`", "PlusMinus");
            MinusPlus          = e.GetSymbol("System`", "MinusPlus");
            Power              = e.GetSymbol("System`", "Power");
            Equal              = e.GetSymbol("System`", "Equal");
            Unequal            = e.GetSymbol("System`", "Unequal");
            Greater            = e.GetSymbol("System`", "Greater");
            GreaterEqual       = e.GetSymbol("System`", "GreaterEqual");
            Less               = e.GetSymbol("System`", "Less");
            LessEqual          = e.GetSymbol("System`", "LessEqual");
            Inequality         = e.GetSymbol("System`", "Inequality");
            SameQ              = e.GetSymbol("System`", "SameQ");
            UnsameQ            = e.GetSymbol("System`", "UnsameQ");
            Not                = e.GetSymbol("System`", "Not");
            Or                 = e.GetSymbol("System`", "Or");
            And                = e.GetSymbol("System`", "And");
            Repeated           = e.GetSymbol("System`", "Repeated");
            RepeatedNull       = e.GetSymbol("System`", "RepeatedNull");
            Alternatives       = e.GetSymbol("System`", "Alternatives");
            StringExpression   = e.GetSymbol("System`", "StringExpression");
            Condition          = e.GetSymbol("System`", "Condition");
            TwoWayRule         = e.GetSymbol("System`", "TwoWayRule");
            Rule               = e.GetSymbol("System`", "Rule");
            DelayedRule        = e.GetSymbol("System`", "DelayedRule");
            ReplaceAll         = e.GetSymbol("System`", "ReplaceAll");
            ReplaceRepeated    = e.GetSymbol("System`", "ReplaceRepeated");
            AddTo              = e.GetSymbol("System`", "AddTo");
            SubtractFrom       = e.GetSymbol("System`", "SubtractFrom");
            TimesBy            = e.GetSymbol("System`", "TimesBy");
            DivideBy           = e.GetSymbol("System`", "DivideBy");
            Function           = e.GetSymbol("System`", "Function");
            Put                = e.GetSymbol("System`", "Put");
            PutAppend          = e.GetSymbol("System`", "PutAppend");
            CompoundExpression = e.GetSymbol("System`", "CompoundExpression");
            SPreRead           = e.GetSymbol("System`", "$PreRead");
            SSyntaxHandler     = e.GetSymbol("System`", "$SyntaxHandler");
            SPre               = e.GetSymbol("System`", "$Pre");
            SPost              = e.GetSymbol("System`", "$Post");
            SPrePrint          = e.GetSymbol("System`", "$PrePrint");
            In                 = e.GetSymbol("System`", "In");
            InString           = e.GetSymbol("System`", "InString");
            Out                = e.GetSymbol("System`", "Out");
            MessageList        = e.GetSymbol("System`", "MessageList");
            SMessageList       = e.GetSymbol("System`", "$MessageList");
            SFailed            = e.GetSymbol("System`", "$Failed");
            SLine              = e.GetSymbol("System`", "$Line");

            Init();
        }