Sha256: a61aaf86e3c0b2d798e0d981afd21cf10714c084e46822730d1e8fc7f8032175

Contents?: true

Size: 442 Bytes

Versions: 7

Compression:

Stored size: 442 Bytes

Contents

module Stamina
  class RegLang
    module Alternative
      include Node

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

    end # module Alternative
  end # class RegLang
end # module Stamina

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stamina-induction-0.6.1 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.6.0 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.5.4 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.5.3 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.5.2 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.5.1 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb
stamina-induction-0.5.0 lib/stamina-induction/stamina/reg_lang/parser/alternative.rb