Class: Hoozuki::Automaton::DFA::Builder
- Inherits:
-
Object
- Object
- Hoozuki::Automaton::DFA::Builder
- Defined in:
- lib/hoozuki/automaton/dfa/builder.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(nfa, use_cache) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(nfa, use_cache) ⇒ Builder
Returns a new instance of Builder.
7 8 9 10 11 12 13 |
# File 'lib/hoozuki/automaton/dfa/builder.rb', line 7 def initialize(nfa, use_cache) @nfa = nfa @use_cache = use_cache @dfa_states = {} @queue = [] @nfa_accept_set = nfa.accept.to_set end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 |
# File 'lib/hoozuki/automaton/dfa/builder.rb', line 15 def call initialize_dfa process_states @dfa end |