public class HaskellHelper {
- public static Tree main(String grammarFile, String targetFile) throws Throwable {
+ public static void main(String[] argv) throws Throwable {
+ help(argv[0], argv[1]);
+ }
+ public static boolean isNull(Object o) { return o==null; }
+ 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",
}
*/
});
- Tree ret = new CharParser(meta).parse(new FileInputStream(targetFile)).expand1();
+ System.out.println();
+ System.out.println();
+ System.out.println();
+ CharInput input = new CharInput(new FileInputStream(targetFile), "", true);
+ Tree ret = new CharParser(meta).parse(input).expand1();
if (ret==null) throw new NullPointerException("CharParser returned null");
return ret;
} catch (Throwable e) {