Expand Kleene operators into recursion as described in section 4.2.2