Method: Kleene::DSL#append
- Defined in:
- lib/kleene/dsl.rb
#append(a, b) ⇒ Object
Append b onto a Appending produces a machine that matches all the strings in machine a followed by all the strings in machine b. This differs from ‘seq` in that the composite machine’s final states are the union of machine a’s final states and machine b’s final states.
118 119 120 121 122 |
# File 'lib/kleene/dsl.rb', line 118 def append(a, b) a = a.deep_clone b = b.deep_clone append!(a, b) end |