Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            grammar = new MathGrammar();
            language = new LanguageData(grammar);
            parser = new Parser(language);
        }
Ejemplo n.º 2
0
        //Default constructor, creates default evaluator
        public ExpressionEvaluator(MathGrammar grammar)
        {
            Grammar = grammar;
            Language = new LanguageData(Grammar);
            Parser = new Parser(Language);
            Runtime = Grammar.CreateRuntime(Language);
            App = new ScriptApp(Runtime);

            Globals.Add("null", Runtime.NoneValue);
            Globals.Add("true", true);
            Globals.Add("false", false);
        }