java - Modeling DFA and NFA using HashMap Implementation -
i have implement following operations on automata in java:
- concatenation
- kleene star
- union
- intersection
those operations easier if automaton nfa. liked implementation given in following link modelling finite deterministic automaton via data think not fit when modeling nfa, because of key uniqueness restriction. recommend me workaround modeling nfas?
as implemented these operations once (when building scanner generator), recommend building automaton nfa, using algorithm subset construction or thompson's algorithm convert down dfa. keeps logic combining automata simple , elegant without sacrificing speed of resulting matching automaton.
hope helps!
Comments
Post a Comment