First conversion of pattern matching code to external complete