*** empty log message ***
[m17n/m17n-lib-cs.git] / xex.cs
diff --git a/xex.cs b/xex.cs
index 6b3a690..e54178c 100644 (file)
--- a/xex.cs
+++ b/xex.cs
@@ -2,16 +2,20 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Xml;
-using System.Xml.Expression;
+using Xex = System.Xml.Xexpression;
 
 public class Test
 {
-  public static void Main()
+  public static void Main(params string[] args)
   {
-    Xexpression.Domain domain = new Xexpression.Domain (null);
-    Xexpression xex = new Xexpression ("xex.xml", domain);
+    Xex.TraceDepth = 10;
+    Xex.Domain domain = new Xex.Domain ("test", null);
+    Xex.Term[] terms = Xex.Parse (domain, "xex.xml");
 
-    Xexpression.debug_level = 1;
-    Console.WriteLine (xex.Eval (domain));
+    if (args.Length >= 2 && args[0] == "-d")
+      Xex.TraceDepth = int.Parse (args[1]);
+    foreach (Xex.Term term in terms)
+      Console.WriteLine (term);
+    Console.WriteLine (Xex.Eval (domain, terms));
   }
 }