You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/DeterministicFiniteAutomaton/DFA.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@
25
25
importcommon.Symbol;
26
26
importcommon.ValidationMessage;
27
27
28
+
importstaticcommon.SymbolConstants.*;
29
+
28
30
/**
29
31
* Represents a Deterministic Finite Automaton (DFA).
30
32
* This class provides functionality to parse, validate, and execute DFAs,
@@ -542,8 +544,8 @@ private State validateState(String name,
542
544
messages.add(newValidationMessage("State '" + name + "' is not defined in 'states'.", line, ValidationMessage.ValidationMessageType.ERROR));
543
545
}
544
546
545
-
if (name.equalsIgnoreCase("eps")) {
546
-
messages.add(newValidationMessage("The state name 'eps' is reserved and cannot be used.", line, ValidationMessage.ValidationMessageType.ERROR));
547
+
if (isEpsilonInput(name)) {
548
+
messages.add(newValidationMessage("The state name '" + EPSILON_INPUT + "' is reserved and cannot be used.", line, ValidationMessage.ValidationMessageType.ERROR));
0 commit comments