From c6ae480838b267584213591927c437da5863e34c Mon Sep 17 00:00:00 2001 From: jjenista Date: Tue, 15 Apr 2008 20:48:57 +0000 Subject: [PATCH] Before writing a dot file, remove all symbols that confuse the dot syntax from the graph's name. --- Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java b/Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java index fac5e59b..ac816503 100644 --- a/Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java +++ b/Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java @@ -55,6 +55,9 @@ public class FlatIRGraph { labelindex=0; labelFlatNodes( fm ); + // take symbols out of graphname that cause dot to fail + graphname = graphname.replaceAll( "[\\W]", "" ); + flatbw=new BufferedWriter( new FileWriter( graphname+"_flatIRGraph.dot" ) ); flatbw.write("digraph "+graphname+" {\n"); -- 2.34.1