An adaptable FSA simulator

The paper describes the author's experience in building applications that simulate the behaviour of finite state machine or finite state automata /FSM, FSA/ as recognizers of strings that belong to automata languages or languages defined with regular expressions or languages defined with linear grammars. The solution of two tasks is being discussed: First, the external and internal representation of the FSA transition function. Second, the implementation of an algorithm to simulate FSA behaviour. The principle to fill the transition table at run time after reading data for internal states, valid input characters and transition function produces a flexible universal table-driven adaptable FSA simulator. The program illustrates the lectures given in the COS401 Compiler Theory course at the American University in Bulgaria.