X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fmisc%2FHaskellHelper.java;h=e54444125227b5e29c6a189feddfff14415c7572;hp=b94c30f554eaa298f626bbc7c91137740ec12cf3;hb=16460a4ebf976fddbcb4dd79f1fa0b010d61602b;hpb=f8adfc66d98670be6553965d7ee9e6c998a4e0a6 diff --git a/src/edu/berkeley/sbp/misc/HaskellHelper.java b/src/edu/berkeley/sbp/misc/HaskellHelper.java index b94c30f..e544441 100644 --- a/src/edu/berkeley/sbp/misc/HaskellHelper.java +++ b/src/edu/berkeley/sbp/misc/HaskellHelper.java @@ -18,9 +18,8 @@ public class HaskellHelper { public static Tree help0(String grammarFile, String targetFile) throws Throwable { try { Tree 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 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);