This is a implmentation of a Finite Automata that accepts a machine defination. After accepting the machine defination the program interprets it and load the automata rules into the memory.
The sample input file looks as :
2 0 1
5 A B C D E
1 D
B E
C E
C B
C E
E EHere as shown above
1st line : #ipsymbols and The Input symbols of the automata
2nd line : #of states and States of automata
3rd line : #of final state and final states
Rest of Lines : Transition rules of the states.
The compile and run process assumes that you have g++ compiler installed.
Sample compile is as :
g++ -c state.cpp
g++ -c fsm.cpp
g++ automata.cpp state.o fsm.o -o automataSo now you have a executable file automata, Run as :
./automatafsm.cpp: All the Finite state machine function definationsautomata.cpp: The automata main code, based on the fsm libraryfsm.h: The header file for fsm librarystate.cpp: State class that resembles the states of fsmstate.h: Header file for state library