Bugfixes, updated graphviz lib

This commit is contained in:
2017-06-12 10:38:21 +02:00
parent a1d00818c3
commit 7f56cf6932
4 changed files with 9 additions and 5 deletions
Binary file not shown.
+2 -1
View File
@@ -102,7 +102,8 @@ public class FileParser {
String line = "Error"; String line = "Error";
line = br.readLine(); line = br.readLine();
RegExp regex = RegExp.naarRegExp(line); RegExp regex = new RegExp();
regex = regex.naarRegExp(line);
return regex; return regex;
} }
+3 -3
View File
@@ -41,7 +41,7 @@ public class RegExp extends Importable{
rechts = null; rechts = null;
} }
public static RegExp loopRecursiefDoorString(String s, RegExp r) { public RegExp loopRecursiefDoorString(String s, RegExp r) {
Deque<Integer> start = new ArrayDeque<>(); Deque<Integer> start = new ArrayDeque<>();
Deque<Integer> end = new ArrayDeque<>(); Deque<Integer> end = new ArrayDeque<>();
@@ -83,7 +83,7 @@ public class RegExp extends Importable{
return reg; return reg;
} }
public static RegExp naarRegExp(String s) { public RegExp naarRegExp(String s) {
// String s is zonder spaces // String s is zonder spaces
// RegExp retval = new RegExp(); // RegExp retval = new RegExp();
// Als eerste moet de string in groupen gedeeld worden op basis van haakjes. // Als eerste moet de string in groupen gedeeld worden op basis van haakjes.
@@ -96,7 +96,7 @@ public class RegExp extends Importable{
return r; return r;
} }
public static RegExp stringNaarRegExp(String start, RegExp initieel, Deque<RegExp> alreadyParsed) { public RegExp stringNaarRegExp(String start, RegExp initieel, Deque<RegExp> alreadyParsed) {
ArrayList<RegExp> toOf = new ArrayList<>(); ArrayList<RegExp> toOf = new ArrayList<>();
ArrayList<String> strings = new ArrayList<>(); ArrayList<String> strings = new ArrayList<>();
+4 -1
View File
@@ -51,9 +51,12 @@ public class InputPanel extends JPanel {
String regS = text.getText(); String regS = text.getText();
String name = regS.toLowerCase().trim(); String name = regS.toLowerCase().trim();
text.setText("");
StatusPanel.Instance().setStatus("Parsing REGEX", 20); StatusPanel.Instance().setStatus("Parsing REGEX", 20);
RegExp regex = RegExp.naarRegExp(regS); RegExp regex = new RegExp();
regex = regex.naarRegExp(regS);
StatusPanel.Instance().setStatus("Converting REGEX to NDFA", 40); StatusPanel.Instance().setStatus("Converting REGEX to NDFA", 40);