checkpoint
[sbp.git] / src / edu / berkeley / sbp / tib / TibDoc.java
index 538d808..553397b 100644 (file)
@@ -3,25 +3,24 @@
 // You may not use this file except in compliance with the License.
 
 package edu.berkeley.sbp.tib;
-//import org.ibex.util.*;
-//import org.ibex.io.*;
 import edu.berkeley.sbp.*;
 import edu.berkeley.sbp.misc.*;
 import edu.berkeley.sbp.util.*;
+import edu.berkeley.sbp.chr.*;
 import java.util.*;
 import java.io.*;
 
 public class TibDoc {
-    
+
     public static void main(String[] s) throws Exception {
         System.out.println("parsing " + s[0]);
-        Tree<String> res = new CharToken.CharToStringParser(MetaGrammar.make()).parse(new CharToken.Stream(new FileInputStream(s[0]))).expand1();
+        Tree<String> res = new CharParser(MetaGrammar.make()).parse(new FileInputStream(s[0])).expand1();
         MetaGrammar gram = (MetaGrammar)new Tib.Grammar().walk(res);
         //System.out.println(gram);
         Union mg = gram.done();
         
         System.out.println("\nparsing " + s[1]);
-        Forest f = new CharToken.CharToStringParser(mg).parse(new Tib(new FileInputStream(s[1])));
+        Forest f = new CharParser(mg).parse(new Tib(new FileInputStream(s[1])));
 
         System.out.println();
         System.out.println(f);
@@ -63,6 +62,7 @@ public class TibDoc {
     public static class HTMLWalker extends ReflectiveWalker {
         //public void header() { throw new Error(); }
         public String li(Object o) { return "<li>"+o+"</li>"; }
+        public String li(Object a, Object o) { return "<li>"+o+"</li>"; }
         public String ul(String[] li) { return "<ul>"+join(li,"")+"</ul>"; }
         public String ol(String[] li) { return "<ol>"+join(li,"")+"</ol>"; }
         public String hr() { return "\n<hr/>\n"; }