Module: Stamina::RegLang::Question

Includes:
Node
Defined in:
lib/stamina-induction/stamina/reg_lang/parser/question.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
11
12
13
# File 'lib/stamina-induction/stamina/reg_lang/parser/question.rb', line 6

def to_fa!(fa)
  f1, t1 = fa.add_n_states(2)
  f2, t2 = self.term.to_fa!(fa)
  fa.connect(f1,f2,nil)
  fa.connect(t2,t1,nil)
  fa.connect(f1,t1,nil)
  [f1, t1]
end