+ Forest<String> res = null;
+ ParseFailed pfe = null;
+ CharParser parser = new CharParser(grammar);
+ //parser.helpgc = false;
+ try {
+ res = tib
+ ? /*new CharParser(grammar).parse(new Tib(input))*/ null
+ : parser.parse(new StringReader(input));
+ } catch (ParseFailed pf) {
+ pfe = pf;
+ }
+ //ystem.out.println("res=="+res);
+
+ if (graph) {
+ FileOutputStream fos = new FileOutputStream("out.dot");
+ PrintWriter p = new PrintWriter(new OutputStreamWriter(fos));
+ GraphViz gv = new GraphViz();
+ res.toGraphViz(gv);
+ gv.dump(p);
+ p.flush();
+ p.close();
+ System.out.println(parser);
+ }