Package att.grappa

Examples of att.grappa.Parser


      original = new File(projectRoot, "test/dotFiles/cfg/saved/"
          + testName);
      if (!original.exists())
        throw new FileNotFoundException(original.getAbsolutePath());

      Parser graphParser = new Parser(new FileInputStream(original));
      Graph realGraph;

      graphParser.parse();
      realGraph = graphParser.getGraph();
      return areGraphsEqual(testGraph, realGraph);
    } finally {
      outStream.close();
    }
  }
View Full Code Here


      outStream = new FileOutputStream(out);
      testGraph.printGraph(outStream);

      original = new File(projectRoot, "test/" + testName);
      if (original.exists()) {
        Parser graphParser = new Parser(new FileInputStream(original));
        Graph realGraph;

        graphParser.parse();
        realGraph = graphParser.getGraph();
        if (!CFGTestUtils.areGraphsEqual(testGraph, realGraph))
          System.err.println("Failed test: " + testName);
        else
          System.out.println("Passed test: " + testName);
      } else {
View Full Code Here

    out.close();

    if (doCompare) {
      InputStream original = new FileInputStream("test/" + subFolder
          + "_" + file);
      Parser graphParser = new Parser(original);
      Graph realGraph;

      graphParser.parse();
      realGraph = graphParser.getGraph();

      Assert
          .assertTrue(CFGTestUtils.areGraphsEqual(testGraph,
              realGraph));
    }
View Full Code Here

    setViewportView(grappa);
  }
 
  public void drawGraph(Reader reader){   
      try {
        Parser program = new Parser(reader, new PrintWriter(System.err), diagram);
        program.parse();
//        diagram.printGraph(new PrintWriter(System.err));
        diagram.repaint()
      } catch(Exception ex) {
        System.err.println("Exception: " + ex.getMessage());
      }
View Full Code Here

            try {
          graphSrc = Util.getAsString(r);
          r.close();
          graphFinal = graphSrc.substring(1, graphSrc.indexOf("{") + 2) + " graph [fontsize=10] edge [fontsize=10, color=black] node [fontsize=10, color=palegreen] " + graphSrc.substring(graphSrc.indexOf("{") + 2, graphSrc.length() -1);

          Parser parser = new Parser(new ByteArrayInputStream((graphFinal.getBytes())));
          parser.parse();
        }
        catch(Exception exc) {
           exc.printStackTrace();
           System.out.println(graphSrc);
           error = true;
View Full Code Here

TOP

Related Classes of att.grappa.Parser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.