I'm doing a lot of code analysis using lexer and finite state machine. For time being I'm using table to describe FSM:
| token | current state | target state | +-------+---------------+--------------+ | . | start | dot | | trace | dot | method | | ( | method | detected |
Using this table and implicit
start state FSM is created:
Lexer is used to generate a stream of tokens and token used as trigger for state transition. In case transition from current state is impossible - FSM is set to
Using table to describe FSM is alright for fairly small number of states, but it gets complicated fairly quickly. Google search suggested very few interesting results:
- MOP FSM plugin by Formal Systems Laboratory.
So the question is there standard or de facto language to describe finite state machines?