Example #1
0
 private void Init(string scriptSrc, byte[] data)
 {
     Data        = new BinaryData(data);
     SymbolTable = SymbolTable.CreateRootSymbolTable();
     Script      = LayoutScript.Parse(scriptSrc);
     Interpreter = new LayoutInterpreter(Script, _outputWriter);
 }
Example #2
0
        /// <summary>
        /// Executes a <see cref="LayoutScript"/> on the binary data.
        /// <param name="script">The layout script to run.</param>
        /// <param name="scriptOutputWriter">A <see cref="TextWriter"/> to which
        /// textual output from the script will be written.</param>
        /// </summary>
        public void RunLayoutScript(LayoutScript script, TextWriter scriptOutputWriter)
        {
            LayoutInterpreter interpreter = new LayoutInterpreter(script, scriptOutputWriter);

            interpreter.Execute(fileStructure.Symbol, this);
        }