Module: Stamina::RegLang::Symbol

Includes:
Node
Defined in:
lib/stamina-induction/stamina/reg_lang/parser/symbol.rb

Instance Method Summary collapse

Methods included from Node

#to_cdfa, #to_dfa, #to_fa

Instance Method Details

#to_fa!(fa) ⇒ Object



6
7
8
9
10
# File 'lib/stamina-induction/stamina/reg_lang/parser/symbol.rb', line 6

def to_fa!(fa)
  from, to = fa.add_n_states(2, :initial => false, :accepting => false)
  fa.connect(from, to, to_s)
  [from, to]
end