The out of orderness was actually the fault of the dot graphing program, not Kraken, so that's good news. DOT generation has also been modified so that it properly inserts \n's (actually \n's) where line returns are so that dot can parse the \n and not the line return.
This commit is contained in:
1 parent
b292bd15ae
commit
ea42cb5bc7
4 files changed
+23
-9
No files matched your search
+6
-7
@@ -5,15 +5,11 @@
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#include <util.h>
|
||||
//#include <Symbol.h>
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
//Circular references
|
||||
//class Symbol;
|
||||
#include "util.h"
|
||||
|
||||
template<class T>
|
||||
class NodeTree {
|
||||
@@ -227,9 +223,12 @@ std::string NodeTree<T>::DOTGraphStringHelper() {
|
||||
|
||||
template<class T>
|
||||
std::string NodeTree<T>::getDOTName() {
|
||||
std::string DOTName = "";
|
||||
if (data != NULL)
|
||||
return "\"" + name + "-" + data->toString() + "_" + intToString(id) + "\""; //Note that terminals already have a quote in the front of their name, so we don't need to add one
|
||||
return "\"" + name + "_" + intToString(id) + "\"";
|
||||
DOTName = "\"" + name + "-" + data->toString() + "_" + intToString(id) + "\""; //Note that terminals already have a quote in the front of their name, so we don't need to add one
|
||||
else
|
||||
DOTName = "\"" + name + "_" + intToString(id) + "\"";
|
||||
return(replace(DOTName, "\n", "\\n"));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -5,11 +5,13 @@
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
//#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
std::string intToString(int theInt);
|
||||
std::string truncateEnd(std::string to_truncate);
|
||||
std::string removeBeginning(std::string to_remove);
|
||||
std::string replace(std::string first, std::string search, std::string replace);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user