The theory of parsing, translation, and compiling
The theory of parsing, translation, and compiling
Resolving non-determinism in NFA
CompSysTech '03 Proceedings of the 4th international conference conference on Computer systems and technologies: e-Learning
Compilers: Principles, Techniques, and Tools (2nd Edition)
Compilers: Principles, Techniques, and Tools (2nd Edition)
Hi-index | 0.00 |
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.