automaton

Moving from state to state in this automaton via HashMap

I'm using this method to move from a state to the next on this automaton simulator: public void processString (String string){ StringBuilder stepString= new StringBuilder (string); int actualStateIntIndex; System.out.println("THE FOUND INITIAL ONE IS "+ theInitialStateIntIndex); State firstState = allStates.get(theInitial...

How should I implement this HashMap's equals and hashCode methods to represent an automaton state?

I want to put State objects (which are HashMaps with Character as key and State as Value into an ArrayList named allStates. Should I override the equals and hashCode methods here? Why? How? This code is for the Automaton and State classes I've built so far: class State extends HashMap<Character, State>{ boolean isFinal; boolean isIni...

Implement a finite state automaton in OOP

I am thinking about implementing a program with finite state automaton in an OOP language like Java or C++. What would you think is the best way to implement this with a manageable amount of available states, regarding to good software design? Is it good to implement for each state an own class? If yes, how to do the bridge between two...

I have to parse a complicated string format. Is implementing an automaton a sensible approach?

I am currently struggling with a particularly obnoxious string format that I have to parse. The strings can contain substrings that denote a variable property that has to be resolved. Imagine something like "ThisExampleStringContainsA[VARIABLE_PROPERTY]". Also, these properties can be arbitrarily nested and also they can have different m...

NFA/DFA implementation in C#

Good night, Does anyone know of any good NFA and DFA implementation in C#, possibly implementing as well conversions between both? What I would like would be to be able to construct a NFA and then convert it automatically to a DFA, but without having to write my own code which would take a very long time. There is this Python code which...