public static FxtLog Run(XmlSchemaSet schemas, XElement trafo, interpreter i)
        {
            var trafos = new List <IFxtTransformation>();
            var log    = new FxtLog();

            // Compile if necessary
            if (!schemas.IsCompiled)
            {
                schemas.Compile();
            }
            if (trafo == null)
            {
                return(log);
            }

            // Interpret trafo
            i(schemas, trafo, log, trafos);

            // Execute trafos
            foreach (var x in trafos)
            {
                x.Run();
            }

            // Re-compile
            foreach (var x in schemas.XmlSchemas())
            {
                schemas.Reprocess(x);
            }
            schemas.Compile();
            return(log);
        }
        public static FxtLog Run(XmlSchemaSet schemas, XElement trafo, interpreter i)
        {
            FxtLog fxtLog;
            List <IFxtTransformation> trafos = new List <IFxtTransformation>();
            FxtLog log = new FxtLog();

            if (!schemas.IsCompiled)
            {
                schemas.Compile();
            }
            if (trafo != null)
            {
                i(schemas, trafo, log, trafos);
                foreach (IFxtTransformation x in trafos)
                {
                    x.Run();
                }
                foreach (XmlSchema x in schemas.XmlSchemas())
                {
                    schemas.Reprocess(x);
                }
                schemas.Compile();
                fxtLog = log;
            }
            else
            {
                fxtLog = log;
            }
            return(fxtLog);
        }
示例#3
0
        public static FxtLog Run(XmlSchemaSet schemas, XElement trafo, interpreter i) 
        {
            var trafos = new List<IFxtTransformation>();
            var log = new FxtLog();

            // Compile if necessary
            if (!schemas.IsCompiled)
                schemas.Compile();
            if (trafo==null)
                return log;

            // Interpret trafo
            i(schemas, trafo,log,trafos);

            // Execute trafos
            foreach (var x in trafos) 
                x.Run();

            // Re-compile
            foreach (var x in schemas.XmlSchemas())
                schemas.Reprocess(x);
            schemas.Compile();                
            return log;
        }
示例#4
0
    // Use this for initialization
    void Start()
    {
        var inter = new interpreter("1291-1254");

        Debug.Log("计算结果" + inter.expr());
    }
示例#5
0
	// Use this for initialization
	void Start () {
        var inter = new interpreter("1291-1254");
        Debug.Log("计算结果" + inter.expr());

	}