adjust misc for changes in meta
[sbp.git] / src / edu / berkeley / sbp / misc / HaskellHelper.java
index b94c30f..e544441 100644 (file)
@@ -18,9 +18,8 @@ public class HaskellHelper {
     public static Tree help0(String grammarFile, String targetFile) throws Throwable {
         try {
             Tree<String> res = new CharParser(MetaGrammar.newInstance()).parse(new FileInputStream(grammarFile)).expand1();
-            Union meta = Grammar.create(res, "s",
+            Union meta = Grammar.create(res, "s" /*,
                                         new Grammar.Bindings() {
-                                            
                                             public Sequence createSequence(Production p) {
                                                 Element[] els = p.elements;
                                                 if (p.tag != null)
@@ -31,10 +30,10 @@ public class HaskellHelper {
                                                         if (idx==-1) idx = i;
                                                         else return Sequence.create(p.nonTerminal, p.elements, p.drops, false);
                                                 if (idx != -1) return Sequence.create(els, idx);
-                                                else           return Sequence.create(els, null);
+                                                else           return Sequence.create(els, "");
                                             }
                                             
-                                        });
+                                            }*/);
             System.out.println();
             System.out.println();
             CharInput input = new CharInput(new FileInputStream(targetFile), "", true);
@@ -50,9 +49,8 @@ public class HaskellHelper {
     public static Tree help(String grammarFile, String targetFile) throws Throwable {
         try {
             Tree<String> res = new CharParser(MetaGrammar.newInstance()).parse(new FileInputStream(grammarFile)).expand1();
-            Union meta = Grammar.create(res, "s",
+            Union meta = Grammar.create(res, "s" /*,
                                         new Grammar.Bindings() {
-                                            
                                             public Sequence createSequence(Production p) {
                                                 Element[] els = p.elements;
                                                 if (p.tag != null && !"".equals(p.tag))
@@ -63,10 +61,10 @@ public class HaskellHelper {
                                                         if (idx==-1) idx = i;
                                                         else return Sequence.create(p.nonTerminal, p.elements, p.drops, false);
                                                 if (idx != -1) return Sequence.create(els, idx);
-                                                else           return Sequence.create(els, null);
+                                                else           return Sequence.create(els, "");
                                             }
                                             
-                                        });
+                                            }*/);
             System.out.println();
             System.out.println();
             //CharInput input = new CharInput(new FileInputStream(targetFile), "", true);